/* Product page. Builds on styles.css tokens. */
.pdp-hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: start; padding-top: 40px; padding-bottom: clamp(80px, 10vw, 140px); }
.gallery { display: grid; grid-template-columns: 76px 1fr; gap: 12px; position: sticky; top: calc(var(--nav-h) + 24px); }
.stage { grid-column: 2; grid-row: 1; position: relative; aspect-ratio: 1; max-height: calc(100dvh - var(--nav-h) - 64px); border-radius: var(--r); overflow: clip; background: var(--bg-2); }
.stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumbs { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; gap: 8px; max-height: calc(100dvh - var(--nav-h) - 64px); overflow-y: auto; scrollbar-width: none; }
.thumb { flex: none; width: 76px; aspect-ratio: 1; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: clip; background: var(--bg-2); cursor: pointer; transition: border-color 200ms ease; }
.thumb { position: relative; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.7; transition: opacity 200ms ease; }
.thumb.is-on { border-color: var(--ink); }
.thumb.is-on img { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .thumb:hover img { opacity: 1; } }

.buy { padding-top: 8px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--ink-2); }
.crumbs i { font-size: 12px; }
@media (hover: hover) and (pointer: fine) { .crumbs a:hover { color: var(--ink); } }
.buy__title { font-family: var(--serif); font-weight: 600; font-size: clamp(3rem, 5.6vw, 5.25rem); line-height: 1.06; letter-spacing: -0.03em; margin-top: 16px; }
.buy__sub { margin-top: 10px; font-size: 1.0625rem; color: var(--ink-2); }

/* taste indicator: two families, the active one gets a filled circle */
.taste-ind { margin-top: 24px; }
.taste-ind__head { font-size: 0.875rem; font-weight: 600; margin-bottom: 10px; }
.tscale { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; border-radius: var(--r); background: var(--bg-2); }
.tscale__cell { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 0.875rem; color: var(--ink-2); }
.tscale__cell i { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid currentColor; }
.tscale__cell.is-on { background: var(--bg); color: var(--ink); font-weight: 600; }
.tscale__cell.is-on i { background: var(--ink); border-color: var(--ink); }
.tscale--lg { width: 100%; }
.tscale--lg .tscale__cell { padding: 16px 16px; font-size: 1rem; }
.tscale--lg .tscale__cell i { width: 24px; height: 24px; }

.buy__lede { margin-top: 22px; font-size: 1.0625rem; max-width: 50ch; }
.buy__price { margin-top: 26px; display: flex; align-items: baseline; gap: 14px; }
.price { font-family: var(--serif); font-weight: 600; font-size: 3rem; line-height: 1; display: inline-block; font-variant-numeric: tabular-nums; }
.per { color: var(--ink-2); font-size: 0.9375rem; display: inline-block; }
.buy__form { margin-top: 24px; display: grid; gap: 20px; }
.buy__row { display: flex; gap: 12px; }
.buy__cta { flex: 1; height: 56px; justify-content: space-between; padding-inline: 28px; font-size: 1.0625rem; }
.buy__cta-price { font-variant-numeric: tabular-nums; padding-left: 16px; border-left: 1px solid rgba(241, 238, 231, 0.3); display: inline-block; }
.buy__pair { margin-top: 16px; display: flex; align-items: center; gap: 14px; padding: 10px 18px 10px 10px; border-radius: var(--r); background: var(--bg-2); font-size: 0.9375rem; transition: background-color 200ms ease; }
.buy__pair img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; }
.buy__pair span { flex: 1; display: grid; }
.buy__pair b { font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .buy__pair:hover { background: var(--bg-3); } }
.buy__facts { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--line); }
.buy__facts li { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 0.9375rem; color: var(--ink-2); }
.buy__facts .ico { width: 34px; height: 34px; }

