/* ============================================================
   SeaTox — Tidewater product page
   ------------------------------------------------------------
   Layered on /css/ (the split stylesheet). Everything that already
   exists there — nav, footer, panels, scrims, buttons, type,
   the depth ladder — is reused as-is. This file adds only what
   the product page needs and the homepage does not: the pack
   chooser, the two-column product lede, and the placeholder
   star. No --st-* or --td-* token is redefined.
   ============================================================ */

/* ---- product hero: name, price, action, facts ---- */
.pd-lede {
  display: grid;
  gap: var(--st-6);
  max-width: 52ch;
}
.pd-price-line {
  display: flex; align-items: baseline; gap: var(--st-3);
  flex-wrap: wrap;
}
.pd-price {
  font-family: var(--st-font-data);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -.02em;
}
/* Full-strength ink, not a dimmed inherit. The direction's colour rules
   forbid reduced opacity on type anywhere on this page, and this line was
   the one place carrying it. */
.pd-price__unit {
  font-family: var(--st-font-data);
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--st-on-light);
}
.td-deep .pd-price__unit { color: var(--st-on-dark-body); }

/* ---- the pack chooser -------------------------------------
   One sea-glass plate, not four tiles. At the top a toggle chooses how to
   buy (one-time or subscribe); below it the bottles stand on a shelf, as
   many as the pack holds, so a pack is read by its size before its price.
   The chosen option lifts its bottles and the shelf under it turns navy.

   The plate sits on the 200 m photograph, which swings from light to mid
   blue down the band, so every word here is read off the plate's own
   ground (ink on veil, 9:1 or better), never off the water. ---- */
.pd-packs {
  margin-top: clamp(40px, 5vw, 72px);
  padding: clamp(20px, 3vw, 36px);
  /* frosted, not white: the kelp shows through, blurred enough that the
     ink on it keeps its contrast. Same blur the nav bar uses. */
  background: rgba(var(--td-veil), .5);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  backdrop-filter: blur(22px) saturate(1.25);
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(var(--td-dark), .12);
  color: var(--st-on-light);
}
.pd-packs__set, .pd-mode { border: 0; margin: 0; padding: 0; min-width: 0; }

/* -- the two switches: which product, then how to buy it --
   A quiet track with a white thumb that slides under the chosen side.
   The product switch is the first decision, so it is the larger. */
.pd-switches {
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(16px, 2vw, 22px);
}
.pd-mode {
  position: relative;
  display: inline-grid; grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 999px;
  background: rgba(12, 31, 48, .06);
  box-shadow: inset 0 1px 2px rgba(var(--td-dark), .08);
  isolation: isolate;
}
.pd-mode__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pd-mode__opt {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding-inline: clamp(14px, 2vw, 22px);
  border-radius: 999px;
  font-family: var(--st-font-ui); font-size: .92rem; font-weight: var(--st-fw-med);
  color: var(--st-on-light-mute);
  white-space: nowrap; cursor: pointer;
  transition: color 220ms var(--st-ease);
}
.pd-mode__opt:hover { color: var(--st-on-light); }
.pd-mode__more { margin-left: -3px; }   /* the label's 8px gap stands in for the word space */
.pd-mode__input:checked + .pd-mode__opt { color: var(--st-on-light); }
/* the product choice reads as tabs: the names themselves, with the
   shelf's own navy line sliding under the chosen one */
