/* =============================================================
   Product page, stacked-section layout (v2). Pilot 31 Oct 2026.
   Only applies to products with layout: 'v2' in js/products.js;
   every rule is scoped to classes the v2 renderer adds.
   ============================================================= */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ── Buy box ── */
.pdp-part { color: var(--dust); }
.pdp-v2 .product-page-info .product-page-price { margin-top: 18px; }
.pdp-fits {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 16px 0 0; padding: 10px 14px;
  background: var(--offwhite); border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; line-height: 1.5; color: var(--asphalt);
}
.pdp-fits svg { flex-shrink: 0; margin-top: 2px; color: var(--moss); }
.pdp-fits a { color: var(--asphalt); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.pdp-opt-name { font-weight: 500; color: var(--asphalt); text-transform: none; letter-spacing: 0; font-family: var(--font-body); }

.pdp-trust { margin: 18px 0 0; display: grid; gap: 8px; font-size: 14px; line-height: 1.5; color: var(--graphite); }
.pdp-trust li { display: flex; gap: 10px; align-items: flex-start; }
.pdp-trust svg { flex-shrink: 0; margin-top: 3px; color: var(--asphalt); }
.pdp-trust a { color: var(--graphite); text-decoration: underline; text-underline-offset: 3px; }
.pdp-trust strong { font-weight: 500; color: var(--asphalt); }

.pdp-qf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 22px 0 0; }
.pdp-qf div { background: var(--offwhite); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.pdp-qf dt, .pdp-facts dt {
  font-family: var(--font-display); font-weight: 600; font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--dust); line-height: 1.4;
}
.pdp-qf dd { font-weight: 500; font-size: 14px; line-height: 1.35; color: var(--asphalt); margin-top: 2px; }

/* ── Below the buy box ── */
.pdp-below { padding: 0 0 64px; }
.pdp-why {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 32px;
}
.pdp-why-item { background: var(--offwhite); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.pdp-why-item strong { font-family: var(--font-display); font-weight: 700; font-size: 17px; line-height: 1.2; color: var(--asphalt); }
.pdp-why-item strong::before { content: ''; display: block; width: 24px; height: 3px; background: var(--volt); margin-bottom: 12px; }
.pdp-why-item span { font-size: 13.5px; line-height: 1.5; color: var(--graphite); }

.pdp-jump {
  position: sticky; top: var(--nav-height); z-index: 20;
  display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none;
  background: var(--concrete); border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.pdp-jump::-webkit-scrollbar { display: none; }
.pdp-jump a {
  font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: 0.02em;
  color: var(--graphite); white-space: nowrap; transition: color var(--transition);
}
.pdp-jump a:hover, .pdp-jump a:focus-visible { color: var(--asphalt); }

.pdp-sec {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px;
  padding: 44px 0; border-top: 1px solid var(--border);
  scroll-margin-top: calc(var(--nav-height) + 56px);
}
.pdp-jump + .pdp-sec { border-top: none; }
.pdp-sec-h { font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1.15; letter-spacing: -0.01em; color: var(--asphalt); }
.pdp-sec-body { max-width: 780px; font-size: 15.5px; line-height: 1.7; color: var(--graphite); min-width: 0; }
.pdp-sec-body p { margin: 0 0 14px; }
.pdp-sec-body a { color: var(--asphalt); text-decoration: underline; text-underline-offset: 3px; }
.pdp-muted { font-size: 14px; }

.pdp-ticks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; margin-top: 10px; }
.pdp-ticks li { position: relative; padding-left: 24px; color: var(--asphalt); font-size: 15px; line-height: 1.5; }
.pdp-ticks li::before {
  content: ''; position: absolute; left: 1px; top: 6px; width: 11px; height: 6px;
  border-left: 2px solid var(--asphalt); border-bottom: 2px solid var(--asphalt); transform: rotate(-45deg);
}

.pdp-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--offwhite); margin: 4px 0 16px; }
.pdp-table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.45; }
.pdp-table th, .pdp-table td { padding: 11px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.pdp-table tbody tr:last-child > * { border-bottom: none; }
.pdp-table thead th {
  font-family: var(--font-display); font-weight: 600; font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--dust); background: var(--concrete);
}
.pdp-table thead th a { color: inherit; }
.pdp-table td { color: var(--asphalt); }
.pdp-compare tbody th { font-weight: 500; color: var(--graphite); width: 32%; }
.pdp-compare td { width: 34%; }
.pdp-fit td:first-child { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.pdp-fit-extra { font-size: 14.5px; }
.pdp-fit-extra strong { font-weight: 500; color: var(--asphalt); }
.pdp-notfit h3 { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--asphalt); margin: 8px 0 6px; }
.pdp-notfit ul { margin-bottom: 14px; }
.pdp-notfit li { position: relative; padding-left: 24px; margin-bottom: 6px; }
.pdp-notfit li::before, .pdp-notfit li::after {
  content: ''; position: absolute; left: 3px; top: 12px; width: 12px; height: 2px; background: var(--oxide);
  transform: rotate(45deg);
}
.pdp-notfit li::after { transform: rotate(-45deg); }

