/* Product detail page. */
.pdp-main { padding-block: var(--s4) var(--s16); }
.crumbs { font-size: var(--fs-sm); color: var(--ink-3); margin-bottom: var(--s4); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line-strong); }
.crumbs a { text-decoration: none; display: inline-flex; min-height: 32px; align-items: center; }
.crumbs a:hover { text-decoration: underline; }

.pdp { display: grid; gap: var(--s6); }
@media (min-width: 1080px) { .pdp { grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); gap: var(--s12); align-items: start; } }

/* gallery */
.gallery { display: grid; gap: var(--s3); }
.gallery-stage {
  position: relative; aspect-ratio: 1; border-radius: var(--r-lg); overflow: hidden; background: #fff; border: 1px solid var(--line);
}
.gallery-stage img, .gallery-stage .ph { position: absolute; inset: 8%; width: 84%; height: 84%; object-fit: contain; transition: transform var(--t-med) var(--ease-out), opacity var(--t-med); transform-origin: var(--zx, 50%) var(--zy, 50%); }
.gallery-stage .ph { inset: 0; width: 100%; height: 100%; }
.gallery-stage.zoom img { transform: scale(1.7); cursor: zoom-out; }
@media (hover: hover) and (pointer: fine) { .gallery-stage img { cursor: zoom-in; } }
.gallery-stage .badges { position: absolute; top: var(--s4); left: var(--s4); z-index: 1; }
/* one clean row: no vertical scroll, no visible scrollbar (iOS drew both), room for the selected border */
.thumbs {
  display: flex; gap: var(--s2); overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  scrollbar-width: none; padding: 4px; margin: -4px; scroll-padding-inline: 4px; -webkit-overflow-scrolling: touch;
}
.thumbs::-webkit-scrollbar { display: none; }
.thumb {
  flex: none; width: 72px; height: 72px; border-radius: var(--r-md); border: 2px solid transparent; background: #fff; padding: 6px;
  border-color: var(--line); display: grid; place-items: center; overflow: hidden;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr); /* fixed track: a tall photo must not stretch the row past the box */
  transition: border-color var(--t-fast), transform var(--t-fast) var(--ease);
}
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb .ph { width: 100%; height: 100%; border-radius: var(--r-sm); }
.thumb .ph span { display: none; }
.thumb[aria-checked="true"] { border-color: var(--ink); }
.thumb:active { transform: scale(.95); }
.gallery-note { font-size: var(--fs-xs); color: var(--ink-3); }

