/* ── Variables (matches Commerce OS admin) ──────────────────────────────────── */
:root {
  --bg:          #0a0b0d;
  --bg2:         #0f1114;
  --bg3:         #161920;
  --border:      #1e2229;
  --border2:     #252b35;
  --text:        #e8eaf0;
  --text2:       #8b92a5;
  --text3:       #4a5166;
  --accent:      #00e5a0;
  --accent2:     #00b87e;
  --accent-d:    rgba(0,229,160,0.08);
  --red:         #ff4757;
  --red-d:       rgba(255,71,87,0.1);
  --yellow:      #ffd32a;
  --yellow-d:    rgba(255,211,42,0.1);
  --blue:        #3d8bff;
  --blue-d:      rgba(61,139,255,0.1);
  --radius:      6px;
  --radius2:     10px;
  --font-head:   'Syne', sans-serif;
  --font-mono:   'DM Mono', monospace;
  --font-body:   'DM Sans', sans-serif;
  --shadow:      0 2px 12px rgba(0,0,0,0.4);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.6);
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

/* ── Header ────────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15,17,20,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 2rem;
  height: 58px; display: flex; align-items: center; gap: 2rem;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-left: auto;
  flex-shrink: 0;
}
.logo {
  font-family: var(--font-head); font-size: 1.2rem; font-weight: 800;
  letter-spacing: .05em; color: var(--text); flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
}
.logo::before { content: '◆'; color: var(--accent); font-size: .75rem; }
.main-nav { display: flex; gap: 1.5rem; margin-left: auto; }
.main-nav a {
  font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text2); transition: color .2s; padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
}
.main-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.nav-menu {
  position: relative;
  display: flex;
  align-items: center;
  padding-bottom: 10px;
  margin-bottom: -10px;
}
.nav-menu::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 12px;
}
.nav-menu__trigger {
  background: none;
  border: none;
  padding: 0 0 2px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text2);
  cursor: pointer;
  border-bottom: 1.5px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav-menu:hover .nav-menu__trigger,
.nav-menu:focus-within .nav-menu__trigger {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.nav-menu__dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .55rem;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius2);
  box-shadow: var(--shadow-lg);
  z-index: 220;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}
.nav-menu:hover .nav-menu__dropdown,
.nav-menu:focus-within .nav-menu__dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.nav-menu__dropdown a {
  display: block;
  padding: .55rem .7rem;
  border-radius: var(--radius);
  border-bottom: none;
  font-size: .76rem;
}
.nav-menu__dropdown a:hover {
  background: var(--bg3);
  border-bottom: none;
}
.cart-btn {
  position: relative; display: flex; align-items: center;
  padding: .45rem; border-radius: var(--radius);
  background: var(--bg3); border: 1px solid var(--border2); transition: all .2s;
}
.cart-btn:hover { border-color: var(--accent); }
.cart-btn svg { width: 18px; height: 18px; color: var(--text2); transition: color .2s; }
.cart-btn:hover svg { color: var(--accent); }
.cart-badge {
  position: absolute; top: -5px; right: -5px;
  background: var(--accent); color: #000;
  font-size: .6rem; font-weight: 700; font-family: var(--font-mono);
  min-width: 17px; height: 17px; border-radius: 99px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* ── Flash ─────────────────────────────────────────────────────────────────── */
.flash { padding: .7rem 2rem; text-align: center; font-size: .82rem; font-weight: 500; }
.flash--success { background: var(--accent-d); color: var(--accent); border-bottom: 1px solid rgba(0,229,160,0.15); }
.flash--error   { background: var(--red-d);    color: var(--red);    border-bottom: 1px solid rgba(255,71,87,0.15); }
.flash--info    { background: var(--blue-d);   color: var(--blue);   border-bottom: 1px solid rgba(61,139,255,0.15); }

