/* =========================================================
   İSTANBUL PİLİÇ — CATALOGUE (products.html + product-detail.html)
   Design: Figma "Product Page — Marquee" 237:7 · detail 260:29
   Shared card grammar lives here; page layouts below.
   ========================================================= */

@font-face {
  font-family: "Melodrama";
  src: url("../assets/fonts/Melodrama-Variable.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "Switzer";
  src: url("../assets/fonts/Switzer-Variable.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Switzer";
  src: url("../assets/fonts/Switzer-VariableItalic.woff2") format("woff2-variations");
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
}

/* Cross-page continuity — the clicked card FLIPs into the detail hero.
   Chromium-only enhancement; other browsers get the GSAP arrival. */
@view-transition {
  navigation: auto;
}

/* the flight itself lives on the group — without this it runs at the
   0.25s UA default while the snapshots keep fading for 0.8s */
::view-transition-group(pd-hero-img),
::view-transition-group(pd-hero-shape) {
  animation-duration: 0.8s;
  animation-timing-function: cubic-bezier(0.87, 0, 0.13, 1);
  /* expo.inOut */
}

::view-transition-old(pd-hero-img),
::view-transition-new(pd-hero-img),
::view-transition-old(pd-hero-shape),
::view-transition-new(pd-hero-shape) {
  height: 100%;
  object-fit: contain;
}

/* Both pages show the same cached file, so never cross-fade the product:
   the outgoing snapshot rides the whole flight at full opacity and the
   incoming one simply covers it pixel-for-pixel once decoded — if the
   hero img isn't ready at transition start, the old pixels hold the fort
   instead of fading into a blank.
   :not(:only-child) = matched pair only. An UNPAIRED old snapshot (the
   destination has no counterpart — e.g. leaving the detail page) must keep
   the UA's quick fade-out, or opacity:1 pins the photo on screen. */
::view-transition-old(pd-hero-img):not(:only-child),
::view-transition-new(pd-hero-img):not(:only-child) {
  animation-name: none;
  opacity: 1;
  mix-blend-mode: normal;
}

/* the shape's rotation differs between pages — keep its cross-fade,
   matched to the flight (unpaired snapshots keep the UA quick fade) */
::view-transition-old(pd-hero-shape):not(:only-child),
::view-transition-new(pd-hero-shape):not(:only-child) {
  animation-duration: 0.8s;
  animation-timing-function: cubic-bezier(0.87, 0, 0.13, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body.pp-body,
body.pd-body {
  background: var(--neutral-100);
  color: var(--color-text-primary);
  font-family: "Switzer", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img {
  max-width: 100%;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--white);
  transform: translateY(-160%);
  transition: transform .2s;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Custom cursor — same grammar as about.css */
.cursor {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  html.js .cursor {
    display: block;
  }

  body.pp-body,
  body.pd-body {
    cursor: none;
  }

  body.pp-body a,
  body.pp-body button,
  body.pd-body a,
  body.pd-body button {
    cursor: none;
  }
}

.cursor-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ember);
}

.cursor-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--ink) 55%, transparent);
  transition: width .25s, height .25s, border-color .25s;
}

.cursor.is-hover .cursor-ring {
  width: 52px;
  height: 52px;
  border-color: var(--ember);
}

.cursor.is-hidden {
  opacity: 0;
}

/* =========================================================
   CARD GRAMMAR — .pcard (grid + related row)
   Hue steps per motion note 243:24: 100 card bg · 200 resting
   shape · 300 hovered · 600 ticker band · 700 type.
   ========================================================= */

.pcard {
  --c100: var(--sage-100);
  --c200: var(--sage-200);
  --c300: var(--sage-300);
  --c600: var(--sage-600);
  --c700: var(--sage-700);
  position: relative;
  border-radius: 20px;
  background: var(--c100);
  height: 374px;
  overflow: clip;
  box-shadow: 0 0 0 0 transparent;
  transition: box-shadow 0.45s ease, background-color 0.35s ease;
  will-change: transform;
}

