/* StepChique merch store.
   Matches the site's existing standalone pages (web/about.html et al):
   system font stack, #f9fafb canvas, Tailwind-ish greys, #F7931E accent,
   dark-brown gradient hero, white cards at radius 16px. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* A class rule with `display` outranks the `hidden` attribute's UA style, so
   without this a hidden modal stays laid out and eats clicks on the page
   under it. Applies to every [hidden] element so it can't recur. */
[hidden] { display: none !important; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f9fafb;
  color: #111827;
  line-height: 1.7;
}
img { max-width: 100%; display: block; }

/* ── Nav ────────────────────────────────────────────────────────── */
nav {
  background: #fff; border-bottom: 1px solid #e5e7eb;
  padding: 16px 24px; display: flex; align-items: center; gap: 16px;
  position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
nav a.brand { text-decoration: none; color: #F7931E; font-weight: 700; font-size: 20px; }
nav span { color: #9ca3af; font-size: 14px; }
.nav-cart {
  margin-left: auto; font-family: inherit; font-size: 15px; font-weight: 700;
  background: #F7931E; color: #fff; border: 0; border-radius: 10px;
  padding: 10px 22px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.nav-cart:hover { background: #e07d0a; }
.cart-count { background: rgba(0,0,0,.22); border-radius: 999px; padding: 0 8px; font-size: 13px; }

/* ── Hero ───────────────────────────────────────────────────────── */
.hero { background: linear-gradient(135deg, #2D1810, #1A0F0A); padding: 80px 24px; text-align: center; }
.hero h1 { font-size: 48px; font-weight: 800; color: #fff; margin-bottom: 16px; }
.hero p { font-size: 20px; color: rgba(255,255,255,.85); max-width: 580px; margin: 0 auto; }

/* ── Grid ───────────────────────────────────────────────────────── */
main { max-width: 1000px; margin: 0 auto; padding: 64px 24px 80px; }
.status { color: #6b7280; text-align: center; padding: 48px 0; }
.grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px; margin-bottom: 64px;
}
.card {
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,.07);
  border: 0; padding: 0; text-align: left; font: inherit; color: inherit;
  cursor: pointer; transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,.11); }
.card-media { aspect-ratio: 1; background: #f3f4f6; }
.card-media img { width: 100%; height: 100%; object-fit: contain; }
.card-body { padding: 24px 28px 28px; }
.card-title { font-size: 20px; font-weight: 700; color: #111827; margin-bottom: 4px; }
.card-spec { color: #9ca3af; font-size: 13px; margin-bottom: 12px; }
.card-price { font-size: 17px; font-weight: 700; color: #111827; }
.swatches { display: flex; gap: 6px; margin-top: 12px; }
.swatch { width: 16px; height: 16px; border-radius: 999px; border: 1px solid rgba(0,0,0,.18); }

/* ── CTA ────────────────────────────────────────────────────────── */
.cta { background: linear-gradient(135deg, #2D1810, #1A0F0A); border-radius: 16px; padding: 48px; text-align: center; }
.cta h2 { font-size: 28px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.cta p { color: rgba(255,255,255,.8); margin-bottom: 28px; }
.cta a {
  display: inline-block; background: #F7931E; color: #fff; text-decoration: none;
  padding: 14px 36px; border-radius: 10px; font-weight: 700; font-size: 17px;
}

/* ── Footer ─────────────────────────────────────────────────────── */
footer { background: #111827; color: #9ca3af; text-align: center; padding: 24px; font-size: 13px; }
footer a { color: #F7931E; text-decoration: none; margin: 0 8px; }
footer .fine { color: #6b7280; }

/* ── Modals ─────────────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 200; background: rgba(17,24,39,.6);
  display: grid; place-items: center; padding: 24px; overflow-y: auto;
}
.modal-card {
  position: relative; background: #fff; border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
  width: min(920px, 100%); max-height: 92vh; overflow-y: auto;
}
.modal-x {
  position: absolute; top: 12px; right: 14px; z-index: 2;
  width: 34px; height: 34px; border-radius: 999px; border: 0;
  background: rgba(255,255,255,.92); color: #6b7280;
  font-size: 22px; line-height: 1; cursor: pointer;
}
.product-card { display: grid; grid-template-columns: 1fr 1fr; }
.product-media { background: #f3f4f6; padding: 32px; display: grid; align-content: center; gap: 16px; }
.product-media img { aspect-ratio: 1; object-fit: contain; width: 100%; }
.views { display: flex; gap: 8px; justify-content: center; }
.view-btn {
  font: inherit; font-size: 13px; font-weight: 600; padding: 8px 16px;
  border-radius: 8px; border: 1px solid #e5e7eb; background: #fff;
  color: #6b7280; cursor: pointer;
}
.view-btn[aria-pressed="true"] { background: #111827; color: #fff; border-color: #111827; }

.product-info { padding: 40px 36px; }
.product-info h2 { font-size: 26px; font-weight: 800; color: #111827; margin-bottom: 4px; }
.spec { color: #9ca3af; font-size: 13px; }
.price { font-size: 24px; font-weight: 700; color: #111827; margin: 16px 0 8px; }
.desc { color: #6b7280; font-size: 15px; margin-top: 6px; }
.picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip {
  font: inherit; font-size: 14px; font-weight: 500; padding: 9px 16px;
  border-radius: 8px; border: 1px solid #e5e7eb; background: #fff; color: #111827;
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.chip[aria-pressed="true"] { border-color: #111827; background: #111827; color: #fff; }
.chip:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.chip-dot { width: 13px; height: 13px; border-radius: 999px; border: 1px solid rgba(0,0,0,.2); }
.qty-row { display: flex; align-items: center; gap: 10px; margin: 20px 0 16px; color: #6b7280; font-size: 15px; }
.qty-row input { width: 78px; }
.note { font-size: 13px; color: #6b7280; min-height: 1.2em; margin-top: 10px; }

/* ── Forms + buttons ────────────────────────────────────────────── */
input {
  font: inherit; font-size: 15px; padding: 11px 13px; width: 100%;
  border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; color: #111827;
}
input:focus-visible, .chip:focus-visible, .btn:focus-visible,
.card:focus-visible, .nav-cart:focus-visible, .view-btn:focus-visible {
  outline: 2px solid #F7931E; outline-offset: 2px;
}
.btn {
  font: inherit; font-size: 16px; font-weight: 700; padding: 13px 28px;
  border-radius: 10px; border: 1px solid #e5e7eb; background: #fff;
  color: #111827; cursor: pointer;
}
.btn-primary { background: #F7931E; border-color: #F7931E; color: #fff; }
.btn-primary:hover:not(:disabled) { background: #e07d0a; border-color: #e07d0a; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-wide { width: 100%; margin-top: 16px; }

/* ── Cart ───────────────────────────────────────────────────────── */
.cart-card { padding: 40px 36px; width: min(620px, 100%); }
.cart-card h2 { font-size: 26px; font-weight: 800; color: #111827; margin-bottom: 18px; }
.cart-card h3 { font-size: 15px; font-weight: 700; color: #111827; margin: 28px 0 12px; }
.line { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid #f3f4f6; }
.line img { width: 54px; height: 54px; object-fit: contain; background: #f3f4f6; border-radius: 8px; }
.line-name { flex: 1; font-size: 15px; }
.line-name small { display: block; color: #9ca3af; font-size: 13px; }
.line-rm { border: 0; background: none; color: #9ca3af; cursor: pointer; font-size: 20px; padding: 4px 8px; }
.ship { display: grid; gap: 10px; }
.row { display: flex; gap: 10px; }
.totals { margin-top: 20px; font-size: 15px; color: #374151; }
.totals div { display: flex; justify-content: space-between; padding: 5px 0; }
.totals .grand {
  border-top: 1px solid #e5e7eb; margin-top: 8px; padding-top: 12px;
  font-weight: 700; font-size: 18px; color: #111827;
}
.totals .fine { color: #9ca3af; }
.err { color: #b91c1c; font-size: 14px; margin-top: 8px; }
.fine { font-size: 12px; color: #9ca3af; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: #6b7280; }
#paymentElement { margin: 10px 0 4px; }

.done { text-align: center; padding: 28px 10px 14px; }
.done h2 { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.done p { color: #6b7280; margin-bottom: 10px; }
.done-mark {
  width: 62px; height: 62px; border-radius: 999px; margin: 0 auto 18px;
  background: #F7931E; color: #fff; display: grid; place-items: center; font-size: 32px;
}

@media (max-width: 820px) {
  .hero { padding: 56px 24px; }
  .hero h1 { font-size: 36px; }
  .hero p { font-size: 17px; }
  .product-card { grid-template-columns: 1fr; }
  .modal { padding: 0; }
  .modal-card { border-radius: 0; width: 100%; max-height: 100vh; height: 100vh; }
  .product-info, .cart-card { padding: 28px 22px 44px; }
  .cta { padding: 36px 24px; }
}
@media (max-width: 560px) {
  .row { flex-direction: column; }
  nav { flex-wrap: wrap; gap: 10px; }
  .nav-cart { padding: 9px 18px; font-size: 14px; }
}