.pdp-box { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.pdp-box li {
  background: var(--offwhite); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; font-size: 14.5px; line-height: 1.45; color: var(--asphalt);
}

.pdp-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 18px; }
.pdp-facts div { background: var(--offwhite); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.pdp-facts dd { color: var(--asphalt); font-size: 14.5px; line-height: 1.45; margin-top: 2px; }
.pdp-link { font-weight: 600; }
.pdp-help {
  display: flex; flex-direction: column; gap: 2px; margin-top: 18px;
  background: var(--asphalt); color: var(--offwhite); border-left: 3px solid var(--volt);
  border-radius: var(--radius); padding: 16px 20px; font-size: 15px; line-height: 1.55;
}
.pdp-help strong { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.pdp-help span { color: var(--dust-dark); }
.pdp-sec-body .pdp-help a { color: var(--offwhite); }

.pdp-faq { border-bottom: 1px solid var(--border); }
.pdp-faq:first-child { border-top: 1px solid var(--border); }
.pdp-faq summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 16px 40px 16px 0; font-weight: 500; font-size: 16px; line-height: 1.45; color: var(--asphalt);
}
.pdp-faq summary::-webkit-details-marker { display: none; }
.pdp-faq summary::before, .pdp-faq summary::after {
  content: ''; position: absolute; right: 6px; top: 50%; width: 14px; height: 2px; background: var(--graphite);
}
.pdp-faq summary::after { transform: rotate(90deg); transition: transform var(--transition); }
.pdp-faq[open] summary::after { transform: rotate(0deg); }
.pdp-faq > div { padding: 0 0 18px; max-width: 680px; }

.pdp-sec .reviews-head { margin-bottom: 16px; }
.pdp-sec .reviews-grid { grid-template-columns: 1fr 1fr; }

/* Sticky buy bar on every screen size for v2 pages (phones only elsewhere) */
body.pdp-v2 .pp-sticky { display: flex; }
body.pdp-v2 .pp-sticky.show { transform: translateY(0); }
body.pdp-v2.pp-sticky-on { padding-bottom: 76px; }
@media (min-width: 901px) {
  body.pdp-v2 .pp-sticky { padding-left: max(24px, calc((100vw - 1200px) / 2 + 24px)); padding-right: max(24px, calc((100vw - 1200px) / 2 + 24px)); }
}

@media (max-width: 1100px) {
  .pdp-qf { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .pdp-sec { grid-template-columns: 1fr; gap: 14px; padding: 32px 0; }
  .pdp-why { grid-template-columns: 1fr 1fr; }
  .pdp-sec-h { font-size: 24px; }
}
@media (max-width: 640px) {
  .pdp-ticks, .pdp-box, .pdp-facts, .pdp-sec .reviews-grid { grid-template-columns: 1fr; }
  .pdp-why-item { padding: 14px 14px; }
  .pdp-why-item strong { font-size: 15.5px; }
  .pdp-table th, .pdp-table td { padding: 9px 10px; }
  .pdp-jump { gap: 20px; }
}

/* Price: one line, sized to sit with the picker instead of shouting over it */
.pdp-v2 .product-page-info .product-page-price { font-size: 30px; line-height: 1.15; }
@media (max-width: 640px) { .pdp-v2 .product-page-info .product-page-price { font-size: 26px; } }

/* ── Spacing fixes (31 Oct, after first review) ──
   The classic layout pads the buy-box section by 96px (64px on phones), which
   left a big empty band before the why-ECA strip. */
.pdp-v2 .product-page-main { padding-bottom: 48px; }
.pdp-why { margin-bottom: 24px; }
.pdp-jump { padding: 12px 0; }
/* Fade at the right edge says the jump links scroll sideways */
.pdp-jump { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); padding-right: 40px; }
@media (min-width: 1000px) { .pdp-jump { -webkit-mask-image: none; mask-image: none; padding-right: 0; } }

@media (max-width: 640px) {
  .pdp-v2 .product-page-main { padding-bottom: 32px; }
  /* One column on phones: two columns left holes where one title wrapped to
     two lines and its neighbour did not. Volt mark moves to the left edge. */
  .pdp-why { grid-template-columns: 1fr; margin-bottom: 16px; }
  .pdp-why-item { padding: 12px 14px 12px 18px; position: relative; gap: 2px; }
  .pdp-why-item strong::before { position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; height: auto; margin: 0; }
  .pdp-why-item strong { font-size: 15.5px; }
  .pdp-why-item span { font-size: 13.5px; }
  .pdp-sec { padding: 28px 0; }
  .pdp-sec-h { font-size: 22px; }
  .pdp-v2 .related-section .section-header { margin-bottom: 16px; }
}

/* ── Scroll cue ── */
.pdp-cue {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 940;
  width: 44px; height: 44px; margin-left: -22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--asphalt); color: var(--volt); border: 1px solid rgba(255,255,255,0.08);
  opacity: 0; pointer-events: none; transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease;
}
.pdp-cue.show { opacity: 1; pointer-events: auto; transform: translateY(0); animation: pdpCueBob 1.6s ease-in-out .6s infinite; }
body.pp-sticky-on .pdp-cue { bottom: calc(88px + env(safe-area-inset-bottom)); }
@keyframes pdpCueBob { 0%, 100% { translate: 0 0; } 50% { translate: 0 6px; } }
@media (prefers-reduced-motion: reduce) { .pdp-cue.show { animation: none; } }

