/* ==========================================================================
   NOVA — Storefront & Admin Stylesheet
   Design tokens: Deep Navy / Electric Blue / Accent Violet + aurora accents
   ========================================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, ul, ol, li, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }

/* ---------- Design tokens ---------- */
:root {
  --navy-950: #0F172A;
  --navy-900: #131C2E;
  --navy-800: #1E293B;
  --navy-700: #2A3B54;
  --blue-500: #3B82F6;
  --blue-600: #2563EB;
  --blue-400: #60A5FA;
  --violet-500: #8B5CF6;
  --violet-400: #A78BFA;
  --cyan-400: #22D3EE;
  --amber-400: #F59E0B;
  --emerald-400: #10B981;
  --rose-400: #F472B6;
  --white: #FFFFFF;
  --slate-50: #F8FAFC;
  --slate-100: #EEF2F9;
  --slate-200: #E2E8F0;
  --slate-400: #94A3B8;
  --slate-500: #64748B;
  --slate-600: #475569;
  --danger: #EF4444;
  --danger-bg: rgba(239, 68, 68, .12);
  --success: #10B981;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(2, 6, 23, .35);
  --shadow-md: 0 10px 30px rgba(2, 6, 23, .35);
  --shadow-lg: 0 24px 70px rgba(2, 6, 23, .5);

  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --ease: 220ms cubic-bezier(.4, 0, .2, 1);
  --container: 1320px;
}

/* Dark theme (default) */
[data-theme="dark"] {
  --bg: var(--navy-950);
  --bg-soft: var(--navy-900);
  --bg-elevated: var(--navy-800);
  --bg-header: rgba(15, 23, 42, .72);
  --text: #F1F5F9;
  --text-muted: #97A3B8;
  --border: rgba(148, 163, 184, .14);
  --border-strong: rgba(148, 163, 184, .28);
  --primary: var(--blue-500);
  --primary-hover: var(--blue-400);
  --secondary: var(--violet-500);
  --input-bg: rgba(255, 255, 255, .04);
  --scrim: rgba(6, 10, 20, .72);
  --card-shadow: var(--shadow-md);
}

/* Light theme */
[data-theme="light"] {
  --bg: var(--slate-50);
  --bg-soft: var(--white);
  --bg-elevated: var(--white);
  --bg-header: rgba(248, 250, 252, .82);
  --text: var(--navy-950);
  --text-muted: var(--slate-600);
  --border: var(--slate-200);
  --border-strong: #CBD5E1;
  --primary: var(--blue-600);
  --primary-hover: var(--blue-500);
  --secondary: var(--violet-500);
  --input-bg: var(--white);
  --scrim: rgba(15, 23, 42, .5);
  --card-shadow: 0 10px 30px rgba(15, 23, 42, .08);
}

/* Category accent map (used via data-cat attribute) */
[data-cat="Electronics"]     { --cat: var(--blue-500); }
[data-cat="Fashion"]         { --cat: var(--violet-500); }
[data-cat="Home & Kitchen"]  { --cat: var(--amber-400); }
[data-cat="Fitness"]         { --cat: var(--emerald-400); }
[data-cat="Beauty"]          { --cat: var(--rose-400); }
[data-cat="Accessories"]     { --cat: var(--cyan-400); }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
  transition: background var(--ease), color var(--ease);
  -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.02em; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.icon { width: 18px; height: 18px; flex-shrink: 0; }
.icon-sm { width: 14px; height: 14px; }
.icon-lg { width: 22px; height: 22px; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg-header);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; gap: 20px;
  padding: 14px 20px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-mark {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--blue-500), var(--violet-500));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(139, 92, 246, .35);
  color: white; font-family: var(--font-display); font-weight: 700; font-size: 18px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-display); font-size: 20px; letter-spacing: -0.01em; }
.brand-text span { font-size: 11px; color: var(--text-muted); letter-spacing: .06em; text-transform: uppercase; }

.header-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  width: 42px; height: 42px; border-radius: var(--radius-pill);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-elevated); border: 1px solid var(--border);
  transition: transform var(--ease), border-color var(--ease);
}
.theme-toggle:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.theme-toggle .icon { color: var(--secondary); }

.cart-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius-pill);
  background: var(--bg-elevated); border: 1px solid var(--border);
  font-size: 13px; color: var(--text-muted);
}
.cart-pill strong { color: var(--text); font-family: var(--font-mono); }

