/* ==========================================================================
   Genesis Computers — Design System
   Palette: deep navy, white, light grey, electric blue accent (per brief)
   Type: Sora (headings) + Inter (body/UI) — self-hosted-free via Google Fonts CDN
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --navy-900: #0b1626;
  --navy-800: #10203a;
  --navy-700: #16294a;
  --blue-500: #2f6fed;
  --blue-600: #1f57cc;
  --blue-100: #e7f0ff;
  --grey-50: #f5f7f9;
  --grey-100: #eef1f4;
  --grey-200: #dfe4e9;
  --grey-400: #9aa6b2;
  --grey-600: #5b6b7a;
  --ink: #101820;
  --white: #ffffff;
  --amber: #c8790f;
  --amber-bg: #fdf3e3;
  --green: #1f7a4d;
  --green-bg: #e8f6ee;
  --red: #b3261e;
  --red-bg: #fdecea;

  --font-head: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --container: 1200px;
  --shadow-card: 0 1px 2px rgba(16, 24, 32, 0.06);
  --shadow-pop: 0 12px 32px rgba(11, 22, 38, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: env(safe-area-inset-top, 0px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--grey-600); }

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

:focus-visible {
  outline: 3px solid var(--blue-500);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--blue-500); color: var(--white); }
.btn-primary:hover { background: var(--blue-600); }
.btn-dark { background: var(--navy-900); color: var(--white); }
.btn-dark:hover { background: var(--navy-700); }
.btn-outline { background: transparent; color: var(--navy-900); border-color: var(--grey-200); }
.btn-outline:hover { border-color: var(--navy-900); }
.btn-ghost { background: transparent; color: var(--blue-600); padding-left: 4px; padding-right: 4px; }
.btn-ghost:hover { text-decoration: underline; }
.btn-danger { background: var(--red-bg); color: var(--red); }
.btn-danger:hover { background: #f8d9d6; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 6px; color: var(--navy-900); }
.field { margin-bottom: 16px; }
.field-hint { font-size: 0.8rem; color: var(--grey-600); margin-top: 4px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="password"], input[type="date"], input[type="search"], textarea, select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--white);
}
textarea { resize: vertical; min-height: 90px; }
input:focus, textarea:focus, select:focus { border-color: var(--blue-500); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
fieldset { border: 1px solid var(--grey-200); border-radius: var(--radius-md); padding: 18px; margin: 0 0 20px; }
legend { font-weight: 700; font-family: var(--font-head); padding: 0 8px; }
.radio-group { display: flex; flex-direction: column; gap: 10px; }
.radio-option { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--grey-200); border-radius: var(--radius-sm); cursor: pointer; }
.radio-option input { margin-top: 3px; width: auto; }
.radio-option.disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Badges & tags ---------- */
.badge { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.badge-blue { background: var(--blue-100); color: var(--blue-600); }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-grey { background: var(--grey-100); color: var(--grey-600); }

/* ---------- Top utility bar ---------- */
.topbar {
  background: var(--navy-900);
  color: #c9d4e0;
  font-size: 0.82rem;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.topbar a { color: #c9d4e0; }
.topbar a:hover { color: var(--white); }
.topbar-links { display: flex; gap: 18px; }

/* ---------- Header / Nav ---------- */
.site-header { border-bottom: 1px solid var(--grey-200); position: sticky; top: 0; background: var(--white); z-index: 40; }
.header-main { display: flex; align-items: center; gap: 28px; height: 76px; }
.logo { font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; color: var(--navy-900); flex-shrink: 0; }
.logo span { color: var(--blue-500); }

.search-form { flex: 1; display: flex; max-width: 560px; }
.search-form input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); border-right: none; }
.search-form button {
  border: 1px solid var(--navy-900);
  background: var(--navy-900);
  color: var(--white);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0 18px;
  cursor: pointer;
}

.header-actions { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.header-action { display: flex; flex-direction: column; align-items: center; font-size: 0.72rem; font-weight: 600; color: var(--navy-900); position: relative; gap: 2px; }
.header-action svg { width: 22px; height: 22px; }
.cart-count {
  position: absolute; top: -6px; right: -10px;
  background: var(--blue-500); color: white; font-size: 0.65rem; font-weight: 700;
  border-radius: 999px; min-width: 17px; height: 17px; display: flex; align-items: center; justify-content: center; padding: 0 3px;
}

.main-nav { background: var(--navy-900); }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; overflow-x: auto; }
.main-nav a { display: block; padding: 13px 16px; color: #d7deea; font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.main-nav a:hover, .main-nav a.active { color: var(--white); background: var(--navy-700); }

.mobile-nav-toggle { display: none; }

@media (max-width: 900px) {
  .search-form { order: 3; max-width: none; width: 100%; margin-top: 12px; }
  .header-main { flex-wrap: wrap; height: auto; padding: 12px 0; }
  .main-nav ul { justify-content: flex-start; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-700) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}
.hero .container { position: relative; padding: 76px 20px 88px; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero-eyebrow { color: #8fb1f5; font-weight: 600; font-size: 0.95rem; margin-bottom: 14px; }
.hero h1 { max-width: 11ch; }
.hero p.lede { color: #c3ceda; font-size: 1.1rem; max-width: 46ch; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-panel {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-md);
  padding: 26px;
}
.hero-panel-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.12); font-size: 0.92rem; }
.hero-panel-row:last-child { border-bottom: none; }
.hero-panel-row strong { color: var(--white); }
@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; padding: 48px 20px 56px; }
}