/* ── Layout ────────────────────────────────────────────────────────────────── */
.site-main { min-height: calc(100vh - 58px - 60px); }
.container  { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  background: var(--bg2); border-bottom: 1px solid var(--border);
  padding: 5rem 2rem; text-align: center; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: -50%;
  background-image:
    linear-gradient(rgba(0,229,160,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,160,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  transform: perspective(600px) rotateX(20deg); pointer-events: none;
}
.hero h1 {
  font-family: var(--font-head); font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800; letter-spacing: .02em; color: var(--text);
  max-width: 680px; margin: 0 auto .75rem; position: relative;
}
.hero p { font-size: .95rem; color: var(--text2); margin-bottom: 2rem; position: relative; }
.hero-search {
  display: flex; max-width: 460px; margin: 0 auto;
  border: 1px solid var(--border2); border-radius: var(--radius);
  background: var(--bg3); overflow: hidden; position: relative;
  transition: border-color .2s, box-shadow .2s;
}
.hero-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-d); }
.hero-search input {
  flex: 1; padding: .75rem 1rem; border: 0; background: transparent;
  outline: none; color: var(--text); font-size: .9rem;
}
.hero-search input::placeholder { color: var(--text3); }
.hero-search button {
  padding: .75rem 1.2rem; background: var(--accent); color: #000;
  border: 0; cursor: pointer; font-weight: 700; font-size: .8rem;
  letter-spacing: .05em; font-family: var(--font-head); transition: background .2s;
}
.hero-search button:hover { background: var(--accent2); }

/* ── Section Head ──────────────────────────────────────────────────────────── */
.section-head { padding: 2.5rem 0 1.25rem; display: flex; align-items: baseline; justify-content: space-between; }
.section-head h2 { font-family: var(--font-head); font-size: 1.35rem; font-weight: 800; letter-spacing: .03em; }
.section-head span { font-size: .72rem; color: var(--text3); font-family: var(--font-mono); letter-spacing: .07em; }