.pcard[data-hue="coral"] {
  --c100: var(--coral-100);
  --c200: var(--coral-200);
  --c300: var(--coral-300);
  --c600: var(--coral-600);
  --c700: var(--coral-700);
}

.pcard[data-hue="butter"] {
  --c100: var(--butter-100);
  --c200: var(--butter-200);
  --c300: var(--butter-300);
  --c600: var(--butter-600);
  --c700: var(--butter-700);
}

.pcard.is-hover {
  box-shadow: 0 14px 34px -6px color-mix(in srgb, var(--c700) 18%, transparent);
}

.pcard-link {
  position: relative;
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
  outline-offset: -3px;
}

.pcard-head {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  display: flex;
  justify-content: space-between;
  z-index: 3;
  display: none;
}

.pcard-kicker,
.pcard-format {
  font-size: 8px;
  letter-spacing: 0.96px;
  color: var(--c700);
}

/* Bottom inset shrinks with the card (390→374) so the stage — which the
   shape and image are sized/centered against — stays exactly 258px tall. */
.pcard-stage {
  position: absolute;
  inset: 0 0 116px 0;
  z-index: 1;
}

.pcard-shape {
  position: absolute;
  left: 50%;
  top: calc(50% - 2px);
  width: 235px;
  height: 235px;
  translate: -50% -47%;
  color: var(--c200);
  transition: color 0.35s ease;
}

.pcard.is-hover .pcard-shape {
  color: var(--c300);
}

.pcard-shape svg {
  display: block;
  width: 100%;
  height: 100%;
}

.pcard-img {
  position: absolute;
  /* centered by layout (inset + auto margins), NOT by translate —
     GSAP owns this element's transform for the hover lift, and any
     CSS translate would get baked into its px offsets on first tween.
     top −4 / bottom 0 keeps the old 2px optical lift. */
  inset: -4px 0 0 0;
  margin: auto;
  /* auto size capped by max-* renders identically to the old forced
     68%×118% box + contain, but the border box hugs the product — the
     view-transition snapshot carries no letterbox bars, so the flight
     scales product-to-product instead of box-to-box */
  width: auto;
  height: auto;
  max-width: 68%;
  max-height: 118%;
  object-fit: contain;
  pointer-events: none;
  z-index: 2;
}

/* Vertical (portrait) cutouts — the tall yellow bags — read oversized
   at the shared width; pull them in 15% so they sit like the rest. */
.pcard-img.vertical-product-size {
  max-width: 50%;
}

.pcard-name {
  position: absolute;
  left: 18px;
  top: 272px;
  z-index: 3;
  font-family: "Melodrama", serif;
  font-weight: 420;
  font-size: 28px;
  line-height: 1.32;
  color: var(--c700);
}

.pcard-sub {
  position: absolute;
  left: 18px;
  top: 308px;
  z-index: 3;
  font-size: 10px;
  color: var(--color-text-secondary);
  opacity: 70%;
}

/* THE MARQUEE IS THE CTA — band grows 32 → 52, product ticker rolls
   out, VIEW PRODUCT rolls in, arrow slides in at the right edge. */
.pcard-band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 32px;
  background: var(--c600);
  overflow: clip;
  z-index: 4;
}

.pcard-band-swap {
  height: 200%;
}

.band-row {
  display: flex;
  align-items: center;
  height: 50%;
  white-space: nowrap;
  width: max-content;
}

.band-loop {
  display: inline-block;
  padding-left: 6px;
  font-size: 8px;
  letter-spacing: 1.12px;
  color: var(--butter-100);
}

.band-row--cta .band-loop {
  font-size: 9px;
  letter-spacing: 1.4px;
}

.pcard[data-hue="butter"] .band-loop {
  color: var(--neutral-100);
}

/* Title arrow — sits on the name line, right edge, pointing ↗.
   The wrapper is the mask: rotated −45° so its overflow clip edges run
   perpendicular to the slide, giving a diagonal wipe. JS moves the icon
   along the wrapper's local x axis (in from bottom-left, out top-right). */
