/*
================================================================
Space Vanta Theme 2.0
Module: Product page — DNA layer
Path: public/pdp/pdp.css
Version: PDP-BASE-100

Loaded after every product stylesheet. It restyles; it does not
change structure, hooks or scripts (gallery, variant, price,
quantity, add to cart, accordions and the policy modal keep their
own JS and class names).

Design rules
- The page is a stack of thin PLATES at different depths. Depth is
  drawn with hard-edged offset planes, hairline metal borders and
  chamfered corners — no blurred shadows anywhere.
- Warm paper stays the ground. Metal (silver-grey-white) is the
  material, bright blue is the single accent.
- Regular and Made to order differ in structure, not just colour:
    Regular        solid plate, solid blue spine, straight route
    Made to order  stacked plates, dashed edge, hatched header,
                   route with a hatched "made for you" step
  The mode comes from [data-sv-mode] on .sv-pdp.
- Motion is limited to hover lifts and the route drawing in once.
  Off under prefers-reduced-motion and <html data-sv-motion="calm">.

Everything is scoped to .sv-pdp / .sv-product__details /
.sv-pdp-ship / .sv-on-demand-pdp: nothing here can reach the header.
================================================================
*/

.sv-pdp,
.sv-product__details,
.sv-pdp-ship,
.sv-on-demand-pdp {
  --pd-paper: #fbf7f0;
  --pd-paper-2: #f7f2e8;
  --pd-ground: #f4eee4;
  --pd-ink: var(--sv-ink, #252321);
  --pd-muted: #5f574d;
  --pd-line: #ddd6c9;
  --pd-blue: var(--sv-blue, #1d6bff);
  --pd-blue-hi: var(--sv-blue-2, #4d8dff);
  --pd-metal: linear-gradient(135deg, #f7f8fa 0%, #c9cbd1 26%, #eef0f4 50%, #b9c1ce 76%, #f4f5f8 100%);
  --pd-rim: #aeb6c2;
  --pd-mono: ui-monospace, "IBM Plex Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --pd-cut: 12px;
}

/* the theme sets border-box globally; keep the new plates safe if it ever does not */
.sv-pdp *, .sv-pdp *::before, .sv-pdp *::after,
.sv-pdp-ship, .sv-pdp-ship *, .sv-pdp-ship *::before,
.sv-product__details *, .sv-product__details *::before, .sv-product__details *::after { box-sizing: border-box; }

/* ---------- mode strip (Made to order) ---------- */

html .sv-on-demand-pdp { background: var(--pd-paper-2); border-bottom: 1px solid var(--pd-line); }
html .sv-on-demand-pdp__inner { align-items: center; }
html .sv-on-demand-pdp__identity,
html .sv-on-demand-pdp__details span,
html .sv-on-demand-pdp__customize span:first-child {
  font-family: var(--pd-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
html .sv-on-demand-pdp__details strong { font-weight: 700; color: var(--pd-ink); }
html .sv-on-demand-pdp__identity {
  position: relative;
  padding: 7px 12px 7px 14px;
  color: var(--pd-blue);
  border: 1px solid var(--pd-blue);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  background: repeating-linear-gradient(135deg, rgba(29, 107, 255, 0.1) 0 1px, rgba(29, 107, 255, 0) 1px 5px);
}

/* ---------- layout ---------- */

.pdp, .pdp *, .pdp *::before, .pdp *::after { box-sizing: border-box; }
.pdp { width: 100%; padding-bottom: clamp(48px, 6vw, 96px); }
.pdp__wrap { width: 100%; max-width: 1360px; margin: 0 auto; padding: clamp(18px, 2.6vw, 40px) clamp(16px, 3vw, 40px) 0; }
html .pdp .pdp__hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(28px, 4.4vw, 76px);
  align-items: start;
}
html .pdp .sv-product__gallery { position: sticky; top: 112px; padding: 0; min-width: 0; }
html .pdp .sv-product__information { min-width: 0; padding: 0; }
html .pdp .sv-product__information-content { display: flex; flex-direction: column; gap: 22px; }
html .pdp .sv-product__information-content > * { margin: 0 !important; }

@media (max-width: 899px) {
  html .pdp .pdp__hero { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  html .pdp .sv-product__gallery { position: static; }
}
@media (max-width: 749px) {
  html .pdp .sv-product__information-content { gap: 18px; }
  html .pdp .sv-product-information-purchase { padding: 18px 16px 14px 18px; }
  html .pdp[data-sv-mode="made"] .sv-product-information-purchase { padding-top: 48px; }
  html .pdp[data-sv-mode="made"] .sv-product-information-purchase::before { padding: 0 18px; }
}

/* ---------- label quick view (allergens / certs, right under the title) ---------- */

.pdf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.pdf[hidden] { display: none; }
.pdf__pill {
  position: relative; display: grid; grid-template-columns: 10px minmax(0, 1fr); column-gap: 8px; row-gap: 3px; align-items: center;
  min-width: 0; margin: 0; padding: 9px 10px 9px 12px; text-align: left; cursor: pointer; border: 0; border-radius: 0;
  background: var(--svd-face-soft, #efebe8); color: var(--svd-ink, #252321);
  box-shadow: inset 0 0 0 1px #d6d1c8;
  clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
  transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s ease, background .2s ease;
}
.pdf__pill:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--svd-seam, #1d6bff); background: #fff; }
.pdf__pill:focus-visible { outline: 2px solid var(--svd-seam, #1d6bff); outline-offset: 2px; }
.pdf__mark { grid-row: 1 / span 2; width: 8px; height: 8px; background: var(--svd-steel, #485d7c); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.pdf__k { min-width: 0; font-family: var(--pd-mono); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.25; color: var(--pd-muted); }
.pdf__v { min-width: 0; font-size: 12.5px; font-weight: 700; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf__pill--allergens { background: var(--svd-face-deep, #313540); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.pdf__pill--allergens .pdf__k { color: rgba(229,255,255,.72); }
.pdf__pill--allergens .pdf__mark { background: var(--svd-ice, #e5ffff); }
.pdf__pill--allergens:hover { background: var(--svd-face-dark, #1f232b); box-shadow: inset 0 0 0 1px var(--svd-ice, #e5ffff); }
.pdf__pill--certs .pdf__mark { background: var(--svd-seam, #1d6bff); }
/* nothing declared: calm, dashed, still clickable (the popup explains) */
.pdf__pill[data-has="0"] { background: transparent; color: var(--pd-muted); box-shadow: none; outline: 1px dashed #c9c4bb; outline-offset: -1px; }
.pdf__pill[data-has="0"] .pdf__v { font-weight: 600; }
.pdf__pill[data-has="0"] .pdf__mark { background: #c9c4bb; }
.pdf__pill--allergens[data-has="0"] .pdf__k { color: var(--pd-muted); }
.pdf__pill[data-has="0"]:hover { background: #fff; outline-color: var(--svd-seam, #1d6bff); }

@media (max-width: 749px) {
  /* phone: one swipeable row that bleeds to the screen edge, so no pill is cramped */
  .pdf { display: flex; overflow-x: auto; gap: 8px; margin: 0 -16px; padding: 2px 16px 6px; scroll-snap-type: x proximity; scrollbar-width: none; }
  .pdf::-webkit-scrollbar { display: none; }
  .pdf__pill { flex: 0 0 auto; min-width: 152px; max-width: 78vw; scroll-snap-align: start; padding: 11px 12px 11px 13px; }
  .pdf__v { font-size: 13px; }
}
/* ---------- title: kicker + name ---------- */

html .sv-pdp .sv-product-information-title__kicker {
  display: block;
  width: fit-content;
  margin: 0 0 14px;
  padding: 0 0 0 20px;
  font-family: var(--pd-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pd-muted);
  background:
    linear-gradient(45deg, transparent 0 40%, var(--pd-blue) 40% 60%, transparent 60%) 0 50% / 9px 9px no-repeat;
}
html .sv-pdp .sv-product-information-title__kicker[data-kind="made"] { color: var(--pd-blue); }
html .sv-pdp .sv-product-information-title__text {
  margin: 0;
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--pd-ink);
}

/* ---------- price: a number on a rule that breaks ---------- */

html .sv-pdp .sv-product-information-price { position: relative; padding: 0 0 18px; }
html .sv-pdp .sv-product-information-price::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 9px;
  background:
    linear-gradient(115deg, rgba(29, 107, 255, 0) 0 45%, var(--pd-blue) 45% 47%, rgba(29, 107, 255, 0) 47%) 52px 0 / 12px 9px no-repeat,
    linear-gradient(var(--pd-rim), var(--pd-rim)) 0 8px / 52px 1px no-repeat,
    linear-gradient(var(--pd-line), var(--pd-line)) 64px 8px / calc(100% - 64px) 1px no-repeat;
}
html .sv-pdp .sv-product-information-price__value {
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--pd-ink);
}

/* ---------- variants: chips on plates ---------- */

html .sv-pdp .sv-product-information-variant { margin-top: 0; }
html .sv-pdp .sv-product-information-variant__option-name {
  font-family: var(--pd-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--pd-muted);
}
html .sv-pdp .sv-product-information-variant__value {
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid var(--pd-rim);
  background: var(--pd-paper);
  font-weight: 600;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
html .sv-pdp .sv-product-information-variant__value:hover {
  border-color: var(--pd-ink);
  transform: translate(-2px, -2px);
  box-shadow: 2px 2px 0 #c9cbd1;
}
html .sv-pdp .sv-product-information-variant__value.is-selected {
  border-color: transparent;
  background: transparent;
  color: var(--pd-blue);
  transform: none;
  box-shadow: none;
}
/* the sliding signal becomes: blue edge on an offset metal plate */
html .sv-pdp .sv-product-information-variant__signal {
  border: 1.5px solid var(--pd-blue);
  background: rgba(29, 107, 255, 0.05);
  box-shadow: 4px 4px 0 #c9cbd1;
}

/* ---------- purchase: the main plate ---------- */

html .sv-pdp .sv-product-information-purchase {
  position: relative;
  padding: 22px 22px 18px 26px;
  background: linear-gradient(180deg, #fffdf9, var(--pd-paper-2));
  border: 1px solid var(--pd-line);
  border-left: 3px solid var(--pd-blue);
  clip-path: polygon(var(--pd-cut) 0, 100% 0, 100% 100%, 0 100%, 0 var(--pd-cut));
}
html .sv-pdp .sv-product-information-purchase__content { gap: 16px; }
html .sv-pdp .sv-product-purchase-quantity__label { color: var(--pd-muted); }
html .sv-pdp .sv-product-purchase-quantity__control { border-color: var(--pd-rim); background: var(--pd-paper); }

html .sv-pdp .sv-product-purchase__note {
  font-family: var(--pd-mono);
  letter-spacing: 0.08em;
}

/* Made to order: the same plate, stacked, edge drawn in pieces, hatched header */
html .sv-pdp[data-sv-mode="made"] .sv-product-information-purchase {
  margin-top: 8px !important;
  padding-top: 52px;
  border-left-width: 1px;
  border-left-style: dashed;
  border-left-color: var(--pd-blue);
  border-style: dashed;
  border-color: #aab3c1;
  background:
    linear-gradient(135deg, rgba(185, 193, 206, 0.2), rgba(251, 247, 240, 0) 50%),
    var(--pd-paper);
}
html .sv-pdp[data-sv-mode="made"] .sv-product-information-purchase::before {
  content: "Made to order  \00b7  ships within 1 week";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 26px;
  font-family: var(--pd-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pd-blue);
  background: repeating-linear-gradient(135deg, rgba(185, 193, 206, 0.3) 0 1px, rgba(185, 193, 206, 0) 1px 6px);
  border-bottom: 1px dashed #aab3c1;
}


/* ---------- bundle ---------- */
html .pdp .sv-product-information-bundle { border: 1px solid var(--pd-line); background: var(--pd-paper); padding: 14px 16px; }
html .pdp .sv-product-information-bundle__link { color: var(--pd-blue); }
html .pdp .sv-product-information-bundle__image { max-width: 100%; height: auto; }

/* ---------- purchase note under the buttons ---------- */
html .pdp .sv-product-purchase__note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 11.5px; color: var(--pd-muted); }
html .pdp .sv-product-purchase__note-mark { width: 14px; height: 14px; color: var(--pd-blue); }
html .pdp .sv-product-purchase__note-sep { width: 1px; height: 12px; background: var(--pd-line); }

/* ---------- variant (the selection signal slides under the chosen value) ---------- */
html .pdp .sv-product-information-variant__option { display: flex; flex-direction: column; gap: 10px; }
html .pdp .sv-product-information-variant__option { position: relative; }
html .pdp .sv-product-information-variant__values { display: flex; flex-wrap: wrap; gap: 10px; }
html .pdp .sv-product-information-variant__value { position: relative; z-index: 1; cursor: pointer; color: var(--pd-ink); font: inherit; }
html .pdp .sv-product-information-variant__value[disabled], html .pdp .sv-product-information-variant__value.is-unavailable { opacity: .45; text-decoration: line-through; cursor: not-allowed; }
html .pdp .sv-product-information-variant__signal { position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none; transition: transform .3s cubic-bezier(.2,.8,.2,1), width .3s, height .3s; }
html .pdp .sv-product-information-variant__value:focus-visible { outline: 2px solid var(--pd-blue); outline-offset: 2px; }

/* ---------- price ---------- */
html .pdp .sv-product-information-price__content { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
html .pdp .sv-product-information-price__compare-at { font-size: 16px; color: var(--pd-muted); text-decoration: line-through; }


/* ---------- assurance band: Note (left) + Service stage (right) ---------- */
.pdb { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(28px, 4vw, 64px); align-items: stretch; }
.pdb__slot--service > .pds { height: 100%; grid-template-rows: auto auto minmax(0, 1fr) auto; }
.pdb__slot--service .pds__track { align-items: stretch; }
.pdb__slot { min-width: 0; }
.pdb__slot:empty { display: none; }
.pdb:has(.pdb__slot--service:empty) { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 899px) {
  .pdb { grid-template-columns: minmax(0, 1fr); gap: 34px; }
}

/* v005: a hidden pill leaves no gap in the label strip */
@media (min-width: 750px) { .pdf { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); } }

/* ---------- PDP-LAYOUT-001: delivery estimate as a full-width band (desktop) ---------- */
.pdp__band { margin-top: clamp(28px, 3.4vw, 52px); }
.pdp__band[hidden] { display: none; }
.pdp__band .sv-pdp-ship { padding: 22px 28px 20px; }
.pdp__band .sv-pdp-ship__options { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; align-items: stretch; }
.pdp__band .sv-pdp-ship__cutoff { max-width: 780px; }
.pdp__band .sv-pdp-ship__route { margin-bottom: 20px; }

/* ---------- PDP-BUNDLE-100: bundle entry card ---------- */
html .pdp .sv-pbp { position: relative; padding: 0 10px 10px 0; border: 0; background: none; }
html .pdp .sv-pbp[hidden] { display: none; }
html .pdp .sv-pbp__plane { position: absolute; inset: 10px 0 0 10px; pointer-events: none; border: 1px solid var(--pd-rim); background: repeating-linear-gradient(135deg, rgba(137,140,149,.2) 0 1px, rgba(137,140,149,0) 1px 7px); clip-path: polygon(var(--pd-cut) 0, 100% 0, 100% 100%, 0 100%, 0 var(--pd-cut)); }
html .pdp .sv-pbp__card {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px;
  text-decoration: none; color: var(--pd-ink); background: var(--pd-paper); box-shadow: inset 0 0 0 1px var(--pd-line);
  clip-path: polygon(var(--pd-cut) 0, 100% 0, 100% 100%, 0 100%, 0 var(--pd-cut));
  transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .2s ease;
}
html .pdp .sv-pbp__card:hover { transform: translate(-3px, -3px); box-shadow: inset 0 0 0 1px var(--pd-blue); }
html .pdp .sv-pbp__card:focus-visible { outline: 2px solid var(--pd-blue); outline-offset: 3px; }
.sv-pbp__plates { position: relative; width: 36px; height: 36px; }
.sv-pbp__plates i { position: absolute; width: 22px; height: 22px; clip-path: polygon(5px 0, 100% 0, 100% 100%, 0 100%, 0 5px); }
.sv-pbp__plates i:nth-child(1) { left: 0; top: 14px; background: #c9ced6; }
.sv-pbp__plates i:nth-child(2) { left: 7px; top: 7px; background: #485d7c; }
.sv-pbp__plates i:nth-child(3) { left: 14px; top: 0; background: var(--pd-blue); }
.sv-pbp__text { display: grid; gap: 3px; min-width: 0; }
.sv-pbp__kicker { font-family: var(--pd-mono); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--pd-blue); }
.sv-pbp__t { font-size: 15px; font-weight: 800; line-height: 1.25; }
.sv-pbp__d { font-size: 12.5px; line-height: 1.45; color: var(--pd-muted); }
.sv-pbp__go { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; font-size: 12.5px; font-weight: 700; white-space: nowrap; color: #fff; background: #313540; clip-path: polygon(7px 0, 100% 0, 100% 100%, 0 100%, 0 7px); transition: background .2s ease; }
.sv-pbp__go i { width: 12px; height: 2px; background: #e5ffff; position: relative; }
.sv-pbp__go i::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border: solid #e5ffff; border-width: 2px 2px 0 0; transform: rotate(45deg); transform-origin: 100% 0; }
html .pdp .sv-pbp__card:hover .sv-pbp__go { background: var(--pd-blue); }
.sv-pbp__related[hidden] { display: none; }
@media (max-width: 749px) {
  html .pdp .sv-pbp__card { grid-template-columns: auto minmax(0, 1fr); padding: 13px 14px; }
  html .pdp .sv-pbp__card:hover { transform: none; }
  .sv-pbp__go { grid-column: 1 / -1; justify-content: center; min-height: 44px; }
}