/* The breadcrumb strip sat underneath the fixed nav (no top margin), so all
   that showed was an empty sliver of it above the photos. */
.pdp-v2 .product-page-hero { margin-top: var(--nav-height); padding-top: 14px; }
.pdp-v2 .product-page-hero .breadcrumb { padding-bottom: 14px; flex-wrap: wrap; row-gap: 2px; }
.pdp-v2 .product-page-main { padding-top: 32px; }
@media (max-width: 640px) {
  .pdp-v2 .product-page-hero { padding-top: 10px; }
  .pdp-v2 .product-page-hero .breadcrumb { padding-bottom: 10px; font-size: 12.5px; }
  .pdp-v2 .product-page-hero .breadcrumb > span:last-child { display: none; }   /* product name repeats the H1 */
  .pdp-v2 .product-page-hero .breadcrumb > span:nth-last-child(2) { display: none; }
  .pdp-v2 .product-page-main { padding-top: 16px; }
}

/* Pairs well with: sized like the other section headings, and on phones a
   compact list (photo left, text right) instead of a 2-column grid that left
   the third card on its own. */
.pdp-v2 .pdp-below { padding-bottom: 40px; }
.pdp-v2 .related-section { padding-bottom: 72px; }
.pdp-v2 .related-section .section-header h2 { font-size: 32px; line-height: 1.1; }
@media (max-width: 640px) {
  .pdp-v2 .related-section { padding-bottom: 40px; }
  .pdp-v2 .related-section .section-header h2 { font-size: 24px; }
  .pdp-v2 .related-grid { grid-template-columns: 1fr; gap: 8px; }
  .pdp-v2 .related-card { flex-direction: row; align-items: stretch; }
  .pdp-v2 .related-card:hover { transform: none; }
  .pdp-v2 .related-card-img { width: 104px; flex-shrink: 0; aspect-ratio: 1; }
  .pdp-v2 .related-card-body { justify-content: center; padding: 10px 14px; }
}

/* Jump links: the wrapper is what sticks (solid background), and the fade is
   an overlay on top of it, so nothing behind shows through when stuck. */
.pdp-jump { position: static; -webkit-mask-image: none; mask-image: none; background: none; border-bottom: none; padding-right: 40px; }
.pdp-jump-wrap {
  position: sticky; top: var(--nav-height); z-index: 20;
  background: var(--concrete); border-bottom: 1px solid var(--border);
}
.pdp-jump-wrap::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 48px; pointer-events: none;
  background: linear-gradient(to right, rgba(232,228,220,0), var(--concrete));
}
.pdp-jump-wrap + .pdp-sec { border-top: none; }
@media (min-width: 1000px) { .pdp-jump { padding-right: 0; } .pdp-jump-wrap::after { display: none; } }