.pcard-name-arrow {
  position: absolute;
  right: 18px;
  top: 274px;
  width: 34px;
  height: 34px;
  z-index: 3;
  display: grid;
  place-items: center;
  overflow: clip;
  rotate: -45deg;
  pointer-events: none;
}

.pcard-name-arrow .ui-arrow {
  width: 22px;
  height: 22px;
  color: var(--c700);
  stroke: currentColor;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* The #ic-arrow symbol now points ↗ natively, so the wrapper's −45° mask
   rotation would tip it to vertical — counter-rotate the glyph inside the
   svg (not the svg itself, which GSAP owns for the slide) back to 45°. */
.pcard-name-arrow .ui-arrow use {
  transform-box: fill-box;
  transform-origin: center;
  transform: rotate(45deg);
}

.pcard.is-hover .pcard-name-arrow .ui-arrow {
  opacity: 1;
}


/* =========================================================
   PRODUCTS PAGE — sticky rail + grid
   ========================================================= */

.pp-layout {
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr);
  gap: 0 44px;
  max-width: 1760px;
  margin: 0 auto;
  padding: 148px clamp(28px, 3.4vw, 64px) 120px;
}

/* ---------- rail ---------- */

.pp-rail {
  position: sticky;
  top: 96px;
  align-self: start;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 128px);
  min-height: 560px;
}

.pp-eyebrow {
  font-size: 10px;
  letter-spacing: 1.2px;
  color: var(--coral-600);
}

.pp-title-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 8px;
  transform-origin: left top;
}

.pp-title {
  font-family: "Melodrama", serif;
  font-weight: 420;
  font-size: 54px;
  line-height: 1.1;
  color: var(--sage-700);
}

.pp-title-mask {
  display: block;
  overflow: clip;
}

.pp-title-line {
  display: inline-block;
}

html.js:not(.pp-ready) .pp-title-line,
html.js:not(.pp-ready) .pp-count-wrap,
html.js:not(.pp-ready) .pp-rail-pill,
html.js:not(.pp-ready) .pp-trust,
html.js:not(.pp-ready) .pp-eyebrow {
  opacity: 0;
}

html.pp-ready .pp-title-line,
html.pp-ready .pp-count-wrap,
html.pp-ready .pp-rail-pill,
html.pp-ready .pp-trust,
html.pp-ready .pp-eyebrow {
  opacity: 1;
}

.pp-count-wrap {
  position: relative;
  display: none /* inline-flex */;
  align-items: center;
  margin-top: 14px;
}

.pp-title-shape {
  width: 26px;
  height: 26px;
  color: var(--butter-600);
  margin-right: 6px;
  order: 2;
}

.pp-title-shape svg {
  display: block;
  width: 100%;
  height: 100%;
}

.pp-count {
  font-size: 13px;
  letter-spacing: 0.26px;
  color: var(--coral-600);
  order: 1;
  display: inline-flex;
}

/* odometer plumbing (counts + ledger values) */
.odo-slot {
  display: inline-block;
  overflow: clip;
  height: 1.25em;
  vertical-align: bottom;
}

.odo-col {
  display: inline-flex;
  flex-direction: column;
}

.odo-col>span {
  height: 1.25em;
  line-height: 1.25;
}

.odo-char {
  display: inline-block;
}

/* ---------- rail list ---------- */

.pp-rail-list {
  position: relative;
  margin-top: 42px;
}

.pp-rail-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 13px 16px 13px 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--color-line-soft);
  font-family: "Melodrama", serif;
  font-weight: 500;
  font-size: 18px;
  color: var(--color-text-secondary);
  text-align: left;
  cursor: pointer;
  transition: color 0.35s ease;
}

.pp-rail-row .pp-row-label {
  flex: 1 1 auto;
  padding-left: 38px;
  transition: color .35s ease, transform .45s cubic-bezier(0.22, 1, 0.36, 1);
}

