/* ALLCUT — product detail page (/products/<slug>/).
   Builds on site.css tokens: paper, ink, one red, hairlines, zero radius. */

/* ───────────── top: gallery + summary ───────────── */
.pdp-top { padding: clamp(20px, 2.4vw, 32px) 0 clamp(48px, 6vw, 88px); }
.pdp-top .crumbs { margin-bottom: clamp(20px, 2.4vw, 32px); }

.pdp-hero {
  --info-pad: clamp(0px, 2.6vw, 44px);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 1fr;
  column-gap: clamp(16px, 2vw, 28px);
}
.pdp-gallery { grid-column: 1 / span 7; grid-row: 1 / span 2; min-width: 0; }
.pdp-head { grid-column: 8 / -1; grid-row: 1; padding-left: var(--info-pad); }
.pdp-body {
  grid-column: 8 / -1; grid-row: 2; align-self: start; padding-left: var(--info-pad); margin-top: 32px;
  position: sticky; top: calc(var(--header-h) + 24px);
}

/* summary */
.pdp-head__range { margin: 0; }
.pdp-head__range a { color: var(--ink-2); transition: color .15s; }
.pdp-head__range a:hover { color: var(--red-ink); }
.pdp-head__pos { color: var(--ink-4); }
.pdp-head__title { margin-top: 18px; overflow-wrap: anywhere; }
.pdp-head__sub { margin: 14px 0 0; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.4; color: var(--ink-2); }
.pdp-head__tag { margin: 6px 0 0; font-size: 15px; color: var(--ink-3); }

.pdp-kf .kf__value { font-size: clamp(22px, 1.9vw, 28px); overflow-wrap: anywhere; }
.pdp-chips { margin-top: 20px; }
.pdp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.pdp-actions .btn { flex: 1 1 auto; }
.pdp-call { margin: 14px 0 0; font: 500 12px/1.5 var(--f-mono); letter-spacing: .04em; color: var(--ink-3); }
.pdp-call a { color: var(--ink); border-bottom: 1px solid var(--rule-2); transition: color .15s, border-color .15s; }
.pdp-call a:hover { color: var(--red-ink); border-color: var(--red); }
.pdp-call__sep { margin: 0 8px; color: var(--ink-4); }