.pd-mode--product {
  gap: clamp(20px, 4vw, 44px);
  padding: 0; border-radius: 0;
  background: none; box-shadow: none;
}
.pd-mode--product .pd-mode__opt {
  min-height: 48px; padding-inline: 2px; border-radius: 0;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
}
.pd-mode--product .pd-mode__thumb {
  top: auto; bottom: 0; left: 0;
  width: calc(50% - clamp(10px, 2vw, 22px)); height: 2px;
  border-radius: 0; background: var(--st-navy); box-shadow: none;
}
.pd-mode--product .pd-mode__input:nth-of-type(2):checked ~ .pd-mode__thumb {
  transform: translateX(calc(100% + clamp(20px, 4vw, 44px)));
}
.pd-mode__tag {
  padding: 3px 8px; border-radius: 999px;
  background: rgba(140, 230, 216, .45); color: var(--st-deep-cyan);
  font-size: .72rem; font-weight: var(--st-fw-semi);
}
.pd-mode__thumb {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(var(--td-dark), .12), 0 6px 18px rgba(var(--td-dark), .12);
  transition: transform 320ms cubic-bezier(.2, .8, .2, 1), box-shadow 220ms var(--st-ease);
}
.pd-mode__input:nth-of-type(2):checked ~ .pd-mode__thumb { transform: translateX(100%); }
/* keyboard focus only (cart.js sets .is-kbd on Tab): a ring on the
   chosen side. A mouse click never shows it. */
.is-kbd .pd-mode:has(.pd-mode__input:focus-visible) .pd-mode__input:checked + .pd-mode__opt {
  outline: 2px solid var(--st-deep-cyan); outline-offset: 2px;
}

/* -- subscribe & save: one ticked box, front and center (Amber, Nov 10) --
   A bordered panel so it reads as the offer, not a setting. Ticked, it
   takes the mint wash; unticked, it goes quiet and the one-time packs show. */
.pd-subscribe {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 10px 18px 10px 14px;
  border: 1.5px solid rgba(12, 31, 48, .18); border-radius: 14px;
  background: #FFFFFF;
  font-family: var(--st-font-ui); font-size: clamp(1rem, 1.6vw, 1.12rem); font-weight: var(--st-fw-med);
  color: var(--st-on-light);
  cursor: pointer;
  transition: border-color 220ms var(--st-ease), background-color 220ms var(--st-ease);
}
.pd-subscribe:hover { border-color: var(--st-deep-cyan); }
.pd-subscribe:has(.pd-subscribe__input:checked) {
  border-color: var(--st-deep-cyan);
  background: rgba(140, 230, 216, .16);
}
.pd-subscribe__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pd-subscribe__box {
  flex: none; display: grid; place-items: center;
  width: 24px; height: 24px; border-radius: 6px;
  border: 1.5px solid rgba(12, 31, 48, .4); background: #FFFFFF;
  transition: background-color 180ms var(--st-ease), border-color 180ms var(--st-ease);
}
.pd-subscribe__box svg {
  width: 16px; height: 16px; fill: none; stroke: #FFFFFF; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round; opacity: 0;
  transition: opacity 160ms var(--st-ease);
}
.pd-subscribe__input:checked + .pd-subscribe__box { background: var(--st-deep-cyan); border-color: var(--st-deep-cyan); }
.pd-subscribe__input:checked + .pd-subscribe__box svg { opacity: 1; }
.is-kbd .pd-subscribe:has(.pd-subscribe__input:focus-visible) { outline: 2px solid var(--st-deep-cyan); outline-offset: 3px; }

/* -- the shelf --
   Four sets (each product, one-time or subscribe) share one grid cell.
   The cell is as tall as the tallest set, so switching never changes the
   box's height or moves the page; the chosen set fades and rises in. */