.pp-rail-row .pp-row-glyph {
  width: 22px;
  height: 22px;
  color: var(--c-glyph, var(--sage-500));
  margin-right: 16px;
  flex: 0 0 auto;
  transition: color .35s ease, transform .5s cubic-bezier(0.22, 1, 0.36, 1);
}

.pp-rail-row .pp-row-glyph svg {
  display: block;
  width: 100%;
  height: 100%;
}

.pp-rail-row[data-cat="doner"] {
  --c-glyph: var(--sage-500);
}

.pp-rail-row[data-cat="sucuk"] {
  --c-glyph: var(--coral-300);
}

.pp-rail-row[data-cat="salami"] {
  --c-glyph: var(--coral-300);
}

.pp-rail-row[data-cat="sausages"] {
  --c-glyph: var(--sage-500);
}

.pp-rail-row[data-cat="crispy"] {
  --c-glyph: var(--butter-500);
}

.pp-rail-row[data-cat="all"] {
  --c-glyph: var(--sage-500);
}

.pp-rail-row .pp-row-count {
  font-family: "Switzer", sans-serif;
  font-size: 10px;
  letter-spacing: 0.4px;
  color: var(--color-text-muted);
  transition: color .35s ease;
  flex: 0 0 auto;
  min-width: 22px;
  text-align: right;
}

.pp-rail-row.is-active {
  color: var(--butter-100);
  border-bottom-color: transparent;
}

.pp-rail-row.is-active .pp-row-label {
  color: var(--butter-100);
}

.pp-rail-row.is-active .pp-row-count {
  color: var(--coral-200);
}

.pp-rail-row.is-active .pp-row-glyph {
  color: color-mix(in srgb, var(--butter-100) 65%, transparent);
}

/* Inactive tab hover — quiet echo of the card grammar: label darkens
   and steps right, the glyph turns a quarter and deepens one tint,
   the count warms. Hover-capable pointers only. */
@media (hover: hover) {
  .pp-rail-row:not(.is-active):hover {
    color: var(--neutral-900);
  }

  .pp-rail-row:not(.is-active):hover .pp-row-label {
    transform: translateX(6px);
  }

  .pp-rail-row:not(.is-active):hover .pp-row-glyph {
    transform: rotate(90deg);
  }

  .pp-rail-row[data-cat="doner"]:not(.is-active):hover .pp-row-glyph,
  .pp-rail-row[data-cat="sausages"]:not(.is-active):hover .pp-row-glyph,
  .pp-rail-row[data-cat="all"]:not(.is-active):hover .pp-row-glyph {
    color: var(--sage-600);
  }

  .pp-rail-row[data-cat="sucuk"]:not(.is-active):hover .pp-row-glyph,
  .pp-rail-row[data-cat="salami"]:not(.is-active):hover .pp-row-glyph {
    color: var(--coral-500);
  }

  .pp-rail-row[data-cat="crispy"]:not(.is-active):hover .pp-row-glyph {
    color: var(--butter-600);
  }

  .pp-rail-row:not(.is-active):hover .pp-row-count {
    color: var(--coral-600);
  }
}

/* the travelling pill — FLIPs behind the active row (JS moves it) */
.pp-rail-pill {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 52px;
  border-radius: 16px;
  background: var(--sage-600);
  overflow: clip;
  z-index: 1;
  pointer-events: none;
}

.pp-rail-pill-shape {
  position: absolute;
  right: 0;
  top: -6px;
  width: 64px;
  height: 64px;
  color: var(--butter-100);
  opacity: 0.16;
}

.pp-rail-pill-shape svg {
  display: none;
  width: 100%;
  height: 100%;
}

/* ---------- trust chips (docked at rail bottom) ---------- */

.pp-trust {
  margin-top: auto;
  padding-top: 32px;
  display: flex;
  gap: 8px;
}

