/* ---------- Design tokens ---------- */
:root {
  color-scheme: dark;
  --bg: #0a0d14;
  --bg-soft: #0d111a;
  --bg-elevated: #12161f;
  --bg-card: #141926;
  --bg-card-hover: #171d2c;
  --border: #232a3d;
  --border-strong: #303952;
  --text: #eef1fa;
  --text-muted: #99a2c2;
  --text-dim: #6b7390;
  --accent: #5b8def;
  --accent-strong: #4472e0;
  --accent-soft: rgba(91, 141, 239, 0.12);
  --accent-text: #0a0d14;
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.12);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.12);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.12);
  --info: #38bdf8;
  --info-soft: rgba(56, 189, 248, 0.12);
  --radius-lg: 18px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -12px rgba(0, 0, 0, 0.55);
  --shadow-pop: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(91, 141, 239, 0.10), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(52, 211, 153, 0.06), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
.container { max-width: 1080px; margin: 0 auto; padding: 40px 20px 80px; }
.container.narrow { max-width: 760px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px; gap: 16px; flex-wrap: wrap;
  background: rgba(10, 13, 20, 0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.08rem; letter-spacing: -0.01em;
  text-decoration: none; color: var(--text);
}
.brand .mark {
  width: 32px; height: 32px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--success));
  color: #071019; font-weight: 900; font-size: 1rem;
  box-shadow: 0 4px 16px -4px rgba(91, 141, 239, 0.6);
}
.site-header nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-header nav a {
  color: var(--text-muted); text-decoration: none; font-size: 0.92rem; font-weight: 500;
  padding: 8px 12px; border-radius: var(--radius-sm); transition: color .15s, background .15s;
}
.site-header nav a:hover { color: var(--text); background: var(--bg-elevated); }
.site-header nav a.cta {
  background: var(--accent); color: var(--accent-text); font-weight: 700;
}
.site-header nav a.cta:hover { background: var(--accent-strong); color: #fff; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 60px; }
.footer-inner {
  max-width: 1080px; margin: 0 auto; padding: 36px 20px 28px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px;
}
.footer-inner h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); margin: 0 0 12px; }
.footer-inner p, .footer-inner a { color: var(--text-muted); font-size: 0.88rem; text-decoration: none; }
.footer-inner a:hover { color: var(--text); }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-legal {
  max-width: 1080px; margin: 0 auto; padding: 18px 20px 32px;
  color: var(--text-dim); font-size: 0.78rem; border-top: 1px solid var(--border);
}
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr; } }

/* ---------- Typography ---------- */
h1 { font-size: 2rem; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 8px; }
h2 { font-size: 1.25rem; letter-spacing: -0.01em; margin: 0 0 4px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent); background: var(--accent-soft); padding: 5px 10px; border-radius: 999px;
  margin-bottom: 14px;
}
.subtitle { color: var(--text-muted); margin: 0 0 8px; font-size: 1.02rem; }
.back-link { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 6px; }
.back-link:hover { color: var(--text); }
.back-link .icon { width: 15px; height: 15px; transform: rotate(180deg); }

/* ---------- Hero ---------- */
.hero { padding: 20px 0 8px; text-align: center; }
.hero h1 { font-size: 2.5rem; max-width: 720px; margin: 0 auto 14px; }
.hero .subtitle { max-width: 560px; margin: 0 auto 26px; }
.trust-row {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 28px;
}
.trust-badge {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 999px;
  padding: 9px 16px; font-size: 0.85rem; color: var(--text-muted);
}
.trust-badge .icon { width: 16px; height: 16px; color: var(--success); flex-shrink: 0; }

/* ---------- Icons ---------- */
.icon { width: 20px; height: 20px; display: inline-block; vertical-align: -4px; }

/* ---------- Cards / grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 300px));
  gap: 18px; margin-top: 24px;
  justify-content: center;
}

.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; text-decoration: none; color: var(--text); display: block;
  transition: border-color .15s, transform .15s, background .15s; box-shadow: var(--shadow-card);
}
.card:hover { border-color: var(--border-strong); background: var(--bg-card-hover); transform: translateY(-2px); }

.category-card .icon-wrap {
  width: 46px; height: 46px; border-radius: var(--radius); margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
}
.category-card h2 { margin-bottom: 6px; }
.category-card .tagline { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 14px; }
.category-card .count-row { display: flex; align-items: center; justify-content: space-between; }
.category-card .count { color: var(--text-dim); font-size: 0.82rem; }
.category-card .go { color: var(--accent); font-weight: 600; font-size: 0.85rem; display: flex; align-items: center; gap: 4px; }
.category-card .go .icon { width: 15px; height: 15px; }

.product-card { display: flex; flex-direction: column; height: 100%; }
.product-card .icon-wrap {
  width: 38px; height: 38px; border-radius: var(--radius-sm); margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
}
.product-card .icon-wrap .icon { width: 18px; height: 18px; }
.product-card h2 { font-size: 1.05rem; }
.product-card .desc { color: var(--text-muted); font-size: 0.87rem; flex-grow: 1; margin: 4px 0 16px; }
.product-card .price-row { display: flex; align-items: center; justify-content: space-between; }
.price { color: var(--success); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; }
.price.lg { font-size: 1.8rem; }
.product-card .buy { color: var(--accent); font-weight: 700; font-size: 0.85rem; }

/* ---------- Layout: product / checkout ---------- */
.product-layout { display: grid; grid-template-columns: 1.3fr 0.9fr; gap: 32px; margin-top: 24px; align-items: start; }
@media (max-width: 820px) { .product-layout { grid-template-columns: 1fr; } }

