/* Soar Supply Co. — storefront
   Display: Bricolage Grotesque · Body: Instrument Sans
   Single-theme (committed light look), indigo-tinted neutrals. */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --paper: #f4f5f9;
  --card: #ffffff;
  --ink: #171a26;
  --muted: #5d6478;
  --brand: #4338ca;
  --brand-deep: #312e81;
  --brand-night: #1e1b4b;
  --brand-ink: #ffffff;
  --wing: #c7d2fe;
  --tint: #eef0fb;
  --line: #e3e5ef;
  --good: #0e7a5f;
  --good-tint: #e2f4ee;
  --star: #b45309;   /* AA on white/paper — the class carries text, not just glyphs */
  --bad: #b42318;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(23, 26, 38, 0.05), 0 10px 30px -12px rgba(49, 46, 129, 0.18);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .btn, .cart-chip { transition: none; }
  .card:hover, .btn:active { transform: none; }
}
body {
  font-family: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--paper); color: var(--ink);
  min-height: 100vh; font-size: 15.5px; line-height: 1.6;
  display: flex; flex-direction: column;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--wing); }
:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, .price, .logo {
  font-family: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif;
  letter-spacing: -0.015em; text-wrap: balance;
}

/* ---- header ---------------------------------------------------------- */
header.site {
  display: flex; align-items: center; gap: 20px; padding: 14px 5vw;
  background: rgba(244, 245, 249, 0.86); backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.logo { font-weight: 800; font-size: 21px; flex: none; }
.logo span { color: var(--brand); }
.navlinks { display: flex; gap: 22px; align-items: center; font-size: 14px; font-weight: 500; margin-left: auto; }
.navlinks a:not(.cart-chip):hover { color: var(--brand); }
.cart-chip {
  background: var(--brand); color: var(--brand-ink); border-radius: 999px;
  padding: 8px 16px; font-weight: 600; font-size: 13.5px;
  transition: background 0.15s;
}
.cart-chip:hover { background: var(--brand-deep); }

main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 30px 5vw 80px; flex: 1; }