/* purchase panel */
.buy-panel { display: grid; gap: var(--s4); align-content: start; }
@media (min-width: 1080px) { .buy-panel { position: sticky; top: 96px; } }
.buy-panel h1 { font-size: var(--fs-2xl); font-weight: 500; line-height: 1.25; }
.pdp-summary { color: var(--ink-2); line-height: 1.7; max-width: 60ch; margin: 0; } /* hand-written description (tools/product_overrides.json) */
.buy-panel .price { font-family: var(--font-display); }
.buy-panel .price-now { font-size: 2rem; font-weight: 600; }
.buy-panel .price:has(.price-was) .price-now { color: var(--sale); }
.buy-panel .price-was { font-size: var(--fs-md); }
.buy-panel .price-save { font-size: var(--fs-md); }
.variant-label { font-size: var(--fs-sm); color: var(--ink-2); }
.variant-label strong { color: var(--ink); }
.buy-actions { display: grid; grid-template-columns: 1fr auto auto; gap: var(--s2); }
.buy-actions .icon-btn { width: 54px; height: 54px; }
.buy-actions .icon-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.info-list { display: grid; gap: 0; margin: 0; border-radius: var(--r-md); background: #fff; border: 1px solid var(--line); overflow: hidden; }
.info-list > div { display: grid; grid-template-columns: 28px 1fr; gap: var(--s3); padding: var(--s4); border-bottom: 1px solid var(--line); }
.info-list > div:last-child { border-bottom: 0; }
.info-list svg { width: 22px; height: 22px; color: var(--blue); margin-top: 2px; }
.info-list dt { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.info-list dd { margin: 2px 0 0; font-size: var(--fs-sm); }
.info-list dd strong { font-size: var(--fs-md); }
.info-list .tone-warn dd strong { color: var(--warn); }
.info-list .tone-stop dd strong { color: var(--stop); }
.info-list .tone-ok dd strong { color: var(--ok); }
.info-list .tone-new dd strong { color: var(--blue); }
.fine { font-size: var(--fs-xs); color: var(--ink-3); }

/* story: who it's for + three key points */
.pdp-section { margin-top: var(--s16); }
.pdp-section > h2 { font-size: var(--fs-xl); font-weight: 700; margin-bottom: var(--s5); }
.story { display: grid; gap: var(--s4); }
@media (min-width: 1080px) { .story { grid-template-columns: .9fr 1.1fr; gap: var(--s6); } }
.who { border-radius: var(--r-md); padding: var(--s6); background: #F6F7F9; display: grid; gap: var(--s3); align-content: start; }
.who h2 { font-size: var(--fs-xl); font-weight: 700; }
.who p { color: var(--ink-2); }
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); counter-reset: pt; }
.points li { counter-increment: pt; display: grid; grid-template-columns: 36px 1fr; gap: var(--s3); align-items: start; padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.points li::before { content: counter(pt); width: 32px; height: 32px; border-radius: 50%; background: var(--ice); color: var(--ink); display: grid; place-items: center; font-weight: 600; font-family: var(--font-display); }
.points-head { font-size: var(--fs-xl); font-weight: 700; margin-bottom: var(--s3); }

/* specs */
.specs { width: 100%; border-collapse: collapse; background: #fff; font-size: var(--fs-sm); border-top: 1px solid var(--line); }
.specs th, .specs td { text-align: left; vertical-align: top; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
.specs tr:last-child th, .specs tr:last-child td { border-bottom: 0; }
.specs th { width: 36%; color: var(--ink-3); font-weight: 600; }
.more-list { margin-top: var(--s5); }
.more-list summary { cursor: pointer; font-weight: 700; min-height: var(--tap); display: flex; align-items: center; }

/* states */
.pdp-state { padding: var(--s16) 0; text-align: center; display: grid; gap: var(--s3); justify-items: center; color: var(--ink-3); }
.pdp-state h1 { color: var(--ink); font-size: var(--fs-2xl); }

/* sticky CTA (phones/tablets) */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-sticky-cta);
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  padding: var(--s2) var(--gutter) calc(var(--s2) + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: var(--s3); transform: translateY(0); transition: transform var(--t-med) var(--ease-out);
}
.sticky-cta.away { transform: translateY(110%); }
.sticky-cta .sc-info { flex: 1; min-width: 0; }
.sticky-cta .sc-name { font-size: var(--fs-xs); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-cta .sc-price { font-weight: 700; font-size: var(--fs-lg); }
.sticky-cta .btn { min-height: 48px; }
@media (min-width: 1080px) { .sticky-cta { display: none !important; } }
.info-list > div > svg { grid-row: 1 / span 2; }
.info-list dt, .info-list dd { grid-column: 2; }
.gallery-stage.noimg { aspect-ratio: 16 / 10; }
@media (min-width: 1080px) { .gallery-stage.noimg { aspect-ratio: 1; } }

/* photo carousel */
.gallery-stage .track { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; border-radius: inherit; }
.gallery-stage .track::-webkit-scrollbar { display: none; }
.gallery-stage .slide { flex: 0 0 100%; position: relative; margin: 0; scroll-snap-align: center; overflow: hidden; }
.gallery-stage .slide img { position: absolute; inset: 8%; width: 84%; height: 84%; object-fit: contain; transition: transform var(--t-med) var(--ease-out); transform-origin: var(--zx, 50%) var(--zy, 50%); }
.gallery-stage.zoom .slide img { transform: scale(1.8); cursor: zoom-out; }
.gallery-stage.zoom .track { overflow: hidden; }
@media (hover: hover) and (pointer: fine) { .gallery-stage .slide img { cursor: zoom-in; } }
.g-nav { position: absolute; top: 50%; z-index: 2; transform: translateY(-50%); background: rgba(255, 255, 255, .92); box-shadow: var(--sh-1); }
.g-prev { left: var(--s3); }
.g-prev svg { transform: rotate(180deg); }
.g-next { right: var(--s3); }
.g-count { position: absolute; right: var(--s4); bottom: var(--s4); z-index: 2; background: rgba(23, 33, 59, .78); color: #fff; font-size: var(--fs-xs); font-weight: 600; padding: 4px 10px; border-radius: var(--r-pill); }
@media (hover: none) { .g-nav { display: none; } } /* swipe on touch screens */
.thumbs .thumb[aria-current="true"] { border-color: var(--ink); }


/* ---------- buying-guide articles (inside the product page) ---------- */
.article-cards { display: grid; grid-auto-flow: column; grid-auto-columns: 82%; gap: var(--s4); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: var(--s2); }
.article-cards::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .article-cards { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; } }
.article-card { scroll-snap-align: start; display: grid; grid-template-rows: auto 1fr; text-decoration: none; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: #fff; transition: border-color var(--t-fast), transform var(--t-med) var(--ease-out); }
.article-card:hover { border-color: var(--ink); transform: translateY(-3px); }
.article-card:hover .ac-img img { transform: scale(1.04); }
.ac-img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--ice-50); }
.ac-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease-out); }
.ac-body { padding: var(--s4); display: grid; gap: 6px; align-content: start; }
.ac-meta { font-size: var(--fs-xs); color: var(--blue); font-weight: 600; }
.ac-title { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-lg); line-height: 1.3; }
.ac-dek { font-size: var(--fs-sm); color: var(--ink-3); }