/* tasting notes */
.notes { position: relative; overflow: clip; color: var(--on-dark); }
.notes__pin { position: relative; height: 100dvh; min-height: 560px; display: grid; place-items: center; }
.notes__stage { position: relative; width: 100%; height: 60%; }
.note { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; padding-inline: var(--gutter); }
.ico--note { width: clamp(88px, 10vw, 150px); height: clamp(88px, 10vw, 150px); margin-bottom: 8px; }
.note__word { font-family: var(--serif); font-weight: 600; font-size: clamp(4rem, 13vw, 12.5rem); line-height: 1.02; letter-spacing: -0.04em; padding-bottom: 0.1em; }
.note__word .nc { display: inline-block; will-change: transform; }
.note__line { margin-top: 20px; font-size: clamp(1.0625rem, 1.6vw, 1.375rem); color: rgba(241, 238, 231, 0.82); max-width: 34ch; }
.note:not(.is-active) { visibility: hidden; }
.notes__tabs { position: absolute; bottom: 40px; left: 0; right: 0; display: flex; justify-content: center; gap: 28px; margin: 0; padding: 0 var(--gutter); list-style: none; font-size: 0.9375rem; }
.notes__tabs li { color: rgba(241, 238, 231, 0.5); position: relative; padding-bottom: 8px; transition: color 300ms ease; }
.notes__tabs li::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--on-dark); transform: scaleX(0); transition: transform 500ms var(--ease-out); }
.notes__tabs li.is-active { color: var(--on-dark); }
.notes__tabs li.is-active::after { transform: scaleX(1); }

/* profile */
.profile__grid { margin-top: 56px; display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 16px; }
.pcell { border-radius: var(--r); padding: clamp(24px, 3vw, 40px); background: var(--bg-2); display: flex; flex-direction: column; gap: 12px; min-height: 300px; }
.pcell h3 { font-family: var(--serif); font-weight: 600; font-size: 2rem; line-height: 1.05; }
.pcell p { color: var(--ink-2); }
.pnotes, .ppairs { list-style: none; margin: auto 0 0; padding: 16px 0 0; display: flex; flex-wrap: wrap; gap: 16px 20px; }
.pnotes li, .ppairs li { display: grid; justify-items: center; gap: 8px; text-align: center; font-size: 0.875rem; font-weight: 600; min-width: 72px; }
.pnotes .ico { width: 64px; height: 64px; }
.ppairs .ico { width: 52px; height: 52px; }
.pcell--pairs { background: var(--accent); }
.pcell--sizes .facts { margin-top: auto; }

/* origin */
.origin { background: var(--bg-2); padding-block: clamp(96px, 12vw, 168px); }
.origin__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 112px); align-items: start; }
.origin__copy { min-width: 0; }  /* not sticky: with a column-wide square photo it is taller than the screen */
.origin__copy .process__read .rw { opacity: 0.25; }
.origin__img { margin: 32px 0 0; width: 100%; aspect-ratio: 1; border-radius: var(--r); overflow: clip; }
.origin__img img { width: 100%; height: 100%; object-fit: cover; }
.ofact { padding: 32px 0; border-top: 1px solid var(--line); }
.ofact:last-child { border-bottom: 1px solid var(--line); }
.ofact h3 { font-size: 0.9375rem; font-weight: 600; font-family: var(--sans); color: var(--ink-2); }
.ofact__big { font-family: var(--serif); font-weight: 600; font-size: clamp(2.25rem, 3.6vw, 3.25rem); line-height: 1.05; margin-top: 8px; font-variant-numeric: tabular-nums; }
.ofact__big small { font-size: 0.5em; color: var(--ink-2); }
.ofact .facts { margin: 16px 0 0; }
.ofact .facts tr:first-child th, .ofact .facts tr:first-child td { border-top: 0; padding-top: 4px; }
.ofact .facts tr:last-child th, .ofact .facts tr:last-child td { border-bottom: 0; }
.pcell .facts tr:first-child th, .pcell .facts tr:first-child td { border-top: 0; }
.pcell .facts tr:last-child th, .pcell .facts tr:last-child td { border-bottom: 0; }