.pp-chip {
  padding: 6px 12px;
  border: 1px solid color-mix(in srgb, var(--neutral-900) 60%, transparent);
  border-radius: 12px;
  font-size: 9px;
  letter-spacing: 0.9px;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

/* ---------- grid ---------- */

.pp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-content: start;
}

html.js:not(.pp-ready) .pp-grid .pcard {
  opacity: 0;
}

html.pp-ready .pp-grid .pcard {
  opacity: 1;
}

/* =========================================================
   PRODUCT DETAIL PAGE
   ========================================================= */

.pd-hero {
  max-width: 1440px;
  margin: 0 auto;
  padding: 96px var(--component-pad) 0;
}

.pd-crumbrow {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
}

.pd-crumb,
.pd-crumb-index {
  font-size: 10px;
  letter-spacing: 0.8px;
  color: var(--color-text-muted);
}

.pd-crumb a {
  color: inherit;
  text-decoration: none;
  transition: color .25s;
}

.pd-crumb a:hover {
  color: var(--coral-600);
}

.pd-crumb-current {
  color: var(--color-text-primary);
}

.pd-hairline {
  display: block;
  height: 1px;
  background: var(--color-line-soft);
  margin-top: 14px;
  transform-origin: left center;
}

html.js:not(.pd-ready) .pd-img,
html.js:not(.pd-ready) .pd-shape,
html.js:not(.pd-ready) .pd-hairline,
html.js:not(.pd-ready) .pd-crumbrow,
html.js:not(.pd-ready) .pd-eyebrow,
html.js:not(.pd-ready) .pd-name-line,
html.js:not(.pd-ready) .pd-name-dot,
html.js:not(.pd-ready) .pd-desc,
html.js:not(.pd-ready) .pd-ledger>div,
html.js:not(.pd-ready) .pd-actions,
html.js:not(.pd-ready) .pd-fact-chip,
html.js:not(.pd-ready) .pd-thumbs,
html.js:not(.pd-ready) .pd-ghost {
  opacity: 0;
}

/* Inbound morph claimed by the head pagereveal capturer — the hero pair is
   the transition's live new state and must be visible before pd-ready lands.
   Same specificity as the pre-hide above; source order decides. */
html.js.pd-via-vt .pd-img,
html.js.pd-via-vt .pd-shape {
  opacity: 1;
}

html.pd-ready .pd-img,
html.pd-ready .pd-shape,
html.pd-ready .pd-hairline,
html.pd-ready .pd-crumbrow,
html.pd-ready .pd-eyebrow,
html.pd-ready .pd-name-line,
html.pd-ready .pd-name-dot,
html.pd-ready .pd-desc,
html.pd-ready .pd-ledger>div,
html.pd-ready .pd-actions,
html.pd-ready .pd-fact-chip,
html.pd-ready .pd-thumbs,
html.pd-ready .pd-ghost {
  opacity: 1;
}

.pd-hero-grid {
  display: grid;
  grid-template-columns: 64px minmax(0, 1.2fr) 480px;
  gap: 0 38px;
  padding-top: 44px;
}

/* ---------- thumbs ---------- */

.pd-thumbs {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 20px;
}

.pd-thumb {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: var(--neutral-200);
  overflow: clip;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.35s ease;
}

.pd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;

}

.pd-thumb.is-active {
  opacity: 1;
}

.pd-thumb-ring {
  position: absolute;
  inset: -2px;
  pointer-events: none;
}

.pd-thumb-ring circle {
  fill: none;
  stroke: var(--sage-700);
  stroke-width: 1.5;
  stroke-dasharray: 214;
  stroke-dashoffset: 214;
  transform: rotate(-90deg);
  transform-origin: center;
}

.pd-thumb.is-active .pd-thumb-ring circle {
  stroke-dashoffset: 0;
}

/* ---------- hero stage ---------- */

.pd-stage {
  position: relative;
  height: 480px;
  max-width: 440px;
  justify-self: center;
  width: 100%;
  margin-left: -24px;
}