/* ---------- Section scaffolding ---------- */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 26px; gap: 16px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-alt { background: var(--grey-50); }

/* ---------- Category tiles ---------- */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.category-tile {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.category-tile:hover { border-color: var(--blue-500); transform: translateY(-2px); }
.category-tile .icon { font-size: 1.7rem; margin-bottom: 8px; }
.category-tile span { font-weight: 600; font-size: 0.88rem; }

/* ---------- Product grid & cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.product-card {
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  background: var(--white);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
  position: relative;
}
.product-card:hover { box-shadow: var(--shadow-pop); border-color: var(--grey-200); }
.product-card .thumb {
  aspect-ratio: 4 / 3;
  background: var(--grey-50);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .thumb .placeholder { color: var(--grey-400); font-size: 0.8rem; text-align: center; padding: 10px; }
.product-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card .brand { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--grey-600); font-weight: 700; }
.product-card h3 { font-size: 0.98rem; margin: 0; font-family: var(--font-body); font-weight: 600; line-height: 1.3; }
.product-card h3 a:hover { color: var(--blue-600); }
.price-row { display: flex; align-items: baseline; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.price-now { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--navy-900); }
.price-mrp { font-size: 0.85rem; color: var(--grey-400); text-decoration: line-through; }
.price-off { font-size: 0.78rem; color: var(--green); font-weight: 700; }
.product-card .stock-note { font-size: 0.78rem; }
.stock-low { color: var(--amber); }
.stock-out { color: var(--red); }
.card-actions { display: flex; gap: 8px; padding: 0 16px 16px; }
.card-actions form { flex: 1; }
.compare-check { position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,0.92); padding: 4px 8px; border-radius: 6px; font-size: 0.72rem; display: flex; align-items: center; gap: 5px; }

/* ---------- Filters sidebar ---------- */
.listing-layout { display: grid; grid-template-columns: 240px 1fr; gap: 30px; align-items: start; }
@media (max-width: 800px) { .listing-layout { grid-template-columns: 1fr; } }
.filters { border: 1px solid var(--grey-200); border-radius: var(--radius-md); padding: 18px; position: sticky; top: 92px; }
.filters h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; margin: 18px 0 10px; color: var(--grey-600); }
.filters h4:first-child { margin-top: 0; }
.filter-option { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 0.9rem; }
.listing-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.result-count { color: var(--grey-600); font-size: 0.9rem; }

/* ---------- Product detail ---------- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 860px) { .product-detail { grid-template-columns: 1fr; } }
.gallery-main { aspect-ratio: 1; background: var(--grey-50); border-radius: var(--radius-md); overflow: hidden; margin-bottom: 12px; display: flex; align-items: center; justify-content: center; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.gallery-thumbs button { width: 64px; height: 64px; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid var(--grey-200); padding: 0; cursor: pointer; background: var(--grey-50); }
.gallery-thumbs button.active { border-color: var(--blue-500); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.pd-brand { color: var(--grey-600); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; }
.pd-title { margin: 4px 0 10px; }
.pd-rating { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 0.9rem; color: var(--grey-600); }
.stars { color: var(--amber); letter-spacing: 1px; }
.pd-price-block { background: var(--grey-50); border-radius: var(--radius-md); padding: 18px; margin: 16px 0; }
.pd-price-block .price-now { font-size: 1.9rem; }
.pd-buy-row { display: flex; gap: 12px; margin: 18px 0; flex-wrap: wrap; }
.pd-buy-row form { flex: 1; min-width: 160px; }
.qty-input { width: 90px; }
.pd-meta-list { list-style: none; margin: 18px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 0.9rem; }
.pd-meta-list li { display: flex; gap: 10px; }
.pd-meta-list .icon { flex-shrink: 0; }

.tabs-nav { display: flex; gap: 4px; border-bottom: 1px solid var(--grey-200); margin: 48px 0 24px; overflow-x: auto; }
.tabs-nav a { padding: 12px 18px; font-weight: 600; font-size: 0.92rem; color: var(--grey-600); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs-nav a:hover { color: var(--navy-900); }
.spec-table { width: 100%; border-collapse: collapse; max-width: 700px; }
.spec-table tr { border-bottom: 1px solid var(--grey-100); }
.spec-table td { padding: 11px 6px; font-size: 0.92rem; }
.spec-table td:first-child { color: var(--grey-600); width: 40%; }
.spec-table td:last-child { font-weight: 600; }

.review { padding: 18px 0; border-bottom: 1px solid var(--grey-100); }
.review-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.review-name { font-weight: 700; }

/* ---------- WhatsApp float ---------- */
.wa-float {
  position: fixed; bottom: 22px; right: 22px; z-index: 50;
  background: #25D366; color: white; width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-pop);
}
.wa-float svg { width: 28px; height: 28px; }
@media (max-width: 640px) { .wa-float { bottom: 78px; } }