/* ---- hero: the shopkeeper's note ------------------------------------- */
.hero {
  background:
    radial-gradient(120% 180% at 85% -30%, #4338ca66 0%, transparent 55%),
    radial-gradient(90% 140% at 10% 120%, #6d28d940 0%, transparent 60%),
    linear-gradient(135deg, var(--brand-night), var(--brand-deep));
  color: #fff; border-radius: 22px; padding: 44px 46px 38px; margin-bottom: 34px;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(#ffffff14 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(115deg, transparent 45%, #000 100%);
  -webkit-mask-image: linear-gradient(115deg, transparent 45%, #000 100%);
}
.hero h1 { font-size: clamp(26px, 4.2vw, 40px); font-weight: 800; margin-bottom: 10px; max-width: 17ch; }
.hero p { color: #d6d9f5; max-width: 52ch; font-size: 15.5px; }
.trust { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; position: relative; }
.trust a, .trust span {
  display: inline-flex; align-items: center; gap: 7px;
  background: #ffffff14; border: 1px solid #ffffff2b; color: #e6e8fa;
  border-radius: 999px; padding: 6px 14px; font-size: 12.5px; font-weight: 500;
}
.trust a:hover { background: #ffffff24; }

/* ---- product grid ----------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.grid .empty { grid-column: 1 / -1; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--wing); }
.card .ph { position: relative; background: var(--tint); }
.card img { width: 100%; aspect-ratio: 4/3; display: block; object-fit: cover; }
.shipchip {
  position: absolute; left: 10px; bottom: 10px;
  background: rgba(23, 26, 38, 0.78); color: #fff; backdrop-filter: blur(4px);
  border-radius: 999px; padding: 4px 11px; font-size: 11.5px; font-weight: 600;
}
.card .body { padding: 15px 17px 17px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card h3 {
  font-size: 15.5px; line-height: 1.35; font-weight: 650;
  overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
/* CJ-sourced titles can carry long unbroken SKU tokens — always give them a break */
.cartline .t h4, .pd h1, .desc, .review p { overflow-wrap: anywhere; }
.pricerow { display: flex; align-items: baseline; gap: 9px; margin-top: auto; padding-top: 6px; }
.price { font-size: 19px; font-weight: 800; }
.compare { color: var(--muted); text-decoration: line-through; font-size: 13px; }
.meta { display: flex; gap: 12px; color: var(--muted); font-size: 12.5px; }
.stars { color: var(--star); font-size: 12.5px; font-weight: 600; }

/* load-in moment */
@media (prefers-reduced-motion: no-preference) {
  .hero, .grid .card { animation: rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
  .grid .card:nth-child(1) { animation-delay: 0.05s; }
  .grid .card:nth-child(2) { animation-delay: 0.1s; }
  .grid .card:nth-child(3) { animation-delay: 0.15s; }
  .grid .card:nth-child(4) { animation-delay: 0.2s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* ---- buttons ----------------------------------------------------------- */
.btn {
  display: inline-block; background: var(--brand); color: var(--brand-ink);
  border: 0; border-radius: 12px; padding: 13px 24px; font-size: 15px;
  font-weight: 600; cursor: pointer; font-family: inherit;
  transition: background 0.15s, transform 0.1s;
}
.btn:hover { background: var(--brand-deep); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.btn.ghost:hover { background: var(--tint); }
.btn.small { padding: 8px 15px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }

/* ---- product page ------------------------------------------------------ */
.pd { display: grid; grid-template-columns: minmax(280px, 500px) 1fr; gap: 40px; }
.pd img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); background: var(--tint); }
.pd h1 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; margin-bottom: 10px; }
.pd .pricerow { margin: 14px 0 18px; }
.pd .price { font-size: 30px; }
.bullets { margin: 14px 0 20px; padding-left: 2px; list-style: none; }
.bullets li { padding: 5px 0 5px 28px; position: relative; font-size: 14.5px; }
.bullets li::before {
  content: '✓'; position: absolute; left: 0; top: 4px;
  width: 19px; height: 19px; border-radius: 50%;
  background: var(--good-tint); color: var(--good);
  font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.desc { color: #3c4152; font-size: 14.5px; line-height: 1.7; max-width: 58ch; }
.buyrow { display: flex; gap: 12px; align-items: stretch; margin: 22px 0 14px; }
.qty {
  width: 74px; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px;
  font-size: 15px; text-align: center; font-family: inherit; background: var(--card);
}
.shipnote {
  color: var(--muted); font-size: 13px; background: var(--tint);
  border-radius: 10px; padding: 10px 14px; display: inline-block;
}
.thumb {
  padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--tint);
  cursor: pointer; width: 72px; height: 72px; overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:hover { border-color: var(--brand); }
.reviews { margin-top: 48px; max-width: 660px; }
.reviews h2 { font-size: 19px; margin-bottom: 14px; }
.review { border-top: 1px solid var(--line); padding: 14px 0; }
.review .who { font-weight: 650; font-size: 13.5px; margin-bottom: 3px; }
.review p { color: #3c4152; font-size: 14px; }
.verified {
  color: var(--good); font-size: 11px; font-weight: 700;
  background: var(--good-tint); border-radius: 999px; padding: 2px 9px; margin-left: 7px;
  vertical-align: 1px;
}

/* ---- cart / forms ------------------------------------------------------- */
.cartline {
  display: flex; align-items: center; gap: 15px; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; padding: 13px 17px; margin-bottom: 10px;
}
.cartline img { width: 66px; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--tint); }
.cartline .t { flex: 1; min-width: 0; }
.cartline .t h4 { font-size: 14.5px; font-weight: 600; }
.cartline .t small { color: var(--muted); }
.rm { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 17px; padding: 6px; border-radius: 8px; }
.rm:hover { color: var(--bad); background: #fee2e2; }
.totals {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 22px; margin: 20px 0; max-width: 440px;
}
.totals .row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.totals .row.grand { font-weight: 700; font-size: 17px; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; }
.totals .row.grand span:last-child { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-weight: 800; }
form.checkout { max-width: 440px; display: flex; flex-direction: column; gap: 10px; }
form.checkout input, form.checkout textarea, form.checkout select {
  padding: 12px 15px; border: 1.5px solid var(--line); border-radius: 12px;
  font-size: 14.5px; font-family: inherit; background: var(--card); color: var(--ink);
}
form.checkout input:focus, form.checkout textarea:focus, form.checkout select:focus {
  outline: none; border-color: var(--brand);
}
.err { color: var(--bad); font-size: 13.5px; min-height: 18px; }
.empty {
  color: var(--muted); text-align: center; padding: 70px 20px; font-size: 15px;
  background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty a { color: var(--brand); font-weight: 600; }
.paynote { color: var(--muted); font-size: 12.5px; margin-top: 12px; max-width: 46ch; }
.paynote b { color: var(--ink); }

/* ---- order status -------------------------------------------------------- */
.status-big { font-size: 22px; margin: 8px 0 4px; }
.tl { list-style: none; margin: 24px 0; max-width: 560px; }
.tl li { position: relative; padding: 0 0 18px 28px; border-left: 2px solid var(--line); margin-left: 8px; font-size: 14.5px; }
.tl li:last-child { border-left-color: transparent; }
.tl li::before {
  content: ''; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--tint);
}
.tl li small { display: block; color: var(--muted); font-size: 12px; }
.badge {
  display: inline-block; border-radius: 999px; padding: 4px 14px; font-size: 12.5px;
  font-weight: 700; background: var(--tint); color: var(--brand-deep); text-transform: capitalize;
}
.badge.delivered { background: var(--good-tint); color: var(--good); }
.badge.refunded, .badge.cancelled { background: #fee2e2; color: var(--bad); }
.badge.shipped { background: #dbeafe; color: #1d4ed8; }

/* ---- policies -------------------------------------------------------------- */
.policy section {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 26px; margin-bottom: 14px;
}
.policy h2 { font-size: 17px; margin-bottom: 8px; }

/* ---- footer ------------------------------------------------------------------ */
footer.site {
  border-top: 1px solid var(--line); background: var(--card);
  padding: 26px 5vw; margin-top: auto;
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
  color: var(--muted); font-size: 13px;
}
footer.site a { font-weight: 600; }
footer.site a:hover { color: var(--brand); }
footer.site .foot-note { margin-left: auto; font-size: 12px; }

@media (max-width: 760px) {
  .pd { grid-template-columns: 1fr; }
  .hero { padding: 32px 26px 30px; }
  .navlinks { gap: 14px; }
  .navlinks a:not(.cart-chip) { display: none; }
  footer.site .foot-note { margin-left: 0; }
}
