/* PDP v3 — the tiled product page (ratified architecture 98c93484, mockup v3.23).
 *
 * Every rule in this file is scoped under `body.pdp-v3`, the class inc/pdp-v3.php
 * adds on `wp` only when peptidology_pdp_v3_enabled() is true for the queried
 * product. With the flag off this stylesheet is never enqueued, and even if it
 * were, nothing it contains can match.
 *
 * Ports the mockup CSS (mock-part1.html) to the pv3- class contract in §6 of
 * deploy/pdp-v3/CONTRACT.md. The measurements that decide the fold — gallery
 * 200 px, chip 42 px, tile padding 10 px, tile margin 10 px, CTA 52 px — are the
 * mockup's exact values, because the 390x844 fold budget (.pv3-add bottom edge
 * <= 825 px with a 57 px header and a 36 px ticker) was measured against them.
 *
 * Two families of override live here besides our own components:
 *   1. the page shell (main-wrapper / products-crd-sec / container / bootstrap
 *      row / div.product / .summary / the WooCommerce gallery), reset so the
 *      tiles sit in the mockup's box model;
 *   2. a belt that hides the v2 (.pep-*) trust / certainty / kit / sticky
 *      furniture from css/pdp-redesign.css, which still loads whenever the
 *      product also carries the v2 ACF flag.
 *
 * Indentation follows the sibling stylesheet (css/pdp-redesign.css): 2 spaces.
 */

/* ============================================================
   1. Tokens
   ============================================================ */

body.pdp-v3 {
  --pv3-ink: #0A0A0A;
  --pv3-ink2: #3C3C43;
  --pv3-grey: #6E6E73;
  --pv3-line: rgba(10, 10, 10, .12);
  --pv3-panel: #F6F8F9;
  --pv3-white: #FFFFFF;
  --pv3-pink: #E10882;
  /* CONTRACT §8 calls #007A9E "teal"; the mockup names the same value --blue
     and uses it for every link and focus ring. Token kept as --pv3-blue. */
  --pv3-blue: #007A9E;
  --pv3-green: #1F7A4D;
  --pv3-amber: #B3690B;
  --pv3-pinkbg: #fde7f2;
  --pv3-pinkink: #9b0a5a;
  --pv3-off: #c9c9ce;
  --pv3-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", Helvetica, Arial, sans-serif;

  /* The viewer's dark mode must not repaint a store page built on one ink and
     one panel; the mockup pins light and so does production (iOS lesson:
     without this, button labels vanished on Josh's iPhone). */
  color-scheme: light;
  background-color: var(--pv3-white);
}

/* Explicit colour on every control we emit — iOS repaints a bare <button>
   label in its own system ink otherwise (13 Sep, chips lost their labels). */
body.pdp-v3 button {
  color: var(--pv3-ink);
}

/* ============================================================
   2. Page shell — put the tiles in the mockup's box model
   ============================================================ */

/* The fixed header sits at the ticker's height; .main-wrapper's own padding is
   what normally clears it, and the ticker + header + gallery arithmetic that
   the fold budget rests on needs that padding to be ours, not the shell's.
   The footer is a sibling inside the same wrapper, so its gutter is restored
   below at the same two breakpoints the shell uses (20px / 12px under 480). */
body.pdp-v3 .main-wrapper {
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
}
body.pdp-v3 .main-wrapper > footer {
  padding-left: 20px;
  padding-right: 20px;
}
@media (max-width: 479px) {
  body.pdp-v3 .main-wrapper > footer {
    padding-left: 12px;
    padding-right: 12px;
  }
}

body.pdp-v3 .products-crd-sec.cmn-gap {
  padding-top: 104px;
  padding-bottom: 0;
}
body.pdp-v3 .products-crd-sec > .container {
  max-width: none;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}
/* The theme's row carries --bs-gutter-y:50px, i.e. a -50px pull on the row and
   a +50px margin on every child. Neutral vertically, but it also spends 15px a
   side that the tiles need. */
body.pdp-v3 .products-crd-row {
  --bs-gutter-x: 0;
  --bs-gutter-y: 0;
  margin: 0;
}
body.pdp-v3 .products-crd-row > * {
  margin-top: 0;
  padding-left: 0;
  padding-right: 0;
}

/* v2 turns this container into a gradient card with 32px of padding and a 44px
   flex gap. v3 is a white page with a full-bleed gallery. */
body.pdp-v3 div.product.type-product {
  display: block;
  background: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0 16px 0;
  margin: 0;
  gap: 0;
  font-family: var(--pv3-sans);
  color: var(--pv3-ink);
  -webkit-font-smoothing: antialiased;
}

body.pdp-v3 div.product.type-product .summary.entry-summary {
  float: none;
  width: auto;
  max-width: none;
  flex: none;
  background: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
  min-width: 0;
}

/* ---- WooCommerce gallery: 200 px on the phone, contained, full bleed ----
   The v2 sheet clamps the image with max-height:max(min(34svh,380px),260px)
   and rounds/shadows it; flexslider also writes an inline height onto
   .flex-viewport. Both are outranked here, under body.pdp-v3 only. */