/* Search / filter bar */
.toolbar {
  border-top: 1px solid var(--border);
  padding: 12px 20px;
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
}
.search-box {
  flex: 1 1 260px; min-width: 200px;
  display: flex; align-items: center; gap: 10px;
  background: var(--input-bg); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: 10px 16px;
  transition: border-color var(--ease);
}
.search-box:focus-within { border-color: var(--primary); }
.search-box .icon { color: var(--text-muted); }
.search-box input {
  background: transparent; border: none; outline: none; width: 100%;
  color: var(--text); font-size: 14px;
}
.search-box input::placeholder { color: var(--text-muted); }

.category-scroller {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px;
  scrollbar-width: none;
}
.category-scroller::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: 9px 16px; border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 13px; font-weight: 500; color: var(--text-muted);
  white-space: nowrap;
  transition: all var(--ease);
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.active {
  background: linear-gradient(135deg, var(--blue-500), var(--violet-500));
  color: white; border-color: transparent;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative; overflow: hidden;
  padding: 64px 20px 48px;
  text-align: center;
}
.aurora-blob {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: .55; z-index: 0;
  pointer-events: none;
}
.aurora-blob.one {
  width: 420px; height: 420px; top: -180px; left: -120px;
  background: radial-gradient(circle, var(--blue-500), transparent 70%);
}
.aurora-blob.two {
  width: 380px; height: 380px; top: -140px; right: -140px;
  background: radial-gradient(circle, var(--violet-500), transparent 70%);
}
.aurora-blob.three {
  width: 300px; height: 300px; bottom: -180px; left: 40%;
  background: radial-gradient(circle, var(--cyan-400), transparent 70%);
  opacity: .3;
}
[data-theme="light"] .aurora-blob { opacity: .28; }

.hero-content { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--secondary); font-weight: 600; margin-bottom: 18px;
}
.eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--secondary); box-shadow: 0 0 0 4px rgba(139,92,246,.18);
}
.hero h1 {
  font-size: clamp(32px, 5.5vw, 56px);
  line-height: 1.05;
  margin-bottom: 16px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--blue-400), var(--violet-400) 60%, var(--cyan-400));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--text-muted); font-size: 16px; max-width: 520px; margin: 0 auto 28px; }

.hero-stats {
  display: flex; justify-content: center; gap: 32px; flex-wrap: wrap;
  margin-top: 8px;
}
.hero-stat strong {
  display: block; font-family: var(--font-mono); font-size: 22px;
  background: linear-gradient(120deg, var(--blue-400), var(--violet-400));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-stat span { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }

/* ==========================================================================
   Product Grid
   ========================================================================== */
.catalog { padding: 8px 20px 80px; }
.catalog-head {
  display: flex; align-items: baseline; justify-content: space-between;
  max-width: var(--container); margin: 0 auto 22px; flex-wrap: wrap; gap: 8px;
}
.catalog-head h2 { font-size: 22px; }
.result-count { font-size: 13px; color: var(--text-muted); }

.product-grid {
  max-width: var(--container); margin: 0 auto;
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.product-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
  position: relative;
}
.product-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--cat) 55%, var(--border));
  box-shadow: 0 20px 45px -18px color-mix(in srgb, var(--cat) 55%, transparent), var(--card-shadow);
}
.product-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--navy-800); }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.product-card:hover .product-media img { transform: scale(1.06); }
.product-badge {
  position: absolute; top: 10px; left: 10px;
  font-size: 11px; font-weight: 600; padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--cat) 88%, black 0%);
  color: white; letter-spacing: .02em;
}
.product-stock {
  position: absolute; top: 10px; right: 10px;
  font-size: 10px; font-weight: 600; padding: 4px 9px;
  border-radius: var(--radius-pill); backdrop-filter: blur(6px);
  background: rgba(15,23,42,.55); color: #E2E8F0;
}
.product-stock.low { color: var(--amber-400); }

.product-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-title { font-size: 15px; font-weight: 600; line-height: 1.3; }
.product-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; flex: 1; }
.product-rating { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-muted); }
.product-rating .icon { width: 13px; height: 13px; color: var(--amber-400); }

.product-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; gap: 10px; }
.product-price { font-family: var(--font-mono); font-size: 18px; font-weight: 700; color: var(--cat); }
.product-price sup { font-size: 11px; opacity: .7; }