.pdp-sheet {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  margin-top: 24px; padding: 14px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  font-weight: 600; transition: color .15s;
}
.pdp-sheet__icon svg { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.pdp-sheet:hover { color: var(--red-ink); }
.pdp-sheet:hover .pdp-sheet__icon svg { transform: translateY(2px); }

/* ───────────── gallery stage ───────────── */
.pdp-stage {
  --pad: clamp(32px, 4.2vw, 64px);
  --pad-x: calc(var(--pad) + 20px);        /* room for the dimension line */
  position: relative; background: var(--white); border: 1px solid var(--rule);
  height: clamp(440px, calc(100vh - 300px), 680px);
  touch-action: pan-y;
}
.pdp-stage.crop::before { left: 10px; top: 10px; }
.pdp-stage.crop::after { right: 10px; bottom: 10px; }

.pdp-view {
  position: absolute; inset: var(--pad) var(--pad-x);
  container-type: size; display: grid; place-items: center;
}
.pdp-view[hidden] { display: none; }
.is-cutout .pdp-view { align-items: end; }  /* cutouts stand on the ground line */

/* Object box: fits the stage, keeps its aspect ratio, never exceeds the file's pixel size. */
.pdp-obj {
  position: relative; display: block;
  width: min(100cqw, 100cqh * var(--ar), var(--w));
  aspect-ratio: var(--ar);
}
.pdp-obj img { width: 100%; height: 100%; object-fit: contain; }
.is-plate .pdp-obj { width: min(100cqw, 100cqh * var(--ar), var(--w) * .92); }

.pdp-stage__ground { position: absolute; left: 10px; right: 10px; bottom: var(--pad); height: 1px; background: var(--rule-2); pointer-events: none; }
.pdp-dim { right: -26px; }
.pdp-stage .dim__label { background: var(--white); }
.pdp-stage__count { position: absolute; left: 22px; bottom: calc(var(--pad) / 2); transform: translateY(50%); margin: 0; color: var(--ink-4); }

/* thumbnails */
.pdp-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pdp-thumb {
  position: relative; display: block; width: 72px; height: 86px; padding: 8px; flex: none;
  background: var(--white); border: 1px solid var(--rule); transition: border-color .15s;
}
.pdp-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pdp-thumb:hover { border-color: var(--ink-4); }
.pdp-thumb[aria-current="true"], .pdp-thumb[aria-pressed="true"] { border-color: var(--ink); }
.pdp-thumb[aria-pressed="true"]::after {
  content: ""; position: absolute; left: -1px; right: -1px; bottom: -1px; height: 2px; background: var(--red);
}

/* ───────────── on-page jump strip ───────────── */
.pdp-toc { border-top: 1px solid var(--rule); }
.pdp-toc__inner { display: flex; align-items: center; gap: 12px 32px; overflow-x: auto; scrollbar-width: none; }
.pdp-toc__inner::-webkit-scrollbar { display: none; }
.pdp-toc__lead { flex: none; color: var(--ink-4); }
.pdp-toc ul { display: flex; gap: 28px; }
.pdp-toc a {
  position: relative; display: block; padding: 18px 0; white-space: nowrap;
  font: 500 12px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); transition: color .15s;
}
.pdp-toc a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .2s var(--ease); }
.pdp-toc a:hover { color: var(--ink); }
.pdp-toc a:hover::after { transform: scaleX(1); }

/* ───────────── sections ───────────── */
.pdp-sec { padding-block: clamp(56px, 7vw, 104px); border-top: 1px solid var(--rule); }

.pdp-split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 28px); row-gap: 36px; }
.pdp-split__head { grid-column: 1 / span 4; align-self: start; position: sticky; top: calc(var(--header-h) + 32px); }
.pdp-split__body { grid-column: 5 / -1; min-width: 0; }
.pdp-split--wide .pdp-split__head { grid-column: 1 / span 5; }
.pdp-split--wide .pdp-split__body { grid-column: 7 / -1; }
.pdp-split__head .label { margin-bottom: 18px; }
.pdp-split__note { margin: 16px 0 0; color: var(--ink-3); font-size: 15px; }
.pdp-links { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 28px; }
.pdp-about { margin-top: 24px; }
.pdp-prose .lede { margin: 0; max-width: 62ch; }

/* specifications: groups flow in two columns */
.pdp-specs { columns: 2; column-gap: clamp(28px, 3.4vw, 56px); }
.pdp-specs__group { break-inside: avoid; margin-bottom: 40px; }
.pdp-specs__group .specs__group { margin: 0; }
.pdp-specs .specs__v { font-size: 16px; }
.vline { display: block; }
.vline + .vline { margin-top: 2px; }

/* benefits */
.pdp-benefits__title { margin: 0 0 14px; }
.pdp-benefits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 3vw, 44px); border-top: 1px solid var(--ink); }
.pdp-benefits li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 16px 0 20px; border-bottom: 1px solid var(--rule); }
.pdp-benefits__n { padding-top: 4px; color: var(--ink-4); }
.pdp-benefits p { margin: 0; color: var(--ink-2); text-wrap: pretty; }
.pdp-benefits strong { color: var(--ink); font-weight: 600; }

/* video */
.pdp-video { margin: 0; }
.pdp-video video { width: 100%; aspect-ratio: 16 / 9; background: var(--ink); object-fit: contain; }

/* field photos */
.pdp-field { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(8px, 1.2vw, 18px); }
.pdp-field img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--tint); }
.pdp-field__n { margin-top: 10px; }