body.pdp-v3 div.product.type-product .woocommerce-product-gallery {
  position: static;
  float: none;
  width: auto;
  max-width: none;
  flex: none;
  min-width: 0;
  margin: 0 -16px;
  padding: 0;
  height: 200px;
  background: var(--pv3-panel);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 0;
}
body.pdp-v3 div.product.type-product .woocommerce-product-gallery .flex-viewport,
body.pdp-v3 div.product.type-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
  height: 200px !important;
  width: 100%;
  margin: 0;
  padding: 0;
}
body.pdp-v3 div.product.type-product .woocommerce-product-gallery .woocommerce-product-gallery__image,
body.pdp-v3 div.product.type-product .woocommerce-product-gallery figure {
  height: 200px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.pdp-v3 div.product.type-product .woocommerce-product-gallery img {
  height: 200px !important;
  width: auto !important;
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 0;
  box-shadow: none;
}
body.pdp-v3 .woocommerce-product-gallery__trigger,
body.pdp-v3 .woocommerce-product-gallery .flex-control-nav,
body.pdp-v3 .woocommerce-product-gallery .flex-direction-nav {
  display: none !important;
}

/* ---- the native WC form stays in the DOM, off-screen ----
   Never display:none: wc-add-to-cart-variation enables/disables the real Add
   button and reads the select; hiding the subtree outright leaves the cart
   engine dead. Off-screen keeps it focusable for assistive tech. */
body.pdp-v3 form.variations_form,
body.pdp-v3 div.product.type-product .summary form.cart {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

/* ---- belt: v2 furniture the takeover also removes server-side ---- */
body.pdp-v3 .pep-trust,
body.pdp-v3 .pep-trust2,
body.pdp-v3 .pep-trust-link,
body.pdp-v3 .pep-certainty,
body.pdp-v3 .pep-kit-nudge,
body.pdp-v3 .pep-kitnudge,
body.pdp-v3 .pep-kit-table,
body.pdp-v3 .pep-kit-social,
body.pdp-v3 .pep-stickybar,
body.pdp-v3 .pep-cta-proof,
body.pdp-v3 .pep-proofstrip,
body.pdp-v3 .pep-masspills,
body.pdp-v3 .summary .pep-pay,
body.pdp-v3 .summary .pep-pay-note,
body.pdp-v3 .summary .pep-cutoff,
body.pdp-v3 .summary .pep-delivery-wrap,
body.pdp-v3 .summary .pep-delivery,
body.pdp-v3 .summary .pep-assure,
body.pdp-v3 .summary .pep-b3g1-line,
body.pdp-v3 .summary > .awdr-bulk-customizable-table {
  display: none !important;
}

/* ============================================================
   3. Primitives
   ============================================================ */

body.pdp-v3 .pv3-atf {
  font-family: var(--pv3-sans);
  color: var(--pv3-ink);
}
body.pdp-v3 .pv3-atf *,
body.pdp-v3 .pv3-sec *,
body.pdp-v3 #pv3-sticky *,
body.pdp-v3 #pv3-overlay * {
  box-sizing: border-box;
}

body.pdp-v3 .pv3-tile {
  background: var(--pv3-panel);
  border-radius: 12px;
  padding: 10px;
  margin-top: 10px;
}
body.pdp-v3 .pv3-tile.pv3-flat {
  background: transparent;
  padding: 0;
}

body.pdp-v3 .pv3-row44 {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
}
body.pdp-v3 button.pv3-row44 {
  width: 100%;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 14px;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
body.pdp-v3 .pv3-row44 .k {
  color: var(--pv3-ink);
  min-width: 0;
}
body.pdp-v3 .pv3-row44 .v {
  color: var(--pv3-grey);
  font-size: 13px;
  text-align: right;
  flex: 0 0 auto;
}

body.pdp-v3 .pv3-hair {
  border-top: 1px solid var(--pv3-line);
}

body.pdp-v3 .pv3-list > .pv3-row44 + .pv3-row44 {
  border-top: 1px solid var(--pv3-line);
}

body.pdp-v3 .pv3-cap {
  font-size: 13px;
  line-height: 20px;
  color: var(--pv3-grey);
}

body.pdp-v3 button.pv3-link,
body.pdp-v3 a.pv3-link,
body.pdp-v3 span.pv3-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: inherit;
  font-weight: 500;
  color: var(--pv3-blue);
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}
body.pdp-v3 a.pv3-link:hover,
body.pdp-v3 button.pv3-link:hover {
  color: var(--pv3-blue);
  text-decoration: underline;
}

body.pdp-v3 .pv3-atf button:focus-visible,
body.pdp-v3 .pv3-atf a:focus-visible,
body.pdp-v3 .pv3-atf input:focus-visible,
body.pdp-v3 .pv3-sec button:focus-visible,
body.pdp-v3 .pv3-sec a:focus-visible,
body.pdp-v3 #pv3-sticky button:focus-visible,
body.pdp-v3 #pv3-overlay button:focus-visible,
body.pdp-v3 #pv3-overlay a:focus-visible {
  outline: 2px solid var(--pv3-blue);
  outline-offset: 2px;
}

/* ============================================================
   4. Title tile
   ============================================================ */

body.pdp-v3 .pv3-title {
  padding-top: 6px;
}
body.pdp-v3 .pv3-h1 {
  font-size: 32px;
  line-height: 38px;
  font-weight: 600;
  margin: 0;
  padding: 0;
  letter-spacing: -.02em;
  text-wrap: balance;
  color: var(--pv3-ink);
  text-transform: none;
}
body.pdp-v3 .pv3-rating {
  font-size: 13px;
  line-height: 20px;
  color: var(--pv3-grey);
  margin-top: 2px;
}
body.pdp-v3 .pv3-rating b {
  color: var(--pv3-green);
  font-weight: 600;
}
body.pdp-v3 .pv3-proof {
  font-size: 13px;
  line-height: 17px;
  color: var(--pv3-grey);
  margin-top: 2px;
}
body.pdp-v3 .pv3-proof b {
  color: var(--pv3-ink);
  font-weight: 600;
}

/* ============================================================
   5. Verified tile
   ============================================================ */

body.pdp-v3 .pv3-tile.pv3-ver .pv3-r1 {
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--pv3-ink);
}
body.pdp-v3 .pv3-tile.pv3-ver .pv3-r1 svg {
  flex: 0 0 auto;
}
body.pdp-v3 .pv3-tile.pv3-ver .pv3-r2 {
  font-size: 13px;
  line-height: 20px;
  color: var(--pv3-grey);
}
body.pdp-v3 .pv3-tile.pv3-ver .pv3-r3 {
  font-size: 13px;
  line-height: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* ============================================================
   6. Size tile — head, tier pill, chips, caption, footer
   ============================================================ */

body.pdp-v3 .pv3-tilehead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  line-height: 20px;
  color: var(--pv3-grey);
}
body.pdp-v3 .pv3-tilehead .pv3-also {
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}
body.pdp-v3 .pv3-tilehead > span:first-child .pv3-tierpill {
  margin-left: 6px;
}
body.pdp-v3 .pv3-tilehead > span:first-child,
body.pdp-v3 .pv3-tilehead .l {
  display: flex;
  align-items: center;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: 11px;
}

body.pdp-v3 .pv3-tierpill {
  display: inline-block;
  margin-left: 8px;
  font: inherit;
  font-size: 11px;
  line-height: 18px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--pv3-pinkink);
  background: var(--pv3-pinkbg);
  border: 0;
  border-radius: 99px;
  padding: 0 8px;
  vertical-align: middle;
}
body.pdp-v3 button.pv3-tierpill {
  cursor: pointer;
}

body.pdp-v3 .pv3-chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

