:root {
  --bg: #0d1117; --surface: #161b22; --surface2: #1f2630; --border: #2d333b;
  --text: #e6edf3; --muted: #9aa4b2; --accent: #2fbf71; --accent-dark: #27a862;
  --radius: 14px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.5; }
a { color: inherit; }

.nav { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center;
  padding: 14px 24px; background: rgba(13,17,23,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.brand { font-size: 1.25rem; text-decoration: none; }
.brand strong { color: var(--accent); }
.cart-btn { position: relative; font-size: 1.3rem; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 16px; cursor: pointer; color: var(--text); }
.cart-count { position: absolute; top: -6px; right: -6px; background: var(--accent); color: #06130c;
  font-size: .75rem; font-weight: 700; border-radius: 999px; min-width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }

.hero { text-align: center; padding: 56px 20px 40px; }
.hero h1 { font-size: clamp(1.8rem, 5vw, 3rem); letter-spacing: -.02em; }
.hero h1 span { color: var(--accent); }
.hero p { color: var(--muted); margin-top: 10px; }

main { max-width: 1200px; margin: 0 auto; padding: 0 20px 80px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; }
.card .visual { position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; background: var(--surface2); }
.card .visual img, .card .visual svg { width: 72%; height: auto; }
.badge { position: absolute; top: 10px; left: 10px; background: var(--accent); color: #06130c;
  font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.card .body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { font-size: 1rem; font-weight: 600; }
.price { font-size: 1.15rem; font-weight: 700; color: var(--accent); }
.opts { display: flex; gap: 8px; }
.opts select { flex: 1; background: var(--surface2); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px; font-size: .9rem; }
.btn-add { margin-top: auto; background: var(--accent); border: none; color: #06130c; font-weight: 700;
  padding: 11px; border-radius: 10px; cursor: pointer; font-size: .95rem; }
.btn-add:hover { background: var(--accent-dark); }
.btn-add.added { background: var(--surface2); color: var(--accent); border: 1px solid var(--accent); }

.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 29; }
.cart { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); z-index: 30;
  background: var(--surface); border-left: 1px solid var(--border); display: flex; flex-direction: column; }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.cart-head button { background: none; border: none; color: var(--muted); font-size: 1.2rem; cursor: pointer; }
.cart-items { flex: 1; overflow-y: auto; padding: 14px 20px; display: flex; flex-direction: column; gap: 14px; }
.cart-empty { color: var(--muted); text-align: center; margin-top: 40px; }
.ci { display: flex; gap: 12px; align-items: center; }
.ci .thumb { width: 54px; height: 54px; border-radius: 10px; background: var(--surface2);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ci .thumb svg, .ci .thumb img { width: 75%; }
.ci .meta { flex: 1; font-size: .88rem; }
.ci .meta small { color: var(--muted); display: block; }
.ci .qty { display: flex; align-items: center; gap: 8px; }
.ci .qty button { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border);
  background: var(--surface2); color: var(--text); cursor: pointer; }
.cart-foot { border-top: 1px solid var(--border); padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.shipnote { font-size: .82rem; color: var(--muted); }
.cart-total { display: flex; justify-content: space-between; font-size: 1.1rem; }
.btn-primary { background: var(--accent); border: none; color: #06130c; font-weight: 700;
  padding: 14px; border-radius: 10px; cursor: pointer; font-size: 1rem; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { opacity: .6; cursor: wait; }
.error { color: #ff7b72; font-size: .85rem; }

footer { border-top: 1px solid var(--border); padding: 28px 20px; text-align: center; color: var(--muted); font-size: .85rem; }
footer a { color: var(--muted); }

.success-wrap { max-width: 560px; margin: 10vh auto; text-align: center; padding: 0 20px; }
.success-wrap .big { font-size: 3.5rem; }
.success-wrap h1 { margin: 12px 0; }
.success-wrap p { color: var(--muted); }
.success-wrap .btn-primary { display: inline-block; margin-top: 24px; text-decoration: none; padding: 13px 28px; }

.legal { max-width: 760px; margin: 40px auto 80px; padding: 0 20px; }
.legal h1 { margin-bottom: 8px; }
.legal h2 { margin: 28px 0 8px; font-size: 1.15rem; }
.legal p, .legal li { color: var(--muted); font-size: .95rem; }
.legal .todo { background: var(--surface2); border: 1px dashed var(--border); border-radius: 10px; padding: 12px 16px; color: #e3b341; }

@media (prefers-color-scheme: light) {
  :root { --bg: #f6f8fa; --surface: #ffffff; --surface2: #eef1f5; --border: #d0d7de; --text: #1f2328; --muted: #59636e; }
  .nav { background: rgba(246,248,250,.92); }
}