/* ── Collapsible sections: the whole heading is the button, arrow beside it ── */
.pdp-sec-toggle {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  width: 100%; padding: 0; text-align: left; cursor: pointer;
  font: inherit; color: inherit; letter-spacing: inherit; line-height: inherit;
}
.pdp-sec-arrow { flex-shrink: 0; margin-top: 4px; color: var(--graphite); transition: transform var(--transition), color var(--transition); }
.pdp-sec-toggle:hover .pdp-sec-arrow, .pdp-sec-toggle:focus-visible .pdp-sec-arrow { color: var(--asphalt); }
.pdp-sec-toggle:focus-visible { outline: 2px solid var(--asphalt); outline-offset: 4px; border-radius: 2px; }
.pdp-sec.collapsed .pdp-sec-arrow { transform: rotate(-90deg); }
.pdp-sec.collapsed { padding-bottom: 0; }
.pdp-sec.collapsed .pdp-sec-h { padding-bottom: 28px; }
@media (max-width: 900px) {
  .pdp-sec.collapsed { gap: 0; }
  .pdp-sec.collapsed .pdp-sec-h { padding-bottom: 0; }
  .pdp-sec.collapsed { padding: 22px 0; }
}

/* How ordering works: numbered steps */
.pdp-steps { counter-reset: step; display: grid; gap: 8px; }
.pdp-steps li {
  counter-increment: step; position: relative; display: flex; flex-direction: column; gap: 2px;
  background: var(--offwhite); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px 14px 56px; font-size: 14.5px; line-height: 1.5;
}
.pdp-steps li::before {
  content: counter(step); position: absolute; left: 16px; top: 13px;
  width: 26px; height: 26px; border-radius: 50%; background: var(--asphalt); color: var(--volt);
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.pdp-steps strong { font-weight: 500; color: var(--asphalt); font-size: 15.5px; }
/* Buy box extras carried over from the classic layout (finish tags, stitching, past builds) */
.pdp-v2 .product-page-info .product-page-finishes,
.pdp-v2 .product-page-info .product-page-spectrum,
.pdp-v2 .product-page-info .product-page-past-builds { margin: 0 0 20px; }


/* 6 Nov 2026: on phones the bobbing scroll cue sat on top of the product title
   between the gallery and the buy box, and the sticky Add to cart bar hid the
   last lines of the page. Hide the cue below tablet width and pad the page
   bottom while the bar is showing. */
@media (max-width: 768px) {
  .pdp-cue, .pdp-cue.show { display: none; }
}
body.pp-sticky-on { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }


/* 6 Nov 2026: gallery crossfade. The stage swaps its photo or video when a lens
   or thumbnail is picked; fade the new one in instead of snapping. */
@keyframes ecaFadeIn { from { opacity: 0; } to { opacity: 1; } }
.product-page-stage img, .product-page-stage video { animation: ecaFadeIn .28s ease both; }
@media (prefers-reduced-motion: reduce) {
  .product-page-stage img, .product-page-stage video { animation: none; }
}

/* Tables, readability pass 11 Nov 2026: dark header band, bold row labels, zebra rows,
   and equal option columns (the old 32% + 34% x 3 widths squeezed the last column). */
.pdp-table thead th {
  font-weight: 700; font-size: 13px; letter-spacing: 0.09em;
  color: var(--offwhite); background: var(--asphalt);
  padding-top: 10px; padding-bottom: 10px; border-bottom: 0; vertical-align: middle;
}
.pdp-table tbody tr:nth-child(even) > * { background: rgba(26, 26, 26, 0.04); }
.pdp-table td + td, .pdp-table th + td, .pdp-table thead th + th { border-left: 1px solid var(--border); }
.pdp-table thead th + th { border-left-color: rgba(245, 241, 232, 0.16); }
.pdp-compare { table-layout: fixed; }
.pdp-compare thead th:first-child, .pdp-compare tbody th { width: 24%; }
.pdp-compare td { width: auto; }
.pdp-compare tbody th {
  font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 0.02em;
  color: var(--asphalt); background: rgba(26, 26, 26, 0.06);
}
.pdp-compare tbody tr:nth-child(even) > th { background: rgba(26, 26, 26, 0.09); }
@media (max-width: 640px) {
  .pdp-compare { min-width: 460px; }
  .pdp-table thead th { font-size: 12px; }
}