body.pdp-v3 .pv3-chip {
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid var(--pv3-line);
  border-radius: 10px;
  background: var(--pv3-white);
  color: var(--pv3-ink);
  color-scheme: light;
  padding: 4px 6px;
  text-align: center;
  cursor: pointer;
  min-height: 42px;
  position: relative;
  font: inherit;
  min-width: 0;
}
body.pdp-v3 .pv3-chip b {
  display: block;
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  color: var(--pv3-ink);
}
body.pdp-v3 .pv3-chip span {
  display: block;
  font-size: 13px;
  line-height: 18px;
  color: var(--pv3-grey);
}
body.pdp-v3 .pv3-chip small {
  display: block;
  font-size: 11px;
  line-height: 14px;
  color: var(--pv3-grey);
}
body.pdp-v3 .pv3-chip small.pv3-t {
  color: var(--pv3-green);
}
body.pdp-v3 .pv3-chip small.pv3-tier {
  color: var(--pv3-pinkink);
}
body.pdp-v3 .pv3-chip small.pv3-best {
  color: var(--pv3-green);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
/* Two batches of one size side by side (batches addendum §4a): a third line
   says which is the newer one. Grey on the selected chip and on a guest's
   inert chip alike — the pink ring is the only accent a chip carries.
   One line, never two: "Newer batch 1729" is ~95px of Inter 11px and a
   390px phone's chip has 93px inside its padding, so the line borrows 4px
   of padding each side (fold budget: this row grows by 14px, not 28). */
body.pdp-v3 .pv3-chip small.pv3-age,
body.pdp-v3 .pv3-chip.is-on small.pv3-age,
body.pdp-v3 .pv3-chip[disabled] small.pv3-age {
  font-size: 11px;
  line-height: 14px;
  font-weight: 400;
  letter-spacing: -.01em;
  text-transform: none;
  color: var(--pv3-grey);
  margin: 0 -4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Narrow phones: a smaller size keeps the batch number (the payload) whole;
   below 340px let it wrap rather than lose digits to an ellipsis. */
@media (max-width: 374px) {
  body.pdp-v3 .pv3-chip small.pv3-age {
    font-size: 10px;
  }
}
@media (max-width: 339px) {
  body.pdp-v3 .pv3-chip small.pv3-age {
    white-space: normal;
  }
}

/* selected */
body.pdp-v3 .pv3-chip.is-on {
  border-color: var(--pv3-pink);
  box-shadow: inset 0 0 0 1px var(--pv3-pink);
}
/* coming soon — dimmed, opens the Coming-soon sheet */
body.pdp-v3 .pv3-chip.is-soon {
  background: transparent;
  opacity: .72;
}
body.pdp-v3 .pv3-chip.is-soon b {
  color: var(--pv3-grey);
}
body.pdp-v3 .pv3-chip.is-soon span {
  color: var(--pv3-amber);
  font-weight: 600;
}
/* sold out */
body.pdp-v3 .pv3-chip.is-soldout {
  color: var(--pv3-grey);
  background: transparent;
}
body.pdp-v3 .pv3-chip.is-soldout b {
  text-decoration: line-through;
  color: var(--pv3-grey);
}
/* guests: label only, inert, but still legible (never a greyed-out page) */
body.pdp-v3 .pv3-chip[disabled] {
  cursor: default;
  background: var(--pv3-white);
  opacity: 1;
}
body.pdp-v3 .pv3-chip[disabled] b {
  color: var(--pv3-ink);
}
body.pdp-v3 .pv3-chip:focus-visible {
  outline: 2px solid var(--pv3-blue);
  outline-offset: 1px;
}

body.pdp-v3 .pv3-caption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  white-space: nowrap;
  font-size: 13px;
  line-height: 20px;
  color: var(--pv3-grey);
}
body.pdp-v3 .pv3-caption b {
  color: var(--pv3-ink);
  font-weight: 500;
}
body.pdp-v3 .pv3-caption > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.pdp-v3 .pv3-caption > span:only-child {
  white-space: normal;
  overflow: visible;
}
body.pdp-v3 .pv3-caption > button,
body.pdp-v3 .pv3-caption > a {
  flex: 0 0 auto;
}

/* Sizes that are in testing / on order: a list under the chips, each row
   opening its own status sheet. Never a date, never a chip. */
body.pdp-v3 .pv3-footer {
  margin-top: 8px;
}
body.pdp-v3 .pv3-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 32px;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 13px;
  line-height: 18px;
  color: var(--pv3-blue);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
body.pdp-v3 .pv3-footer-row + .pv3-footer-row {
  border-top: 1px solid var(--pv3-line);
}

/* ============================================================
   7. Buy tile — price, qty, ladder, Add, RUO, guest login row
   ============================================================ */

/* CONTRACT names this tile `.pv3-tile.pv3-buy`; the mockup renders it flat
   (no panel, no padding) and the fold budget is measured on the flat box. */
body.pdp-v3 .pv3-tile.pv3-buy {
  background: transparent;
  padding: 0;
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 10px;
}
body.pdp-v3 .pv3-buy > * {
  min-width: 0;
}
/* Optional row wrapper (price + stepper on one line) if the template emits one. */
body.pdp-v3 .pv3-buy .pv3-buyrow {
  flex: 1 0 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
}

body.pdp-v3 .pv3-price {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 6px;
  min-height: 38px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--pv3-ink);
  margin: 0;
}
body.pdp-v3 .pv3-price del,
body.pdp-v3 .pv3-price s {
  color: var(--pv3-grey);
  font-weight: 400;
  font-size: 15px;
  text-decoration: line-through;
}
body.pdp-v3 .pv3-price ins {
  text-decoration: none;
  background: none;
  color: inherit;
  font-weight: 600;
}
body.pdp-v3 .pv3-price .pv3-cap {
  font-weight: 400;
}

body.pdp-v3 .pv3-qty {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--pv3-line);
  border-radius: 10px;
  background: var(--pv3-white);
}
body.pdp-v3 .pv3-qty-dec,
body.pdp-v3 .pv3-qty-inc {
  -webkit-appearance: none;
  appearance: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 20px;
  line-height: 1;
  color: var(--pv3-ink);
  cursor: pointer;
}
body.pdp-v3 .pv3-qty-dec[disabled],
body.pdp-v3 .pv3-qty-inc[disabled] {
  color: var(--pv3-off);
  cursor: default;
}
body.pdp-v3 .pv3-qty-in {
  -webkit-appearance: none;
  -moz-appearance: textfield;
  appearance: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  text-align: center;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--pv3-ink);
  padding: 0;
  border-radius: 0;
  min-width: 0;
}
body.pdp-v3 .pv3-qty-in::-webkit-outer-spin-button,
body.pdp-v3 .pv3-qty-in::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

body.pdp-v3 .pv3-ladder {
  flex: 1 0 100%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  line-height: 18px;
  color: var(--pv3-green);
  font-weight: 500;
  margin: 2px 0 6px;
}
/* display:flex above would otherwise beat the UA's [hidden] rule, and the line
   is server-rendered hidden at qty 1 / on a sale price for the JS to reveal. */
body.pdp-v3 .pv3-ladder[hidden] {
  display: none !important;
}
body.pdp-v3 .pv3-ladder-text {
  min-width: 0;
}

