/* Product page + checkout. Loads after shop.css. */
html, body { overflow-x: clip; }

/* ---------- floating capsule header ---------- */
.product-header {
  top: 0;
  padding: 14px 0 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}
.product-header.scrolled { border-color: transparent; }
.product-header .header-inner {
  position: relative;
  min-height: 76px;
  padding: 0 24px;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 18px 46px rgba(21,18,33,.12), inset 0 1px 0 rgba(255,255,255,.95);
  backdrop-filter: blur(18px) saturate(120%);
}
.product-header .header-left,
.product-header .header-nav { display: flex; flex: 1 1 0; align-items: center; }
.product-header .header-nav { justify-content: flex-end; gap: 18px; }
.product-header .brand {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
}
.product-header .brand-logo { height: 46px; }
.shop-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  color: var(--ink);
  font-size: .96rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
  text-transform: uppercase;
}
.shop-link svg { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.shop-link:hover svg { transform: translateY(2px); }
.product-header .header-nav .header-text-link { padding-inline: 2px; }
.header-icon-link,
.product-header .cart-button {
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, transform .2s var(--ease);
}
.product-header .header-nav .header-icon-link::after { display: none; }
.header-icon-link svg,
.product-header .cart-button svg { width: 23px; height: 23px; }
.header-icon-link:hover,
.product-header .cart-button:hover { color: var(--violet-dark); background: rgba(106,63,224,.08); transform: translateY(-1px); }
.product-header .cart-count { top: 0; right: -1px; }

.breadcrumb { padding: 22px 0 0; color: var(--muted); font-size: .78rem; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb span { margin: 0 8px; }

/* ---------- product layout ---------- */
.product { padding: 28px 0 clamp(70px, 8vw, 120px); }
.product-grid { display: grid; gap: clamp(32px, 5vw, 72px); grid-template-columns: 1.05fr .95fr; align-items: start; }

.gallery { position: sticky; top: 100px; }
.gallery-main { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--white); aspect-ratio: 1 / 1; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; transition: opacity .22s ease, transform .48s var(--ease); }
.gallery-main.is-switching img { opacity: 0; transform: scale(1.025); }
.gallery-caption { position: absolute; bottom: 16px; left: 16px; max-width: calc(100% - 32px); padding: 9px 14px; border-radius: 999px; color: var(--white); background: rgba(14,11,22,.6); font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; backdrop-filter: blur(10px); }
.thumbs { display: grid; gap: 10px; margin-top: 12px; grid-template-columns: repeat(4, 1fr); }
.thumb { overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--white); cursor: pointer; aspect-ratio: 1 / 1; transition: border-color .2s ease, box-shadow .25s ease, transform .25s var(--ease); }
.thumb img { width: 100%; height: 100%; object-fit: contain; transition: transform .45s var(--ease); }
.thumb:hover { transform: translateY(-2px); }
.thumb:hover img { transform: scale(1.045); }
.thumb[aria-selected="true"] { border-color: var(--violet); box-shadow: 0 0 0 2px rgba(106,63,224,.22); }