.panel {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px; box-shadow: var(--shadow-card);
}
.panel + .panel { margin-top: 16px; }
.panel.sticky { position: sticky; top: 96px; }

.feature-list { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.feature-list li { display: flex; align-items: flex-start; gap: 10px; color: var(--text-muted); font-size: 0.92rem; }
.feature-list .icon { color: var(--success); flex-shrink: 0; margin-top: 1px; }

/* ---------- Forms ---------- */
form.checkout, form.admin-form { display: flex; flex-direction: column; gap: 14px; }
label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; display: block; margin-bottom: 6px; }
input[type=text], input[type=number], input[type=password], textarea, select {
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text);
  padding: 11px 13px; border-radius: var(--radius-sm); font-size: 0.96rem; width: 100%;
  font-family: inherit; transition: border-color .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; }

button, .btn {
  background: var(--accent); color: var(--accent-text); border: none; padding: 13px 20px;
  border-radius: var(--radius-sm); font-weight: 700; cursor: pointer; font-size: 0.96rem;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .15s, transform .1s;
}
button:hover, .btn:hover { background: var(--accent-strong); }
button:active, .btn:active { transform: scale(0.98); }
button.secondary, .btn.secondary { background: var(--bg-elevated); color: var(--text); border: 1px solid var(--border); }
button.secondary:hover, .btn.secondary:hover { background: var(--bg-card-hover); border-color: var(--border-strong); }
button.danger, .btn.danger { background: var(--danger-soft); color: var(--danger); }
button.danger:hover { background: rgba(248, 113, 113, 0.22); }
button.block, .btn.block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Status pills / stepper ---------- */
.status-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  font-size: 0.8rem; font-weight: 700;
}
.status-pending_payment { background: var(--warning-soft); color: var(--warning); }
.status-paid { background: var(--info-soft); color: var(--info); }
.status-fulfilled { background: var(--success-soft); color: var(--success); }
.status-cancelled { background: var(--danger-soft); color: var(--danger); }

.stepper { display: flex; align-items: center; gap: 8px; margin: 20px 0 28px; }
.step { display: flex; align-items: center; gap: 10px; color: var(--text-dim); font-size: 0.85rem; font-weight: 600; }
.step .dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border-strong); display: flex; align-items: center; justify-content: center; font-size: 0.78rem; flex-shrink: 0; }
.step.done .dot { background: var(--success); border-color: var(--success); color: #06210f; }
.step.active .dot { border-color: var(--accent); color: var(--accent); }
.step.active { color: var(--text); }
.step.done { color: var(--text-muted); }
.step-line { flex: 1; height: 2px; background: var(--border); min-width: 20px; }
.step-line.done { background: var(--success); }
@media (max-width: 560px) { .stepper .step span.label { display: none; } }

/* ---------- Key/value + code display ---------- */
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 10px 14px; margin: 4px 0; font-size: 0.92rem; }
.kv div:nth-child(odd) { color: var(--text-muted); }

.copy-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; margin: 6px 0;
}
.copy-row code { font-size: 0.95rem; }
.copy-btn {
  background: transparent; border: none; color: var(--text-dim); cursor: pointer; padding: 4px 6px;
  display: flex; align-items: center; gap: 4px; font-size: 0.78rem; font-weight: 600; border-radius: 6px;
}
.copy-btn:hover { color: var(--accent); background: var(--accent-soft); }
.copy-btn.copied { color: var(--success); }

code {
  background: var(--bg-soft); border: 1px solid var(--border); padding: 3px 8px; border-radius: 6px;
  font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 0.9em;
}

/* ---------- Misc ---------- */
.error { color: var(--danger); font-size: 0.88rem; background: var(--danger-soft); padding: 10px 14px; border-radius: var(--radius-sm); }
.empty-state { color: var(--text-muted); padding: 40px 0; text-align: center; }

table { width: 100%; border-collapse: collapse; margin-top: 16px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
th { color: var(--text-dim); font-weight: 600; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.05em; }
tr:hover td { background: rgba(91, 139, 239, 0.05); }

.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.filter-row a { text-decoration: none; }