body.pdp-v3 .pv3-add {
  flex: 1 0 100%;
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 14px;
  background: var(--pv3-pink);
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 12px;
}
body.pdp-v3 .pv3-add:hover {
  background: #c80674;
  color: #fff;
}
body.pdp-v3 .pv3-add[disabled] {
  background: var(--pv3-off);
  color: #fff;
  cursor: default;
}
/* "Ask about restock in chat ›" under a sold-out Add */
body.pdp-v3 .pv3-buy > .pv3-link {
  flex: 1 0 100%;
  margin-top: 8px;
  font-size: 15px;
}

body.pdp-v3 .pv3-ruo {
  flex: 1 0 100%;
  font-size: 13px;
  line-height: 18px;
  color: var(--pv3-ink);
  margin: 4px 0 0;
}

/* Guest buy tile: one log-in row, then the RUO line. No price, no state. */
body.pdp-v3 .pv3-login {
  flex: 1 0 100%;
  display: block;
  margin-top: 12px;
  background: var(--pv3-panel);
  border-radius: 12px;
  padding: 14px 12px;
  color: var(--pv3-ink);
  text-decoration: none;
}
body.pdp-v3 .pv3-login:hover {
  color: var(--pv3-ink);
  text-decoration: none;
}
body.pdp-v3 .pv3-login b {
  display: block;
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
}
body.pdp-v3 .pv3-login span {
  display: block;
  font-size: 13px;
  line-height: 18px;
  color: var(--pv3-grey);
  margin-top: 2px;
}

/* ============================================================
   8. Facts cells
   ============================================================ */

body.pdp-v3 .pv3-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
/* Guests get the Ships cell too since the batches addendum (§4c: the same-day
   statement, never a day word), so both audiences share the two-column row. */
body.pdp-v3 .pv3-fact {
  -webkit-appearance: none;
  appearance: none;
  background: var(--pv3-panel);
  border: 0;
  border-radius: 12px;
  padding: 12px;
  min-height: 76px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: var(--pv3-ink);
  min-width: 0;
}
body.pdp-v3 .pv3-fact .k,
body.pdp-v3 .pv3-fact b {
  display: block;
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  color: var(--pv3-ink);
}
body.pdp-v3 .pv3-fact .v,
body.pdp-v3 .pv3-fact span {
  display: block;
  font-size: 13px;
  line-height: 18px;
  font-weight: 400;
  color: var(--pv3-grey);
  margin-top: 2px;
}

/* ============================================================
   9. Pay row (members only)
   ============================================================ */

/* The template emits the row AS the opener button (.pv3-pay itself), holding
   .pv3-pay-label and a .pv3-paymarks group of .pv3-paymark chips. The nested
   .pv3-row44 form is kept styled for a template that wraps instead. */
body.pdp-v3 .pv3-pay {
  margin-top: 12px;
  border-top: 1px solid var(--pv3-line);
  border-bottom: 1px solid var(--pv3-line);
}
body.pdp-v3 button.pv3-pay {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  background: none;
  border-left: 0;
  border-right: 0;
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: var(--pv3-grey);
  text-align: left;
  cursor: pointer;
}
body.pdp-v3 .pv3-pay .pv3-pay-label,
body.pdp-v3 .pv3-pay .pv3-row44 > span:first-child {
  white-space: nowrap;
  flex: 0 0 auto;
}
body.pdp-v3 .pv3-pay .pv3-row44 {
  font-size: 13px;
  color: var(--pv3-grey);
  cursor: pointer;
  width: 100%;
}
body.pdp-v3 .pv3-paymarks {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
}
body.pdp-v3 .pv3-paymark {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 700;
  border: 1px solid var(--pv3-line);
  border-radius: 5px;
  padding: 2px 6px;
  color: var(--pv3-ink2);
  background: var(--pv3-white);
  letter-spacing: .02em;
  line-height: 16px;
}
body.pdp-v3 .pv3-paymark svg {
  display: block;
  flex: 0 0 auto;
}
body.pdp-v3 .pv3-paymark-mc,
body.pdp-v3 .pv3-paymark-apay,
body.pdp-v3 .pv3-paymark-bank {
  padding: 2px 5px;
}
body.pdp-v3 .pv3-paymark-more {
  border: 0;
  background: none;
  color: var(--pv3-grey);
  font-weight: 500;
  padding: 0 0 0 2px;
}
body.pdp-v3 .pv3-marks {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}
body.pdp-v3 .pv3-mk {
  font-size: 10.5px;
  font-weight: 700;
  border: 1px solid var(--pv3-line);
  border-radius: 5px;
  padding: 2px 6px;
  color: var(--pv3-ink2);
  background: var(--pv3-white);
  letter-spacing: .02em;
  line-height: 16px;
}
/* If the template reuses v2's payment-mark spans inside our row, bring them
   down to the v3 scale rather than v2's 30px pills. */
body.pdp-v3 .pv3-pay .pep-paymark {
  height: auto;
  min-width: 0;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 10.5px;
  line-height: 16px;
}

/* ============================================================
   9b. Trust strip (batches addendum §4d) — both audiences
   ============================================================ */

/* Trust strip — the Apple articulation (owner note, 19 Sep 2026): no boxes, no
   emoji. A monoline glyph in ink, the promise in bold, the fact under it in grey.
   A quiet hairline list on the phone (glyph left, two lines right); stacked
   columns from 701px. Sits after the pay row (members) / the facts row (guests),
   below the fold measure. flex-basis 100% covers the flex-wrap buy tile. */
body.pdp-v3 .pv3-adv {
  flex: 1 0 100%;
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 16px;
  border-top: 1px solid var(--pv3-line);
  min-width: 0;
  font-family: var(--pv3-sans);
  color: var(--pv3-ink);
}
body.pdp-v3 .pv3-adv-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  column-gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--pv3-line);
  min-width: 0;
}
body.pdp-v3 .pv3-adv-icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  color: var(--pv3-ink);
}
body.pdp-v3 .pv3-adv-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}
body.pdp-v3 .pv3-adv-item > div {
  min-width: 0;
}
body.pdp-v3 .pv3-adv-item > div > b {
  display: block;
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--pv3-ink);
}
body.pdp-v3 .pv3-adv-item > div > span {
  display: block;
  font-size: 13px;
  line-height: 18px;
  color: var(--pv3-grey);
}
@media (min-width: 701px) {
  body.pdp-v3 .pv3-adv {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    column-gap: 24px;
    row-gap: 18px;
    padding-top: 18px;
  }
  body.pdp-v3 .pv3-adv-item {
    grid-template-columns: 1fr;
    row-gap: 10px;
    padding: 0;
    border-bottom: 0;
    align-items: start;
  }
}

/* ============================================================
   10. Sticky bar — phones and small tablets only
   ============================================================ */