/* ── Product Grid ──────────────────────────────────────────────────────────── */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.25rem; padding-bottom: 4rem; }
.product-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius2);
  overflow: hidden; transition: border-color .25s, box-shadow .25s, transform .25s;
  display: flex; flex-direction: column; position: relative;
}
.product-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent); opacity: 0; transition: opacity .25s;
}
.product-card:hover { border-color: var(--border2); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.product-card:hover::before { opacity: 1; }
.product-card__img { aspect-ratio: 1; background: var(--bg3); overflow: hidden; border-bottom: 1px solid var(--border); }
.product-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.product-card:hover .product-card__img img { transform: scale(1.04); }
.product-card__img .no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text3); font-size: 2.5rem; opacity: .2; }
.product-card__body { padding: .95rem 1rem; flex: 1; display: flex; flex-direction: column; }
.product-card__name {
  font-family: var(--font-head); font-size: .9rem; font-weight: 700;
  margin-bottom: .4rem; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card__price { font-family: var(--font-mono); font-size: .95rem; color: var(--accent); margin-top: auto; margin-bottom: .55rem; }
.product-card__stock { font-size: .68rem; color: var(--text3); margin-bottom: .7rem; font-family: var(--font-mono); letter-spacing: .05em; text-transform: uppercase; }
.product-card__stock.low { color: var(--yellow); }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .55rem 1.1rem; border-radius: var(--radius);
  font-size: .78rem; font-weight: 600; cursor: pointer; letter-spacing: .04em;
  border: 1px solid transparent; transition: all .2s; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #000; border-color: var(--accent); font-family: var(--font-head); }
.btn-primary:hover { background: var(--accent2); border-color: var(--accent2); box-shadow: 0 4px 14px rgba(0,229,160,0.25); }
.btn-outline { background: var(--bg3); color: var(--text2); border-color: var(--border2); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger  { background: var(--red-d); color: var(--red); border-color: rgba(255,71,87,0.3); }
.btn-danger:hover { background: rgba(255,71,87,0.2); }
.btn-sm { padding: .35rem .8rem; font-size: .72rem; }
.btn-block { width: 100%; }

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.form-card {
  max-width: 440px; margin: 3rem auto; padding: 2.5rem;
  background: var(--bg2); border: 1px solid var(--border2); border-radius: var(--radius2);
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
  animation: slideUp 0.35s cubic-bezier(0.16,1,0.3,1);
}
.form-card--wide {
  max-width: 760px;
}
@keyframes slideUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
.form-card h1 { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; letter-spacing: .03em; margin-bottom: 1.5rem; }
.form-section-label {
  margin-bottom: .9rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text3);
  font-family: var(--font-mono);
}
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text3); margin-bottom: .4rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: .6rem .85rem; border: 1px solid var(--border2); border-radius: var(--radius);
  background: var(--bg3); color: var(--text); outline: none; transition: border-color .2s, box-shadow .2s;
}
.form-group input::placeholder { color: var(--text3); }
.form-group input:focus, .form-group select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-d); }
.form-hint { font-size: .7rem; color: var(--text3); margin-top: .3rem; font-family: var(--font-mono); }
.form-link { text-align: center; margin-top: 1.25rem; font-size: .82rem; color: var(--text3); }
.form-link a { color: var(--accent); font-weight: 600; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── Cart ──────────────────────────────────────────────────────────────────── */
.cart-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1.75rem; padding: 2rem 0 4rem; align-items: start; }
@media (max-width: 820px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text3); font-family: var(--font-mono); border-bottom: 1px solid var(--border); padding: .6rem 0; }
.cart-table td { padding: .9rem 0; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text2); font-size: .88rem; }
.cart-item-img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius); background: var(--bg3); border: 1px solid var(--border); }
.cart-item-name { font-weight: 500; font-size: .88rem; color: var(--text); }
.cart-qty-input {
  width: 56px; padding: .3rem .4rem; text-align: center;
  border: 1px solid var(--border2); border-radius: var(--radius);
  background: var(--bg3); color: var(--text); font-family: var(--font-mono); outline: none; transition: border-color .2s;
}
.cart-qty-input:focus { border-color: var(--accent); }
.cart-remove { background: 0; border: 0; cursor: pointer; color: var(--text3); padding: .3rem; transition: color .2s; }
.cart-remove:hover { color: var(--red); }
.order-summary { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius2); padding: 1.4rem; box-shadow: var(--shadow); position: sticky; top: 78px; }
.order-summary h3 { font-family: var(--font-head); font-size: 1rem; font-weight: 800; letter-spacing: .03em; margin-bottom: 1rem; }
.summary-line { display: flex; justify-content: space-between; margin-bottom: .5rem; font-size: .83rem; color: var(--text2); }
.summary-line span:last-child { font-family: var(--font-mono); }
.summary-line.total { font-weight: 700; font-size: .95rem; color: var(--text); border-top: 1px solid var(--border); padding-top: .7rem; margin-top: .5rem; }
.summary-line.total span:last-child { color: var(--accent); }

/* ── Checkout ──────────────────────────────────────────────────────────────── */
.checkout-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1.75rem; padding: 2rem 0 4rem; align-items: start; }
@media (max-width: 820px) { .checkout-layout { grid-template-columns: 1fr; } }
.checkout-section { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius2); padding: 1.4rem; margin-bottom: 1.25rem; }
.checkout-section h3 { font-family: var(--font-head); font-size: .95rem; font-weight: 800; letter-spacing: .03em; margin-bottom: 1.1rem; }
.checkout-section label { display: flex; align-items: center; gap: .65rem; margin-bottom: .6rem; cursor: pointer; font-size: .88rem; color: var(--text2); padding: .55rem .85rem; border: 1px solid var(--border2); border-radius: var(--radius); transition: all .2s; }
.checkout-section label:hover { border-color: var(--accent); color: var(--text); }
.checkout-section input[type="radio"] { accent-color: var(--accent); }