.pd-shelf {
  display: grid;
  margin-top: clamp(24px, 3vw, 36px);
}
.pd-set {
  grid-area: 1 / 1;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: opacity 220ms var(--st-ease), transform 380ms cubic-bezier(.2, .8, .2, 1), visibility 0s linear 380ms;
}
.pd-set--sub { grid-template-columns: minmax(0, 340px); justify-content: center; }
.pd-packs:has(#product-cr:checked):has(#mode-sub:not(:checked)) [data-set="cr-once"],
.pd-packs:has(#product-cr:checked):has(#mode-sub:checked)  [data-set="cr-sub"],
.pd-packs:has(#product-jm:checked):has(#mode-sub:not(:checked)) [data-set="jm-once"],
.pd-packs:has(#product-jm:checked):has(#mode-sub:checked)  [data-set="jm-sub"] {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity 320ms var(--st-ease) 80ms, transform 420ms cubic-bezier(.2, .8, .2, 1) 80ms, visibility 0s;
}

.pd-pack { position: relative; min-width: 0; }
.pd-pack__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pd-pack__card {
  display: grid; justify-items: center; text-align: center;
  padding: 0 8px 4px;
  cursor: pointer;
}
/* the bottles, standing on the shelf line */
.pd-bottles {
  position: relative;
  width: 100%; height: clamp(120px, 14vw, 170px);
  border-bottom: 2px solid rgba(12, 31, 48, .14);
  transition: border-color 220ms var(--st-ease);
}
.pd-bottles img {
  position: absolute; bottom: 0; left: 50%;
  height: 92%; width: auto;
  transform-origin: 50% 100%;
  transform: translate(calc(-50% + var(--x, 0px)), var(--y, 0px)) scale(var(--s, 1));
  filter: drop-shadow(0 6px 8px rgba(var(--td-dark), .18)) saturate(.75) brightness(1.04);
  opacity: .72;
  transition: transform 320ms var(--st-ease), opacity 220ms var(--st-ease), filter 220ms var(--st-ease);
}
/* three: two behind, one in front (offsets are in bottle widths) */
.pd-bottles--3 img:nth-child(1) { --x: -64%; --s: .9; }
.pd-bottles--3 img:nth-child(2) { --x: 64%;  --s: .9; }
.pd-bottles--3 img:nth-child(3) { z-index: 1; }
/* six: a back row of three, raised so every cap shows; a front row of
   three, the middle one forward */
.pd-bottles--6 img:nth-child(-n+3) { --s: .8; --y: -12%; }
.pd-bottles--6 img:nth-child(1) { --x: -78%; }
.pd-bottles--6 img:nth-child(2) { --x: 0%; }
.pd-bottles--6 img:nth-child(3) { --x: 78%; }
.pd-bottles--6 img:nth-child(n+4) { z-index: 1; }
.pd-bottles--6 img:nth-child(4),
.pd-bottles--6 img:nth-child(5) { --s: .94; }
.pd-bottles--6 img:nth-child(6) { --x: 0%; z-index: 2; }
.pd-bottles--6 img:nth-child(4) { --x: -104%; }
.pd-bottles--6 img:nth-child(5) { --x: 104%; }

/* two: the combo, one of each product side by side */
.pd-bottles--2 img:nth-child(1) { --x: -36%; }
.pd-bottles--2 img:nth-child(2) { --x: 36%; }

.pd-pack__input:checked + .pd-pack__card .pd-bottles { border-bottom-color: var(--st-navy); }
.pd-pack__input:checked + .pd-pack__card .pd-bottles img {
  opacity: 1;
  filter: drop-shadow(0 10px 12px rgba(var(--td-dark), .26));
  transform: translate(calc(-50% + var(--x, 0px)), calc(var(--y, 0px) - 6px)) scale(var(--s, 1));
}
.pd-pack__card:hover .pd-bottles img { opacity: 1; }
.pd-pack__input:focus-visible + .pd-pack__card { outline: 2px solid var(--st-deep-cyan); outline-offset: 4px; border-radius: 12px; }

.pd-pack__name {
  margin-top: 14px;
  font-family: var(--st-font-ui); font-size: 1rem; font-weight: var(--st-fw-med);
}
.pd-pack__price {
  margin-top: 4px;
  font-family: var(--st-font-data);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.1; letter-spacing: -.02em;
}
.pd-pack__unit, .pd-pack__tag {
  font-family: var(--st-font-data); font-size: .78rem; color: var(--st-on-light-mute);
}
.pd-pack__unit { margin-top: 6px; }
.pd-pack__tag { margin-top: 2px; }
.pd-pack__ship, .pd-sum__ship {
  padding: 3px 9px; border-radius: 999px;
  background: rgba(140, 230, 216, .45); color: var(--st-navy);
  font-family: var(--st-font-ui); font-size: .76rem; font-weight: var(--st-fw-semi);
}
.pd-pack__ship { margin-top: 8px; }
.pd-sum__ship[hidden] { display: none; }
/* the dose line follows the product chosen in the box */
.pd-packs:has(#product-cr:checked) .pd-packs__terms[data-product="jm"],
.pd-packs:has(#product-jm:checked) .pd-packs__terms[data-product="cr"] { display: none; }
.pd-pack__input:checked + .pd-pack__card .pd-pack__tag { color: var(--st-deep-cyan); }
.pd-pack__card.is-sold-out { cursor: not-allowed; }
.pd-pack__card.is-sold-out .pd-bottles img { opacity: .3; }

/* subscribe: one bottle on the shelf, the terms beside it */
.pd-pack--sub .pd-pack__card { justify-items: center; }
.pd-pack[hidden] { display: none; }
/* once the combo is on sale, the subscribe shelf holds two options */
.pd-set--sub:has(.pd-pack--combo:not([hidden])) { grid-template-columns: repeat(2, minmax(0, 300px)); }
.pd-set--sub .pd-shelf__sub-note { grid-column: 1 / -1; }
.pd-shelf__sub-note {
  margin: 12px 0 0; padding-inline: 8px;
  text-align: center;
  font-size: .9rem; line-height: 1.5;
  color: var(--st-on-light-mute);
}

/* -- the checkout bar: what you picked, and the way to buy it -- */
.pd-packs__foot {
  margin-top: clamp(24px, 3vw, 36px);
  padding-top: clamp(20px, 2.6vw, 28px);
  border-top: 1px solid var(--td-line-light);
  display: grid; grid-template-columns: 1fr auto;
  align-items: center; gap: 14px 32px;
}
.pd-sum p { margin: 0; }
.pd-sum__name { font-family: var(--st-font-ui); font-size: 1rem; font-weight: var(--st-fw-med); }
.pd-sum__line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; }
.pd-sum__price {
  font-family: var(--st-font-data);
  font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1; letter-spacing: -.03em;
}
.pd-sum__unit { font-family: var(--st-font-data); font-size: .85rem; color: var(--st-on-light-mute); }
.pd-buy { display: grid; justify-items: center; gap: 10px; }
.pd-buy__btn { min-width: 240px; justify-content: center; }
.pd-packs__secure {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0; font-size: .82rem; color: var(--st-on-light-mute);
}
.pd-packs__secure svg {
  width: 13px; height: 13px;
  fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round;
}
.pd-packs__terms {
  grid-column: 1 / -1;
  margin: 0; font-size: .85rem; line-height: 1.5;
  color: var(--st-on-light-mute);
}

@media (prefers-reduced-motion: reduce) {
  .pd-mode__thumb, .pd-bottles img, .pd-set { transition: none !important; transform: none !important; }
}



/* ---- how to take it ----
   The head above these is a heading plus one line, and the list ran
   straight on from it with nothing between — the first numeral sat closer
   to the lede than to its own step. Separation belongs between groups. */
.pd-steps {
  list-style: none; margin: clamp(40px, 5vw, 72px) 0 0; padding: 0;
  display: grid; gap: clamp(28px, 3.4vw, 40px);
}
@media (min-width: 860px) {
  .pd-steps { grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 56px); }
}
.pd-step { display: grid; gap: 0; align-content: start; }
/* The numerals stay: this is a sequence — shake, then dose, then store —
   and the order is the instruction. Ink, not deep cyan: the canopy
   photograph runs to (175,187,181) behind these, where the cyan measures
   2.1:1 and full ink measures 6.0:1. */

.pd-step__h {
  margin: var(--st-3) 0 0;
  font-family: var(--st-font-ui);
  font-size: var(--st-size-h3); font-weight: var(--st-fw-light);
  line-height: 1.2;
  letter-spacing: -.015em;
  color: var(--st-on-light);
  text-wrap: balance;
}
.pd-step__p {
  margin: var(--st-3) 0 0;
  line-height: var(--st-lead-body);
  color: var(--st-on-light);
  max-width: 34ch;
}

/* ---- the two-up product split ---- */
.pd-split {
  display: grid; gap: clamp(32px, 5vw, 72px);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 940px) {
  .pd-split { grid-template-columns: 1fr 1fr; }
  .pd-split--reverse .pd-split__media { order: -1; }
}
/* 700 m. The midnight panel only reaches deep water in its lower half —
   its top stop is #6E93A8 under a .26 wash, and the Joint + Muscle copy
   opens right there. --st-on-dark-body measures 2.87:1 against that;
   white measures 4.79:1. So this one band takes full white body copy
   rather than the page's usual tinted one. */
.td-depth--midnight .pd-split .td-body--dark { color: var(--st-on-dark); }

.pd-split__media { margin: 0; display: flex; justify-content: center; }
.pd-split__media img {
  max-width: 100%; height: auto;
  max-height: clamp(320px, 52vh, 620px);
  width: auto;
}

/* ---- phones -----------------------------------------------
   css/05-responsive-daylight.css raises every tracked micro-label to a 15px floor below
   760px, because the client reviews this site on a phone. These
   labels are new since that list was written and belong to it. ---- */
@media (max-width: 760px) {
  .pd-price__unit,
  .pd-pack__unit,
  .pd-pack__tag,
  .pd-packs__terms,
  .pd-packs__secure { font-size: .9375rem; }
}
@media (max-width: 520px) {
  /* matches the hero and the closing panel: at this width a pill that
     stops short of the column reads as an afterthought */
  /* three columns are too narrow for 15px type here, so each option
     becomes a row: its bottles on the left, its name and price beside */
  .pd-switches { display: grid; }
  .pd-mode { display: grid; width: 100%; }
  .pd-packs__foot { grid-template-columns: 1fr; }
  .pd-buy, .pd-buy__btn { width: 100%; min-width: 0; }
  .pd-mode__opt { padding-inline: 8px; font-size: .9rem; }
  /* free shipping is shown on the subscription itself, so the switch can
     drop it and its longer label to fit the width */
  .pd-mode__more { display: none; }
  .pd-mode__tag { display: none; }
  .pd-set, .pd-set--sub { grid-template-columns: 1fr; gap: 6px; }
  .pd-pack__card {
    grid-template-columns: 112px 1fr;
    justify-items: start; text-align: left; column-gap: 16px;
    padding: 8px 4px;
  }
  .pd-bottles { grid-row: 1 / 6; height: 96px; align-self: start; }
  .pd-pack__prices { justify-content: flex-start; }
  .pd-set--sub .pd-pack__prices { justify-content: center; }
  .pd-pack__name { margin-top: 10px; }
  /* the subscription is a single option, so it stands tall and centred,
     filling about the height the three one-time rows take, so the box
     keeps its size without a gap */
  .pd-set--sub .pd-pack__card {
    grid-template-columns: 1fr; justify-items: center; text-align: center;
  }
  .pd-set--sub .pd-bottles { grid-row: auto; height: 190px; width: 70%; }
  /* with the combo there are two subscriptions, so they take the same rows
     as the one-time options */
  .pd-set--sub:has(.pd-pack--combo:not([hidden])) { grid-template-columns: 1fr; }
  .pd-set--sub:has(.pd-pack--combo:not([hidden])) .pd-pack__card {
    grid-template-columns: 112px 1fr; justify-items: start; text-align: left;
  }
  .pd-set--sub:has(.pd-pack--combo:not([hidden])) .pd-bottles { grid-row: 1 / 6; height: 96px; width: 100%; }
  .pd-shelf__sub-note { margin: 8px 0 0; text-align: center; }
}

/* ============================================================
   TEMPORARY — REVIEW SCAFFOLDING. DELETE BEFORE LAUNCH.

   A yellow star marks any image that is a stand-in and still
   needs the client's own photography. To remove: delete this
   block and every <span class="pd-star">. The data-placeholder
   attributes can stay — they are invisible, and they are the
   record of what was a stand-in.
   ============================================================ */