body.pdp-v3 #pv3-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 700;
  background: var(--pv3-white);
  border-top: 1px solid var(--pv3-line);
  box-shadow: 0 -6px 18px rgba(0, 0, 0, .08);
  padding: 8px 12px calc(12px + env(safe-area-inset-bottom));
  font-family: var(--pv3-sans);
  color: var(--pv3-ink);
}
body.pdp-v3 #pv3-sticky[hidden] {
  display: none !important;
}
body.pdp-v3 .pv3-sticky-r {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
body.pdp-v3 .pv3-sticky-t {
  font-size: 14px;
  font-weight: 600;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.pdp-v3 .pv3-sticky-p {
  color: var(--pv3-grey);
  font-weight: 400;
}
body.pdp-v3 .pv3-sticky-add {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  width: auto;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  background: var(--pv3-pink);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
  cursor: pointer;
  white-space: nowrap;
}
body.pdp-v3 .pv3-sticky-add[disabled] {
  background: var(--pv3-off);
  color: #fff;
  cursor: default;
}
body.pdp-v3 #pv3-sticky .pv3-ruo {
  font-size: 12px;
  line-height: 16px;
  margin: 6px 0 0;
  color: var(--pv3-ink);
}
@media (min-width: 901px) {
  body.pdp-v3 #pv3-sticky {
    display: none !important;
  }
}

/* ============================================================
   11. Overlay + sheets
   ============================================================ */

/* The overlay IS the scrim; a click on it closes (JS). Driven by [hidden] or
   by .on — both are supported so the behaviour survives either JS shape. */
body.pdp-v3 #pv3-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, .35);
  font-family: var(--pv3-sans);
  color: var(--pv3-ink);
}
body.pdp-v3 #pv3-overlay.on,
body.pdp-v3 #pv3-overlay:not([hidden]) {
  display: block;
}
body.pdp-v3 #pv3-overlay[hidden] {
  display: none !important;
}

/* Body scroll lock hook (JS adds/removes the class while a sheet is open). */
body.pdp-v3.pv3-locked {
  overflow: hidden;
}

body.pdp-v3 .pv3-sheet {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 88%;
  background: var(--pv3-white);
  color: var(--pv3-ink);
  border-radius: 18px 18px 0 0;
  padding: 6px 16px calc(20px + env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 1001;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .2);
}
body.pdp-v3 .pv3-sheet.on,
body.pdp-v3 .pv3-sheet:not([hidden]) {
  display: block;
}
body.pdp-v3 .pv3-sheet[hidden] {
  display: none !important;
}
/* The grab handle is decoration; no markup is required for it. */
body.pdp-v3 .pv3-sheet::before {
  content: "";
  display: block;
  width: 36px;
  height: 5px;
  border-radius: 3px;
  background: #d0d0d5;
  margin: 4px auto 10px;
}

body.pdp-v3 .pv3-sheet-h {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
body.pdp-v3 .pv3-sheet-h h3 {
  font-size: 17px;
  line-height: 24px;
  font-weight: 600;
  margin: 6px 0 2px;
  letter-spacing: -.01em;
  color: var(--pv3-ink);
}
body.pdp-v3 .pv3-close {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 0;
  background: var(--pv3-panel);
  color: var(--pv3-ink);
  font: inherit;
  font-size: 16px;
  line-height: 30px;
  text-align: center;
  padding: 0;
  cursor: pointer;
}

body.pdp-v3 .pv3-sheet-b {
  font-size: 14px;
  line-height: 21px;
  color: var(--pv3-ink);
}
/* The sheet subtitle is emitted as .pv3-sheet-sub by the buy-box template;
   .pv3-sub is kept for a sheet that reuses the section subtitle class. */
body.pdp-v3 .pv3-sheet-b .pv3-sheet-sub,
body.pdp-v3 .pv3-sheet-b .pv3-sub {
  font-size: 13px;
  line-height: 20px;
  color: var(--pv3-grey);
  margin: 0 0 10px;
}
body.pdp-v3 .pv3-sheet-b p {
  font-size: 14px;
  line-height: 21px;
  margin: 8px 0;
}
body.pdp-v3 .pv3-sheet-b ul {
  margin: 8px 0 0;
  padding-left: 20px;
  font-size: 15px;
  line-height: 22px;
  list-style: disc;
}
body.pdp-v3 .pv3-sheet-b ul li {
  margin-bottom: 8px;
  padding-left: 2px;
}
body.pdp-v3 .pv3-sheet-b ul li::marker {
  color: var(--pv3-pink);
}
body.pdp-v3 .pv3-sheet-b table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  margin: 8px 0 0;
}
body.pdp-v3 .pv3-sheet-b th {
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--pv3-grey);
  font-weight: 600;
  text-align: left;
  padding: 6px 4px;
  border-bottom: 1px solid var(--pv3-line);
}
body.pdp-v3 .pv3-sheet-b td {
  padding: 8px 4px;
  border-bottom: 1px solid var(--pv3-line);
  vertical-align: top;
}
body.pdp-v3 .pv3-sheet-b th:not(:first-child),
body.pdp-v3 .pv3-sheet-b td:not(:first-child) {
  text-align: right;
}
body.pdp-v3 .pv3-sheet-b td small,
body.pdp-v3 .pv3-sheet-b th small {
  color: var(--pv3-grey);
}
body.pdp-v3 .pv3-sheet-b tr.pv3-absent td,
body.pdp-v3 .pv3-sheet-b tr[data-pv3-status="na"] td {
  color: var(--pv3-grey);
}
body.pdp-v3 .pv3-sheet-b .pv3-foot {
  font-size: 12px;
  line-height: 17px;
  color: var(--pv3-ink);
  margin-top: 16px;
  border-top: 1px solid var(--pv3-line);
  padding-top: 10px;
}
body.pdp-v3 .pv3-sheet-b a {
  color: var(--pv3-blue);
  font-weight: 500;
  text-decoration: none;
}
body.pdp-v3 .pv3-sheet-b a:hover {
  text-decoration: underline;
}
/* Full-width actions inside a sheet (e.g. the post-add sheet). */
body.pdp-v3 .pv3-sheet-b .pv3-add,
body.pdp-v3 .pv3-sheet-b .pv3-ghost {
  width: 100%;
  margin-top: 8px;
}
body.pdp-v3 .pv3-ghost {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  height: 52px;
  border: 1px solid var(--pv3-line);
  border-radius: 14px;
  background: var(--pv3-white);
  color: var(--pv3-ink);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
  cursor: pointer;
  text-align: center;
}

/* ============================================================
   12. Below-fold sections
   ============================================================ */

