/* ==========================================================================
   Product detail page.

   Layout is a two-column grid: the gallery holds the left column across both
   rows and sticks while the right column (buy block, then the dossier) scrolls
   past it. Class names `product-gallery-main` and the skeleton hooks are load
   bearing — pdp-motion.css and product.html both name them.
   ========================================================================== */

/* Escape the shared `html, body { height: 100%; overflow-x: hidden }` in
   storestyle.css. With html pinned to the viewport the document cannot scroll,
   which left the dossier below the fold unreachable. Same fix the animal page
   carries in animal.v3.css. */
html,
body.product-v2 {
  height: auto;
  min-height: 100vh;
  overflow: visible;
}

/* The breadcrumb markup is shared with the animal page, but animal.css scopes
   its styling to .animal-v2 — on this page the body is .product-v2, so the
   link rendered as default browser blue, flush against the viewport edge. */
.product-v2 .animal-breadcrumb {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px clamp(18px, 4vw, 32px) 0;
  font-family: 'Josefin_Light', 'Josefin Sans', Arial, sans-serif;
  font-size: 13px;
  letter-spacing: .06em;
}

.product-v2 .animal-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.product-v2 .animal-breadcrumb a:hover { color: var(--fg); }

.product-v2 .animal-breadcrumb a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.product-v2 .product-root {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 32px);
}

.product-v2 .pdp {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  grid-template-areas:
    "gallery buy"
    "gallery file";
  grid-template-rows: auto 1fr;
  gap: 32px 56px;
  align-items: start;
  padding: 32px 0 72px;
}

/* ── Gallery ─────────────────────────────────────────────── */

.product-v2 .pdp-gallery {
  grid-area: gallery;
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* One frame for every product, 4:5, the same ratio the store grid uses. The catalogue
   has no common shape of its own — sources run from 0.74 to 1.33 — so a fixed frame
   with `cover` is the only way every product reads at the same size. */
.product-v2 .product-gallery-main {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--v2-image-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--v2-image-border);
  cursor: zoom-in;
}

.product-v2 .product-gallery-main img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-v2 .product-gallery-main:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.product-v2 .product-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }

.product-v2 .product-thumb {
  flex: 0 0 80px;
  height: 100px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--v2-image-bg);
  box-shadow: 0 0 0 1px var(--v2-image-border);
  cursor: pointer;
  transition: box-shadow 160ms ease;
}

.product-v2 .product-thumb.active { box-shadow: 0 0 0 2px var(--fg); }
/* in the dark theme --fg is light, and a light ring round a light tile is no ring at all */
html.dark-theme .product-v2 .product-thumb.active { box-shadow: 0 0 0 2px var(--gold); }
.product-v2 .product-thumb:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.product-v2 .product-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* ── 3D (mugs, magnets) ──────────────────────────────────────
   js/product.js lays .pdp-inspect over the photo frame, the same 4:5 and the same
   ring, so switching between them moves nothing. */
.product-v2 .pdp-stage { position: relative; }

.product-v2 .pdp-inspect {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--v2-image-bg);
  box-shadow: 0 0 0 1px var(--v2-image-border);
  opacity: 0;
  transition: opacity 260ms ease;
}
.product-v2 .pdp-inspect.is-ready.is-shown { opacity: 1; }
.product-v2 .pdp-inspect:not(.is-shown) { pointer-events: none; }   /* until chosen, the photo under it stays live */
/* every piece stands in a photographer's studio: the light grey sweep of its own
   photographs, so choosing 3D changes the object, not the room (the cream ground
   made a 3D mug read as shrunken next to its photo, 25 Oct 2026) */