.pd-ghost {
  position: absolute;
  left: -24px;
  top: -64px;
  font-family: "Melodrama", serif;
  font-weight: 420;
  font-size: clamp(120px, 14vw, 200px);
  line-height: 1.35;
  color: var(--sage-300);
  opacity: 0.4;
  z-index: 1;
  display: inline-flex;
}

.pd-ghost .odo-slot,
.pd-ghost .odo-col>span {
  height: 1.35em;
  line-height: 1.35;
}

.pd-shape {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 88%;
  aspect-ratio: 1;
  translate: -50% -50%;
  color: var(--sage-200);
  transition: color 0.35s ease;
  z-index: 2;
}

.pd-stage:hover .pd-shape {
  color: var(--sage-300);
}

.pd-shape svg {
  display: block;
  width: 100%;
  height: 100%;
}

.pd-hue-coral .pd-shape {
  color: var(--coral-200);
}

.pd-hue-coral .pd-stage:hover .pd-shape,
.pd-hue-coral .pd-stage.is-hover .pd-shape {
  color: var(--coral-300);
}

.pd-hue-coral .pd-ghost {
  color: var(--coral-300);
}

.pd-hue-coral .pd-thumb-ring circle {
  stroke: var(--coral-700);
}

.pd-hue-butter .pd-shape {
  color: var(--butter-200);
}

.pd-hue-butter .pd-stage:hover .pd-shape,
.pd-hue-butter .pd-stage.is-hover .pd-shape {
  color: var(--butter-300);
}

.pd-hue-butter .pd-ghost {
  color: var(--butter-300);
}

.pd-hue-butter .pd-thumb-ring circle {
  stroke: var(--butter-700);
}

.pd-img {
  position: absolute;
  /* layout centering — GSAP tweens y on hover; see .pcard-img */
  inset: 0;
  margin: auto;
  /* content-hugging box (same rendered size as the old inset:0 + contain)
     so the view-transition snapshot has no letterbox — see .pcard-img */
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;

  z-index: 3;
  view-transition-name: pd-hero-img;
}

.pd-shape {
  view-transition-name: pd-hero-shape;
}

.pd-fact-chip {
  position: absolute;
  z-index: 4;
  padding: 8px 14px;
  background: var(--butter-100);
  border: 1px solid var(--neutral-900);
  border-radius: 999px;
  font-size: 9px;
  letter-spacing: 0.54px;
  color: var(--neutral-900);
  white-space: nowrap;
}

.pd-fact-chip--a {
  right: 8%;
  top: 17%;
  rotate: 5deg;
}

.pd-fact-chip--b {
  left: 3%;
  bottom: 17%;
  rotate: -4deg;
}

/* ---------- info column ---------- */

.pd-info {
  padding-top: 20px;
}

.pd-eyebrow {
  font-size: 10px;
  letter-spacing: 1.2px;
  color: var(--sage-600);
}

.pd-hue-coral .pd-info .pd-eyebrow {
  color: var(--coral-600);
}

.pd-hue-butter .pd-info .pd-eyebrow {
  color: var(--butter-700);
}

.pd-name {
  margin-top: 10px;
  font-family: "Melodrama", serif;
  font-weight: 420;
  font-size: clamp(44px, 4.4vw, 64px);
  line-height: 1.18;
  color: var(--color-text-primary);
}

.pd-name-mask {
  display: block;
  overflow: clip;
}

.pd-name-line {
  display: inline-block;
}

.pd-name-dot {
  display: inline-block;
  color: var(--coral-500);
}

.pd-desc {
  margin-top: 26px;
  max-width: 470px;
  font-size: 15px;
  line-height: 25px;
  color: var(--color-text-secondary);
}

/* ---------- spec ledger ---------- */

.pd-ledger {
  margin-top: 44px;
}

.pd-ledger>div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 17px 0;
  position: relative;
  width: 95%;
}

.pd-ledger>div::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--color-line-soft);
  transform-origin: left center;
}

.pd-ledger>div:last-child::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--color-line-soft);
  transform-origin: left center;
}