body.pdp-v3 .pv3-sec {
  margin-top: 28px;
  padding: 0 16px;
  font-family: var(--pv3-sans);
  color: var(--pv3-ink);
}
body.pdp-v3 .pv3-sec:last-of-type {
  padding-bottom: 40px;
}
body.pdp-v3 .pv3-sh h2 {
  font-size: 22px;
  line-height: 28px;
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: -.02em;
  color: var(--pv3-ink);
  text-transform: none;
}
body.pdp-v3 .pv3-sh .pv3-sub {
  font-size: 13px;
  line-height: 20px;
  color: var(--pv3-grey);
  margin: 0 0 12px;
}
body.pdp-v3 .pv3-sh .pv3-sub a {
  color: var(--pv3-blue);
  font-weight: 500;
  text-decoration: none;
}
body.pdp-v3 .pv3-sb {
  min-width: 0;
}

/* ---- certificate ---- */
body.pdp-v3 .pv3-cert[hidden] {
  display: none !important;
}

body.pdp-v3 .pv3-certhead {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  background: var(--pv3-panel);
  border-radius: 12px;
  padding: 10px;
  margin-top: 10px;
}
/* Each fact is a .pv3-cell holding two inline spans; they only stack when the
   spans are block-level (the template cannot carry layout). */
body.pdp-v3 .pv3-certhead .pv3-cell {
  min-width: 0;
}
body.pdp-v3 .pv3-certhead .k {
  display: block;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--pv3-grey);
}
body.pdp-v3 .pv3-certhead .v {
  display: block;
  font-size: 17px;
  font-weight: 600;
  line-height: 22px;
  color: var(--pv3-ink);
  overflow-wrap: anywhere;
}
/* The headline metric cell (purity, or content per capsule). .is-pink is the
   mockup's name for the same cell; both are honoured. */
body.pdp-v3 .pv3-certhead .v.pv3-metric,
body.pdp-v3 .pv3-certhead .v.is-pink {
  color: var(--pv3-pink);
}
body.pdp-v3 .pv3-certhead .pv3-cap {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
  line-height: 17px;
}
body.pdp-v3 .pv3-certhead .v.is-small {
  font-size: 15px;
}
body.pdp-v3 .pv3-certhead .pv3-labs {
  grid-column: 1 / -1;
  font-size: 12.5px;
  line-height: 18px;
  color: var(--pv3-grey);
  margin: 0;
}

body.pdp-v3 .pv3-qc {
  margin-top: 12px;
}
body.pdp-v3 .pv3-qc .pv3-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 132px) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--pv3-line);
  font-size: 13px;
}
body.pdp-v3 .pv3-qc .pv3-n {
  font-weight: 500;
  min-width: 0;
  color: var(--pv3-ink);
}
body.pdp-v3 .pv3-qc .pv3-n .pv3-meta {
  display: block;
  color: var(--pv3-grey);
  font-weight: 400;
  font-size: 11.5px;
  line-height: 16px;
}
body.pdp-v3 .pv3-qc .pv3-res {
  color: var(--pv3-ink2);
  text-align: right;
  font-variant-numeric: tabular-nums;
  min-width: 0;
}
body.pdp-v3 .pv3-qc .pv3-res .pv3-v {
  display: block;
}
body.pdp-v3 .pv3-qc .pv3-res .pv3-lab {
  display: block;
  color: var(--pv3-grey);
  font-size: 11px;
  line-height: 15px;
}
body.pdp-v3 .pv3-qc .pv3-row[data-pv3-key="conformity"] .pv3-n {
  color: var(--pv3-ink2);
}

body.pdp-v3 .pv3-chip-res {
  display: inline-block;
  font-size: 10px;
  letter-spacing: .06em;
  font-weight: 700;
  color: var(--pv3-green);
  border: 1px solid var(--pv3-green);
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
}
/* Anything short of a pass reads amber, as the mockup rules; a row the lab did
   not run reads as absent, not as a failure. */
body.pdp-v3 .pv3-row[data-pv3-status="fail"] .pv3-chip-res,
body.pdp-v3 .pv3-row[data-pv3-status="over"] .pv3-chip-res,
body.pdp-v3 .pv3-row[data-pv3-status="under"] .pv3-chip-res {
  color: var(--pv3-amber);
  border-color: var(--pv3-amber);
}
/* A row the lab did not run: both templates write data-pv3-status="absent" on
   it AND the class .is-absent (a stored row with no readable result writes
   "na"), so all three spellings grey out together. */
body.pdp-v3 .pv3-row[data-pv3-status="na"] .pv3-chip-res,
body.pdp-v3 .pv3-row[data-pv3-status="absent"] .pv3-chip-res,
body.pdp-v3 .pv3-row.is-absent .pv3-chip-res {
  color: var(--pv3-grey);
  border-color: var(--pv3-line);
}
body.pdp-v3 .pv3-row[data-pv3-status="na"] .pv3-n,
body.pdp-v3 .pv3-row[data-pv3-status="na"] .pv3-res,
body.pdp-v3 .pv3-row[data-pv3-status="absent"] .pv3-n,
body.pdp-v3 .pv3-row[data-pv3-status="absent"] .pv3-res,
body.pdp-v3 .pv3-row.is-absent .pv3-n,
body.pdp-v3 .pv3-row.is-absent .pv3-res {
  color: var(--pv3-grey);
}
body.pdp-v3 .pv3-row[data-pv3-status="na"] .pv3-n .pv3-meta,
body.pdp-v3 .pv3-row[data-pv3-status="absent"] .pv3-n .pv3-meta,
body.pdp-v3 .pv3-row.is-absent .pv3-n .pv3-meta {
  color: #a0a0a5;
}

body.pdp-v3 .pv3-certfoot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--pv3-line);
  font-size: 13px;
  line-height: 20px;
}

/* A row-driven switch scrolls the certificate into view (js); keep it clear
   of the fixed ticker + header (36 + 57 on the phone, 96 on the desktop). */
body.pdp-v3 .pv3-cert {
  scroll-margin-top: 96px;
}

/* ---- purity by batch (heading column, addendum §5a) ----
   Inherits .pv3-sh .pv3-sub; the six values line up on tabular digits. */
body.pdp-v3 .pv3-sh .pv3-sub.pv3-bylot {
  font-variant-numeric: tabular-nums;
}

/* ---- all batches (addendum §5b) ----
   One row per released certificate, newest first, under the panel. The row
   is a grid rather than a flex row so the phone shape is fixed at two lines
   (batch · size · tag / date · purity · tier · link) whatever a row lacks —
   a guest's row has no tag, a certificate pinned to every size has no size.
   display:grid outranks the UA's [hidden] rule, hence the explicit reset. */