.btn-buy {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--blue-500), var(--violet-500));
  color: white; font-size: 13px; font-weight: 600;
  transition: transform var(--ease), box-shadow var(--ease);
  box-shadow: 0 8px 20px -8px rgba(59, 130, 246, .6);
}
.btn-buy:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -8px rgba(139, 92, 246, .55); }
.btn-buy .icon { width: 14px; height: 14px; }

.empty-state {
  max-width: var(--container); margin: 40px auto; text-align: center;
  padding: 60px 20px; color: var(--text-muted);
}
.empty-state .icon { width: 40px; height: 40px; margin: 0 auto 14px; opacity: .5; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 30px 20px; text-align: center;
  color: var(--text-muted); font-size: 13px;
}
.site-footer strong { color: var(--text); }

/* ==========================================================================
   Modal
   ========================================================================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: var(--scrim); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity var(--ease), visibility var(--ease);
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(.98);
  transition: transform var(--ease);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }

.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 20px 22px 0;
}
.modal-product-summary { display: flex; gap: 12px; align-items: center; }
.modal-product-summary img { width: 52px; height: 52px; border-radius: var(--radius-sm); object-fit: cover; }
.modal-product-summary h3 { font-size: 15px; }
.modal-product-summary .product-price { font-size: 14px; }
.modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--input-bg); color: var(--text-muted);
  flex-shrink: 0;
}
.modal-close:hover { color: var(--text); }

.modal-form { padding: 18px 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.field input, .field textarea, .field select {
  background: var(--input-bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 11px 13px;
  color: var(--text); font-size: 14px; outline: none;
  transition: border-color var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); }
.field textarea { resize: vertical; min-height: 64px; }
.field-error { font-size: 11.5px; color: var(--danger); min-height: 14px; }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }

.qty-row { display: flex; align-items: center; gap: 12px; }
.qty-stepper { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-pill); }
.qty-stepper button { width: 34px; height: 34px; font-size: 16px; color: var(--text); }
.qty-stepper span { min-width: 28px; text-align: center; font-family: var(--font-mono); }
.order-total { margin-left: auto; font-size: 13px; color: var(--text-muted); }
.order-total strong { color: var(--text); font-family: var(--font-mono); font-size: 15px; }

.btn-primary {
  width: 100%; padding: 13px; border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--blue-500), var(--violet-500));
  color: white; font-weight: 600; font-size: 14.5px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform var(--ease), box-shadow var(--ease);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -8px rgba(139, 92, 246, .6); }

/* ==========================================================================
   Toast
   ========================================================================== */
.toast-stack {
  position: fixed; bottom: 20px; right: 20px; z-index: 200;
  display: flex; flex-direction: column; gap: 10px;
  max-width: calc(100vw - 40px);
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-left: 3px solid var(--success);
  padding: 14px 16px; border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: 13.5px;
  animation: toast-in 260ms var(--ease);
  min-width: 260px;
}
.toast.error { border-left-color: var(--danger); }
.toast .icon { color: var(--success); flex-shrink: 0; }
.toast.error .icon { color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.toast.leaving { animation: toast-out 200ms var(--ease) forwards; }
@keyframes toast-out { to { opacity: 0; transform: translateX(20px); } }

/* ==========================================================================
   ADMIN — Login
   ========================================================================== */
.admin-login {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px; position: relative; overflow: hidden;
}
.login-card {
  position: relative; z-index: 1;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px 32px;
  width: 100%; max-width: 380px;
  box-shadow: var(--shadow-lg);
}
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 26px; }
.login-brand .brand-mark { width: 48px; height: 48px; font-size: 20px; }
.login-brand h1 { font-size: 18px; }
.login-brand span { font-size: 12px; color: var(--text-muted); }
.login-error {
  display: none; align-items: center; gap: 8px;
  background: var(--danger-bg); color: var(--danger);
  font-size: 12.5px; padding: 10px 12px; border-radius: var(--radius-sm);
  margin-bottom: 14px;
}
.login-error.show { display: flex; }
.login-hint {
  margin-top: 18px; font-size: 11.5px; color: var(--text-muted);
  text-align: center; line-height: 1.5;
  border-top: 1px dashed var(--border); padding-top: 14px;
}

/* ==========================================================================
   ADMIN — Dashboard shell
   ========================================================================== */
