.product-page {
  --product-blue: #edf7fb;
  --product-blue-strong: #dfeff5;
  --product-white: #fff;
  --product-border: #d4e4e9;
  background: var(--product-white);
}

.product-page .site-header,
.product-page .site-header.scrolled {
  z-index: 103;
  color: var(--ink);
  background: rgba(255, 255, 255, .96);
  border-color: var(--product-border);
  box-shadow: 0 5px 18px rgba(30, 78, 88, .05);
}

.product-page .product-dropdown {
  width: 220px;
  display: grid;
  grid-template-columns: 1fr;
}

.products-hero {
  aspect-ratio: 1920 / 600;
  margin-top: 72px;
  background-color: var(--product-blue);
  background-image: url("product-center-hero.jpg");
  background-position: center;
  background-size: cover;
  border-bottom: 1px solid var(--product-border);
}
.detail-breadcrumb {
  margin: 0 0 34px;
  color: var(--ink-soft);
}

.catalog-section { scroll-margin-top: 72px; padding: 88px 0 108px; background: var(--product-white); }
.product-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 54px; align-items: start; }
.category-panel {
  position: sticky;
  top: 96px;
  padding: 24px 20px;
  background: var(--product-blue);
  border: 1px solid var(--product-border);
}
.category-panel__label {
  margin: 0 0 15px;
  padding: 0 10px 16px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--product-border);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
}
.category-list { display: grid; }
.category-button {
  position: relative;
  width: 100%;
  min-height: 55px;
  padding: 0 30px 0 10px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--product-border);
  cursor: pointer;
  text-align: left;
  transition: color .2s ease, background .2s ease, padding .2s ease;
}
.category-button:last-child { border-bottom: 0; }
.category-button::after { content: "→"; position: absolute; right: 10px; opacity: 0; transition: opacity .2s ease; }
.category-button:hover,
.category-button[aria-selected="true"] { padding-left: 15px; color: var(--accent-deep); background: rgba(255,255,255,.72); font-weight: 700; }
.category-button[aria-selected="true"]::after { opacity: 1; }

.product-results__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 36px; margin-bottom: 34px; }
.product-results__head h2 { margin: 0; font: 600 clamp(30px, 3.5vw, 46px)/1.25 "Noto Serif SC", "Songti SC", Georgia, serif; }
.product-results__head p { max-width: 620px; margin: 15px 0 0; color: var(--ink-soft); font-size: 14px; line-height: 1.8; }
.result-count { flex: 0 0 auto; padding-bottom: 5px; color: var(--ink-soft); font-size: 13px; }
.result-count strong { margin-right: 4px; color: var(--accent); font: 500 26px Georgia, serif; }