body.pdp-v3 .pv3-lots {
  margin-top: 18px;
  font-variant-numeric: tabular-nums;
}
body.pdp-v3 .pv3-lots-h {
  padding: 0 10px 8px;
}
body.pdp-v3 .pv3-lots-h b {
  display: block;
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  color: var(--pv3-ink);
}
body.pdp-v3 .pv3-lots-h span {
  display: block;
  font-size: 13px;
  line-height: 18px;
  color: var(--pv3-grey);
}
body.pdp-v3 .pv3-lot {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  grid-template-areas:
    "lot size tag tag"
    "date pur tier link";
  gap: 4px 10px;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border-top: 1px solid var(--pv3-line);
  font-size: 13px;
  line-height: 18px;
  color: var(--pv3-grey);
}
body.pdp-v3 .pv3-lot[hidden] {
  display: none !important;
}
body.pdp-v3 .pv3-lot > span {
  min-width: 0;
  white-space: nowrap;
}
body.pdp-v3 .pv3-lot .lot {
  grid-area: lot;
  font-weight: 600;
  color: var(--pv3-ink);
}
body.pdp-v3 .pv3-lot .size {
  grid-area: size;
  color: var(--pv3-ink2);
}
body.pdp-v3 .pv3-lot .date {
  grid-area: date;
}
body.pdp-v3 .pv3-lot .pur {
  grid-area: pur;
  font-weight: 500;
  color: var(--pv3-ink2);
}
body.pdp-v3 .pv3-lot .tier {
  grid-area: tier;
}
/* The state pill — neutral panel grey; the row's own ring is the accent. */
body.pdp-v3 .pv3-lot .tag {
  grid-area: tag;
  justify-self: start;
  display: inline-block;
  font-size: 11px;
  line-height: 14px;
  font-weight: 500;
  letter-spacing: .01em;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--pv3-panel);
  color: var(--pv3-ink2);
}
body.pdp-v3 .pv3-lot .pv3-lot-open {
  grid-area: link;
  justify-self: end;
  margin-left: auto;
  min-width: 0;
  font-size: 13px;
  line-height: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* The row whose certificate is on screen: the chip's pink inset, on a
   rounded box, with the hairlines either side of it stepping aside. */
body.pdp-v3 .pv3-lot.is-on {
  border-top-color: transparent;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--pv3-pink);
}
body.pdp-v3 .pv3-lot.is-on + .pv3-lot {
  border-top-color: transparent;
}
/* "Show all N batches ›" — a .pv3-link button on its own 44px row. */
body.pdp-v3 button.pv3-lots-more {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  padding: 10px 10px 0;
  border-top: 1px solid var(--pv3-line);
  font-size: 14px;
  line-height: 20px;
  text-align: left;
}

/* ---- specs ---- */
body.pdp-v3 .pv3-spec {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  align-items: baseline;
  font-size: 14px;
}
body.pdp-v3 .pv3-spec dt {
  grid-column: 1;
  color: var(--pv3-grey);
  font-weight: 400;
  padding: 10px 10px 10px 0;
  min-height: 40px;
  display: flex;
  align-items: center;
}
body.pdp-v3 .pv3-spec dd {
  grid-column: 2;
  margin: 0;
  padding: 10px 0;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-weight: 500;
  text-align: right;
  text-wrap: balance;
  font-variant-numeric: tabular-nums;
  line-height: 20px;
}
body.pdp-v3 .pv3-spec dt:not(:first-of-type),
body.pdp-v3 .pv3-spec dt:not(:first-of-type) + dd {
  border-top: 1px solid var(--pv3-line);
}
/* Wrapped rows (dl > div > dt + dd) are styled as their own flex row. */
body.pdp-v3 .pv3-spec > div {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 10px 0;
}
body.pdp-v3 .pv3-spec > div + div {
  border-top: 1px solid var(--pv3-line);
}
body.pdp-v3 .pv3-spec > div dt,
body.pdp-v3 .pv3-spec > div dd {
  border-top: 0;
  padding: 0;
  min-height: 0;
  display: block;
}

/* ---- about / literature ----
   The section is `<section class="pv3-sec" id="pv3-about">` and its body is
   `.pv3-prose` (CONTRACT §6 names the section by ID, not by class), so the
   prose selectors hang off the id and the wrapper, not off a `.pv3-about`
   class no template emits. */
body.pdp-v3 .pv3-prose {
  font-size: 15px;
  line-height: 23px;
  color: var(--pv3-ink2);
}
body.pdp-v3 .pv3-prose > :first-child {
  margin-top: 0;
}
body.pdp-v3 .pv3-prose > :last-child {
  margin-bottom: 0;
}
body.pdp-v3 #pv3-about p,
body.pdp-v3 .pv3-prose p {
  font-size: 15px;
  line-height: 23px;
  color: var(--pv3-ink2);
  margin: 0 0 12px;
}
body.pdp-v3 #pv3-about ul,
body.pdp-v3 #pv3-about ol,
body.pdp-v3 .pv3-prose ul,
body.pdp-v3 .pv3-prose ol {
  font-size: 15px;
  line-height: 23px;
  color: var(--pv3-ink2);
  margin: 0 0 12px;
  padding-left: 20px;
}
body.pdp-v3 .pv3-prose a {
  color: var(--pv3-blue);
  font-weight: 500;
  text-decoration: none;
}
body.pdp-v3 .pv3-lit {
  margin: 0;
  padding: 0;
  list-style: none;
}
body.pdp-v3 .pv3-lit li {
  font-size: 14px;
  line-height: 20px;
  padding: 10px 0;
}
body.pdp-v3 .pv3-lit li + li {
  border-top: 1px solid var(--pv3-line);
}
body.pdp-v3 .pv3-lit a {
  color: var(--pv3-blue);
  font-weight: 500;
  text-decoration: none;
}

/* ---- research notice ---- */
body.pdp-v3 .pv3-notice {
  margin: 0;
  font-size: 12px;
  line-height: 17px;
  color: var(--pv3-grey);
  border-top: 1px solid var(--pv3-line);
  padding-top: 12px;
}
body.pdp-v3 .pv3-notice b {
  color: var(--pv3-ink);
  font-weight: 600;
}

/* ---- related rail ---- */
body.pdp-v3 #pv3-related .pv3-sb {
  min-width: 0;
}

/* ============================================================
   13. Desktop — two columns above the fold, split sections below
   ============================================================ */