/* ── Orders ────────────────────────────────────────────────────────────────── */
.orders-page { padding: 2rem 0 4rem; }
.orders-page h1 { font-family: var(--font-head); font-size: 1.8rem; font-weight: 800; letter-spacing: .03em; margin-bottom: 1.75rem; }
.order-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius2); margin-bottom: 1rem; overflow: hidden; transition: border-color .2s; }
.order-card:hover { border-color: var(--border2); }
.order-card__head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; padding: .85rem 1.25rem; background: var(--bg3); border-bottom: 1px solid var(--border); }
.order-card__head strong { font-family: var(--font-mono); font-size: .82rem; color: var(--text); }
.badge { display: inline-flex; align-items: center; padding: .2rem .65rem; border-radius: 20px; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; white-space: nowrap; font-family: var(--font-mono); }
.badge-pending    { background: var(--yellow-d); color: var(--yellow); border: 1px solid rgba(255,211,42,0.2); }
.badge-processing { background: var(--blue-d);   color: var(--blue);   border: 1px solid rgba(61,139,255,0.2); }
.badge-shipped    { background: var(--accent-d);  color: var(--accent); border: 1px solid rgba(0,229,160,0.2); }
.badge-delivered  { background: var(--accent-d);  color: var(--accent); border: 1px solid rgba(0,229,160,0.2); }
.badge-cancelled  { background: var(--red-d);     color: var(--red);    border: 1px solid rgba(255,71,87,0.2); }
.order-items-table { width: 100%; border-collapse: collapse; }
.order-items-table td { padding: .7rem 1.25rem; border-bottom: 1px solid var(--border); font-size: .83rem; color: var(--text2); }
.order-items-table td:last-child { font-family: var(--font-mono); color: var(--accent); }
.order-items-table tr:last-child td { border: 0; }

/* ── Empty state ───────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 5rem 2rem; color: var(--text3); }
.empty-state svg { width: 48px; height: 48px; margin: 0 auto 1rem; opacity: .15; }
.empty-state h3 { font-family: var(--font-head); font-size: 1.25rem; font-weight: 800; color: var(--text2); margin-bottom: .5rem; }

/* ── Footer ────────────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); background: var(--bg2); padding: 1.25rem 2rem; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: .75rem; color: var(--text3); font-family: var(--font-mono); }
.footer-logo { font-family: var(--font-head); font-weight: 800; color: var(--text2); letter-spacing: .05em; }

/* ── Pagination ────────────────────────────────────────────────────────────── */
.pagination { display: flex; gap: .4rem; justify-content: center; padding: 1rem 0 3rem; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius); font-size: .75rem; font-family: var(--font-mono); border: 1px solid var(--border2); background: var(--bg2); color: var(--text2); transition: all .2s; }
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .active { background: var(--accent-d); color: var(--accent); border-color: var(--accent); }


/* ══════════════════════════════════════════════════════════════════════════════
   THEMES
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Midnight Blue ─────────────────────────────────────────────────────────── */
body.theme-blue {
  --bg:       #080c14;
  --bg2:      #0d1220;
  --bg3:      #131929;
  --border:   #1a2236;
  --border2:  #202d44;
  --text:     #e0e8f8;
  --text2:    #7b90b8;
  --text3:    #3a4e72;
  --accent:   #3d8bff;
  --accent2:  #2070e0;
  --accent-d: rgba(61,139,255,0.08);
}

/* ── Crimson ───────────────────────────────────────────────────────────────── */
body.theme-red {
  --bg:       #100808;
  --bg2:      #160d0d;
  --bg3:      #1e1212;
  --border:   #2a1515;
  --border2:  #361c1c;
  --text:     #f5e8e8;
  --text2:    #a87878;
  --text3:    #5c3a3a;
  --accent:   #ff4757;
  --accent2:  #d93040;
  --accent-d: rgba(255,71,87,0.08);
}

