/* Product pages (products/*.html). One template for all 24 products, built
   on /css/gs-v2.css; the mat calculator is /css/mat-tiling.css and the
   behaviour is /js/pdp.js. Section order: hero with the at-a-glance block,
   the page's "show" (calculator, preview or comparison), the detail
   statements, specifications, questions, related products, closing call.
   The two boxwood mat pages also load boxwood-recovery.css for their guard;
   the resets below neutralise its element rules. */

html:has(> body.gs-v2) { scroll-behavior: auto; }
.gs-v2 main#main { padding-top: 0; }

/* ── Hero: the product photo beside its name, price and actions ── */
.pd-hero { padding-top: calc(var(--nav-h) + clamp(1.75rem, 4.5vh, 3.25rem)); }
.pd-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  grid-template-areas: "media crumbs" "media title" "media lede" "media buy";
  grid-template-rows: auto auto auto 1fr;
  column-gap: clamp(2.5rem, 5vw, 4.75rem);
  align-items: start;
  padding-bottom: clamp(2.25rem, 5vh, 3.5rem);
}
.pd-hero .gs-crumbs { grid-area: crumbs; }
.pd-titlebox { grid-area: title; }
.pd-title { font-size: clamp(2.35rem, 3.7vw, 3.5rem); line-height: 1.04; letter-spacing: -0.02em; max-width: 15ch; }
.pd-sku { margin-top: 0.7rem; font: 500 var(--gs-label)/1.3 var(--gs-font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gs-muted); }
.pd-lede { grid-area: lede; margin-top: 1rem; font-size: clamp(1rem, 1.2vw, 1.0625rem); line-height: 1.62; color: rgba(245, 242, 235, 0.86); max-width: 50ch; }
.pd-buy { grid-area: buy; margin-top: 1.6rem; padding-top: 1.25rem; border-top: 1px solid var(--gs-line); }

/* The photo sits on a plate. Photos shot on white take the limestone plate
   (multiply turns their white backdrop into the plate); close-ups fill it. */
.pd-media { grid-area: media; margin: 0; }
.pd-plate { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #1f2a1f; isolation: isolate; }
.pd-plate > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pd-plate--white { background: var(--gs-day); }
.pd-plate--white > img { object-fit: contain; mix-blend-mode: multiply; }
/* small source photos stay at their own size instead of being blown up */
.pd-plate--small { display: grid; place-items: center; background: var(--gs-day); }
.pd-plate--small > img { position: relative; inset: auto; width: auto; height: auto; max-width: calc(100% - 2rem); max-height: calc(100% - 2rem); object-fit: contain; box-shadow: 0 1px 0 rgba(27, 29, 26, 0.08); }
.pd-plate--small.pd-plate--white > img { box-shadow: none; }
.pd-tag { position: absolute; z-index: 2; left: 0.75rem; top: 0.75rem; max-width: calc(100% - 1.5rem); padding: 0.45em 0.6em; background: rgba(12, 12, 12, 0.84); color: #F5F2EB; font: 500 var(--gs-label)/1 var(--gs-font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.pd-tag--fire { color: var(--gs-gold); }
.pd-incart:not([hidden]) { position: absolute; z-index: 2; right: 0.75rem; bottom: 0.75rem; display: inline-flex; align-items: center; gap: 0.4em; padding: 0.45em 0.65em; background: var(--gs-green); color: var(--gs-night); font: 500 var(--gs-label)/1 var(--gs-font-mono); letter-spacing: 0.08em; text-transform: uppercase; animation: pd-pop 0.45s var(--gs-ease); }
.pd-incart b { font-weight: 600; font-variant-numeric: tabular-nums; }
.pd-media figcaption { padding-top: 0.7rem; font-size: 0.8125rem; line-height: 1.5; color: var(--gs-muted); }
@keyframes pd-pop { from { transform: scale(0.6); opacity: 0; } }
/* The photo draws in as the page first paints (CSS only, so nothing flashes) */
@media (prefers-reduced-motion: no-preference) {
  .js .pd-plate { animation: pd-wipe 1s var(--gs-ease) 80ms both; }
  .js .pd-plate > img { animation: pd-settle 1.3s var(--gs-ease) 80ms both; }
}
@keyframes pd-wipe { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0); } }
@keyframes pd-settle { from { transform: scale(1.08); } to { transform: none; } }