.article-dialog { width: min(760px, 100% - 16px); }
.art-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.art-text { padding: var(--s6) var(--s5) var(--s4); font-family: var(--font-th); font-size: 1.0625rem; line-height: 1.75; color: var(--ink-2); }
@media (min-width: 768px) { .art-text { padding: var(--s8) var(--s12) var(--s6); } }
.art-meta { font-size: var(--fs-sm); color: var(--blue); font-weight: 600; font-family: var(--font); }
.art-text h2 { font-size: var(--fs-2xl); color: var(--ink); margin: var(--s2) 0 var(--s3); line-height: 1.25; }
.art-dek { font-size: var(--fs-lg); color: var(--ink); margin-bottom: var(--s6); }
.art-text section { margin-top: var(--s6); }
.art-text h3 { font-size: var(--fs-lg); color: var(--ink); margin-bottom: var(--s2); }
.art-text p + p { margin-top: var(--s3); }
.art-text ul { margin: var(--s2) 0 0; padding-left: 1.2em; display: grid; gap: 6px; }
.art-fig { margin: var(--s6) 0 0; }
.art-fig img { width: 100%; max-height: 420px; object-fit: contain; background: #F6F7F9; border-radius: var(--r-md); }
.art-fig figcaption { font-size: var(--fs-sm); color: var(--ink-3); margin-top: var(--s2); }
.art-check { margin-top: var(--s8); background: var(--ice-50); border-radius: var(--r-md); padding: var(--s5); }
.art-check h3 { display: flex; align-items: center; gap: var(--s2); }
.art-check h3 svg { width: 22px; height: 22px; color: var(--ok); }
.art-check ul { list-style: none; padding: 0; }
.art-check li { padding-left: 28px; position: relative; }
.art-check li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 14px; height: 14px; border: 2px solid var(--blue); border-radius: 4px; }
.art-note { margin-top: var(--s5); font-size: var(--fs-sm); color: var(--ink-3); }
.art-products { padding: 0 var(--s5) var(--s8); }
@media (min-width: 768px) { .art-products { padding: 0 var(--s12) var(--s10); } }
.art-products h3 { font-size: var(--fs-lg); margin-bottom: var(--s4); }
.art-products .rail { grid-auto-columns: minmax(150px, 46%); }
@media (min-width: 768px) { .art-products .rail { grid-auto-columns: calc(33% - 10px); } }

/* discontinued: buyable stand-ins (product.js altBox) — phones: above the photos · wide screens: under the buy buttons */
.alt-box { border: 2px solid var(--line-strong); border-radius: var(--r-md); padding: var(--s3); background: var(--cloud); }
.alt-head { margin: 0 0 var(--s2); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); font-size: var(--fs-md); }
.alt-grid { display: grid; grid-template-columns: 1fr; gap: var(--s2); } /* phones: one per row so the full model name fits */
@media (min-width: 600px) { .alt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.alt-card { display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; column-gap: var(--s2); align-items: center;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--s2); color: var(--ink); text-decoration: none; min-height: 72px; }
.alt-card img { grid-row: span 2; width: 56px; height: 56px; object-fit: contain; }
.alt-name { font-size: var(--fs-sm); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.alt-price { font-weight: 700; font-size: var(--fs-sm); color: var(--blue); }
.alt-card { min-height: 64px; }
.alt-price s { color: var(--ink-3); font-weight: 400; }
.alt-card:hover, .alt-card:focus-visible { border-color: var(--blue); }
.alt-under { display: none; }
@media (min-width: 1080px) { .alt-top { display: none; } .alt-under { display: block; } }