/* ── Purple Haze ───────────────────────────────────────────────────────────── */
body.theme-purple {
  --bg:       #0c080f;
  --bg2:      #110d16;
  --bg3:      #18121e;
  --border:   #221830;
  --border2:  #2c1f3e;
  --text:     #ede8f5;
  --text2:    #9080b8;
  --text3:    #4e3870;
  --accent:   #a855f7;
  --accent2:  #8b3de0;
  --accent-d: rgba(168,85,247,0.08);
}

/* ── Amber ─────────────────────────────────────────────────────────────────── */
body.theme-amber {
  --bg:       #0f0c06;
  --bg2:      #161108;
  --bg3:      #1e1810;
  --border:   #2a2010;
  --border2:  #362a14;
  --text:     #f5f0e0;
  --text2:    #b09050;
  --text3:    #6a5428;
  --accent:   #ffd32a;
  --accent2:  #e0b010;
  --accent-d: rgba(255,211,42,0.08);
}

/* ── Light ─────────────────────────────────────────────────────────────────── */
body.theme-light {
  --bg:       #f5f7fa;
  --bg2:      #ffffff;
  --bg3:      #eef1f6;
  --border:   #dde2ec;
  --border2:  #c8d0e0;
  --text:     #1a2035;
  --text2:    #5a6480;
  --text3:    #9aa0b8;
  --accent:   #00b87e;
  --accent2:  #009060;
  --accent-d: rgba(0,184,126,0.08);
  --shadow:   0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg:0 8px 32px rgba(0,0,0,0.12);
}

/* ── Theme Switcher Widget ─────────────────────────────────────────────────── */
.theme-switcher {
  position: relative;
}
.theme-btn {
  display: flex; align-items: center; gap: 6px;
  padding: .35rem .7rem; border-radius: var(--radius);
  background: var(--bg3); border: 1px solid var(--border2);
  color: var(--text2); font-size: .72rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer; transition: all .2s; font-family: var(--font-body);
  white-space: nowrap;
}
.theme-btn:hover { border-color: var(--accent); color: var(--accent); }
.theme-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
}
.theme-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--radius2); padding: .5rem;
  min-width: 160px; z-index: 200;
  box-shadow: var(--shadow-lg);
  display: none; /* JS controlled */
}
.theme-dropdown.open { display: block; animation: fadeDown .15s ease; }
@keyframes fadeDown { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.theme-option {
  display: flex; align-items: center; gap: 10px;
  padding: .55rem .75rem; border-radius: var(--radius);
  cursor: pointer; font-size: .82rem; color: var(--text2);
  transition: all .15s; border: none; background: none;
  width: 100%; text-align: left; font-family: var(--font-body);
}
.theme-option:hover { background: var(--bg3); color: var(--text); }
.theme-option.active { color: var(--accent); }
.theme-swatch {
  width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.1);
}

/* ── Theme dropdown override ─────────────────────────────────────────────── */
.theme-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius2);
  padding: .5rem;
  min-width: 170px;
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.theme-option {
  display: flex;
  align-items: center;
  padding: .55rem .75rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: .82rem;
  color: var(--text2);
  transition: all .15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
}
.theme-option:hover { background: var(--bg3); color: var(--text); }
.theme-option.active { color: var(--accent); }


/* ══════════════════════════════════════════════════════════════════════════════
   MOBILE / RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Hamburger button ──────────────────────────────────────────────────────── */
.hamburger {
  display: none;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text2);
  cursor: pointer;
  padding: .45rem;
  transition: all .2s;
  flex-shrink: 0;
}
.hamburger:hover { border-color: var(--accent); color: var(--accent); }
.hamburger svg { width: 20px; height: 20px; display: block; }

