/* /preorder/ (product page) and /preorder/thanks/. Kept apart from site.css. */

.pdp { padding: 16px 0 56px; }
@media (min-width: 900px) { .pdp { padding: 40px 0 96px; } }
.pdp-grid { display: grid; gap: 28px; }
@media (min-width: 900px) {
  .pdp-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 56px; align-items: start; }
  .gallery { position: sticky; top: 84px; }
}
@media (min-width: 1200px) { .pdp-grid { gap: 80px; } }

/* ---------- Gallery ---------- */
.gallery { min-width: 0; }
.gallery-main {
  display: flex; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  background: var(--card); border-radius: 24px;
}
.gallery-main::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .gallery-main { border-radius: var(--radius-card); } }
.gallery-main:focus-visible { outline-offset: 4px; border-radius: 24px; }
.slide { flex: 0 0 100%; margin: 0; scroll-snap-align: center; scroll-snap-stop: always; padding: 7% 5%; display: grid; place-items: center; }
.slide img { width: 100%; height: auto; aspect-ratio: 1000 / 720; }
.gallery-count { display: none; }
.thumbs { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; padding: 2px; scroll-padding: 0 8px; }
.thumbs::-webkit-scrollbar { display: none; }
.thumb {
  flex: 0 0 64px; height: 52px; border-radius: 12px; background: var(--card);
  display: grid; place-items: center; padding: 5px; box-shadow: inset 0 0 0 2px transparent;
  transition: box-shadow .15s;
}
.thumb img { width: 100%; height: auto; }
.thumb:hover { box-shadow: inset 0 0 0 2px var(--line); }
.thumb[aria-current="true"] { box-shadow: inset 0 0 0 2px var(--ink); }
@media (min-width: 900px) {
  .thumbs { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); overflow: visible; }
  .thumb { height: auto; aspect-ratio: 5 / 4; }
}
.gallery-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- Buy column ---------- */
.buy { min-width: 0; max-width: 520px; }
.pdp-title { font-size: clamp(48px, 6.4vw, 76px); line-height: .95; letter-spacing: -.055em; font-weight: 680; }
.pdp-sub { margin: 14px 0 0; font-size: 18px; line-height: 1.45; color: var(--muted); letter-spacing: -.01em; }
.pdp-price { margin: 22px 0 0; font-size: 34px; line-height: 1.1; font-weight: 650; letter-spacing: -.035em; color: var(--ink); }
.pdp-ship { margin: 6px 0 0; font-size: 15px; color: var(--muted); }
.pdp-deposit { margin: 10px 0 0; font-size: 17px; font-weight: 600; color: var(--ink); }

.preorder-msg { margin: 18px 0 0; background: #fff4e5; border-radius: 16px; padding: 12px 16px; color: var(--ink); font-size: 15px; }

.buy-form { margin: 22px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.qty-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 16px; }
.qty-label { font-size: 15px; font-weight: 560; color: var(--ink); }
.qty { display: inline-flex; align-items: center; height: 48px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); background: #fff; }
.qty-btn { width: 48px; height: 48px; border: 0; background: none; border-radius: 999px; display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.qty-btn:hover:not(:disabled) { background: var(--card); }
.qty-btn:disabled { color: #b9bac0; cursor: default; }
.qty-btn svg { width: 16px; height: 16px; }
.qty input {
  width: 40px; height: 44px; border: 0; background: none; text-align: center; padding: 0;
  font: inherit; font-size: 18px; font-weight: 600; color: var(--ink); -moz-appearance: textfield; appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input:focus-visible { outline: 2px solid var(--blue); outline-offset: 0; border-radius: 8px; }
.qty-total { margin: 0 0 0 auto; font-size: 15px; color: var(--muted); }
.qty-total b { color: var(--ink); font-size: 18px; font-weight: 650; margin-left: 4px; }
.buy-btn { width: 100%; justify-content: center; min-height: 58px; font-size: 18px; padding: 0 24px; }
.buy-btn[disabled], .buybar-btn[disabled] { background: #b9bac0; cursor: not-allowed; transform: none; }
.buy-form .note-soon:empty { display: none; }
.reassure { margin: 12px 0 0; font-size: 15px; font-weight: 560; color: var(--ink); letter-spacing: -.01em; }
.trust { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--muted); }
.trust li { display: inline-flex; align-items: center; gap: 6px; }
.trust svg { width: 18px; height: 18px; flex: none; color: var(--ink); }

.pdp-details { margin-top: 32px; }
.pdp-details summary { padding: 18px 0; font-size: 18px; min-height: 44px; }
.pdp-details summary .plus { width: 32px; height: 32px; }
.pdp-details .answer { padding: 0 0 22px; font-size: 16px; }
.pdp-details .answer p { margin: 0 0 .8em; }
.pdp-details .answer a { color: var(--ink); text-underline-offset: 3px; }
.plain-list { margin: 0; padding-left: 1.15em; }
.plain-list li { margin: 4px 0; }
.spec-list { margin: 0; }
.spec-list div { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.spec-list div:first-child { border-top: 0; padding-top: 0; }
.spec-list dt { color: var(--ink); font-weight: 560; }
.spec-list dd { margin: 0; }
.qa h3 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; margin: 14px 0 2px; }
.qa h3:first-child { margin-top: 0; }

/* ---------- Phone buy bar ---------- */
.buybar { display: none; }
@media (max-width: 899px) {
  body.has-buybar { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .buybar {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: saturate(1.8) blur(18px); backdrop-filter: saturate(1.8) blur(18px);
    box-shadow: 0 -1px 0 var(--line), 0 -12px 30px -18px rgba(20, 22, 30, .25);
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
    transition: transform .25s var(--ease);
  }
  .buybar.tucked { transform: translateY(calc(100% + 2px)); }
  .buybar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 640px; margin: 0 auto; }
  .buybar-price { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
  .buybar-price b { font-size: 20px; font-weight: 650; color: var(--ink); letter-spacing: -.02em; }
  .buybar-price > span { font-size: 13px; color: var(--muted); white-space: nowrap; }
  .buybar-btn { min-height: 48px; padding: 0 22px; flex: none; }
}
@media (max-width: 899px) and (prefers-reduced-motion: reduce) { .buybar { transition: none; } }