.pd-ledger dt {
  font-size: 9px;
  letter-spacing: 0.9px;
  color: var(--color-text-muted);
}

.pd-ledger dd {
  font-family: "Melodrama", serif;
  font-weight: 420;
  font-size: 18px;
  color: var(--color-text-primary);
  display: inline-flex;
}

/* ---------- actions ---------- */

.pd-actions {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 26px;
}

.pd-quote-btn {
  border: 0;
  font: inherit;
}

.pd-spec-link {
  position: relative;
  display: inline-block;
  text-decoration: none;
  color: var(--neutral-900);
  font-size: 13px;
  letter-spacing: 1.3px;
  padding-bottom: 8px;
}

.pd-spec-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.pd-spec-row .ui-arrow {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

.pd-spec-underline {
  position: absolute;
  left: 0;
  right: 12px;
  bottom: 0;
  height: 1px;
  background: var(--neutral-900);
}

/* underline redraws left → right in coral on hover */
.pd-spec-underline::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--coral-600);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.pd-spec-link:hover .pd-spec-underline::after {
  transform: scaleX(1);
}

/* ---------- quote panel (pill FLIP-expands, no page jump) ---------- */

.pd-quote-veil {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: color-mix(in srgb, var(--neutral-900) 32%, transparent);
}

.pd-quote-panel {
  position: fixed;
  z-index: 91;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  width: min(520px, calc(100vw - 40px));
  background: var(--neutral-100);
  border-radius: 24px;
  padding: 36px 36px 32px;
  box-shadow: 0 30px 80px -20px color-mix(in srgb, var(--neutral-900) 35%, transparent);
  transform-origin: center;
}

.pd-quote-close {
  position: absolute;
  top: 16px;
  right: 18px;
  border: 0;
  background: none;
  font-size: 14px;
  color: var(--color-text-muted);
  cursor: pointer;
}

.pd-quote-close:hover {
  color: var(--neutral-900);
}

.pd-quote-form {
  margin-top: 22px;
  display: grid;
  gap: 16px;
}

.pd-quote-form label {
  display: grid;
  gap: 6px;
  font-size: 9px;
  letter-spacing: 0.9px;
  color: var(--color-text-muted);
}

.pd-quote-form input,
.pd-quote-form textarea {
  font: 14px/1.5 "Switzer", sans-serif;
  color: var(--neutral-900);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--color-line-strong);
  padding: 6px 0 8px;
  border-radius: 0;
  outline: none;
  resize: vertical;
  transition: border-color .25s;
}

.pd-quote-form input:focus,
.pd-quote-form textarea:focus {
  border-bottom-color: var(--coral-600);
}

.pd-quote-form .ui-button {
  margin-top: 6px;
  border: 0;
  font: inherit;
  justify-self: start;
}

/* ---------- related row ---------- */

.pd-related {
  max-width: 1440px;
  margin: 0 auto;
  padding: 110px 80px 120px;
}

.pd-related-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 40px;
}

.pd-related-title {
  font-family: "Melodrama", serif;
  font-weight: 420;
  font-size: clamp(26px, 2.6vw, 32px);
  color: var(--color-text-primary);
}

.pd-related-all {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 10px;
  letter-spacing: 0.8px;
  color: var(--neutral-900);
  transition: color .25s;
}

.pd-related-all:hover {
  color: var(--coral-600);
}

.pd-related-all .ui-arrow {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

.pd-related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

html.js:not(.pd-ready) .pd-related-grid .pcard {
  opacity: 0;
}

html.pd-ready .pd-related-grid .pcard {
  opacity: 1;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1240px) {
  .pp-layout {
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 0 36px;
    padding-inline: 48px;
  }

  .pp-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pd-hero,
  .pd-related {
    padding-inline: 48px;
  }

  .pd-hero-grid {
    grid-template-columns: 64px minmax(0, 1.2fr) 420px;
    gap: 0 30px;
  }

  .pd-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1020px) {
  .pd-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px 0;
    padding-top: 32px;
  }

  .pd-stage {
    height: min(78vw, 540px);
    justify-self: center;
  }

  .pd-ghost {
    top: -34px;
  }

  /* thumbs become a horizontal row under the stage */
  .pd-thumbs {
    order: 2;
    flex-direction: row;
    justify-content: center;
    padding-top: 0;
  }

  .pd-stage {
    order: 1;
  }

  .pd-info {
    order: 3;
    padding-top: 0;
    max-width: 560px;
  }
}