/* ── Mobile nav overlay ────────────────────────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
}
.mobile-nav.open { display: block; }
.mobile-nav-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}
.mobile-nav-panel {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: min(360px, 100vw);
  background: var(--bg2);
  border-right: 1px solid var(--border2);
  display: flex;
  flex-direction: column;
  animation: slideInLeft .25s cubic-bezier(0.16,1,0.3,1);
  overflow-y: auto;
}
@keyframes slideInLeft {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}
.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.mobile-nav-header .logo { font-size: 1rem; }
.mobile-nav-close {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text2);
  cursor: pointer;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: all .2s;
}
.mobile-nav-close:hover { border-color: var(--red); color: var(--red); }
.mobile-nav-links {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: .25rem;
  flex: 1;
}
.mobile-cart-link {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .85rem;
  background: var(--bg3);
  border: 1px solid var(--border2) !important;
}
.mobile-cart-badge {
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #000;
  font-size: .8rem;
  font-weight: 700;
  font-family: var(--font-mono);
}
.mobile-nav-group {
  display: block;
  margin-bottom: .7rem;
}
.mobile-nav-group-title {
  list-style: none;
  padding: .45rem 1rem;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text3);
  cursor: pointer;
}
.mobile-nav-group-title::-webkit-details-marker { display: none; }
.mobile-nav-group > summary { list-style: none; }
.mobile-nav-group:not([open]) a {
  display: none;
}
.mobile-nav-group[open] a {
  display: block;
}
.mobile-nav-links a {
  display: block;
  padding: .9rem 1rem;
  border-radius: var(--radius);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text2);
  letter-spacing: .04em;
  transition: all .15s;
  border: 1px solid transparent;
}
.mobile-nav-links a:hover {
  background: var(--bg3);
  border-color: var(--border2);
  color: var(--text);
}
.mobile-nav-links a.admin-link { color: var(--accent); }
.mobile-nav-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
}
.mobile-theme-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .9rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border2);
  background: var(--bg3);
  color: var(--text2);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.mobile-theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.mobile-theme-options {
  display: none;
  flex-wrap: wrap;
  gap: .55rem;
  padding-top: .85rem;
}
.mobile-theme-options.open {
  display: flex;
}

/* ── Responsive breakpoints ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Header */
  .main-nav { display: none; }
  .hamburger { display: flex; align-items: center; justify-content: center; }
  .cart-btn { display: none !important; }
  .theme-switcher { display: none !important; }
  .header-inner {
    gap: .65rem;
    padding: 0 1rem;
    min-width: 0;
    justify-content: flex-start;
  }
  .logo {
    min-width: 0;
    flex: 0 1 auto;
    font-size: .66rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100vw - 64px);
  }
  .header-actions {
    display: none !important;
  }
  .hamburger {
    flex-shrink: 0;
  }
  .hamburger {
    position: sticky;
    top: 8px;
    left: 0;
    order: -1;
    margin-right: .15rem;
  }
  .mobile-nav-header {
    padding: 1rem;
  }
  .mobile-nav-header .logo {
    font-size: .66rem;
    max-width: calc(100vw - 96px);
  }
  .mobile-nav-links {
    padding: 1rem;
  }
  .mobile-nav-footer {
    padding: 1rem;
  }
  .mobile-theme-toggle {
    font-size: 1.15rem;
  }
  .mobile-theme-options button {
    width: 32px !important;
    height: 32px !important;
  }

  /* Hero */
  .hero { padding: 3rem 1.25rem; }
  .hero h1 { font-size: 1.9rem; }

  /* Container */
  .container { padding: 0 1rem; }

  /* Product grid — 2 cols on tablet */
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }

  /* Section head */
  .section-head { padding: 1.5rem 0 1rem; }

  /* Cart */
  .cart-layout { grid-template-columns: 1fr; gap: 1.25rem; padding: 1.25rem 0 3rem; }
  .cart-table th:nth-child(3),
  .cart-table td:nth-child(3) { display: none; }
  .order-summary { position: static; }

  /* Checkout */
  .checkout-layout { grid-template-columns: 1fr; gap: 1.25rem; padding: 1.25rem 0 3rem; }
  .form-row { grid-template-columns: 1fr; gap: 0; }

  /* Form card */
  .form-card { margin: 1.5rem 1rem; padding: 1.75rem 1.25rem; }
  .form-card--wide { max-width: none; }
  .checkout-section { padding: 1.1rem; }

  /* Orders */
  .orders-page { padding: 1.25rem 0 3rem; }
  .orders-page h1 { font-size: 1.4rem; margin-bottom: 1.25rem; }
  .order-card__head { gap: .5rem; }
  .order-items-table td { padding: .6rem 1rem; font-size: .8rem; }
}

