/* Product catalog. The common shell supplies the header, footer and brand tokens. */
.page-product {
  --p-ink: #101a42;
  --p-muted: #435474;
  --p-blue: #153ed2;
  --p-raised: 0 5px 13px rgba(61, 89, 147, .13), inset 0 1px 2px #fff;
}
.p-dashboard, .p-dashboard * { box-sizing: border-box; }
.p-dashboard {
  display: flex;
  flex-direction: column;
  color: var(--p-ink);
  min-width: 0;
  min-height: 0;
  max-width: 1500px;
  width: 100%;
  margin-inline: auto;
  padding-block: clamp(8px, 1.8vh, 20px) clamp(12px, 2.8vh, 32px);
  outline: none;
}
.p-dashboard :where(h1,h2,p,dl,dt,dd,figure,ul,fieldset) { margin: 0; }
.p-dashboard :where(a,button,input) { -webkit-tap-highlight-color: transparent; }
.p-dashboard button { font: inherit; cursor: pointer; color: inherit; }
.p-dashboard a { text-decoration: none; }
.p-dashboard svg { display: block; flex-shrink: 0; }
.p-dashboard :is(a,button,input,section):focus-visible { outline: 3px solid #1642c9; outline-offset: 3px; }
.p-topbar, .p-variants, .p-stepper, .p-back, .p-selector { display: flex; align-items: center; }
.p-topbar {
  flex: 0 0 auto;
  justify-content: space-between;
  gap: 10px;
  min-height: 32px;
  margin-bottom: clamp(6px, 1.6vh, 18px);
}
.p-back { gap: 8px; color: var(--p-muted); font-size: 14px; font-weight: 600; }
.p-back svg { width: 18px; }
.p-variants { gap: 12px; }
.p-selector, .p-stepper, .p-dialog-head button {
  background: linear-gradient(145deg,#f9fbff,#e5ecfa);
  border: 1px solid #fff;
  box-shadow: var(--p-raised);
  border-radius: 24px;
}
.p-selector { justify-content: center; gap: 7px; padding: 0 14px; height: 35px; font-size: 12px !important; font-weight: 600 !important; }
.p-selector svg { width: 14px; }
.p-stepper { gap: 4px; padding: 1px 3px; }
.p-stepper a { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--p-blue); }
.p-stepper a:hover, .p-dialog-head button:hover { background: #dce8ff; }
.p-stepper svg { width: 15px; }
.p-stepper span { color: var(--p-muted); font-variant-numeric: tabular-nums; font-weight: 600; font-size: 11px; white-space: nowrap; }
.p-layout {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: grid;
  align-content: center;
  grid-template-columns: minmax(0,1.12fr) minmax(0,1fr);
  grid-template-areas: "visual title" "visual info" "visual pack" "visual buy";
  gap: clamp(14px, 2.5vh, 30px) clamp(30px, 4.4vw, 82px);
}
.p-visual {
  grid-area: visual;
  min-width: 0;
  min-height: 0;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.96);
  border-radius: clamp(20px, 2.5vw, 38px);
  background: linear-gradient(135deg,#f7faff,#e3ebfa);
  box-shadow: 7px 7px 22px rgba(88,117,177,.14), -3px -3px 13px rgba(255,255,255,.82), inset 2px 2px 3px #fff;
}

.p-visual img {
  position: absolute;
  width: 84%;
  height: 78%;
  inset: 0;
  margin: auto;
  object-fit: contain;
  object-position: center;
}
.p-title, .p-info, .p-pack, .p-purchase { min-width: 0; }
.p-title { grid-area: title; align-self: end; }
.p-title p { color: var(--p-blue); font-size: clamp(11px,.85vw,14px); font-weight: 650; letter-spacing: .095em; text-transform: uppercase; line-height: 1.35; }
.p-title h1 { font-weight: 680; font-size: clamp(36px, 4.6vw, 74px); line-height: 1.07; letter-spacing: -.058em; color: var(--p-ink); margin: .11em 0 0; }
.p-title h1 span { color: var(--p-blue); font-weight: 480; }
.p-info { grid-area: info; }
.p-tabs {
  display: flex;
  align-items: stretch;
  gap: 3px;
  padding: 4px;
  background: #dce5f5;
  box-shadow: inset 1px 2px 5px rgba(87,113,161,.18),0 1px 1px #fff;
  border-radius: 15px;
}
.p-tabs button {
  flex: 1;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #334769;
  padding: 10px 5px;
  font-size: clamp(13px,1vw,16px);
  font-weight: 560;
  line-height: 1.2;
}
.p-tabs button b { display: none; font: inherit; }
.p-tabs button[aria-selected=true] {
  background: linear-gradient(145deg,#fff,#f0f4fd);
  color: var(--p-blue);
  border-color: #fff;
  box-shadow: 0 2px 5px rgba(57,91,158,.18);
}
#tab-volumes { display: none; }
.p-panels {
  display: grid;
  margin-top: 13px;
  padding: clamp(15px,1.7vw,28px);
  color: var(--p-ink);
  border: 1px solid rgba(255,255,255,.90);
  background: linear-gradient(135deg,rgba(255,255,255,.85),rgba(237,243,255,.70));
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(66,91,145,.07),inset 0 1px white;
}
/* Inert panels reserve their common height, so the dashboard stays still as the reader changes tabs. */
.p-panel, .p-panel[hidden] { grid-area: 1 / 1; display: block; min-height: 0; min-width: 0; align-self: center; }
.p-panel[hidden] { display: block!important; visibility: hidden; pointer-events: none; }
.p-panel.p-compact-pack[hidden] { display: none!important; }
.p-description p {
  font-size: clamp(16px,1.27vw,21px);
  line-height: 1.52;
  color: var(--p-muted);
  max-width: 55ch;
}
.p-description p:first-child { color: var(--p-ink); }
.p-description p + p { margin-top: .55em; }
.p-panel dl { display: grid; gap: 6px; line-height: 1.38; }
.p-panel dl div { display: grid; grid-template-columns: minmax(90px,.48fr) minmax(0,1fr); gap: 10px; }
.p-panel dt { color: var(--p-muted); font-size: clamp(12px,.98vw,15px); }
.p-panel dd { font-size: clamp(13px,1.03vw,16px); }
.p-doc { color: var(--p-blue); display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; margin-top: 12px; }
.p-doc svg { width: 15px; height: 15px; }
.p-panel ul { padding-left: 1.1em; font-size: clamp(15px,1.1vw,19px); line-height: 1.55; }
.p-panel li::marker { color: #2456ce; }
.p-instruction { font-size: 12px; line-height: 1.45; color: var(--p-muted); margin-top: .7em !important; }
.p-pack { grid-area: pack; }
.p-pack-options { margin: 0; border: 0; padding: 0; min-width: 0; }
.p-pack-options legend { display: block; font-size: 13px; line-height: 1.35; font-weight: 600; color: var(--p-muted); padding: 0 0 8px; }
.p-pack-options > div { display: flex; gap: 8px; }
.p-pack-options label { flex: 1; position: relative; border-radius: 12px; min-width: 0; }
.p-pack-options input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; margin: 0; }
.p-pack-options label span {
  display: grid;
  place-content: center;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.95);
  background: linear-gradient(145deg,#f5f8fe,#dfe8f8);
  box-shadow: 0 3px 8px rgba(73,99,155,.13);
  font-size: clamp(14px,1.13vw,18px);
  font-weight: 560;
  white-space: nowrap;
}
.p-pack-options input:checked + span { color: #1439aa; background: #dfebff; border-color: #7e9ded; box-shadow: inset 0 1px 4px #b8cfed; }
.p-pack-options input:focus-visible + span { outline: 2px solid #1439aa; outline-offset: 2px; }
.p-purchase { grid-area: buy; }
.p-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 51px;
  padding: 10px 17px;
  border-radius: 17px;
  background: linear-gradient(112deg,#267bf8,#184fdc 57%,#2344cf);
  border: 1px solid #b5caff;
  box-shadow: inset 0 1px 2px #b0d9ff,0 5px 12px rgba(62,94,185,.22);
  color: #fff;
  font-size: clamp(14px, 1.14vw, 18px);
  font-weight: 620;
}
.p-cta svg:first-child { width: 23px; height: 23px; }
.p-cta svg:last-child { width: 17px; height: 17px; }
.p-cta small { margin-left: auto; font-size: 12px; white-space: nowrap; font-weight: 500; }
.p-cta:hover { background: linear-gradient(112deg,#1a68ea,#1745c7 62%,#293bc0); }
.p-dialog {
  width: min(445px,calc(100% - 22px));
  color: var(--p-ink);
  border: 1px solid #fff;
  background: linear-gradient(140deg,#f9fbff,#e1eaf9);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 15px 55px #25386845,inset 0 1px #fff;
  max-height: calc(100dvh - 20px);
  overflow: auto;
  margin: auto;
}
.p-dialog::backdrop { background: rgba(35,52,90,.34); backdrop-filter: blur(4px); }
.p-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.p-dialog-head h2 { font-size: 25px; line-height: 1.1; letter-spacing: -.045em; }
.p-dialog-head button { display: grid; place-content: center; width: 35px; height: 35px; }
.p-variant-list { display: grid; gap: 7px; }
.p-variant-list a { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.1fr) 15px; gap: 8px; align-items: center; min-height: 46px; padding: 8px 12px; background: #f6f9ffbf; border: 1px solid #fff; border-radius: 12px; color: var(--p-ink); }
.p-variant-list strong { font-size: 14px; }
.p-variant-list span { color: var(--p-muted); font-size: 12px; }
.p-variant-list svg { width: 14px; }
.p-variant-list [aria-current] { background: #dfebff; border-color: #8eaef6; }

@media (min-width: 760px) and (max-height: 800px) {
  .p-dashboard { padding-block: 6px 12px; }
  .p-topbar { min-height: 30px; margin-bottom: 8px; }
  .p-layout { row-gap: 14px; }
  .p-panels { padding: 15px 19px; margin-top: 10px; }
  .p-title h1 { font-size: clamp(36px,4.6vw,58px); }
  .p-description p { font-size: clamp(15px,1.2vw,18px); line-height: 1.45; }
}
@media (max-width: 759px) and (min-height: 511px) {
  .p-dashboard { padding-block: 5px 10px; }
  .p-topbar { min-height: 29px; margin-bottom: 7px; }
  .p-back { font-size: 12px; gap: 5px; min-height: 30px; }
  .p-back svg { width: 15px; }
  .p-variants { gap: 5px; }
  .p-selector { height: 31px; padding-inline: 9px; font-size: 11px !important; }
  .p-stepper { gap: 2px; }
  .p-stepper a { height: 27px; width: 26px; }
  .p-stepper span { font-size: 10px; }
  .p-layout {
    align-content: stretch;
    grid-template-columns: minmax(0,1fr);
    grid-template-rows: auto minmax(0,1fr) auto auto auto;
    grid-template-areas: "title" "visual" "info" "pack" "buy";
    gap: clamp(7px,1.1dvh,14px);
  }
  .p-title { display: flex; flex-direction: column; }
  .p-title p { font-size: 10px; }
  .p-title h1 { font-size: clamp(33px,7.5vw,45px); margin: 1px 0 0; line-height: 1.05; }
  .p-visual { border-radius: 21px; }
  .p-visual img { width: 90%; height: 88%; }

  .p-tabs { padding: 3px; }
  .p-tabs button { padding: 9px 4px; font-size: 13px; }
  .p-panels { margin-top: 6px; padding: 12px 15px; border-radius: 15px; }
  .p-description p { font-size: 15px; line-height: 1.36; }
  .p-description p + p { margin-top: 5px; }
  .p-panel dl { gap: 4px; line-height: 1.25; }
  .p-panel dl div { grid-template-columns: minmax(70px,.48fr) minmax(0,1fr); gap: 6px; }
  .p-panel dt { font-size: 12px; }
  .p-panel dd { font-size: 13px; }
  .p-doc { font-size: 12px; margin-top: 8px; }
  .p-panel ul { font-size: 14px; line-height: 1.35; }
  .p-instruction { margin-top: 5px !important; }
  .p-pack-options legend { font-size: 12px; padding-bottom: 5px; }
  .p-pack-options > div { gap: 6px; }
  .p-pack-options label span { min-height: 37px; font-size: 14px; }
  .p-cta { min-height: 43px; border-radius: 14px; padding: 7px 13px; gap: 8px; font-size: 14px; }
  .p-cta svg:first-child { width: 20px; height: 20px; }
}
.product-shell[data-pack-tab] #tab-volumes { display: block; }
.product-shell[data-pack-tab] .p-pack { display: none; }
.product-shell[data-pack-tab] .p-compact-pack[hidden] { display: block!important; }
@media (max-width: 759px) and (min-height: 511px) {
  .product-shell[data-pack-tab] .p-layout {
    grid-template-areas: "title" "visual" "info" "buy";
    grid-template-rows: auto minmax(0,1fr) auto auto;
  }
}
@media (min-width: 760px) {
  .product-shell[data-pack-tab] .p-layout {
    grid-template-areas: "visual title" "visual info" "visual buy";
  }
}
@media (max-width: 430px) {
  .product-shell[data-pack-tab] .p-tabs button span { display: none; }
  .product-shell[data-pack-tab] .p-tabs button b { display: inline; }
  .p-dialog { padding: 16px; }
  .p-variant-list a { padding-inline: 9px; }
}
/* In landscape, the name sits over the photograph, leaving the other column
   available for a full tab and the order action. */
@media (max-height: 510px) {
  .p-dashboard { padding-block: 3px 6px; }
  .p-topbar { min-height: 25px; margin-bottom: 4px; }
  .p-back { min-height: 24px; gap: 4px; font-size: 12px; }
  .p-variants { gap: 5px; }
  .p-selector { height: 27px; padding: 0 9px; font-size: 11px !important; }
  .p-stepper a { width: 25px; height: 23px; }
  .p-layout, .product-shell[data-pack-tab] .p-layout {
    grid-template-columns: minmax(0,.80fr) minmax(0,1.20fr);
    grid-template-rows: auto minmax(0,1fr) auto;
    grid-template-areas: "title info" "visual info" "visual buy";
    gap: 5px clamp(10px,2vw,25px);
    align-content: stretch;
  }
  .p-title p { font-size: 9px; letter-spacing: .055em; }
  .p-title h1 { font-size: clamp(26px,4.2vw,43px); margin-top: 2px; }
  .p-visual { border-radius: 15px; }
  .p-visual img { width: 90%; height: 89%; }

  .p-info { align-self: center; }
  .p-tabs { padding: 2px; border-radius: 11px; gap: 1px; }
  .p-tabs button { padding: 8px 2px; font-size: 12px; border-radius: 9px; }
  .p-tabs button span { display: none; }
  .p-tabs button b { display: inline; }
  .p-panels { padding: 9px 12px; border-radius: 13px; margin-top: 5px; }
  .p-panel dl { gap: 2px; line-height: 1.2; }
  .p-panel dl div { grid-template-columns: minmax(56px,.48fr) minmax(0,1fr); gap: 6px; }
  .p-panel dt, .p-doc { font-size: 11px; }
  .p-panel dd, .p-panel ul { font-size: 12px; }
  .p-panel ul { line-height: 1.35; }
  .p-description p { font-size: 14px; line-height: 1.3; }
  .p-description p + p, .p-doc { margin-top: 4px; }
  .p-instruction { font-size: 11px; margin-top: 3px !important; }
  .p-pack-options legend { padding-bottom: 4px; font-size: 11px; }
  .p-pack-options label span { min-height: 32px; font-size: 13px; }
  .p-cta { min-height: 34px; padding: 6px 9px; border-radius: 11px; gap: 6px; font-size: 12px; }
  .p-cta svg:first-child { width: 16px; height: 16px; }
  .p-cta small { font-size: 11px; }
  .p-dialog { padding: 14px; }
  .p-variant-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .p-variant-list a { position: relative; display: flex; flex-direction: column; align-items: start; justify-content: center; gap: 2px; padding-right: 21px; }
  .p-variant-list svg { position: absolute; right: 6px; top: calc(50% - 10px); }
}
@media (max-width: 519px) and (max-height: 510px) {
  .p-layout, .product-shell[data-pack-tab] .p-layout {
    grid-template-columns: minmax(0,1fr) 85px;
    grid-template-rows: auto minmax(0,1fr) auto;
    grid-template-areas: "title visual" "info info" "buy buy";
    gap: 4px 8px;
  }
  .p-visual { min-height: 41px; border-radius: 10px; }
  .p-visual img { height: 96%; }
  .p-info { align-self: center; }
  .p-title h1 { font-size: 26px; }
}
@media print {
  .page-product,.page-product .product-shell,.page-product .p-dashboard { height: auto!important; display: block!important; overflow: visible!important; }
  .page-product .p-layout { display: block!important; }
  .p-visual { height: 230px; margin-bottom: 18px!important; }
  .p-title { margin-bottom: 16px; }
  .p-tabs,.p-topbar,.p-purchase,.p-doc,.p-dialog,.p-fallback,.p-compact-pack { display: none!important; }
  .p-panels { display: block; }
  .p-panel,.p-panel[hidden] { display: block!important; visibility: visible; margin-bottom: 12px; }
}
