/* D74 product pages — vol-01/02/03.html only. Loaded after style.css.
   Reuses the site tokens (paper/ink/accent, JetBrains Mono). Mobile first.
   D76: color picker (Black / Pepper / Ivory). */

/* buy button states (mirrors index.html inline rules; checkout.js toggles them) */
.btn-receipt.buy--pending { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-receipt[data-buy] { cursor: pointer; }

/* skip link */
.pdp-skip {
  position: absolute; left: -9999px; top: 12px; z-index: 60;
  background: var(--ink); color: var(--paper); padding: 8px 12px;
  font-size: 12px; text-decoration: none;
}
.pdp-skip:focus { left: 16px; }

/* shared focus ring */
.pdp a:focus-visible,
.pdp summary:focus-visible,
.gallery-track:focus-visible,
.gallery-btn:focus-visible,
.gallery-thumb:focus-visible,
.footer a:focus-visible,
.nav a:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 3px;
}

/* layout */
.pdp {
  max-width: 1180px; margin: 0 auto;
  padding: clamp(18px, 3vh, 40px) clamp(16px, 4vw, 56px) clamp(48px, 8vh, 96px);
}
.crumbs ol {
  list-style: none; display: flex; flex-wrap: wrap; gap: 8px;
  font-size: 11px; letter-spacing: .06em; color: var(--ink-soft);
  margin-bottom: clamp(16px, 3vh, 28px);
}
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--accent-deep); }
.crumbs a { color: var(--ink-soft); text-underline-offset: 3px; }
.crumbs a:hover { color: var(--accent-deep); }
.crumbs [aria-current="page"] { color: var(--ink); font-weight: 600; }

.pdp-grid { display: grid; gap: clamp(24px, 4vw, 56px); }
@media (min-width: 880px) {
  .pdp-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
}

/* gallery */
.gallery { min-width: 0; }
.gallery [hidden] { display: none !important; }
.gallery-track {
  position: relative; /* slides' offsetLeft is relative to the track */
  display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  background: var(--paper-2); border: 1px solid var(--hair);
  scrollbar-width: thin;
}
.gallery-slide {
  flex: 0 0 86%; /* no-JS: next photo peeks so the strip reads as scrollable */
  scroll-snap-align: start; scroll-snap-stop: always;
}
.gallery-slide + .gallery-slide { border-left: 1px dashed var(--hair); }
.gallery-slide img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }

.is-enhanced .gallery-slide { flex-basis: 100%; }
.is-enhanced .gallery-track { scrollbar-width: none; }
.is-enhanced .gallery-track::-webkit-scrollbar { display: none; }

.gallery-controls {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 12px;
}
.gallery-btn {
  width: 44px; height: 44px; flex: 0 0 44px;
  font-family: var(--mono); font-size: 18px; line-height: 1;
  background: #fffdf7; color: var(--ink); border: 1.5px solid var(--ink);
  cursor: pointer; transition: background .15s ease, color .15s ease;
}
.gallery-btn:hover { background: var(--ink); color: var(--paper); }
.gallery-count {
  font-size: 12px; font-weight: 600; letter-spacing: .1em;
  font-variant-numeric: tabular-nums; color: var(--ink-soft);
}

.gallery-thumbs {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px;
  margin-top: 12px;
}
.gallery-thumb {
  padding: 0; background: var(--paper-2); cursor: pointer;
  border: 1.5px solid var(--hair); opacity: .7;
  transition: opacity .15s ease, border-color .15s ease;
}
.gallery-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb[aria-current="true"] { opacity: 1; border-color: var(--ink); box-shadow: inset 0 -3px 0 var(--accent); }