/* downloads */
.pdp-dl { border-top: 1px solid var(--ink); }
.pdp-dl__item {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto 16px; align-items: center; gap: 16px;
  padding: 18px 0; border-bottom: 1px solid var(--rule); transition: color .15s;
}
.pdp-dl__n { color: var(--ink-4); }
.pdp-dl__name { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.pdp-dl__note { display: block; margin-top: 3px; font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--ink-3); }
.pdp-dl__meta { white-space: nowrap; }
.pdp-dl__icon svg { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.pdp-dl__item:hover { color: var(--red-ink); }
.pdp-dl__item:hover .pdp-dl__icon svg { transform: translateY(2px); }

/* accessories */
.pdp-acc { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.pdp-acc__item { position: relative; display: flex; flex-direction: column; padding: 20px 20px 24px; background: var(--white); border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.pdp-acc__media { height: 168px; margin-bottom: 18px; }
.pdp-acc__media img { width: 100%; height: 100%; object-fit: contain; transition: transform .3s var(--ease); }
.pdp-acc__kind { margin: 0; }
.pdp-acc__name { margin-top: 6px; font-size: 18px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.15; }
.pdp-acc__name a { transition: color .15s; }
.pdp-acc__name a::after { content: ""; position: absolute; inset: 0; }
.pdp-acc__desc { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-3); }
.pdp-acc__item:hover .pdp-acc__name a { color: var(--red-ink); }
.pdp-acc__item:hover .pdp-acc__media img { transform: translateY(-3px); }
.pdp-acc__item:focus-within { outline: 2px solid var(--red); outline-offset: -2px; }
.pdp-acc__name a:focus-visible { outline: none; }

/* ───────────── range comparison ───────────── */
.cmp-wrap { scrollbar-width: thin; }
.cmp { --first: 188px; border-collapse: separate; border-spacing: 0; table-layout: fixed; min-width: calc(var(--first) + var(--n) * 128px); }
.cmp th, .cmp td { padding: 11px 14px; }
.cmp td { font-size: 15px; font-weight: 500; color: var(--ink-2); overflow-wrap: anywhere; }
.cmp tbody th[scope="row"], .cmp .cmp__corner {
  position: sticky; left: 0; z-index: 1; width: var(--first); padding-left: 0; background: var(--paper);
  white-space: normal; font-size: 11px;
}
.cmp .cmp__corner { vertical-align: bottom; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.cmp tbody tr:hover th[scope="row"] { background: var(--white); }
.cmp tbody tr.cmp__group:hover { background: transparent; }

.cmp .cmp__model {
  position: relative; vertical-align: bottom; white-space: normal; padding-top: 18px; padding-bottom: 14px;
  font: 700 15px/1.2 var(--f-sans); letter-spacing: -0.01em; text-transform: none; color: var(--ink);
}
.cmp__thumb { display: block; height: 80px; margin-bottom: 12px; }
.cmp__thumb img { width: 100%; height: 100%; object-fit: contain; object-position: left bottom; }
.cmp__name { display: block; }
a.cmp__name { transition: color .15s; }
a.cmp__name:hover { color: var(--red-ink); }
a.cmp__name::after { content: ""; position: absolute; inset: 0; }
.cmp__this { display: block; margin-top: 6px; font-size: 10px; }
.cmp__model.is-cur, .cmp td.is-cur { background: var(--white); }
.cmp__model.is-cur::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--red); }
.cmp td.is-cur { color: var(--ink); font-weight: 700; }

.cmp__group th { padding: 22px 0 8px; color: var(--ink); background: transparent; border-bottom: 1px solid var(--rule); }
.cmp__group th span { position: sticky; left: 0; }
.cmp tbody:first-of-type .cmp__group th { padding-top: 16px; }

/* ───────────── prev / next ───────────── */
.pdp-pager { border-top: 1px solid var(--rule); }
.pdp-pager__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 24px; }
.pdp-pager__link { display: flex; align-items: center; gap: 20px; padding: 28px 0; min-width: 0; }
.pdp-pager__link--next { flex-direction: row-reverse; text-align: right; }
.pdp-pager__thumb { flex: none; width: 68px; height: 84px; padding: 8px; background: var(--white); border: 1px solid var(--rule); transition: border-color .15s; }
.pdp-pager__thumb img { width: 100%; height: 100%; object-fit: contain; }
.pdp-pager__text { min-width: 0; }
.pdp-pager__name { display: block; margin-top: 6px; font-size: clamp(19px, 1.6vw, 24px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; transition: color .15s; }
.pdp-pager__sub { display: block; margin-top: 4px; font-size: 14px; color: var(--ink-3); }
.pdp-pager__link:hover .pdp-pager__name { color: var(--red-ink); }
.pdp-pager__link:hover .pdp-pager__thumb { border-color: var(--ink-4); }
.pdp-pager__all { padding: 12px 16px; border: 1px solid var(--rule-2); color: var(--ink-2); transition: border-color .15s, color .15s; white-space: nowrap; }
.pdp-pager__all:hover { border-color: var(--ink); color: var(--ink); }

/* ───────────── responsive ───────────── */
@media (max-width: 1100px) {
  .pdp-acc { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pdp-split--wide .pdp-split__head { grid-column: 1 / span 5; }
  .pdp-split--wide .pdp-split__body { grid-column: 6 / -1; }
  .pdp-benefits { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .pdp-hero { display: flex; flex-direction: column; }
  .pdp-head, .pdp-body { padding-left: 0; }
  .pdp-gallery { margin-top: 24px; }
  .pdp-body { position: static; margin-top: 28px; }
  .pdp-stage { height: clamp(340px, 88vw, 560px); --pad: clamp(24px, 6vw, 44px); --pad-x: calc(var(--pad) + 22px); }
  .pdp-actions { max-width: 560px; }

  .pdp-split { display: block; }
  .pdp-split__head { position: static; margin-bottom: 32px; }
  .pdp-split__head .h2 { max-width: 22ch; }
}

@media (max-width: 760px) {
  .pdp-acc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pdp-acc__item { padding: 14px 14px 18px; }
  .pdp-acc__media { height: 132px; }
  .pdp-acc__name { font-size: 16px; }
  .pdp-field { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .cmp { --first: 132px; min-width: calc(var(--first) + var(--n) * 116px); }
  .cmp th, .cmp td { padding: 10px 10px; }
  .cmp td { font-size: 14px; }
  .cmp__thumb { height: 64px; }
  .cmp__model { font-size: 14px; }

  .pdp-pager__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
  .pdp-pager__thumb { display: none; }
  .pdp-pager__link { padding: 22px 0; }
  .pdp-pager__all { grid-column: 1 / -1; grid-row: 2; justify-self: start; margin-bottom: 22px; }
  .pdp-pager__name { font-size: 18px; }
}

@media (max-width: 640px) {
  .pdp-specs { columns: 1; }
  .pdp-specs__group { margin-bottom: 32px; }
  .pdp-dl__item { grid-template-columns: minmax(0, 1fr) auto 16px; gap: 12px; }
  .pdp-dl__n { display: none; }
  .pdp-toc__lead { display: none; }
  .pdp-toc ul { gap: 22px; }
}

@media (max-width: 420px) {
  .pdp-thumb { width: 60px; height: 72px; padding: 6px; }
  .pdp-dl__item { grid-template-columns: minmax(0, 1fr) 16px; row-gap: 4px; }
  .pdp-dl__meta { grid-column: 1; grid-row: 2; }
  .pdp-dl__icon { grid-column: 2; grid-row: 1 / span 2; }
  .pdp-kf[style*="--kf-cols: 3"] .kf__value { font-size: 20px; }
}

/* no JS: thumbnails link straight to the image files */
html:not(.js) .pdp-thumb[aria-current="true"] { border-color: var(--ink); }