/* ---------- Trust / features strip ---------- */
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.trust-item { display: flex; gap: 12px; align-items: flex-start; }
.trust-item .check { color: var(--green); font-weight: 700; flex-shrink: 0; }
.trust-item strong { display: block; font-family: var(--font-head); margin-bottom: 2px; }

/* ---------- Steps ---------- */
.steps { display: flex; gap: 0; counter-reset: step; flex-wrap: wrap; }
.step { flex: 1; min-width: 140px; padding: 0 18px 0 0; position: relative; }
.step-num { font-family: var(--font-head); font-weight: 800; font-size: 1.6rem; color: var(--blue-500); }

/* ---------- Cart page ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
@media (max-width: 860px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-line { display: grid; grid-template-columns: 80px 1fr auto; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--grey-100); align-items: center; }
.cart-line img, .cart-line .placeholder { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius-sm); background: var(--grey-50); }
.cart-line .placeholder { display: flex; align-items: center; justify-content: center; font-size: 0.65rem; color: var(--grey-400); text-align: center; }
.qty-form { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.qty-form input { width: 60px; padding: 6px 8px; }
.summary-box { border: 1px solid var(--grey-200); border-radius: var(--radius-md); padding: 22px; position: sticky; top: 92px; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 0.92rem; }
.summary-row.total { border-top: 1px solid var(--grey-200); margin-top: 8px; padding-top: 14px; font-weight: 700; font-size: 1.05rem; }
.summary-row .discount { color: var(--green); }

/* ---------- Checkout ---------- */
.checkout-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .checkout-layout { grid-template-columns: 1fr; } }
.checkout-line { display: flex; justify-content: space-between; font-size: 0.9rem; padding: 8px 0; border-bottom: 1px solid var(--grey-100); }

/* ---------- Order confirmation / tracking ---------- */
.confirm-hero { text-align: center; padding: 40px 20px; }
.confirm-hero .check-circle {
  width: 68px; height: 68px; border-radius: 50%; background: var(--green-bg); color: var(--green);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; font-size: 2rem;
}
.order-tracker { display: flex; justify-content: space-between; margin: 32px 0; overflow-x: auto; gap: 4px; }
.tracker-step { flex: 1; text-align: center; min-width: 90px; position: relative; }
.tracker-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--grey-200); margin: 0 auto 8px; }
.tracker-step.done .tracker-dot { background: var(--blue-500); }
.tracker-step.done { color: var(--navy-900); font-weight: 600; }
.tracker-line { position: absolute; top: 6px; left: -50%; width: 100%; height: 2px; background: var(--grey-200); z-index: -1; }
.tracker-step.done .tracker-line { background: var(--blue-500); }
.tracker-step:first-child .tracker-line { display: none; }

/* ---------- Tables (generic) ---------- */
table.simple { width: 100%; border-collapse: collapse; }
table.simple th, table.simple td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--grey-100); font-size: 0.9rem; }
table.simple th { color: var(--grey-600); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.02em; }

/* ---------- Compare table ---------- */
.compare-table { width: 100%; border-collapse: collapse; }
.compare-table th, .compare-table td { padding: 12px; border: 1px solid var(--grey-100); vertical-align: top; font-size: 0.88rem; }
.compare-table th { background: var(--grey-50); text-align: left; }
.compare-table .compare-product-head img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 8px; }