.admin-shell { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--navy-950); color: #E2E8F0;
  border-right: 1px solid rgba(148,163,184,.12);
  display: flex; flex-direction: column;
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 60;
  transform: translateX(0);
  transition: transform var(--ease);
}
[data-theme="light"] .admin-sidebar { background: var(--navy-950); }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 20px; }
.sidebar-brand span { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: white; }
.sidebar-nav { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: var(--radius-sm);
  color: #94A3B8; font-size: 14px; font-weight: 500;
  transition: background var(--ease), color var(--ease);
}
.sidebar-link .icon { color: #64748B; transition: color var(--ease); }
.sidebar-link:hover { background: rgba(255,255,255,.05); color: #E2E8F0; }
.sidebar-link.active {
  background: linear-gradient(135deg, rgba(59,130,246,.18), rgba(139,92,246,.18));
  color: white;
}
.sidebar-link.active .icon { color: var(--blue-400); }
.sidebar-footer { padding: 14px 12px; border-top: 1px solid rgba(148,163,184,.12); }
.sidebar-logout {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 14px; border-radius: var(--radius-sm);
  color: #F87171; font-size: 14px; font-weight: 500;
}
.sidebar-logout:hover { background: rgba(239,68,68,.1); }

.admin-main { flex: 1; margin-left: 240px; display: flex; flex-direction: column; min-width: 0; }
.admin-topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 26px; background: var(--bg-header);
  backdrop-filter: blur(14px); border-bottom: 1px solid var(--border);
}
.hamburger {
  display: none; width: 38px; height: 38px; border-radius: var(--radius-sm);
  align-items: center; justify-content: center;
  background: var(--bg-elevated); border: 1px solid var(--border);
}
.admin-topbar h1 { font-size: 18px; }
.admin-topbar .theme-toggle { margin-left: auto; }

.admin-content { padding: 26px; flex: 1; }
.admin-section { display: none; }
.admin-section.active { display: block; animation: fade-in 260ms var(--ease); }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* Stat cards */
.stat-grid {
  display: grid; gap: 18px; margin-bottom: 28px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.stat-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
  position: relative; overflow: hidden;
}
.stat-card .stat-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--stat-color) 16%, transparent);
  color: var(--stat-color);
}
.stat-card[data-color="blue"] { --stat-color: var(--blue-500); }
.stat-card[data-color="violet"] { --stat-color: var(--violet-500); }
.stat-card[data-color="emerald"] { --stat-color: var(--emerald-400); }
.stat-value { font-family: var(--font-mono); font-size: 28px; font-weight: 700; }
.stat-label { font-size: 12.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }

/* Panels / tables */
.panel {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 24px;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.panel-head h2 { font-size: 16px; }
.panel-head p { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
thead th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-muted); padding: 12px 20px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td { padding: 14px 20px; font-size: 13.5px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--input-bg); }
td.mono, .mono-cell { font-family: var(--font-mono); }
.cell-muted { color: var(--text-muted); font-size: 12px; }

.icon-btn {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); color: var(--text-muted);
  transition: all var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn.danger:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-bg); }

.btn-sm {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600;
  background: var(--bg-soft); border: 1px solid var(--border);
}
.btn-sm:hover { border-color: var(--border-strong); }
.btn-sm.primary {
  background: linear-gradient(135deg, var(--blue-500), var(--violet-500));
  color: white; border-color: transparent;
}

.badge { display: inline-flex; padding: 4px 10px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 600; }
.badge.blue { background: rgba(59,130,246,.15); color: var(--blue-400); }
.badge.low { background: rgba(245,158,11,.15); color: var(--amber-400); }

.table-empty { padding: 50px 20px; text-align: center; color: var(--text-muted); }
.table-empty .icon { width: 34px; height: 34px; margin: 0 auto 10px; opacity: .5; }

/* Product admin grid */
.padmin-grid {
  display: grid; gap: 16px; padding: 20px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.padmin-card {
  border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden;
  display: flex; flex-direction: column;
}
.padmin-card img { aspect-ratio: 4/3; object-fit: cover; }
.padmin-body { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.padmin-title { font-size: 13px; font-weight: 600; }
.padmin-meta { display: flex; justify-content: space-between; align-items: center; }
.padmin-actions { display: flex; gap: 6px; }

/* Product form modal (admin) */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .field.full { grid-column: 1 / -1; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .admin-sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .hamburger { display: flex; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .header-inner { padding: 12px 16px; }
  .brand-text span { display: none; }
  .hero { padding: 44px 16px 36px; }
  .hero-stats { gap: 20px; }
  .catalog { padding: 4px 16px 60px; }
  .modal { max-width: 100%; }
  .cart-pill span:not(.icon) { display: none; }
}

@media (min-width: 1600px) {
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}

/* Scrollbar (webkit) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; }