.product-v2 .pdp-inspect { background: radial-gradient(120% 85% at 50% 38%, #f6f5f3 0%, #e7e5e1 55%, #d6d3ce 100%); }
/* the same light studio in the dark theme: the photographs beside it are always shot on
   it, and a black tee on a dark ground all but vanished (iPhone, 25 Oct 2026) */

.product-v2 .insp-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;               /* a vertical swipe still scrolls the page */
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.product-v2 .pdp-inspect.is-held .insp-canvas { cursor: grabbing; }
.product-v2 .insp-canvas:focus-visible { outline: 2px solid var(--gold); outline-offset: -4px; border-radius: 16px; }

.product-v2 .pdp-inspect-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg, #fff) 82%, transparent);
  color: var(--fg-muted, var(--fg));
  font-size: 12px;
  letter-spacing: .02em;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 400ms ease;
}
.product-v2 .pdp-inspect.was-held .pdp-inspect-hint { opacity: 0; }

.product-v2 button.product-thumb-3d.is-pending { opacity: .4; cursor: default; }
.product-v2 button.product-thumb-3d {
  /* the tile is always the light image ground, so its label is always dark ink — in the
     dark theme --fg went light and the label all but vanished (25 Oct 2026). `button.`
     because storestyle.css's `.product-v2 button.product-thumb` (color: inherit,
     display: block) outweighed the plain class and won. */
  color: #24211c;
  display: grid;
  place-items: center;
  font-family: 'Josefin_Medium', 'Josefin Sans', Arial, sans-serif;
  font-size: 15px;
  letter-spacing: .14em;
}

/* ── You may also like (js/product.js mountSuggestions) ──────────
   The store's own cards on the store's staggered wall; eight on a wide screen, six
   on a tablet, four on a phone, so it is a glance, not a second store. */
.product-v2 .pdp-suggest {
  margin: 8px 0 72px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.product-v2 .pdp-suggest-head {
  margin: 0 0 22px;
  font-family: 'Josefin_Medium', 'Josefin Sans', Arial, sans-serif;
  font-size: 13px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
}
@media (max-width: 1199px) { .product-v2 .pdp-suggest .carousel-item:nth-child(n + 7) { display: none; } }
@media (max-width: 639px)  { .product-v2 .pdp-suggest .carousel-item:nth-child(n + 5) { display: none; } }

/* ── Buy block ───────────────────────────────────────────── */

.product-v2 .pdp-buy {
  grid-area: buy;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 520px;
}

.product-v2 .pdp-eyebrow {
  margin: 0;
  font-family: 'Josefin_Medium', 'Josefin Sans', Arial, sans-serif;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
}

.product-v2 .pdp-title {
  margin: 0;
  font-family: 'Josefin_Bold', 'Josefin Sans', Arial, sans-serif;
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--fg);
}

/* A maker's piece: who made it, before anything else is said about it. */
.product-v2 .pdp-seller {
  margin: -4px 0 0;
  font-size: 15px;
  color: var(--muted);
}
.product-v2 .pdp-seller a {
  color: var(--gold-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* A lesson: how long, where, how many sessions are open — the facts before the dates. */
.product-v2 .pdp-lesson {
  margin: 0;
  display: grid;
  gap: 6px;
  font-size: 15px;
}
.product-v2 .pdp-lesson div {
  display: grid;
  grid-template-columns: 6.5em 1fr;
  gap: 8px;
}
.product-v2 .pdp-lesson dt {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-top: 2px;
}
.product-v2 .pdp-lesson dd {
  margin: 0;
  min-width: 0;
}
.product-v2 .pdp-lesson-hint {
  color: var(--muted);
  font-size: 13px;
}

/* The catalogue's own punchline, given the size it has always deserved. */
.product-v2 .pdp-hook {
  margin: 0;
  font-family: 'Josefin_Medium', 'Josefin Sans', Arial, sans-serif;
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.25;
  color: var(--fg);
  border-left: 3px solid var(--gold);
  padding-left: 14px;
}

.product-v2 .pdp-price {
  margin: 0;
  font-family: 'Josefin_Medium', 'Josefin Sans', Arial, sans-serif;
  font-size: 24px;
  color: var(--fg);
}

.product-v2 .pdp-picker { margin-top: 4px; }

.product-v2 .pdp-reassure {
  margin: 0;
  font-family: 'Josefin_Light', 'Josefin Sans', Arial, sans-serif;
  font-size: 13px;
  color: var(--muted);
}

.product-v2 .pdp-reassure a { color: var(--gold); text-underline-offset: 2px; }

/* links inside the dark "What inspired this piece" panel were the browser's default
   blue on near-black (the India Post line on every stamp bottle) */
.product-v2 .pdp-story a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }

/* "← All products" was a 13px-tall target on a phone: pad it to a thumb's size
   without moving the type */
.product-v2 .animal-breadcrumb a { display: inline-block; padding: 14px 10px 14px 0; margin: -14px 0; }

/* ── The file ────────────────────────────────────────────── */

/* Inverted on purpose: a dossier should read as a different document from the
   page it sits on. Fixed ink colours, not tokens — this panel looks the same
   in both themes, which is what makes it feel stamped rather than styled. */
.product-v2 .pdp-file {
  grid-area: file;
  background: #14120f;
  color: #f2ebdc;
  border: 1px solid rgba(212, 182, 132, 0.28);
  border-radius: 14px;
  padding: 26px 28px 22px;
  max-width: 520px;
}

.product-v2 .pdp-file-head {
  margin: 0 0 14px;
  font-family: 'Josefin_Bold', 'Josefin Sans', Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: #d4b684;
}

.product-v2 .pdp-file[data-voice="field"] .pdp-file-head { color: #7ed192; }

.product-v2 .pdp-story {
  margin: 0 0 20px;
  font-family: 'Josefin_Light', 'Josefin Sans', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(242, 235, 220, 0.9);
}

.product-v2 .pdp-rows { margin: 0; }

.product-v2 .pdp-row {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 14px;
  padding: 11px 0;
  border-top: 1px dashed rgba(212, 182, 132, 0.24);
}

.product-v2 .pdp-row dt {
  font-family: 'Josefin_Medium', 'Josefin Sans', Arial, sans-serif;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(212, 182, 132, 0.86);
  padding-top: 3px;
}

.product-v2 .pdp-row dd {
  margin: 0;
  font-family: 'Josefin_Light', 'Josefin Sans', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: #f2ebdc;
}

.product-v2 .pdp-flag {
  margin: 18px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(126, 209, 146, 0.12);
  border: 1px solid rgba(126, 209, 146, 0.34);
  font-family: 'Josefin_Light', 'Josefin Sans', Arial, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #a9e2b8;
}

/* ── Skeleton (painted by product.html before the fetch lands) ── */

.product-v2 .product-shell {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: start;
  padding: 32px 0 64px;
}

.product-v2 .product-shell.skeleton .product-gallery-skeleton {
  aspect-ratio: 4/5;
  background: var(--line);
  border-radius: 16px;
  animation: animal-pulse 1.4s ease-in-out infinite;
}

.product-v2 .product-info-skeleton { display: flex; flex-direction: column; gap: 14px; }
.product-v2 .product-info-skeleton .sk-line { background: var(--line); border-radius: 4px; animation: animal-pulse 1.4s ease-in-out infinite; }
.product-v2 .product-info-skeleton .sk-line-xxl  { height: 44px; width: 70%; }
.product-v2 .product-info-skeleton .sk-line-md   { height: 22px; width: 30%; }
.product-v2 .product-info-skeleton .sk-line-full { height: 14px; width: 100%; }
.product-v2 .product-info-skeleton .sk-line-half { height: 14px; width: 60%; }

/* ── Narrow ──────────────────────────────────────────────── */

@media (max-width: 900px) {
  .product-v2 .pdp {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "gallery" "buy" "file";
    gap: 28px;
    padding: 20px 0 48px;
  }
  .product-v2 .pdp-gallery { position: static; }
  .product-v2 .pdp-buy,
  .product-v2 .pdp-file { max-width: none; }
  .product-v2 .product-shell { grid-template-columns: 1fr; gap: 28px; padding: 20px 0 40px; }
}

/* Sold out replaces the buy control entirely — see js/product.js. */
.product-v2 .pdp-sold-out {
  margin: 0;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--fg) 6%, transparent);
  font-family: 'Josefin_Medium', 'Josefin Sans', Arial, sans-serif;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

/* ==========================================================================
   Overflow containment.

   Grid tracks and flex items both default to a min-width of `auto`, so a single
   unbreakable string — a pasted URL in the story copy, a long product title —
   sets the floor for the whole column and pushes the page sideways. Every child
   of the PDP grid gets an explicit zero minimum, and prose is allowed to break.
   ========================================================================== */
.product-v2 .pdp > *,
.product-v2 .pdp-gallery,
.product-v2 .pdp-buy,
.product-v2 .pdp-file {
  min-width: 0;
}

/* `max-width` is what actually contains an over-wide image. `height: auto` was here
   too, and because this block sits AFTER the gallery rules at the same specificity it
   quietly beat `height: 100%` on the framed images — so a square photo sat 4:5-boxed
   with a band of dead background under it, and every thumbnail did the same. Height is
   `auto` by default for a replaced element, so nothing needs it stated here. */
.product-v2 .pdp-gallery img,
.product-v2 .pdp-thumbs img {
  max-width: 100%;
}

.product-v2 .pdp-hook,
.product-v2 .pdp-file,
.product-v2 .pdp-file p,
.product-v2 .pdp-file dd,
.product-v2 .pdp-story {
  overflow-wrap: anywhere;
}

/* Belt and braces: nothing on a product page may scroll the document sideways. */
.product-v2 body,
body.product-v2 { overflow-x: hidden; }


/* ── Share, and the page for a product that is not there ─────── */
.product-v2 .pdp-share {
  align-self: flex-start;
  margin-top: -10px;           /* sits with the line above it, not a section of its own */
  padding: 8px 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.product-v2 .pdp-share:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.pdp-missing {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-height: 52vh;
  align-content: center;
  padding: 48px 16px;
  text-align: center;
}
.pdp-missing h1 {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: clamp(30px, 5vw, 44px);
  color: var(--fg);
}
.pdp-missing p {
  margin: 0;
  max-width: 40ch;
  font-family: 'Josefin_Light', 'Josefin Sans', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}
.pdp-missing-cta {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  margin-top: 10px;
  padding: 0 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg);
  text-decoration: none;
  font-family: 'Josefin_Medium', 'Josefin Sans', Arial, sans-serif;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.pdp-missing-cta:hover, .pdp-missing-cta:focus-visible { border-color: var(--gold); color: var(--gold); }