.subcategory-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 30px; }
.subcategory-tab {
  min-height: 38px;
  padding: 0 17px;
  color: var(--ink-soft);
  background: var(--product-blue);
  border: 1px solid var(--product-border);
  cursor: pointer;
  font-size: 13px;
  transition: .2s ease;
}
.subcategory-tab:hover,
.subcategory-tab[aria-pressed="true"] { color: #fff; background: var(--accent); border-color: var(--accent); }

.product-catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.catalog-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--product-border);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.catalog-card:hover,
.catalog-card:focus-visible { transform: translateY(-4px); border-color: #9ec3ce; box-shadow: 0 14px 34px rgba(30, 78, 88, .09); }
.catalog-card__image {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / .82;
  padding: 24px;
  overflow: hidden;
  background: var(--product-blue);
  border-bottom: 1px solid var(--product-border);
}
.catalog-card__image img { width: 100%; height: 100%; object-fit: contain; transition: transform .3s ease; }
.catalog-card:hover .catalog-card__image img { transform: scale(1.025); }
.catalog-card--image-only .catalog-card__image {
  aspect-ratio: 4 / 5;
  border-bottom: 0;
}
.catalog-card--image-only .catalog-card__image img {
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: scale-down;
}
.catalog-card--image-only:hover .catalog-card__image img,
.catalog-card--image-only:focus-visible .catalog-card__image img { transform: none; }
.catalog-card__body { display: flex; flex: 1; flex-direction: column; padding: 22px; }
.catalog-card__category { color: var(--accent); font-size: 11px; letter-spacing: .08em; }
.catalog-card h3 { margin: 10px 0 12px; font: 600 21px/1.35 "Noto Serif SC", "Songti SC", Georgia, serif; }
.catalog-card p {
  display: -webkit-box;
  min-height: 66px;
  margin: 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.catalog-card__more { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; padding-top: 16px; color: var(--accent-deep); border-top: 1px solid var(--product-border); font-size: 13px; font-weight: 700; }

.detail-hero { padding: 122px 0 82px; background: var(--product-blue); border-bottom: 1px solid var(--product-border); }
.detail-breadcrumb { padding-top: 20px; }
.detail-breadcrumb a:hover { color: var(--accent); }
.detail-hero__grid { display: grid; grid-template-columns: minmax(360px, .86fr) minmax(0, 1.14fr); gap: clamp(54px, 7vw, 96px); align-items: center; }
.detail-product-image {
  display: grid;
  place-items: center;
  min-height: 500px;
  margin: 0;
  padding: 42px;
  background: #fff;
  border: 1px solid var(--product-border);
}
.detail-product-image img { max-width: 100%; max-height: 500px; object-fit: contain; }
.detail-category { display: inline-flex; min-height: 32px; align-items: center; padding: 0 12px; color: var(--accent-deep); background: #fff; border: 1px solid var(--product-border); font-size: 12px; }
.detail-summary h1 { margin: 24px 0 24px; font: 600 clamp(40px, 5vw, 66px)/1.2 "Noto Serif SC", "Songti SC", Georgia, serif; letter-spacing: -.03em; }
.detail-summary > p { max-width: 650px; margin: 0; color: var(--ink-soft); font-size: 16px; line-height: 2; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.detail-back,
.detail-contact { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border: 1px solid var(--accent); font-size: 13px; font-weight: 700; }
.detail-back { gap: 10px; color: var(--accent-deep); background: transparent; }
.detail-contact { color: #fff; background: var(--accent); }
.detail-back:hover { background: #fff; }
.detail-contact:hover { background: var(--accent-deep); }

.detail-content-section { padding: 88px 0 102px; background: #fff; }
.detail-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 58px; align-items: start; }
.detail-toc { position: sticky; top: 100px; padding: 22px; background: var(--product-blue); border: 1px solid var(--product-border); }
.detail-toc > p { margin: 0 0 13px; padding-bottom: 13px; color: var(--ink-soft); border-bottom: 1px solid var(--product-border); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.detail-toc nav { display: grid; }
.detail-toc a { padding: 10px 4px; color: var(--ink-soft); font-size: 13px; line-height: 1.4; }
.detail-toc a:hover { color: var(--accent); }
.detail-block { scroll-margin-top: 96px; padding: 38px 42px; border: 1px solid var(--product-border); }
.detail-block + .detail-block { border-top: 0; }
.detail-block:nth-child(even) { background: var(--product-blue); }
.detail-block h2 { margin: 0 0 25px; color: var(--accent-deep); font: 600 25px/1.35 "Noto Serif SC", "Songti SC", Georgia, serif; }
.detail-block p { margin: 0; color: #36545b; font-size: 15px; line-height: 1.95; }
.detail-block p + p { margin-top: 12px; }
.detail-block p.is-subhead { margin-top: 22px; color: var(--ink); font-weight: 700; }
.detail-block p.is-spec { padding: 10px 14px; color: var(--ink); background: rgba(255,255,255,.74); border-left: 3px solid #86b7c2; font-weight: 600; }

.related-section { padding: 86px 0 100px; background: var(--product-blue); border-top: 1px solid var(--product-border); }
.related-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.related-head h2 { margin: 0; font: 600 clamp(30px, 3.5vw, 44px)/1.25 "Noto Serif SC", "Songti SC", Georgia, serif; }
.related-head > a { color: var(--accent-deep); font-size: 13px; font-weight: 700; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

.product-not-found { min-height: 70vh; padding: 180px 0 100px; text-align: center; background: var(--product-blue); }
.product-not-found span { color: var(--accent); font: 500 72px Georgia, serif; }
.product-not-found h1 { margin: 12px 0; font-size: 36px; }
.product-not-found p { color: var(--ink-soft); }
.product-not-found a { display: inline-flex; margin-top: 18px; padding: 13px 22px; color: #fff; background: var(--accent); }

@media (max-width: 1080px) {
  .product-catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-hero__grid { grid-template-columns: minmax(320px, .9fr) 1.1fr; gap: 48px; }
  .detail-product-image { min-height: 420px; }
}

@media (max-width: 820px) {
  .catalog-section { padding: 62px 0 80px; }
  .product-layout { display: block; }
  .category-panel { position: static; margin-bottom: 44px; padding: 18px; }
  .category-list { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .category-list::-webkit-scrollbar { display: none; }
  .category-button { flex: 0 0 auto; width: auto; min-height: 42px; padding: 0 15px; background: #fff; border: 1px solid var(--product-border); white-space: nowrap; }
  .category-button::after { display: none; }
  .category-button:hover,
  .category-button[aria-selected="true"] { padding-left: 15px; color: #fff; background: var(--accent); border-color: var(--accent); }
  .detail-hero { padding: 104px 0 64px; }
  .detail-hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .detail-product-image { min-height: 390px; }
  .detail-layout { display: block; }
  .detail-toc { position: static; margin-bottom: 28px; }
  .detail-toc nav { display: flex; gap: 4px 18px; overflow-x: auto; scrollbar-width: none; }
  .detail-toc a { white-space: nowrap; }
}

@media (max-width: 560px) {
  .product-page .container { width: min(100% - 32px, 1180px); }
  .product-results__head { align-items: flex-start; flex-direction: column; gap: 14px; }
  .product-catalog-grid,
  .related-grid { grid-template-columns: 1fr; }
  .catalog-card__image { aspect-ratio: 1 / .76; }
  .detail-product-image { min-height: 330px; padding: 28px; }
  .detail-summary h1 { font-size: 39px; }
  .detail-summary > p { font-size: 15px; }
  .detail-content-section { padding: 62px 0 74px; }
  .detail-block { padding: 28px 22px; }
  .detail-block h2 { font-size: 22px; }
  .related-head { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 720px) {
  .products-hero { margin-top: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .catalog-card,
  .catalog-card__image img { transition: none; }
}