/* reviews */
.pdp-reviews { display: grid; grid-template-columns: 0.8fr 1.6fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.pdp-reviews__head { position: sticky; top: calc(var(--nav-h) + 48px); }
.pdp-reviews__head .lede { margin-top: 18px; }
.stack { display: grid; grid-auto-rows: 1fr; gap: 24px; padding-bottom: 8vh; }
.stack__card { position: sticky; top: calc(var(--nav-h) + 40px + var(--i, 0) * 24px); margin: 0; padding: clamp(28px, 3.5vw, 44px); border-radius: var(--r); background: var(--bg-2); min-height: 280px; display: flex; flex-direction: column; box-shadow: 0 -16px 40px rgba(23, 23, 21, 0.1); transform-origin: 50% 0; }
.stack__card:nth-child(1) { --i: 0; }
.stack__card:nth-child(2) { --i: 1; background: #e6e2c9; }
.stack__card:nth-child(3) { --i: 2; background: var(--bg-3); }
.stack__card:nth-child(4) { --i: 3; background: var(--dark); color: var(--on-dark); }
.stack__card .stars { margin-bottom: 12px; }
.stack__card figcaption span { font-weight: 400; opacity: 0.7; }
.stack__title { font-family: var(--serif); font-weight: 600; font-size: clamp(1.75rem, 2.6vw, 2.25rem); line-height: 1.15; }
.stack__card blockquote { margin: 14px 0 0; font-size: 1.0625rem; color: inherit; opacity: 0.8; max-width: 52ch; }
.stack__card figcaption { margin-top: auto; padding-top: 24px; font-size: 0.9375rem; font-weight: 600; }

/* floating buy bar */
.bar { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 45; width: min(640px, calc(100% - 32px)); display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 8px; border-radius: 999px; background: var(--bg); box-shadow: 0 20px 50px rgba(23, 23, 21, 0.22), 0 0 0 1px var(--line); translate: -50% 160%; transition: translate 600ms var(--ease-out); }
.bar.is-on { translate: -50% 0; }
.bar img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.bar__info { flex: 1; min-width: 0; }
.bar__name { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar__variant { font-size: 0.8125rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar__cta { height: 48px; padding-inline: 20px; gap: 14px; }

@media (max-width: 1100px) {
  .pdp-hero { grid-template-columns: 1fr; padding-top: 24px; }
  .gallery { position: static; grid-template-columns: 1fr; }
  .stage { grid-column: 1; max-height: none; }
  .thumbs { grid-column: 1; grid-row: 2; flex-direction: row; overflow-x: auto; max-height: none; }
  .thumb { width: 64px; }
  .profile__grid { grid-template-columns: 1fr 1fr; }
  .pcell--taste { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .origin__grid, .pdp-reviews { grid-template-columns: 1fr; }
  .origin__copy, .pdp-reviews__head { position: static; }
}
@media (max-width: 640px) {
  .pdp-hero { gap: 24px; padding-top: 16px; }
  .tscale--lg .tscale__cell { padding: 12px 10px; font-size: 0.875rem; gap: 8px; }
  .tscale--lg .tscale__cell i { width: 18px; height: 18px; }
  .buy__row { flex-direction: column; }
  .qty { align-self: flex-start; }
  .buy__cta { flex: none; }
  .profile__grid { grid-template-columns: 1fr; }
  .pcell { min-height: 0; }
  .notes__tabs { gap: 16px; font-size: 0.8125rem; bottom: 96px; }
  .stack__card { min-height: 220px; top: calc(var(--nav-h) + 16px + var(--i, 0) * 16px); }
  .bar__name { font-size: 1.0625rem; }
  .bar__cta { padding-inline: 16px; }
  .bar__cta > span:first-child { display: none; }
  .bar__cta .buy__cta-price { border-left: 0; padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .notes__pin { height: auto; padding-block: 120px; }
  .notes__stage { height: auto; display: grid; gap: 64px; }
  .note { position: relative; visibility: visible !important; }
  .notes__tabs { display: none; }
  .stack__card { position: relative; top: auto; }
  .origin__copy .process__read .rw { opacity: 1; }
}