@media (min-width: 701px) {
  body.pdp-v3 .products-crd-sec.cmn-gap {
    padding-top: 104px;
  }

  /* CONTRACT §8 names the two-column host .pv3-page; in production the host is
     WooCommerce's own div.product.type-product (gallery + summary are its two
     children), so both selectors carry the grid. */
  body.pdp-v3 div.product.type-product,
  body.pdp-v3 .pv3-page {
    display: grid;
    grid-template-columns: minmax(0, 560px) minmax(0, 480px);
    gap: 40px;
    justify-content: center;
    align-items: start;
    padding: 32px 20px 0;
  }

  body.pdp-v3 div.product.type-product .woocommerce-product-gallery {
    margin: 0;
    height: 480px;
    border-radius: 16px;
    position: sticky;
    /* 36px ticker + 57px header of production chrome; the mockup's 80px would
       tuck the image under the real fixed header. */
    top: 96px;
  }
  body.pdp-v3 div.product.type-product .woocommerce-product-gallery .flex-viewport,
  body.pdp-v3 div.product.type-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
    height: 480px !important;
  }
  body.pdp-v3 div.product.type-product .woocommerce-product-gallery .woocommerce-product-gallery__image,
  body.pdp-v3 div.product.type-product .woocommerce-product-gallery figure {
    height: 480px;
  }
  body.pdp-v3 div.product.type-product .woocommerce-product-gallery img {
    height: 480px !important;
    max-height: 480px;
  }

  body.pdp-v3 .pv3-h1 {
    font-size: 40px;
    line-height: 46px;
  }

  body.pdp-v3 .pv3-chips {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Below the fold: heading column left (sticky), content column right. */
  body.pdp-v3 .pv3-sec {
    display: grid;
    grid-template-columns: minmax(0, 560px) minmax(0, 480px);
    gap: 40px;
    justify-content: center;
    margin: 36px auto 0;
    padding: 28px 20px 0;
    max-width: 1120px;
    border-top: 1px solid var(--pv3-line);
  }
  body.pdp-v3 .pv3-sec:last-of-type {
    padding-bottom: 60px;
  }
  body.pdp-v3 #pv3-offers {
    border-top: 0;
    padding-top: 0;
    margin-top: 10px;
  }
  body.pdp-v3 .pv3-sh {
    grid-column: 1;
    position: sticky;
    top: 96px;
    align-self: start;
  }
  body.pdp-v3 .pv3-sb {
    grid-column: 2;
    min-width: 0;
  }
  body.pdp-v3 .pv3-sb > .pv3-tile:first-child,
  body.pdp-v3 .pv3-sb > .pv3-list:first-child {
    margin-top: 0;
  }
  body.pdp-v3 .pv3-sh h2 {
    font-size: 26px;
    line-height: 32px;
  }

  /* The related rail spans both columns — it is a rail, not a split section. */
  body.pdp-v3 #pv3-related .pv3-sb {
    grid-column: 1 / -1;
  }

  /* Certificate rows get room for the result column on a wide screen. */
  body.pdp-v3 .pv3-qc .pv3-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 220px) auto;
  }

  /* The certificate section uses the width (Josh, 18 Sep 2026, on the staging
     panel: "should adjust based on screen size … tight on desktop"). Its
     heading row sits ABOVE a card that spans both grid columns (1080px) instead
     of being squeezed into the 480px right column with the 14 QC rows wrapping;
     the head cells go four across and the result column widens. Only this
     section changes — every other section keeps the two-column split, and the
     phone layout is untouched. */
  body.pdp-v3 #pv3-certificate .pv3-sh,
  body.pdp-v3 #pv3-certificate .pv3-sb {
    grid-column: 1 / -1;
  }
  body.pdp-v3 #pv3-certificate .pv3-sh {
    position: static;
  }
  body.pdp-v3 #pv3-certificate .pv3-certhead {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  /* .pv3-labs and .pv3-cap keep their base grid-column: 1 / -1 — full width
     under the four cells. */
  body.pdp-v3 #pv3-certificate .pv3-qc .pv3-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 320px) auto;
  }

  /* Sheets become a centred dialog. */
  body.pdp-v3 .pv3-sheet {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: auto;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 560px;
    max-width: calc(100vw - 40px);
    max-height: 80vh;
    border-radius: 18px;
    padding: 6px 20px 20px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
  }
  body.pdp-v3 .pv3-sheet::before {
    display: none;
  }
}

/* ---- 900px and up: the batch rows become a table, the trust strip a row ----
   Seven columns line up across rows (tabular digits + a floor per column:
   "Batch 1772" · "20 mg" · "Sep 9, 2026" · "99.80%" · "14×" · the state pill ·
   the link). One line per batch, pill included: the certificate section spans
   both grid columns from 701px (above), so a members' "On sale · newer batch"
   pill shares the line with the six cells and the right-aligned "View
   certificate ›" link. Guest rows (no pill) leave that column empty. */
@media (min-width: 900px) {
  body.pdp-v3 .pv3-lot {
    grid-template-columns: minmax(76px, auto) minmax(40px, auto) minmax(84px, auto) minmax(50px, auto) minmax(30px, auto) minmax(0, 1fr) auto;
    grid-template-areas:
      "lot size date pur tier tag link";
    row-gap: 0;
  }
  body.pdp-v3 .pv3-lot .tag {
    margin-top: 0;
  }
  body.pdp-v3 .pv3-lot .pv3-lot-open {
    justify-self: end;
  }

}

/* Phone-only header clearance. The slim navbar (logo 40px + 8px padding top
   and bottom + the 1px rule = 57px) is the header the fold budget assumes;
   without these two lines the bar renders ~87px tall and every measurement
   below it moves. Matches what v2 does for the same reason. */
@media (max-width: 767px) {
  body.pdp-v3 header.main-head .navbar {
    padding-top: 8px;
    padding-bottom: 8px;
  }
  body.pdp-v3 header.main-head .navbar-brand img {
    max-height: 40px;
    width: auto;
  }
  body.pdp-v3 .products-crd-sec.cmn-gap {
    padding-top: 57px;
  }
}

/* Very narrow phones: three chips still fit, but the caption row may not. */
@media (max-width: 360px) {
  body.pdp-v3 .pv3-caption {
    flex-wrap: wrap;
    white-space: normal;
  }
}

/* ============================================================
   14. Reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  body.pdp-v3 .pv3-sheet,
  body.pdp-v3 #pv3-overlay,
  body.pdp-v3 #pv3-sticky,
  body.pdp-v3 .pv3-chip,
  body.pdp-v3 .pv3-add,
  body.pdp-v3 .pv3-sticky-add {
    transition: none !important;
    animation: none !important;
  }
  body.pdp-v3 .pv3-sheet {
    scroll-behavior: auto;
  }
}

/* ============================================================
   15. Print
   ============================================================ */

@media print {
  body.pdp-v3 #pv3-sticky,
  body.pdp-v3 #pv3-overlay,
  body.pdp-v3 .pv3-qty,
  body.pdp-v3 .pv3-add,
  body.pdp-v3 form.variations_form {
    display: none !important;
  }
  body.pdp-v3 .pv3-cert[hidden] {
    display: block !important;
  }
  /* Paper gets every batch row; the reveal button is screen-only. */
  body.pdp-v3 .pv3-lot[hidden] {
    display: grid !important;
  }
  body.pdp-v3 button.pv3-lots-more {
    display: none !important;
  }
  body.pdp-v3 .pv3-qc .pv3-row,
  body.pdp-v3 .pv3-tile,
  body.pdp-v3 .pv3-sec {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  body.pdp-v3 .pv3-sh {
    position: static;
  }
}