/* ---------- buy box ---------- */
.buy h1 { margin: 14px 0 0; font-size: clamp(2.6rem, 4.6vw, 4rem); font-weight: 500; letter-spacing: -.055em; line-height: .95; }
.buy h1 em { color: var(--violet); font-family: var(--font-mark); font-style: normal; font-weight: 400; }
.buy-lead { max-width: 46ch; margin: 16px 0 0; color: var(--ink-soft); font-size: 1.02rem; }
.price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin: 26px 0 4px; }
.price { font-size: clamp(2.4rem, 4vw, 3.2rem); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.05em; line-height: 1; }
.old-price { color: var(--muted); font-size: 1rem; font-weight: 600; }
.sale-badge { display: inline-flex; min-height: 30px; align-items: center; padding: 0 11px; border-radius: 999px; color: var(--white); background: var(--violet-dark); font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.price-note { color: var(--muted); font-size: .82rem; }
.stock { display: inline-flex; align-items: center; gap: 9px; margin: 14px 0 0; padding: 7px 14px; border: 1px solid rgba(47,125,82,.3); border-radius: 999px; color: #23603F; background: rgba(47,125,82,.08); font-size: .76rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.stock i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(47,125,82,.16); }
.accuracy-pill { display: inline-flex; min-height: 36px; align-items: center; gap: 7px; margin: 10px 0 0; padding: 0 13px; border: 1px solid rgba(106,63,224,.25); border-radius: 999px; color: var(--ink-soft); background: rgba(106,63,224,.07); font-size: .75rem; }
.accuracy-pill strong { color: var(--violet-dark); font-size: .92rem; }

.buy-controls { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }
.qty-picker { display: inline-flex; align-items: center; height: 50px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); }
.qty-picker button { display: grid; width: 44px; height: 48px; place-items: center; border: 0; border-radius: 50%; background: transparent; cursor: pointer; font-size: 1.2rem; }
.qty-picker button:hover:not([disabled]) { color: var(--violet-dark); }
.qty-picker button[disabled] { opacity: .3; cursor: not-allowed; }
.qty-picker span { min-width: 34px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; }
.buy-controls .button { flex: 1 1 220px; }
.added-msg { margin: 14px 0 0; color: #23603F; font-size: .84rem; font-weight: 600; }
.added-msg[hidden] { display: none; }

.includes { margin: 30px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.includes li { display: grid; padding: 12px 0; border-bottom: 1px solid var(--line); gap: 12px; grid-template-columns: 22px 1fr; color: var(--ink-soft); font-size: .92rem; }
.includes li::before { color: var(--violet-dark); content: "\2713"; font-weight: 700; }

.assurances { display: grid; gap: 14px; margin: 26px 0 0; grid-template-columns: repeat(3, 1fr); }
.assurance { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.5); }
.assurance strong { display: block; font-size: .84rem; }
.assurance span { display: block; margin-top: 3px; color: var(--muted); font-size: .74rem; }

/* ---------- spec + detail sections ---------- */
.section { padding: clamp(64px, 8vw, 110px) 0; }
.section.dark { color: var(--white); background: var(--ink); }
.section.dark .eyebrow { color: #B9A5FF; }
.section-title { max-width: 760px; margin: 14px 0 0; font-size: clamp(2.2rem, 4.4vw, 3.9rem); font-weight: 500; letter-spacing: -.055em; line-height: .98; }
.section-copy { max-width: 58ch; margin: 16px 0 0; color: var(--ink-soft); font-size: 1.02rem; }
.section.dark .section-copy { color: #C8C3D1; }

.use-features { background: var(--white); }
.feature-cards { display: grid; gap: 14px; margin-top: 42px; grid-template-columns: repeat(3, 1fr); }
.feature-cards article { min-height: 190px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--cream); transition: border-color .25s ease, transform .35s var(--ease); }
.feature-cards article:hover { border-color: rgba(106,63,224,.35); transform: translateY(-6px); }
.feature-cards article > span { color: var(--violet-dark); font-size: .7rem; font-weight: 700; letter-spacing: .12em; }
.feature-cards h3 { margin: 34px 0 8px; font-size: 1.05rem; }
.feature-cards p { margin: 0; color: var(--ink-soft); font-size: .88rem; }
.coverage-grid { display: grid; overflow: hidden; margin-top: 18px; border: 1px solid var(--ink); border-radius: 16px; color: var(--white); background: var(--ink); grid-template-columns: repeat(3, 1fr); }
.coverage-grid div { padding: 24px; text-align: center; }
.coverage-grid div + div { border-left: 1px solid rgba(255,255,255,.16); }
.coverage-grid strong { display: block; color: #CFC4FF; font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 500; letter-spacing: -.04em; }
.coverage-grid span { display: block; margin-top: 4px; color: #D8D3E0; font-size: .8rem; }

.spec-table { width: 100%; margin-top: 44px; border-collapse: collapse; font-size: .93rem; }
.spec-table th, .spec-table td { padding: 16px 4px; border-bottom: 1px solid rgba(255,255,255,.14); text-align: left; vertical-align: top; }
.spec-table th { width: 34%; color: #B9A5FF; font-weight: 600; }
.spec-table td { color: #E4E1EA; font-variant-numeric: tabular-nums; }
.spec-table caption { padding-bottom: 8px; color: #9690A2; font-size: .78rem; text-align: left; }

.detail-grid { display: grid; gap: 18px; margin-top: 46px; grid-template-columns: repeat(3, 1fr); }
.detail { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--white); }
.detail img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.detail div { padding: 20px; }
.detail h3 { margin: 0 0 6px; font-size: 1.02rem; }
.detail p { margin: 0; color: var(--ink-soft); font-size: .88rem; }

.faq-list { margin-top: 40px; border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { position: relative; display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 56px 18px 0; cursor: pointer; font-size: 1.05rem; font-weight: 600; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { position: absolute; right: 6px; display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--line); border-radius: 50%; content: "+"; font-size: 1.25rem; font-weight: 400; transition: transform .25s ease; }
details[open] summary::after { transform: rotate(45deg); }
details p { max-width: 68ch; margin: -4px 0 28px; color: var(--ink-soft); }
details[open] p { animation: faqReveal .38s var(--ease) both; }

/* ---------- motion system ---------- */
.motion-ready .motion-reveal {
  opacity: 0;
  transform: translate3d(0, 34px, 0);
  transition: opacity .78s var(--ease), transform .78s var(--ease);
  transition-delay: var(--motion-delay, 0ms);
}
.motion-ready .motion-reveal.from-left { transform: translate3d(-34px, 0, 0) scale(.985); }
.motion-ready .motion-reveal.from-right { transform: translate3d(34px, 0, 0); }
.motion-ready .motion-reveal.is-visible { opacity: 1; transform: none; }
.motion-ready .buy.is-visible .accuracy-pill { animation: accuracySignal 1s var(--ease) .75s both; }
@keyframes accuracySignal {
  0%, 100% { transform: scale(1); }
  45% { transform: scale(1.045); }
}
@keyframes faqReveal {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- checkout ---------- */
.checkout { padding: 30px 0 clamp(70px, 8vw, 110px); }
.checkout h1 { margin: 12px 0 0; font-size: clamp(2.4rem, 4.4vw, 3.6rem); font-weight: 500; letter-spacing: -.055em; line-height: 1; }
.checkout-grid { display: grid; gap: clamp(28px, 4vw, 60px); margin-top: 40px; grid-template-columns: 1.15fr .85fr; align-items: start; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; font-size: .84rem; font-weight: 600; }
.field .req { color: var(--violet-dark); }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--violet); outline: none; box-shadow: 0 0 0 3px rgba(106,63,224,.16); }
.field .hint { display: block; margin-top: 5px; color: var(--muted); font-size: .75rem; }
.field .err { display: block; margin-top: 5px; color: #A32F45; font-size: .76rem; font-weight: 600; }
.field .err[hidden] { display: none; }
.field.invalid input, .field.invalid select { border-color: #A32F45; }
.field-row { display: grid; gap: 0 16px; grid-template-columns: 1fr 1fr; }
fieldset { margin: 0 0 26px; padding: 0; border: 0; }
fieldset legend { margin-bottom: 16px; padding: 0; font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--violet-dark); }

.summary-card { position: sticky; top: 100px; padding: 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); }
.summary-card h2 { margin: 0 0 18px; font-size: 1.05rem; }
.summary-lines { margin: 0 0 18px; padding: 0; list-style: none; }
.summary-lines li { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.summary-lines li span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }
.pay-method { display: grid; gap: 10px; padding: 16px; border: 1px solid rgba(47,125,82,.3); border-radius: 14px; background: rgba(47,125,82,.07); grid-template-columns: 20px 1fr; }
.pay-method strong { font-size: .9rem; }
.pay-method p { margin: 4px 0 0; color: var(--ink-soft); font-size: .8rem; }
.pay-method::before { width: 11px; height: 11px; margin-top: 6px; border-radius: 50%; background: var(--ok); content: ""; box-shadow: 0 0 0 4px rgba(47,125,82,.16); }

.confirm { max-width: 620px; padding: 60px 0 90px; }
.confirm[hidden] { display: none; }
.confirm .tick { display: grid; width: 62px; height: 62px; place-items: center; border-radius: 50%; color: var(--white); background: var(--ok); font-size: 1.7rem; }
.confirm h1 { margin: 22px 0 0; }
.confirm p { color: var(--ink-soft); }
.order-ref { display: inline-block; margin-top: 6px; padding: 8px 14px; border: 1px dashed var(--line); border-radius: 10px; background: var(--white); font-size: .95rem; font-weight: 700; letter-spacing: .06em; }
.order-dump { width: 100%; min-height: 190px; margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; }

@media (max-width: 980px) {
  .product-grid, .checkout-grid { grid-template-columns: 1fr; }
  .gallery, .summary-card { position: static; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .product-header .header-text-link { display: none; }
  .feature-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .product-header { padding-top: 10px; }
  .product-header .container { width: min(calc(100% - 20px), var(--container)); }
  .product-header .header-inner { min-height: 64px; padding: 0 10px 0 14px; }
  .product-header .brand-logo { height: 40px; }
  .shop-link { min-height: 44px; padding-inline: 5px; font-size: .82rem; }
  .shop-link svg { width: 16px; height: 16px; }
  .header-icon-link,
  .product-header .cart-button { width: 42px; height: 42px; }
  .header-icon-link svg,
  .product-header .cart-button svg { width: 21px; height: 21px; }
  .thumbs { grid-template-columns: repeat(4, 1fr); }
  .assurances, .detail-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .buy-controls .button { flex-basis: 100%; }
  .spec-table th, .spec-table td { display: block; width: 100%; }
  .spec-table th { padding-bottom: 2px; border-bottom: 0; }
  .spec-table td { padding-top: 0; }
  .feature-cards, .coverage-grid { grid-template-columns: 1fr; }
  .coverage-grid div + div { border-top: 1px solid rgba(255,255,255,.16); border-left: 0; }
}
@media (max-width: 430px) {
  .product-header .header-icon-link { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-main img, .thumb, .thumb img, .feature-cards article, .motion-reveal { transition: none !important; }
  .gallery-main.is-switching img, .motion-reveal { opacity: 1; transform: none; }
  details[open] p, .buy.is-visible .accuracy-pill { animation: none !important; }
}

/* Specification as a quotable passage, alongside the scannable grid. */
.spec-brief { padding: clamp(48px, 6vw, 84px) 0; background: var(--white); border-top: 1px solid var(--line); }
.brief-inner { display: grid; grid-template-columns: .55fr 1.45fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.spec-brief h2 { margin: 0; font-size: clamp(24px, 3vw, 34px); line-height: 1.15; letter-spacing: -.02em; }
.brief-body p { margin: 0 0 16px; font-size: clamp(16px, 1.3vw, 17.5px); line-height: 1.7; color: var(--ink-soft); max-width: 62ch; }
.brief-body p:last-child { margin-bottom: 0; }
.brief-body strong { color: var(--ink); font-weight: 600; }
@media (max-width: 860px) { .brief-inner { grid-template-columns: 1fr; gap: 16px; } }