@media (max-width: 860px) {
  /* block flow (not grid) — sticky needs the chips' containing block to be
     the whole page column, and a grid item's sticky range is only its own
     grid area */
  .pp-layout {
    display: block;
    padding: 120px 20px 80px;
  }

  /* the rail folds into a page header + horizontal category chips;
     display:contents lifts head/chips/trust into .pp-layout's flow so the
     chip row can stick past the rail's own height */
  .pp-rail {
    display: contents;
  }

  .pp-title {
    font-size: 42px;
  }

  .pp-rail-list {
    /* docks flush to the viewport top — the nav pill auto-hides on
       scroll-down (is-pill-hidden), so the chips own the top edge */
    position: sticky;
    top: env(safe-area-inset-top, 0px);
    z-index: 30;
    background: var(--neutral-100);
    margin-top: 14px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-block: 10px 12px;
    margin-inline: -20px;
    padding-inline: 20px;
  }

  .pp-rail-list::-webkit-scrollbar {
    display: none;
  }

  .pp-rail-pill {
    display: none;
  }

  .pp-rail-row {
    flex: 0 0 auto;
    width: auto;
    border: 1px solid var(--color-line-soft);
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 15px;
    gap: 8px;
    transition: background-color .3s ease, color .3s ease, border-color .3s ease;
  }

  .pp-rail-row .pp-row-label {
    padding-left: 0;
  }

  .pp-rail-row .pp-row-glyph {
    width: 16px;
    height: 16px;
    margin-right: 0;
    order: -1;
  }

  .pp-rail-row .pp-row-count {
    min-width: 0;
  }

  .pp-rail-row.is-active {
    background: var(--sage-700);
    border-color: var(--sage-700);
  }

  .pp-trust {
    margin-top: 4px;
    padding-top: 18px;
  }

  .pp-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 420px;
    /* block-flow .pp-layout has no grid gap — restore the rail→grid gap */
    margin: 34px auto 0;
    width: 100%;
  }

  .pd-hero {
    padding: 112px 20px 0;
  }

  .pd-related {
    padding: 84px 20px 90px;
  }

  .pd-crumbrow {
    flex-direction: column;
    gap: 6px;
  }

  .pd-stage {
    height: min(88vw, 460px);
  }

  .pd-fact-chip--a {
    right: 0;
    top: 10%;
  }

  .pd-fact-chip--b {
    left: 0;
    bottom: 10%;
  }

  .pd-ledger {
    margin-top: 34px;
  }

  .pd-ledger dd {
    font-size: 16px;
  }

  /* related row scrolls horizontally with snap */
  .pd-related-grid {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin-inline: -20px;
    padding-inline: 20px;
  }

  .pd-related-grid::-webkit-scrollbar {
    display: none;
  }

  .pd-related-grid .pcard {
    flex: 0 0 min(78vw, 300px);
    scroll-snap-align: start;
  }
}

@media (max-width: 560px) {
  .pp-grid {
    max-width: none;
  }

  .pd-quote-panel {
    padding: 28px 22px 24px;
  }
}

@media (min-width: 861px) and (max-width: 1240px) {
  .pd-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor {
    display: none !important;
  }

  html.js:not(.pp-ready) .pp-grid .pcard,
  html.js:not(.pp-ready) .pp-title-line,
  html.js:not(.pp-ready) .pp-count-wrap,
  html.js:not(.pp-ready) .pp-eyebrow {
    opacity: 1;
  }

  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}