:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e6e8ef;
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --accent: #10b981;
  --danger: #ef4444;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1120px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #a855f7);
  display: grid; place-items: center; color: #fff; font-size: 1.1rem;
}
.brand small { color: var(--muted); font-weight: 500; font-size: .72rem; display: block; margin-top: -3px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.link-muted { color: var(--muted); font-weight: 600; font-size: .9rem; padding: 8px 12px; border-radius: 10px; }
.link-muted:hover { background: #eef0f6; color: var(--ink); }

.cart-btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: #fff; border: none; cursor: pointer;
  padding: 10px 16px; border-radius: 12px; font-weight: 700; font-size: .9rem;
}
.cart-btn:hover { background: #1e293b; }
.cart-count {
  position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--accent); color: #fff; border-radius: 999px;
  font-size: .72rem; font-weight: 800; display: grid; place-items: center;
}

/* ---------- Hero ---------- */
.hero {
  max-width: 1120px; margin: 28px auto 8px; padding: 0 20px;
}
.hero-inner {
  background: linear-gradient(120deg, #4f46e5, #7c3aed 55%, #a855f7);
  color: #fff; border-radius: 22px; padding: 40px 36px;
  display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow);
}
.hero h1 { margin: 0; font-size: 2rem; letter-spacing: -0.03em; }
.hero p { margin: 0; opacity: .92; max-width: 560px; }
.hero .pill {
  align-self: flex-start; margin-bottom: 6px;
  background: rgba(255,255,255,.18); padding: 6px 12px; border-radius: 999px;
  font-size: .78rem; font-weight: 700; letter-spacing: .02em;
}

/* ---------- Catalog ---------- */
.container { max-width: 1120px; margin: 0 auto; padding: 20px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 18px 4px 14px; }
.section-head h2 { margin: 0; font-size: 1.2rem; letter-spacing: -0.02em; }
.filters { display: flex; gap: 8px; }
.filters button {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: .85rem; cursor: pointer;
}
.filters button.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(15,23,42,.12); }
.card .thumb { aspect-ratio: 4 / 3; background: #eef0f6; }
.card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .tag { font-size: .7rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .05em; }
.card h3 { margin: 0; font-size: 1.02rem; letter-spacing: -0.01em; }
.card .blurb { color: var(--muted); font-size: .85rem; flex: 1; }
.card .row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.price { font-weight: 800; font-size: 1.05rem; }
.price small { color: var(--muted); font-weight: 600; font-size: .72rem; }
.btn {
  border: none; cursor: pointer; font-weight: 700; font-size: .85rem;
  padding: 9px 14px; border-radius: 10px; background: var(--brand); color: #fff;
}
.btn:hover { background: var(--brand-dark); }
.btn.ghost { background: #eef0f6; color: var(--ink); }
.btn.ghost:hover { background: #e2e6f0; }
.btn.block { width: 100%; padding: 13px; font-size: .95rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Cart drawer ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.45); opacity: 0; pointer-events: none;
  transition: opacity .2s ease; z-index: 50;
}
.overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 100%);
  background: #fff; z-index: 60; transform: translateX(100%); transition: transform .25s ease;
  display: flex; flex-direction: column; box-shadow: -8px 0 40px rgba(15,23,42,.18);
}
.drawer.open { transform: translateX(0); }
.drawer-head { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.drawer-head h3 { margin: 0; font-size: 1.1rem; }
.icon-btn { background: #eef0f6; border: none; width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 1rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px 20px; }
.cart-line { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line .thumb { width: 64px; height: 52px; border-radius: 10px; background: #eef0f6; flex: none; overflow: hidden; }
.cart-line .info { flex: 1; min-width: 0; }
.cart-line .info h4 { margin: 0 0 2px; font-size: .92rem; }
.cart-line .info .sub { color: var(--muted); font-size: .8rem; }
.qty { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty button { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 700; }
.qty span { min-width: 18px; text-align: center; font-weight: 700; font-size: .9rem; }
.line-price { font-weight: 700; white-space: nowrap; }
.remove { background: none; border: none; color: var(--danger); font-size: .78rem; cursor: pointer; padding: 4px 0 0; }
.empty { text-align: center; color: var(--muted); padding: 48px 20px; }

.drawer-foot { padding: 16px 20px 20px; border-top: 1px solid var(--line); }
.totals { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.totals .big { font-size: 1.4rem; font-weight: 800; }
.field { margin-bottom: 10px; }
.field label { display: block; font-size: .78rem; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.field input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: .92rem;
  font-family: inherit; background: #fbfcfe;
}
.field input:focus { outline: 2px solid #c7d2fe; border-color: var(--brand); }
.pay-note { font-size: .76rem; color: var(--muted); text-align: center; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 6px; }

/* ---------- Status / info pages ---------- */
.center-wrap { max-width: 640px; margin: 48px auto; padding: 0 20px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; }
.status-icon { width: 68px; height: 68px; border-radius: 999px; display: grid; place-items: center; font-size: 2rem; margin-bottom: 16px; }
.status-icon.ok { background: #dcfce7; color: #16a34a; }
.status-icon.wait { background: #fef9c3; color: #ca8a04; }
.status-icon.bad { background: #fee2e2; color: #dc2626; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .8rem; font-weight: 800; text-transform: capitalize; }
.badge.paid { background: #dcfce7; color: #15803d; }
.badge.pending { background: #fef9c3; color: #a16207; }
.badge.refunded { background: #e0e7ff; color: #4338ca; }
.badge.failed, .badge.cancelled, .badge.expired { background: #fee2e2; color: #b91c1c; }
.order-items { margin-top: 20px; border-top: 1px solid var(--line); }
.order-items .line { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.order-items .line .name { font-weight: 600; }
.order-items .line .name small { color: var(--muted); font-weight: 500; }
.order-total { display: flex; justify-content: space-between; padding-top: 14px; font-weight: 800; font-size: 1.15rem; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }

.dash-order { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 14px; }
.dash-order .top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.dash-order .items-mini { color: var(--muted); font-size: .88rem; margin-top: 6px; }

footer.site-footer { text-align: center; color: var(--muted); font-size: .82rem; padding: 40px 20px 60px; }

@media (max-width: 560px) {
  .hero h1 { font-size: 1.55rem; }
  .header-inner { padding: 12px 16px; }
}