/* ---------- Flash messages ---------- */
.flash-stack { position: fixed; top: 16px; right: 16px; z-index: 100; display: flex; flex-direction: column; gap: 10px; max-width: 340px; }
.flash { padding: 13px 16px; border-radius: var(--radius-sm); font-size: 0.88rem; font-weight: 500; box-shadow: var(--shadow-pop); }
.flash-success { background: var(--green-bg); color: var(--green); border: 1px solid #bfe6cf; }
.flash-error { background: var(--red-bg); color: var(--red); border: 1px solid #f3c6c2; }

/* ---------- Empty states ---------- */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .icon { font-size: 2.5rem; margin-bottom: 12px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #aebbca; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 30px; padding: 56px 0 30px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
.footer-grid h4 { color: var(--white); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-grid a { font-size: 0.88rem; }
.footer-grid a:hover { color: var(--white); }
.footer-logo { font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; color: var(--white); margin-bottom: 10px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 18px 0; font-size: 0.82rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ==========================================================================
   Admin portal
   ========================================================================== */
.admin-body { background: var(--grey-50); min-height: 100vh; }
.admin-shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
@media (max-width: 800px) { .admin-shell { grid-template-columns: 1fr; } }
.admin-sidebar { background: var(--navy-900); color: #c9d4e0; padding: 22px 14px; }
.admin-sidebar .logo { color: var(--white); padding: 0 10px 22px; display: block; }
.admin-sidebar .logo span { color: var(--blue-500); }
.admin-nav { display: flex; flex-direction: column; gap: 2px; }
.admin-nav a { padding: 10px 12px; border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 500; display: flex; align-items: center; justify-content: space-between; }
.admin-nav a:hover { background: rgba(255,255,255,0.06); color: var(--white); }
.admin-nav a.active { background: var(--blue-500); color: var(--white); }
.admin-nav .count { background: rgba(255,255,255,0.15); font-size: 0.7rem; padding: 1px 7px; border-radius: 999px; }
.admin-main { padding: 28px 34px 60px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; flex-wrap: wrap; gap: 12px; }
.admin-topbar h1 { margin: 0; font-size: 1.5rem; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 30px; }
.stat-card { background: var(--white); border: 1px solid var(--grey-200); border-radius: var(--radius-md); padding: 18px 20px; }
.stat-card .value { font-family: var(--font-head); font-size: 1.8rem; font-weight: 800; color: var(--navy-900); }
.stat-card .label { font-size: 0.82rem; color: var(--grey-600); margin-top: 2px; }
.stat-card.alert .value { color: var(--amber); }

.admin-card { background: var(--white); border: 1px solid var(--grey-200); border-radius: var(--radius-md); padding: 22px; margin-bottom: 22px; }
.admin-card h2 { font-size: 1.1rem; margin-bottom: 16px; }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.admin-table th, .admin-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--grey-100); font-size: 0.88rem; vertical-align: middle; }
.admin-table th { color: var(--grey-600); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; }
.admin-thumb { width: 42px; height: 42px; border-radius: 6px; object-fit: cover; background: var(--grey-100); }
.row-actions { display: flex; gap: 10px; }
.row-actions form { display: inline; }
.row-actions button, .row-actions a { font-size: 0.82rem; }

.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--navy-900); padding: 20px; }
.login-card { background: var(--white); border-radius: var(--radius-md); padding: 40px; width: 100%; max-width: 380px; }
.login-card .logo { display: block; text-align: center; margin-bottom: 26px; font-size: 1.4rem; }

/* ---------- Photo manager (admin product form) ---------- */
.photo-uploader {
  border: 2px dashed var(--grey-200);
  border-radius: var(--radius-md);
  padding: 26px;
  text-align: center;
  background: var(--grey-50);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.photo-uploader.dragover { border-color: var(--blue-500); background: var(--blue-100); }
.photo-uploader input[type="file"] { display: none; }
.photo-uploader .hint { font-size: 0.82rem; color: var(--grey-600); margin-top: 6px; }
.photo-preview-list { display: flex; margin-top: 10px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; margin-top: 18px; }
.photo-tile { position: relative; border: 1px solid var(--grey-200); border-radius: var(--radius-sm); overflow: hidden; background: var(--white); }
.photo-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.photo-tile .photo-tools { display: flex; justify-content: space-between; padding: 6px; background: var(--white); }
.photo-tile .photo-tools button { border: none; background: none; cursor: pointer; font-size: 0.72rem; font-weight: 600; padding: 3px 6px; border-radius: 4px; }
.photo-tile .photo-tools button:hover { background: var(--grey-100); }
.photo-tile.is-cover { border-color: var(--blue-500); }
.photo-tile .cover-flag { position: absolute; top: 6px; left: 6px; background: var(--blue-500); color: white; font-size: 0.65rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; }

.spec-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; margin-bottom: 10px; align-items: center; }
@media (max-width: 640px) { .spec-row { grid-template-columns: 1fr; } }

/* ---------- Small helpers ---------- */
.text-muted { color: var(--grey-600); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.hr { border: none; border-top: 1px solid var(--grey-200); margin: 24px 0; }
