/* ===========================================================================
   ACME Athletica — gold-standard storefront. Premium, minimal, AI-forward.
   Self-contained (no external fonts/images) so it never fails on demo wifi.
   =========================================================================== */
:root {
  --ink: #0a0a0a;
  --sub: #6b7280;
  --line: #ebebeb;
  --bg: #ffffff;
  --soft: #f6f6f4;
  --accent: #d6001c;      /* signature red */
  --accent-ink: #a80016;
  --ok: #15803d;
  --bad: #dc2626;
  --shadow: 0 8px 30px rgba(0,0,0,.08);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.16);
  --r: 16px;
  --maxw: 1200px;
  --font: "Helvetica Neue", Helvetica, Arial, system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
button { font-family: var(--font); cursor: pointer; border: 0; }
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--sub); font-weight: 600; }

/* ---- Announcement bar ---- */
.announce {
  background: var(--ink); color: #fff; text-align: center;
  font-size: 12.5px; letter-spacing: .04em; padding: 9px 12px;
}
.announce b { color: #fff; }

/* ---- Header ---- */
header.nav {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 66px; }
.logo { font-weight: 800; font-size: 20px; letter-spacing: -.02em; display: flex; align-items: center; gap: 9px; }
.logo .mark {
  width: 26px; height: 26px; border-radius: 50%;
  background: conic-gradient(from 200deg, var(--accent), #ff6a3d, var(--accent));
}
.logo small { font-weight: 500; letter-spacing: .28em; font-size: 11px; color: var(--sub); }
nav.links { display: flex; gap: 22px; font-size: 14px; font-weight: 500; }
nav.links a { padding: 6px 0; border-bottom: 2px solid transparent; transition: .15s; }
nav.links a:hover { border-color: var(--ink); }
nav.links a.sale { color: var(--accent); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.icon-btn { background: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--ink); }
.icon-btn:hover { background: var(--soft); }
.bag { position: relative; }
.bag .count {
  position: absolute; top: 4px; right: 4px; background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 999px;
  display: grid; place-items: center; padding: 0 4px;
}

/* ---- Hero ---- */
.hero {
  position: relative; overflow: hidden; border-radius: 0 0 34px 34px;
  background:
    radial-gradient(1200px 500px at 80% -10%, #ffd9cf 0%, transparent 60%),
    radial-gradient(900px 500px at 0% 10%, #e8e3ff 0%, transparent 55%),
    linear-gradient(180deg, #faf9f7, #f2efec);
}
.hero-inner { max-width: var(--maxw); margin: 0 auto; padding: 78px 24px 92px; }
.hero h1 { font-size: clamp(40px, 7vw, 78px); line-height: .98; letter-spacing: -.03em; margin: 14px 0 18px; font-weight: 800; max-width: 12ch; }
.hero p { font-size: 18px; color: #3f3f46; max-width: 46ch; margin: 0 0 28px; }
.cta { display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; padding: 15px 26px; border-radius: 999px; font-weight: 600; font-size: 15px; transition: .2s; }
.cta:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.cta.light { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.hero-badges { display: flex; gap: 22px; margin-top: 34px; flex-wrap: wrap; }
.hero-badges span { font-size: 13px; color: #52525b; display: flex; align-items: center; gap: 7px; }
.hero-badges .d { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---- Category tiles ---- */
.section { padding: 64px 0; }
.section h2 { font-size: 28px; letter-spacing: -.02em; margin: 6px 0 26px; font-weight: 800; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tile { position: relative; height: 280px; border-radius: var(--r); overflow: hidden; color: #fff; display: flex; align-items: flex-end; padding: 22px; font-weight: 700; font-size: 20px; background-size: cover; background-position: center; transition: .25s; }
.tile:hover { transform: translateY(-3px); }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.45)); }
.tile span { position: relative; z-index: 1; }
.tile.w { background: linear-gradient(135deg, #6d28d9, #9333ea, #db2777); }
.tile.m { background: linear-gradient(135deg, #0f172a, #1e3a8a, #0e7490); }
.tile.a { background: linear-gradient(135deg, #b91c1c, #ea580c, #f59e0b); }

/* ---- Product grid ---- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 980px) { .grid { grid-template-columns: repeat(2, 1fr); } .tiles { grid-template-columns: 1fr; } }
.card { background: #fff; border-radius: var(--r); overflow: hidden; transition: .2s; }
.card:hover { transform: translateY(-4px); }
.card .media { position: relative; aspect-ratio: 3/4; border-radius: var(--r); overflow: hidden; }
.card .media::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120px 120px at 30% 25%, rgba(255,255,255,.35), transparent 60%); }
.card .badge { position: absolute; top: 12px; left: 12px; background: #fff; color: var(--ink); font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 999px; z-index: 2; letter-spacing: .03em; }
.card .badge.hot { background: var(--accent); color: #fff; }
.card .quick {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 2;
  background: rgba(255,255,255,.95); color: var(--ink); font-weight: 600; font-size: 13px;
  padding: 11px; border-radius: 10px; opacity: 0; transform: translateY(8px); transition: .2s;
}
.card:hover .quick { opacity: 1; transform: translateY(0); }
.card .meta { padding: 14px 4px 4px; }
.card .swatches { display: flex; gap: 6px; margin-bottom: 8px; }
.card .swatches i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); }
.card .name { font-weight: 600; font-size: 15px; }
.card .cat { color: var(--sub); font-size: 13px; margin: 2px 0 6px; }
.card .price { font-weight: 700; font-size: 15px; }

/* ---- AI stylist editorial band ---- */
.ai-band {
  background: linear-gradient(120deg, #0a0a0a, #1a1030 55%, #3b0d1a);
  color: #fff; border-radius: 28px; padding: 54px; display: grid;
  grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; overflow: hidden; position: relative;
}
@media (max-width: 900px) { .ai-band { grid-template-columns: 1fr; padding: 34px; } .checkout-grid { grid-template-columns: 1fr !important; } }
.ai-band h2 { color: #fff; font-size: 34px; margin: 10px 0 14px; }
.ai-band p { color: #d4d4d8; font-size: 16px; max-width: 42ch; }
.ai-band .spark { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #ff8a6a; font-weight: 700; }
.ai-preview {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px; padding: 18px; backdrop-filter: blur(8px);
}
.ai-preview .bub { background: rgba(255,255,255,.1); padding: 10px 13px; border-radius: 12px; font-size: 14px; margin-bottom: 10px; max-width: 85%; }
.ai-preview .bub.me { background: var(--accent); margin-left: auto; }

/* ---- Footer ---- */
footer.site { background: var(--soft); margin-top: 70px; padding: 56px 0 30px; border-top: 1px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 30px; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-grid h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 14px; }
.foot-grid a { display: block; color: var(--sub); font-size: 14px; padding: 4px 0; }
.foot-grid a:hover { color: var(--ink); }
.news input { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; width: 100%; margin-bottom: 10px; font-size: 14px; }
.foot-bottom { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 20px; color: var(--sub); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---- Drawers (cart + AI chat) shared ---- */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: .25s; z-index: 90; }
.overlay.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100dvh; width: 420px; max-width: 92vw;
  background: #fff; z-index: 100; box-shadow: var(--shadow-lg); transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column;
}
.drawer.show { transform: translateX(0); }
.drawer header { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid var(--line); }
.drawer header h3 { margin: 0; font-size: 17px; }
.drawer .body { flex: 1; overflow: auto; padding: 20px; }
.drawer .foot { border-top: 1px solid var(--line); padding: 18px 20px; }
.close-x { background: none; font-size: 22px; line-height: 1; color: var(--sub); }
.cart-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-item .th { width: 56px; height: 72px; border-radius: 8px; }
.cart-item .nm { font-weight: 600; font-size: 14px; }
.cart-item .pr { color: var(--sub); font-size: 13px; }
.checkout { width: 100%; background: var(--ink); color: #fff; padding: 15px; border-radius: 12px; font-weight: 600; }

/* ---- AI chat ---- */
.fab-ai {
  position: fixed; right: 22px; bottom: 22px; z-index: 80;
  background: linear-gradient(135deg, #0a0a0a, #3b0d1a); color: #fff; border-radius: 999px;
  padding: 14px 20px; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 9px;
  box-shadow: var(--shadow-lg);
}
.fab-ai .pulse { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74,222,128,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(74,222,128,.5)} 70%{box-shadow:0 0 0 10px rgba(74,222,128,0)} 100%{box-shadow:0 0 0 0 rgba(74,222,128,0)} }
.chat-msgs { display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 82%; padding: 11px 14px; border-radius: 14px; font-size: 14px; line-height: 1.45; }
.msg.ai { background: var(--soft); border-bottom-left-radius: 4px; }
.msg.me { background: var(--ink); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.typing { color: var(--sub); font-style: italic; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; font-size: 13px; }
.chip:hover { border-color: var(--ink); }
.chat-input { display: flex; gap: 8px; }
.chat-input input { flex: 1; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }
.chat-input button { background: var(--accent); color: #fff; border-radius: 12px; padding: 0 16px; font-weight: 600; }
.ai-foot { font-size: 11px; color: var(--sub); text-align: center; margin-top: 8px; }

/* ---- Presenter security console (discreet) ---- */
.fab-demo {
  position: fixed; left: 22px; bottom: 22px; z-index: 80; background: #0f172a; color: #e2e8f0;
  border-radius: 999px; padding: 12px 16px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow); border: 1px solid #1e293b;
}
.demo-panel {
  position: fixed; left: 22px; bottom: 74px; z-index: 85; width: 380px; max-width: 92vw;
  background: #0b1220; color: #e2e8f0; border: 1px solid #1e293b; border-radius: 16px;
  box-shadow: var(--shadow-lg); overflow: hidden; transform: translateY(12px) scale(.98);
  opacity: 0; pointer-events: none; transition: .2s;
}
.demo-panel.show { transform: none; opacity: 1; pointer-events: auto; }
.demo-panel h3 { margin: 0; padding: 14px 16px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; background: #111827; border-bottom: 1px solid #1e293b; }
.demo-beats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px; }
.demo-beats .b { background: #111827; border: 1px solid #1e293b; border-radius: 10px; padding: 10px; }
.demo-beats .b .k { font-size: 10px; color: #94a3b8; text-transform: uppercase; letter-spacing: .05em; }
.demo-beats .b .t { font-size: 12.5px; font-weight: 600; margin: 3px 0 8px; }
.demo-beats .b button { width: 100%; background: var(--bad); color: #fff; border-radius: 8px; padding: 8px; font-size: 12px; font-weight: 600; }
.demo-beats .b button.ghost { background: #1e293b; }
.demo-log { margin: 0 14px 14px; background: #020617; border: 1px solid #1e293b; border-radius: 10px; padding: 12px; font-family: ui-monospace, Menlo, monospace; font-size: 12px; min-height: 84px; max-height: 200px; overflow: auto; white-space: pre-wrap; }
.demo-log .ok { color: #4ade80; } .demo-log .bad { color: #f87171; } .demo-log .dim { color: #64748b; }

.card-page { max-width: 460px; margin: 60px auto; padding: 0 24px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 30px; box-shadow: var(--shadow); }
.field { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; font-size: 15px; }
