/* Bag, checkout and the buy panel.

   Shared by index.html and products.html so the two pages have the same
   cart rather than two that can drift apart. Both pages define --red,
   --black, --white and --B in their own :root. */

/* ── Nav cart button ── */
.nav__cart { position: relative; background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-family: var(--B); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--black); opacity: 0.6; padding: 6px; transition: opacity 0.2s, color 0.2s; }
.nav__cart:hover { opacity: 1; color: var(--red); }
.nav__cart svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.nav__cart-count { position: absolute; top: -2px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; line-height: 17px; text-align: center; transform: scale(0); transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1); }
.nav__cart-count.is-visible { transform: scale(1); }
.nav__actions { display: flex; align-items: center; gap: 20px; }

/* ── Buy panel under the 3D viewer ── */
.buy { background: #0A0A0A; padding: 22px 24px 30px; display: flex; flex-direction: column; gap: 18px; align-items: center; }
.buy__row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; }
.buy__price { font-family: var(--D); font-size: 34px; line-height: 1; color: var(--white); letter-spacing: 0.01em; }
.buy__price-note { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,0.4); margin-top: 4px; }
.qty { display: inline-flex; align-items: center; border: 1px solid rgba(255,255,255,0.25); }
.qty button { width: 40px; height: 44px; background: none; border: 0; color: var(--white); font-size: 18px; cursor: pointer; transition: background 0.2s, color 0.2s; }
.qty button:hover:not(:disabled) { background: rgba(255,255,255,0.08); }
.qty button:disabled { opacity: 0.25; cursor: not-allowed; }
.qty input { width: 46px; height: 44px; background: none; border: 0; border-left: 1px solid rgba(255,255,255,0.18); border-right: 1px solid rgba(255,255,255,0.18); color: var(--white); text-align: center; font-family: var(--B); font-size: 15px; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 14px 34px; background: var(--red); color: #fff; border: 0; font-family: var(--B); font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; cursor: pointer; text-decoration: none; transition: background 0.25s, transform 0.25s; }
.btn-primary:hover:not(:disabled) { background: #ff1a24; transform: translateY(-2px); }
.btn-primary:disabled { background: #555; cursor: not-allowed; transform: none; }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 13px 28px; background: none; color: var(--white); border: 1px solid rgba(255,255,255,0.3); font-family: var(--B); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; cursor: pointer; transition: border-color 0.25s, background 0.25s; }
.btn-ghost:hover { border-color: var(--white); background: rgba(255,255,255,0.06); }
.buy__meta { font-size: 11px; color: rgba(255,255,255,0.45); text-align: center; line-height: 1.6; }

/* ── Product detail: kept quiet so it reads as a footnote to the object,
   not a wall of marketing copy sitting under it. ── */
.pdp { background: #0A0A0A; padding: 0 24px 44px; }
.pdp__inner { max-width: none; margin: 0; border-top: 1px solid rgba(255,255,255,0.12); padding-top: 34px; }
.pdp__cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.pdp__body p { font-size: 15px; line-height: 1.75; color: rgba(255,255,255,0.62); max-width: 70ch; }
.pdp__body p + p { margin-top: 13px; }
.pdp__spec { list-style: none; }
.pdp__spec li { display: grid; grid-template-columns: 78px 1fr; gap: 14px; padding: 11px 0;
  border-top: 1px solid rgba(255,255,255,0.10); font-size: 13px; color: rgba(255,255,255,0.72); line-height: 1.5; }
.pdp__spec li:last-child { border-bottom: 1px solid rgba(255,255,255,0.10); }
.pdp__spec span { font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.38); padding-top: 3px; }
.pdp__sign { margin-top: 30px; font-size: 13px; font-style: italic; color: rgba(255,255,255,0.45); }
@media (max-width: 760px) {
  .pdp { padding: 0 20px 44px; }
  .pdp__cols { grid-template-columns: 1fr; gap: 32px; }
}

/* ── Shared overlay scrim ── */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.65); backdrop-filter: blur(3px); opacity: 0; visibility: hidden; transition: opacity 0.35s ease, visibility 0.35s; z-index: 900; }
.scrim.is-open { opacity: 1; visibility: visible; }

/* ── Cart drawer ── */
.cart { position: fixed; top: 0; right: 0; height: 100%; width: min(430px, 100%); background: #101010; color: var(--white); z-index: 950; display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.42s cubic-bezier(0.22,1,0.36,1); }
.cart.is-open { transform: translateX(0); }
.cart__head { display: flex; align-items: center; justify-content: space-between; padding: 24px 24px 18px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.cart__title { font-family: var(--D); font-size: 28px; text-transform: uppercase; letter-spacing: 0.02em; }
.cart__close { background: none; border: 0; color: var(--white); font-size: 26px; line-height: 1; cursor: pointer; opacity: 0.6; padding: 4px 8px; transition: opacity 0.2s; }
.cart__close:hover { opacity: 1; }
.cart__body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.cart__empty { text-align: center; padding: 60px 10px; color: rgba(255,255,255,0.45); font-size: 14px; line-height: 1.7; }
.cart__empty strong { display: block; font-family: var(--D); font-size: 24px; text-transform: uppercase; color: rgba(255,255,255,0.75); margin-bottom: 10px; }
.line { display: grid; grid-template-columns: 74px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,0.09); }
.line__img { width: 74px; height: 74px; object-fit: contain; background: #1a1a1a; }
.line__name { font-family: var(--B); font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.line__sub { font-size: 11px; color: rgba(255,255,255,0.45); letter-spacing: 0.08em; text-transform: uppercase; }
.line__ctrls { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.line__qty { display: inline-flex; align-items: center; border: 1px solid rgba(255,255,255,0.22); }
.line__qty button { width: 28px; height: 28px; background: none; border: 0; color: #fff; cursor: pointer; font-size: 14px; }
.line__qty button:hover { background: rgba(255,255,255,0.08); }
.line__qty span { min-width: 26px; text-align: center; font-size: 13px; }
.line__remove { background: none; border: 0; color: rgba(255,255,255,0.4); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; text-decoration: underline; padding: 4px; transition: color 0.2s; }
.line__remove:hover { color: var(--red); }
.line__price { font-family: var(--B); font-size: 14px; text-align: right; white-space: nowrap; }
.cart__foot { border-top: 1px solid rgba(255,255,255,0.12); padding: 20px 24px 26px; background: #0C0C0C; }
.cart__row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-size: 13px; }
.cart__row--total { font-family: var(--D); font-size: 26px; text-transform: uppercase; margin: 14px 0 18px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.12); }
.cart__note { font-size: 11px; color: rgba(255,255,255,0.4); text-align: center; margin-top: 12px; line-height: 1.6; }
.cart__foot .btn-primary { width: 100%; }

/* ── Checkout (light theme) ── */
.checkout { position: fixed; inset: 0; background: var(--white); color: var(--black); z-index: 980; overflow-y: auto; opacity: 0; visibility: hidden; transition: opacity 0.35s ease, visibility 0.35s; }
.checkout.is-open { opacity: 1; visibility: visible; }
.checkout__inner { max-width: 1080px; margin: 0 auto; padding: 28px 24px 80px; }
.checkout__bar { display: flex; align-items: center; justify-content: space-between; padding-bottom: 22px; border-bottom: 1px solid rgba(10,10,10,0.12); margin-bottom: 30px; }
.checkout__brand { font-family: var(--D); font-size: 22px; text-transform: uppercase; letter-spacing: 0.04em; }
.checkout .cart__close { color: var(--black); }
.steps { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 34px; }
.step { display: flex; align-items: center; gap: 8px; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(10,10,10,0.4); }
.step__dot { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(10,10,10,0.25); display: grid; place-items: center; font-size: 10px; }
.step.is-active { color: var(--black); }
.step.is-active .step__dot { border-color: var(--red); background: var(--red); color: #fff; }
.step.is-done .step__dot { border-color: var(--red); color: var(--red); }
.step__sep { width: 22px; height: 1px; background: rgba(10,10,10,0.18); }
.checkout__grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 44px; align-items: start; }
.panel { display: none; }
.panel.is-active { display: block; }
.panel__title { font-family: var(--D); font-size: 32px; text-transform: uppercase; margin-bottom: 6px; }
.panel__hint { font-size: 13px; color: rgba(10,10,10,0.55); margin-bottom: 26px; line-height: 1.6; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(10,10,10,0.55); margin-bottom: 8px; }
.field input, .field select, .field textarea { width: 100%; min-height: 46px; background: #FAFAFA; border: 1px solid rgba(10,10,10,0.18); color: var(--black); padding: 12px 14px; font-family: var(--B); font-size: 14px; transition: border-color 0.25s, background 0.25s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--red); background: #fff; }
.field input::placeholder, .field textarea::placeholder { color: rgba(10,10,10,0.32); }
.field input[readonly] { background: #F0F0F0; color: rgba(10,10,10,0.55); }
.field--error input, .field--error select { border-color: var(--red); background: #FFF5F5; }
.field__err { display: none; font-size: 11px; color: var(--red); margin-top: 6px; }
.field--error .field__err { display: block; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.panel__actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
/* Ghost button needs dark strokes on the light checkout */
.checkout .btn-ghost { color: var(--black); border-color: rgba(10,10,10,0.3); }
.checkout .btn-ghost:hover { border-color: var(--black); background: rgba(10,10,10,0.05); }

/* Order summary rail */
.summary { background: #F7F6F3; border: 1px solid rgba(10,10,10,0.1); padding: 26px 24px; position: sticky; top: 28px; }
.summary__title { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(10,10,10,0.55); margin-bottom: 20px; }
.summary__line { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid rgba(10,10,10,0.1); font-size: 13px; }
.summary__line img { width: 52px; height: 52px; object-fit: contain; background: #EAEAEA; }
.summary__row { display: flex; justify-content: space-between; font-size: 13px; margin-top: 12px; color: rgba(10,10,10,0.7); }
.summary__row--total { font-family: var(--D); font-size: 24px; text-transform: uppercase; color: var(--black); margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(10,10,10,0.14); }
.summary__pending { font-size: 11px; color: rgba(10,10,10,0.5); font-style: italic; }

/* Pending-integration notice (delivery / payment) */
.pending { border: 1px dashed rgba(10,10,10,0.3); padding: 26px 24px; text-align: center; background: #FAFAFA; }
.pending__badge { display: inline-block; font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--red); border: 1px solid var(--red); padding: 5px 10px; margin-bottom: 14px; }
.pending p { font-size: 13px; color: rgba(10,10,10,0.6); line-height: 1.7; max-width: 420px; margin: 0 auto; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--white); color: var(--black); padding: 14px 22px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; z-index: 1000; opacity: 0; visibility: hidden; transition: opacity 0.3s, transform 0.3s, visibility 0.3s; display: flex; align-items: center; gap: 10px; }
.toast.is-open { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast__tick { color: var(--red); font-size: 15px; }

@media (max-width: 900px) {
  .checkout__grid { grid-template-columns: 1fr; gap: 30px; }
  .summary { position: static; order: -1; }
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .cart { width: 100%; }
  .buy__row { flex-direction: column; }
  .buy__row .btn-primary { width: 100%; }
  .panel__actions { flex-direction: column; }
  .panel__actions button { width: 100%; }
}
/* ── Delivery option in checkout ──────────────────────────────────
   Reads as a stated rate, not a chooser: there is one way a parcel
   travels, so a radio button would imply a decision that isn't there. */
.ship-opt { border: 1px solid rgba(10,10,10,0.16); padding: 18px 20px; background: #FAFAFA; }
.ship-opt__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.ship-opt__name { font-size: 14px; font-weight: 500; letter-spacing: 0.02em; margin: 0; }
.ship-opt__price { font-size: 15px; font-weight: 500; margin: 0; font-variant-numeric: tabular-nums; }
.ship-opt__note { font-size: 12px; color: rgba(10,10,10,0.6); line-height: 1.65; margin: 7px 0 0; }
.ship-opt--none { border-style: dashed; }
.ship-opt--none .ship-opt__note { max-width: 46ch; }

/* Free-delivery threshold. The gap line is a prompt, the earned line is a
   confirmation, so they carry different weight rather than the same grey. */
.ship-opt__price s { opacity: 0.42; font-weight: 400; margin-right: 6px; }
.ship-opt__gap { font-size: 12px; font-weight: 500; color: rgba(10,10,10,0.85);
  margin: 10px 0 0; letter-spacing: 0.01em; }
.ship-opt__free { font-size: 12px; color: rgba(10,10,10,0.6); line-height: 1.65; margin: 10px 0 0; }
.cart__nudge { font-size: 11.5px; letter-spacing: 0.03em; color: rgba(255,255,255,0.6);
  margin: -2px 0 12px; text-align: right; }