@media (max-width: 480px) {
  /* Single column product grid on phones */
  .product-grid { grid-template-columns: 1fr; }

  /* Smaller hero */
  .hero { padding: 2.5rem 1rem; }
  .hero h1 { font-size: 1.6rem; }
  .hero p { font-size: .85rem; }
  .hero-search { max-width: 100%; }

  /* Cart table — hide image col too */
  .cart-table th:nth-child(1),
  .cart-table td:nth-child(1) { display: none; }

  /* Theme btn — icon only */
  .mobile-nav-panel { width: 100vw; }
  .flash { padding-left: 1rem; padding-right: 1rem; }
  .form-card { margin-left: .75rem; margin-right: .75rem; padding: 1.35rem 1rem; }
  .form-group label[style] {
    gap: .5rem !important;
  }
  .header-inner {
    padding: 0 .875rem;
  }
  .container {
    padding: 0 .875rem;
  }
  .logo {
    font-size: .66rem;
  }
  .mobile-nav-group-title {
    font-size: 1.3rem;
  }
  .mobile-nav-links a {
    font-size: 1.25rem;
  }
  .mobile-nav-header .logo {
    font-size: .66rem;
  }
  .mobile-theme-toggle {
    font-size: 1.2rem;
  }
  .mobile-theme-options button {
    width: 34px !important;
    height: 34px !important;
  }
}


/* ══════════════════════════════════════════════════════════════════════════════
   CATEGORY SIDEBAR
   ══════════════════════════════════════════════════════════════════════════════ */

.shop-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  padding-top: 2rem;
}

.cat-sidebar {
  position: sticky;
  top: 78px;
  height: fit-content;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  overflow: hidden;
}

.cat-sidebar__head {
  padding: .85rem 1rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text3);
  font-family: var(--font-mono);
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
}

.cat-sidebar__list {
  list-style: none;
  padding: .5rem;
}

.cat-sidebar__item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem .75rem;
  border-radius: var(--radius);
  font-size: .85rem;
  color: var(--text2);
  transition: all .15s;
  border: 1px solid transparent;
  cursor: pointer;
}
.cat-sidebar__item:hover {
  background: var(--bg3);
  color: var(--text);
  border-color: var(--border2);
}
.cat-sidebar__item.active {
  background: var(--accent-d);
  color: var(--accent);
  border-color: rgba(0,229,160,0.2);
}
.cat-sidebar__item span:first-of-type { flex: 1; }
.cat-sidebar__count {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--text3);
  background: var(--bg3);
  padding: .1rem .4rem;
  border-radius: 99px;
  flex-shrink: 0;
}
.cat-sidebar__item.active .cat-sidebar__count {
  background: rgba(0,229,160,0.15);
  color: var(--accent);
}
.cat-sidebar__img {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.shop-main { min-width: 0; }

/* ── Mobile sidebar collapse ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .shop-layout {
    grid-template-columns: 1fr;
    padding-top: 1rem;
  }
  .cat-sidebar {
    position: static;
    display: flex;
    flex-direction: column;
  }
  .cat-sidebar__list {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    padding: .6rem;
  }
  .cat-sidebar__item {
    padding: .4rem .75rem;
    font-size: .78rem;
  }
}
/*--------- Footer social media -------*/
.footer-social {
  display: flex;
  gap: .75rem;
  justify-content: center;
  margin-top: .75rem;
}
.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text2);
  text-decoration: none;
  transition: color .2s, border-color .2s, background .2s;
}
.footer-social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-d);
}