/* info card (receipt look, no hover tilt) */
.pdp-card { background: #fffdf7; border: 1px solid var(--hair); position: relative; min-width: 0; }
.pdp-card::before {
  content: ""; position: absolute; top: -7px; left: 0; right: 0; height: 14px;
  background-image: radial-gradient(circle at 7px 7px, var(--paper) 5px, transparent 5.5px);
  background-size: 18px 14px; background-repeat: repeat-x;
}
.pdp-kicker {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 11px; font-weight: 600; letter-spacing: .12em;
  padding: 16px 18px 12px; border-bottom: 1px dashed var(--hair);
}
.pdp-kicker span:last-child { color: var(--accent-deep); }
.pdp-body { padding: 18px; }
.pdp-title {
  font-size: clamp(26px, 5vw, 44px); font-weight: 800; line-height: 1.05;
  letter-spacing: -.01em; margin-bottom: 12px; overflow-wrap: anywhere;
}
.pdp-pitch { font-size: 15.5px; color: var(--ink-soft); margin-bottom: 18px; }
.pdp-pitch strong { color: var(--ink); }
.pdp code {
  font-family: var(--mono); font-size: .92em; background: var(--paper-2);
  padding: 1px 5px; overflow-wrap: anywhere;
}
.pdp-body .receipt-row { margin-bottom: 6px; }
.pdp-price-note { font-size: 11px; letter-spacing: .06em; color: var(--ink-soft); margin-bottom: 16px; }
.pdp-drop-note { font-size: 11px; color: var(--ink-soft); margin: 10px 0 18px; text-align: center; }

/* D76 color picker: native radios, hidden until product.js runs */
.color-picker { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.color-picker[hidden] { display: none; }
.color-legend {
  padding: 0; margin-bottom: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
}
.color-legend span { color: var(--accent-deep); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.swatch-box {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  padding: 6px 12px 6px 8px; background: #fffdf7;
  border: 1.5px solid var(--hair);
  font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--ink);
  transition: border-color .15s ease;
}
.swatch:hover .swatch-box { border-color: var(--ink-soft); }
.swatch input:checked + .swatch-box { border-color: var(--ink); box-shadow: inset 0 -3px 0 var(--accent); }
.swatch input:focus-visible + .swatch-box { outline: 2px solid var(--accent-deep); outline-offset: 3px; }
.swatch-chip { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; border: 1px solid rgba(22, 20, 15, .35); }
.swatch-chip--black { background: #1d1c1a; }
.swatch-chip--pepper { background: #5e5c58; }
.swatch-chip--ivory { background: #f2ebd9; }
@media (forced-colors: active) {
  .swatch input:checked + .swatch-box { outline: 3px solid CanvasText; outline-offset: 2px; }
}

/* expandable sections */
.pdp-details { border-top: 1px dashed var(--hair); }
.pdp-details:last-of-type { border-bottom: 1px dashed var(--hair); }
.pdp-details summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 15px 0; min-height: 44px;
  font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
}
.pdp-details summary::-webkit-details-marker { display: none; }
.pdp-details summary::after { content: "+"; font-size: 16px; color: var(--accent-deep); }
.pdp-details[open] summary::after { content: "−"; }
.pdp-details summary:hover { color: var(--accent-deep); }
.pdp-details-body { padding-bottom: 18px; font-size: 14px; color: var(--ink-soft); }
.pdp-details-body > * + * { margin-top: 12px; }
.pdp-sub { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.pdp-specs, .pdp-measure { list-style: none; }
.pdp-specs li, .pdp-measure li { padding-left: 1.2em; position: relative; margin-top: 4px; }
.pdp-specs li::before, .pdp-measure li::before { content: "·"; position: absolute; left: .3em; color: var(--accent-deep); font-weight: 800; }
.pdp-measure b { color: var(--ink); }
.pdp-fine { font-size: 11px; }
.pdp-details .size-table { font-size: 12.5px; }
.pdp-details .size-table th, .pdp-details .size-table td { padding: 9px 10px; white-space: nowrap; }

/* other vols */
.pdp-more {
  margin-top: clamp(40px, 7vh, 80px); padding-top: clamp(24px, 4vh, 40px);
  border-top: 1px solid var(--hair);
}
.pdp-more-title { font-size: clamp(20px, 3vw, 30px); font-weight: 800; letter-spacing: -.01em; margin-bottom: 20px; }
.pdp-more-grid {
  list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px); max-width: 640px;
}
.pdp-more-card {
  display: block; height: 100%; text-decoration: none; color: var(--ink);
  background: #fffdf7; border: 1px solid var(--hair);
  transition: transform .2s ease, box-shadow .2s ease;
}
.pdp-more-card:hover { transform: translateY(-4px); box-shadow: 6px 8px 0 rgba(22, 20, 15, .12); }
.pdp-more-card img {
  display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover;
  background: var(--paper-2); border-bottom: 1px dashed var(--hair);
}
.pdp-more-vol { display: block; padding: 10px 12px 0; font-size: 10.5px; font-weight: 600; letter-spacing: .12em; color: var(--accent-deep); }
.pdp-more-name { display: block; padding: 2px 12px 12px; font-size: 13px; font-weight: 800; overflow-wrap: anywhere; }
.pdp-back {
  display: inline-block; margin-top: 20px; font-size: 12px; color: var(--ink-soft);
  text-underline-offset: 3px;
}
.pdp-back:hover { color: var(--accent-deep); }

/* reduced motion: no smooth scroll, no lifts */
@media (prefers-reduced-motion: reduce) {
  html, .gallery-track { scroll-behavior: auto; }
  .pdp-more-card, .gallery-thumb, .gallery-btn, .swatch-box { transition: none; }
  .pdp-more-card:hover { transform: none; }
}