/* Loupe: pointer devices can look closer at the photo (built by pdp.js) */
.pd-lens { position: absolute; z-index: 3; left: 0; top: 0; width: 200px; height: 200px; margin: -100px 0 0 -100px; border-radius: 50%; border: 1px solid rgba(245, 242, 235, 0.9); background-color: var(--pd-lens-bg, #1f2a1f); background-repeat: no-repeat; box-shadow: 0 0 0 1px rgba(12, 12, 12, 0.35), 0 18px 40px rgba(0, 0, 0, 0.35); pointer-events: none; opacity: 0; transform: scale(0.85); transition: opacity 0.2s linear, transform 0.35s var(--gs-ease); }
.pd-plate--white .pd-lens { --pd-lens-bg: var(--gs-day); background-blend-mode: multiply; }
.pd-plate.is-looking .pd-lens { opacity: 1; transform: none; }
.pd-plate[data-loupe].is-ready { cursor: zoom-in; }
.pd-hint { position: absolute; z-index: 2; left: 0.75rem; bottom: 0.75rem; display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.45em 0.65em; background: rgba(12, 12, 12, 0.72); color: #F5F2EB; font: 500 var(--gs-label)/1 var(--gs-font-mono); letter-spacing: 0.08em; text-transform: uppercase; pointer-events: none; transition: opacity 0.25s linear; }
.pd-hint svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.pd-plate.is-looking .pd-hint { opacity: 0; }

/* Price and actions */
.pd-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.45rem; font-size: 0.9375rem; color: rgba(245, 242, 235, 0.78); }
.pd-price b { font-family: var(--gs-font-display); font-weight: 300; font-size: clamp(2.1rem, 3vw, 2.6rem); line-height: 1; letter-spacing: -0.01em; color: var(--gs-ink); font-variant-numeric: tabular-nums; }
.pd-price--ask { font-family: var(--gs-font-display); font-weight: 300; font-size: clamp(1.6rem, 2.3vw, 2rem); line-height: 1.1; color: var(--gs-ink); }
.pd-terms { margin-top: 0.6rem; font-size: 0.8125rem; line-height: 1.5; color: rgba(245, 242, 235, 0.72); max-width: 46ch; }
.pd-actions { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.pd-add { gap: 0.75rem; }
.pd-add-ic { position: relative; flex: none; width: 16px; height: 16px; }
.pd-add-ic svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pd-add-plus { transition: transform 0.45s var(--gs-ease), opacity 0.2s linear; }
.pd-add-ck path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.15s linear; }
.pd-add.is-added .pd-add-plus { transform: rotate(90deg) scale(0.4); opacity: 0; }
.pd-add.is-added .pd-add-ck path { stroke-dashoffset: 0; transition: stroke-dashoffset 0.45s var(--gs-ease) 0.1s; }
.pd-cartline { min-height: 1.5em; margin-top: 0.85rem; font-size: 0.875rem; color: rgba(245, 242, 235, 0.78); }
.pd-cartline button { font-weight: 600; color: var(--gs-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; text-decoration-color: rgba(245, 242, 235, 0.45); transition: color 0.2s, text-decoration-color 0.2s; }
.pd-cartline button:hover { color: var(--gs-green); text-decoration-color: currentColor; }
.pd-sheetlink { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 0.4rem; font-size: 0.875rem; font-weight: 600; color: var(--gs-link); }
.pd-sheetlink svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: translate 0.35s var(--gs-ease); }
.pd-sheetlink:hover svg, .pd-sheetlink:focus-visible svg { translate: 0 2px; }
.pd-jump { display: flex; width: max-content; margin-top: 0.15rem; color: var(--gs-ink); }
.pd-jump:hover { color: var(--gs-green); }

/* A secondary button on limestone (the ghost button is for night) */
.pd-btn-line { border: 1px solid rgba(27, 29, 26, 0.45); color: var(--gs-ink-day); background: rgba(255, 255, 255, 0.35); }
.pd-btn-line:hover { border-color: var(--gs-ink-day); background: var(--gs-ink-day); color: var(--gs-day); }

/* At a glance: the product's facts as a title block under the hero */
.pd-glance { padding-bottom: clamp(3rem, 6vw, 4.5rem); }
@media (min-width: 769px) {
  .pd-tb { grid-template-columns: repeat(var(--pd-n, 4), minmax(0, 1fr)); }
  .pd-tb dd { font-size: clamp(1.05rem, 1.25vw, 1.2rem); }
}

/* ── Section heads: heading left, one line right ── */
.pd-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem clamp(2.5rem, 6vw, 6rem); align-items: end; margin-bottom: clamp(2rem, 4vw, 3rem); }
.pd-head h2 { margin-bottom: 0; max-width: 18ch; }
.pd-head .gs-lede { max-width: 54ch; }
.pd-fine { margin-top: clamp(1.75rem, 3.5vw, 2.5rem); padding-top: 1.1rem; border-top: 1px solid var(--gs-rule); max-width: 76ch; font-size: 0.875rem; line-height: 1.6; color: var(--gs-fg-muted); }
.pd-fine a { color: var(--gs-fg); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.pd-fine a:hover { color: var(--gs-link); }

/* ── Calculator section ── */
@media (min-width: 1025px) { .pd-calc .mt-result { position: sticky; top: calc(var(--nav-h) + 1.5rem); } }
.pd-calc .mt-cost dt b { font-weight: 600; }
.pd-calc .mt-actions .gs-btn { min-height: 46px; }
.pd-blend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-top: clamp(1.75rem, 3.5vw, 2.5rem); padding: 1rem 1.1rem; border: 1px solid var(--gs-line-day); background: rgba(255, 255, 255, 0.32); }
.pd-blend img { flex: none; width: 56px; height: 56px; object-fit: cover; }
.pd-blend p { flex: 1 1 18rem; font-size: 0.9375rem; line-height: 1.5; color: var(--gs-muted-day); }
.pd-blend p strong { color: var(--gs-ink-day); font-weight: 600; }
.pd-go { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9375rem; font-weight: 600; color: var(--gs-link); }
.pd-go:hover .gs-ar, .pd-go:focus-visible .gs-ar { translate: 3px 0; }

/* ── Show: sprays by the case ── */
.pd-cases { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 2rem clamp(2.5rem, 5vw, 4.5rem); align-items: start; }
.pd-crates { counter-reset: pd-crate; display: flex; flex-wrap: wrap; align-content: center; gap: 1rem; min-height: 15rem; padding: clamp(1rem, 2.5vw, 1.75rem); border: 1px solid var(--gs-line-day); background: rgba(255, 255, 255, 0.32); }
.pd-crate { counter-increment: pd-crate; display: grid; grid-template-columns: repeat(10, 12px); gap: 0 4px; padding: 0.55rem 0.75rem 0.7rem; border: 1px solid rgba(27, 29, 26, 0.38); background: var(--gs-day); }
.pd-crate::before { content: 'Case ' counter(pd-crate); grid-column: 1 / -1; margin-bottom: 0.45rem; font: 500 var(--gs-label)/1.2 var(--gs-font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gs-muted-day); }
.pd-crate i { display: block; width: 12px; height: 42px; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 30'%3E%3Cpath d='M5.5 30V6' stroke='%231E5C35' stroke-width='1.2'/%3E%3Cg fill='%233f6b34'%3E%3Cellipse cx='3' cy='9' rx='2.4' ry='1.6'/%3E%3Cellipse cx='8' cy='12' rx='2.4' ry='1.6'/%3E%3Cellipse cx='3' cy='15' rx='2.4' ry='1.6'/%3E%3Cellipse cx='8' cy='18' rx='2.4' ry='1.6'/%3E%3Cellipse cx='3' cy='21' rx='2.4' ry='1.6'/%3E%3Cellipse cx='5.5' cy='4' rx='2' ry='2.4'/%3E%3C/g%3E%3C/svg%3E"); }
.pd-crate i.is-spare { opacity: 0.28; }
.gs-motion .pd-crate.is-new { animation: pd-crate 0.5s var(--gs-ease) both; }
@keyframes pd-crate { from { opacity: 0; transform: translateY(10px) scale(0.96); } }
.pd-crates-cap { margin-top: 0.75rem; font: 500 var(--gs-label)/1.5 var(--gs-font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gs-muted-day); }
.pd-count label { display: block; margin-bottom: 0.6rem; font-size: 0.9375rem; font-weight: 600; }
.pd-stepper { display: inline-flex; align-items: stretch; border: 1px solid rgba(27, 29, 26, 0.3); background: rgba(255, 255, 255, 0.55); }
.pd-stepper button { width: 46px; min-height: 46px; font-size: 1.2rem; line-height: 1; color: var(--gs-ink-day); transition: background-color 0.2s, scale 0.2s var(--gs-ease); }
.pd-stepper button:hover { background: rgba(27, 29, 26, 0.06); }
.pd-stepper button:active { scale: 0.92; }
.pd-stepper input { width: 5.5ch; border: 0; border-inline: 1px solid rgba(27, 29, 26, 0.18); background: none; font: 500 1.125rem/1 var(--gs-font-mono); text-align: center; color: var(--gs-ink-day); -moz-appearance: textfield; appearance: textfield; }
.pd-stepper input::-webkit-inner-spin-button, .pd-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pd-count .gs-range { margin-top: 0.75rem; }
.pd-readout { margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid var(--gs-line-day); display: grid; gap: 0.85rem; }
.pd-readout-n { display: flex; align-items: baseline; gap: 0.6rem; font-size: 0.9375rem; color: var(--gs-muted-day); }
.pd-readout-n output { font-family: var(--gs-font-display); font-weight: 300; font-size: clamp(2.6rem, 4vw, 3.4rem); line-height: 1; color: var(--gs-ink-day); font-variant-numeric: tabular-nums; }
.pd-readout-cost { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.6rem 0; border-block: 1px solid var(--gs-line-day); font-size: 0.9375rem; }
.pd-readout-cost small { display: block; font-size: var(--gs-xs); color: var(--gs-muted-day); }
.pd-readout-cost output { font-weight: 600; font-variant-numeric: tabular-nums; }
.pd-readout-note { font-size: 0.8125rem; line-height: 1.5; color: var(--gs-muted-day); }
.pd-readout .pd-actions { margin-top: 0.25rem; }

/* ── Show: hedge letters preview ── */
.pd-letters { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 2rem clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
.pd-stagebox { margin: 0; }
.pd-stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(to bottom, #E4DFD3 0%, #E4DFD3 72%, #D5CFC1 72.2%, #DCD6C9 100%); border: 1px solid var(--gs-line-day); }
.pd-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pd-word-face { fill: url(#pdBox); }
.pd-word-depth { fill: #22361F; }
.pd-word-ground { fill: rgba(27, 29, 26, 0.22); }
.pd-stage text { font-family: 'Space Grotesk', var(--gs-font-body); font-weight: 700; letter-spacing: 0.01em; }
.pd-stagebox figcaption { padding-top: 0.7rem; font-size: 0.8125rem; line-height: 1.5; color: var(--gs-muted-day); }
.pd-type label { display: block; margin-bottom: 0.55rem; font-size: 0.9375rem; font-weight: 600; }
.pd-type input { width: 100%; min-height: 52px; padding: 0.6rem 0.85rem; border: 1px solid rgba(27, 29, 26, 0.3); border-radius: var(--gs-radius); background: rgba(255, 255, 255, 0.55); font: 500 1.25rem/1.2 var(--gs-font-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--gs-ink-day); transition: border-color 0.2s, background-color 0.2s; }
.pd-type input:hover { border-color: rgba(27, 29, 26, 0.55); }
.pd-type input:focus { border-color: var(--gs-ink-day); background: rgba(255, 255, 255, 0.75); }
.pd-type-note { min-height: 1.5em; margin-top: 0.5rem; font-size: var(--gs-xs); color: var(--gs-muted-day); }
.pd-type .pd-actions { margin-top: 1.25rem; }
.pd-type-copy { margin-top: 1rem; font-size: 0.9375rem; line-height: 1.6; color: var(--gs-muted-day); max-width: 46ch; }

/* ── Show: comparison and process ── */
.pd-vs th img { display: block; width: 100%; max-width: 220px; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 0.7rem; background: var(--gs-day); }
.pd-vs thead th { vertical-align: bottom; }
.pd-vs th img.is-white { mix-blend-mode: multiply; }
.pd-vs thead th a { color: var(--gs-link); }
.pd-steps-wrap .gs-steps p { color: var(--gs-muted-day); }

/* ── Two columns of short copy (the boxwood mat pages' product choices) ── */
.pd-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem clamp(2rem, 5vw, 4.5rem); border-top: 1px solid var(--gs-rule); padding-top: clamp(1.5rem, 3vw, 2rem); }
.pd-col h3 { font-size: clamp(1.35rem, 2vw, 1.7rem); font-weight: 300; margin-bottom: 0.6rem; }
.pd-col > p { font-size: 0.9375rem; line-height: 1.65; color: var(--gs-fg-muted); max-width: 54ch; }
.pd-col-lead { margin-bottom: 0.4rem; font-family: var(--gs-font-display); font-weight: 300; font-size: 1.15rem; color: var(--gs-fg) !important; }
.pd-col .pd-go { margin-top: 0.9rem; }
.pd-col .pd-checks { margin-top: 0.5rem; }
.pd-callout { margin-top: clamp(1.75rem, 3.5vw, 2.5rem); padding-top: 1.1rem; border-top: 1px solid var(--gs-rule); max-width: 72ch; font-size: 0.9375rem; line-height: 1.65; color: var(--gs-fg-muted); }
.pd-callout strong { color: var(--gs-fg); font-weight: 600; }
.pd-workflow .gs-steps p { color: var(--gs-muted); }
.pd-workflow .gs-steps h3 { color: var(--gs-ink); }

/* ── Detail: the page's long copy as statements ── */
.pd-detail-grid { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: 1.5rem clamp(2.5rem, 6vw, 6rem); align-items: start; }
.pd-detail-grid h2 { max-width: 12ch; }
.pd-detail-grid .gs-lede { margin-top: -0.6rem; }
@media (min-width: 1025px) { .pd-detail-head { position: sticky; top: calc(var(--nav-h) + 2rem); } }
.pd-detail .gs-statement summary { font-size: clamp(1.35rem, 2.3vw, 1.95rem); }
.pd-detail .gs-statement-body p + p { margin-top: 0.85rem; }

/* ── Specifications ── */
.pd-spec-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 2.5rem clamp(2.5rem, 6vw, 5.5rem); align-items: start; }
.pd-spec-grid h3 { margin-bottom: 0.9rem; font-size: clamp(1.25rem, 1.7vw, 1.45rem); }
.pd-spec-grid h3:not(:first-child) { margin-top: clamp(2rem, 4vw, 2.75rem); }
.pd-spec .gs-compare tbody th { width: 34%; }
.pd-checks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
.pd-checks li { position: relative; padding: 0.55rem 0 0.55rem 1.85rem; border-bottom: 1px solid var(--gs-rule); font-size: 0.9375rem; line-height: 1.5; color: var(--gs-fg); }
.pd-checks li::before { content: ''; position: absolute; left: 0.2rem; top: 0.95rem; width: 10px; height: 5px; border-left: 1.6px solid var(--gs-link); border-bottom: 1.6px solid var(--gs-link); transform: rotate(-45deg); }
.pd-uses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.25rem; }
.pd-uses li { padding: 0.55rem 0; border-bottom: 1px solid var(--gs-rule); font-size: 0.9375rem; line-height: 1.45; color: var(--gs-fg-muted); }
.pd-spec .pd-sheetlink { margin-top: 1.1rem; }
.pd-spec3 tbody th { width: 24%; }
.pd-apps { margin-top: clamp(3rem, 6vw, 4.5rem); display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); grid-template-rows: auto 1fr; gap: 1rem clamp(2.5rem, 6vw, 6rem); align-items: start; }
.pd-apps-title { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 300; max-width: 16ch; }
.pd-apps-lede { grid-column: 1; font-size: 0.9375rem; line-height: 1.6; color: var(--gs-muted-day); max-width: 46ch; }
.pd-app-list { grid-column: 2; grid-row: 1 / span 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem clamp(1.25rem, 3vw, 2.25rem); align-content: start; }
.pd-app-list li { padding-top: 0.9rem; border-top: 1px solid var(--gs-rule); }
.pd-app-list h3 { font-size: 1.15rem; margin-bottom: 0.35rem; }
.pd-app-list p { font-size: 0.9375rem; line-height: 1.55; color: var(--gs-muted-day); }

/* ── Related products: cards from the shop ── */
.pd-rel-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem); }
.pd-rel-head h2 { margin-bottom: 0; }
.pd-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1.75rem, 3vw, 2.5rem) clamp(1rem, 2vw, 1.5rem); }
.pd-card { position: relative; display: flex; flex-direction: column; transition: translate 0.5s var(--gs-ease); }
.pd-card-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #d9d4c8; }
.pd-card-media img { width: 100%; height: 100%; object-fit: cover; transition: scale 0.9s var(--gs-ease); }
.pd-card-media.is-white { background: #fff; }
.pd-card-name { margin-top: 0.85rem; font-size: 1.15rem; line-height: 1.25; font-weight: 400; letter-spacing: -0.01em; }
.pd-card-name a { transition: color 0.2s; }
.pd-card-name a::after { content: ''; position: absolute; inset: 0; }
.pd-card-price { flex: 1; margin-top: 0.55rem; font-size: 0.875rem; color: var(--gs-muted-day); }
.pd-card-price b { margin-right: 0.15rem; font-family: var(--gs-font-display); font-weight: 300; font-size: 1.4rem; line-height: 1; color: var(--gs-ink-day); }
.pd-card-price--ask { font-family: var(--gs-font-display); font-weight: 300; font-size: 1.1rem; color: var(--gs-ink-day); }
.pd-card .pd-mini { position: relative; z-index: 1; margin-top: 0.75rem; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; width: 100%; min-height: 44px; padding: 0.55rem 0.9rem; border: 1px solid rgba(27, 29, 26, 0.38); border-radius: var(--gs-radius); background: rgba(255, 255, 255, 0.4); color: var(--gs-ink-day); font-size: 0.875rem; font-weight: 600; text-align: left; transition: background-color 0.2s, border-color 0.2s, color 0.2s, scale 0.25s var(--gs-ease); }
.pd-card .pd-mini:hover { background: var(--gs-ink-day); border-color: var(--gs-ink-day); color: var(--gs-day); }
.pd-card .pd-mini:active { scale: 0.98; transition-duration: 0.2s, 0.2s, 0.2s, 0.08s; }
.pd-card .pd-mini.is-added { background: var(--gs-green-day); border-color: var(--gs-green-day); color: #F5F2EB; }
.gs-motion .pd-cards > li:nth-child(2) [data-reveal="wipe"] { transition-delay: 70ms; }
.gs-motion .pd-cards > li:nth-child(3) [data-reveal="wipe"] { transition-delay: 140ms; }
.gs-motion .pd-cards > li:nth-child(4) [data-reveal="wipe"] { transition-delay: 210ms; }
.pd-card--all .pd-card-media { display: grid; place-items: center; padding: 1.25rem; background: var(--gs-ink-day); color: var(--gs-day); font-family: var(--gs-font-display); font-weight: 300; font-size: clamp(1.25rem, 1.8vw, 1.5rem); line-height: 1.2; text-align: center; }
@media (hover: hover) {
  .pd-card:hover { translate: 0 -4px; }
  .pd-card:hover .pd-card-media img { scale: 1.045; }
  .pd-card:hover .pd-card-name a { color: var(--gs-green-day); }
}
.pd-card-name a:focus-visible { color: var(--gs-green-day); }

/* ── Closing call ── */
.pd-close { border-top: 1px solid var(--gs-line); }
.pd-close-in { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.5rem 3rem; }
.pd-close h2 { margin-bottom: 0.6rem; max-width: 20ch; }
.pd-close .gs-lede { max-width: 56ch; }
.pd-close .pd-actions { margin-top: 0; }

/* ── Quote cart: floating button, backdrop and drawer (rendered by /shop-cart.js) ── */
.cart-fab { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 998; width: 56px; height: 56px; display: none; align-items: center; justify-content: center; border-radius: 50%; background: var(--gs-green); color: var(--gs-night); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35); transition: transform 0.35s var(--gs-ease), background-color 0.2s; }
.cart-fab:hover { background: var(--gs-green-hover); transform: translateY(-2px); }
.cart-fab:active { transform: scale(0.95); }
.cart-fab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cart-badge { position: absolute; top: -3px; right: -3px; min-width: 22px; height: 22px; padding: 0 5px; display: none; align-items: center; justify-content: center; border: 2px solid var(--gs-night); border-radius: 11px; background: var(--gs-ink); color: var(--gs-night); font: 600 0.6875rem/1 var(--gs-font-mono); }
.cart-backdrop { position: fixed; inset: 0; z-index: 1001; background: rgba(12, 12, 12, 0.62); opacity: 0; visibility: hidden; transition: opacity 0.35s linear, visibility 0s linear 0.35s; }
.cart-backdrop.open { opacity: 1; visibility: visible; transition: opacity 0.35s linear, visibility 0s; }
.cart-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 1002; width: min(440px, 100%); display: flex; flex-direction: column; background: var(--gs-night-raised); color: var(--gs-ink); border-left: 1px solid var(--gs-line); transform: translateX(100%); visibility: hidden; transition: transform 0.55s var(--gs-ease), visibility 0s linear 0.55s; }
.cart-drawer.open { transform: none; visibility: visible; box-shadow: -24px 0 60px rgba(0, 0, 0, 0.45); transition: transform 0.55s var(--gs-ease), visibility 0s; }
.cart-drawer-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.35rem 1.5rem 1.2rem; border-bottom: 1px solid var(--gs-line); }
.cart-drawer-subtitle { font: 500 var(--gs-label)/1.3 var(--gs-font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gs-gold); }
.cart-drawer-title { margin-top: 0.25rem; font-family: var(--gs-font-display); font-weight: 300; font-size: 1.75rem; line-height: 1.1; letter-spacing: -0.01em; }
.cart-close { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(245, 242, 235, 0.3); border-radius: 50%; font-size: 1.4rem; line-height: 1; color: var(--gs-ink); transition: border-color 0.2s, background-color 0.2s, color 0.2s; }
.cart-close:hover { border-color: var(--gs-ink); background: var(--gs-ink); color: var(--gs-night); }
.cart-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0.5rem 1.5rem; }
.cart-empty { padding: 3rem 0.5rem; text-align: center; font-size: 0.9375rem; line-height: 1.6; color: var(--gs-muted); }
.cart-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 0.9rem; align-items: start; padding: 1rem 0; border-bottom: 1px solid var(--gs-line); }
.cart-item:last-child { border-bottom: 0; }
.cart-item-img { width: 64px; height: 64px; object-fit: cover; background: #2a2825; }
.cart-item-name { font-size: 0.9375rem; font-weight: 600; line-height: 1.3; }
.cart-item-price { margin: 0.2rem 0 0.6rem; font-size: 0.8125rem; color: var(--gs-muted); }
.cart-item-qty { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.qty-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(245, 242, 235, 0.28); border-radius: var(--gs-radius); font-size: 1rem; line-height: 1; color: var(--gs-ink); transition: border-color 0.2s, background-color 0.2s, scale 0.2s var(--gs-ease); }
.qty-btn:hover { border-color: var(--gs-ink); background: rgba(245, 242, 235, 0.08); }
.qty-btn:active { scale: 0.92; }
.qty-val { min-width: 2.2rem; text-align: center; font: 500 0.9375rem/1 var(--gs-font-mono); font-variant-numeric: tabular-nums; }
.qty-remove { margin-left: 0.4rem; padding: 0.55rem 0.25rem; font-size: 0.8125rem; color: var(--gs-muted); text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: rgba(245, 242, 235, 0.3); transition: color 0.2s; }
.qty-remove:hover { color: var(--gs-ink); }
.cart-item-total { font: 500 0.8125rem/1.4 var(--gs-font-mono); color: var(--gs-muted); }
.cart-footer { padding: 1.25rem 1.5rem calc(1.25rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--gs-line); }
.cart-footer:empty { display: none; }
.cart-mode-reason { margin-bottom: 1rem; padding: 0.8rem 0.95rem; border: 1px solid rgba(196, 162, 101, 0.4); font-size: 0.875rem; line-height: 1.55; color: rgba(245, 242, 235, 0.86); }
.cart-subtotal { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.9rem; font-size: 0.875rem; color: var(--gs-muted); }
.cart-subtotal strong { font-family: var(--gs-font-display); font-weight: 300; font-size: 1.4rem; color: var(--gs-ink); }
.cart-quote-btn { display: block; width: 100%; min-height: 52px; padding: 0.9rem 1.2rem; border-radius: var(--gs-radius); background: var(--gs-green); color: var(--gs-night); font-size: 0.975rem; font-weight: 600; text-align: center; transition: background-color 0.2s, scale 0.25s var(--gs-ease); }
.cart-quote-btn:hover { background: var(--gs-green-hover); }
.cart-quote-btn:active { scale: 0.98; background: #00B34A; }
.cart-shipping-note { margin-top: 0.75rem; text-align: center; font-size: 0.8125rem; color: var(--gs-muted); }

.m-cta-bar { transition: transform 0.35s var(--gs-ease), opacity 0.3s linear; }

/* ── Tablet ── */
@media (max-width: 1099px) {
  .pd-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pd-cards > .pd-card--all { display: none; }
}
@media (max-width: 1024px) {
  .pd-head, .pd-detail-grid, .pd-spec-grid, .pd-cases, .pd-letters, .pd-apps { grid-template-columns: minmax(0, 1fr); }
  .pd-app-list { grid-column: auto; grid-row: auto; }
  .pd-detail-grid .gs-lede { margin-top: -0.25rem; }
}
@media (max-width: 900px) {
  .pd-hero-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "crumbs" "title" "media" "buy" "lede"; grid-template-rows: none; }
  .pd-media { margin-top: 1.25rem; max-width: 640px; }
  .pd-buy { margin-top: 1.25rem; border-top: 0; padding-top: 0; }
  .pd-lede { margin-top: 1.25rem; }
}
/* ── Phone ── */
@media (max-width: 768px) {
  .pd-title { font-size: clamp(2.1rem, 9vw, 2.7rem); max-width: none; }
  .pd-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.6rem; }
  .pd-uses, .pd-cols, .pd-app-list { grid-template-columns: minmax(0, 1fr); }
  .pd-close .pd-actions { width: 100%; }
  .cart-fab { bottom: calc(48px + env(safe-area-inset-bottom) + 0.85rem); right: 1rem; }
  .pd-vs thead th img { max-width: 160px; }
}
@media (max-width: 599px) {
  .pd-cards { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pd-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 0.95rem; padding: 1.1rem 0; border-top: 1px solid var(--gs-line-day); }
  .pd-card:last-child { border-bottom: 1px solid var(--gs-line-day); }
  .pd-card-media { grid-row: 1 / span 3; aspect-ratio: 1; align-self: start; }
  .pd-card-name { margin-top: 0; font-size: 1.1rem; }
  .pd-card .pd-mini { grid-column: 2; margin-top: 0.6rem; }
  .pd-crates { gap: 0.75rem; min-height: 12rem; }
  .pd-crate { grid-template-columns: repeat(10, 9px); gap: 0 3px; padding: 0.5rem 0.6rem 0.6rem; }
  .pd-crate i { width: 9px; height: 32px; }
  .pd-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pd-card, .pd-card-media img, .pd-card .pd-mini, .pd-add-plus, .pd-add-ck path, .pd-lens, .pd-stepper button, .pd-sheetlink svg, .cart-fab, .cart-drawer, .cart-backdrop, .qty-btn, .cart-quote-btn, .m-cta-bar { transition: none; }
  .pd-card:hover { translate: none; }
  .pd-card:hover .pd-card-media img { scale: none; }
  .pd-incart:not([hidden]) { animation: none; }
  .pd-go:hover .gs-ar, .pd-go:focus-visible .gs-ar, .pd-sheetlink:hover svg, .pd-sheetlink:focus-visible svg { translate: none; }
}
