/* ============================================================
   TuningHub – style.css
   Dark mode • Plum Purple accents • Minimal Performance
   ============================================================ */

/* ── RESET & VARIABLES ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Backgrounds */
  --bg-deep:    #07070e;
  --bg-base:    #0d0d18;
  --bg-surface: #12121f;
  --bg-card:    #18182a;
  --bg-raised:  #1f1f35;
  --bg-hover:   #252540;

  /* Accent – Plum Purple */
  --accent:        #8B35A8;
  --accent-light:  #a855f7;
  --accent-dim:    #6B21A8;
  --accent-glow:   rgba(139, 53, 168, 0.35);
  --accent-subtle: rgba(139, 53, 168, 0.12);
  --accent-border: rgba(139, 53, 168, 0.30);

  /* Text */
  --text-primary:   #e8e8f4;
  --text-secondary: #9898b8;
  --text-muted:     #5a5a78;
  --text-inverse:   #07070e;

  /* Status */
  --success: #22c55e;
  --warning: #f59e0b;
  --danger:  #ef4444;
  --info:    #38bdf8;

  /* Borders */
  --border:       rgba(139, 53, 168, 0.20);
  --border-light: rgba(255,255,255,0.06);
  --border-focus: rgba(139, 53, 168, 0.70);

  /* Radii */
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  16px;
  --r-xl:  24px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.5);
  --shadow-md: 0 6px 24px rgba(0,0,0,0.6);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.7);
  --shadow-accent: 0 0 32px rgba(139,53,168,0.25);

  /* Layout */
  --max-w: 1280px;
  --nav-h: 72px;
  --transition: 200ms cubic-bezier(.4,0,.2,1);
}

/* ── BASE ─────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

h1,h2,h3,h4,h5,h6 {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

a { color: var(--accent-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--text-primary); }

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

::selection { background: var(--accent); color: #fff; }

/* ── SCROLLBAR ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--accent-dim); border-radius: 3px; }

/* ── NAVBAR ─────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(7,7,14,.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.navbar.scrolled { box-shadow: 0 4px 32px rgba(0,0,0,.6); }

.nav-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-text {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}
.logo-accent { color: var(--accent-light); }

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: var(--text-primary); background: var(--accent-subtle); }
.dropdown-arrow { font-size: .65rem; opacity: .6; }

/* Dropdowns */
.nav-dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 6px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition);
  z-index: 999;
}
.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-item {
  display: block;
  padding: 8px 14px;
  color: var(--text-secondary);
  font-size: .9rem;
  border-radius: var(--r-sm);
  transition: all var(--transition);
  text-decoration: none;
}
.dropdown-item:hover { color: var(--text-primary); background: var(--accent-subtle); }

/* Nav actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Search */
.nav-search-form {
  display: flex;
  align-items: center;
  background: var(--bg-raised);
  border: 1px solid var(--border-light);
  border-radius: var(--r-full);
  overflow: hidden;
  transition: border-color var(--transition);
}
.nav-search-form:focus-within { border-color: var(--border-focus); }
.nav-search {
  background: transparent;
  border: none;
  padding: 7px 14px;
  font-size: .88rem;
  color: var(--text-primary);
  width: 180px;
  outline: none;
  font-family: 'Outfit', sans-serif;
}
.nav-search::placeholder { color: var(--text-muted); }
.nav-search-btn {
  background: none;
  border: none;
  padding: 7px 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition);
}
.nav-search-btn:hover { color: var(--accent-light); }

/* Cart / icon btn */
.nav-icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  color: var(--text-secondary);
  transition: all var(--transition);
  text-decoration: none;
}
.nav-icon-btn:hover { color: var(--accent-light); background: var(--accent-subtle); }
.cart-badge {
  position: absolute;
  top: 2px; right: 2px;
  background: var(--accent);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* User menu */
.nav-user-menu { position: relative; }
.nav-user-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: var(--bg-raised);
  cursor: pointer;
  transition: border-color var(--transition);
  overflow: hidden;
}
.nav-user-btn:hover { border-color: var(--accent); }
.user-avatar { width: 100%; height: 100%; object-fit: cover; }
.user-initials {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: .85rem;
  color: var(--accent-light);
  letter-spacing: .05em;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 6px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition);
  z-index: 999;
}
.nav-user-menu:hover .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.user-dropdown-header {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 6px;
}
.user-dropdown-header strong {
  display: block;
  font-size: .95rem;
  color: var(--text-primary);
}
.user-dropdown-header small {
  color: var(--text-muted);
  font-size: .78rem;
}
.user-dropdown-item {
  display: block;
  padding: 8px 12px;
  color: var(--text-secondary);
  font-size: .88rem;
  border-radius: var(--r-sm);
  transition: all var(--transition);
  text-decoration: none;
}
.user-dropdown-item:hover { color: var(--text-primary); background: var(--accent-subtle); }
.user-dropdown-item.logout { color: #ef4444; }
.user-dropdown-item.logout:hover { background: rgba(239,68,68,.12); }
.user-dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 6px 0;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: all var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MAIN CONTENT ─────────────────────────────────────────── */
.main-content {
  margin-top: var(--nav-h);
  min-height: calc(100vh - var(--nav-h));
}

/* ── FLASH MESSAGES ───────────────────────────────────────── */
.flash-message {
  position: fixed;
  top: calc(var(--nav-h) + 12px);
  right: 16px;
  z-index: 2000;
  padding: 14px 48px 14px 18px;
  border-radius: var(--r-md);
  font-size: .9rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: slideIn .3s ease;
  max-width: 380px;
}
@keyframes slideIn {
  from { opacity:0; transform: translateX(24px); }
  to   { opacity:1; transform: translateX(0); }
}
.flash-success { background: rgba(34,197,94,.18); border: 1px solid rgba(34,197,94,.4); color: #86efac; }
.flash-error   { background: rgba(239,68,68,.18);  border: 1px solid rgba(239,68,68,.4);  color: #fca5a5; }
.flash-info    { background: rgba(56,189,248,.18); border: 1px solid rgba(56,189,248,.4); color: #7dd3fc; }
.flash-warning { background: rgba(245,158,11,.18); border: 1px solid rgba(245,158,11,.4); color: #fcd34d; }
.flash-close {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: currentColor;
  cursor: pointer;
  font-size: 1rem;
  opacity: .7;
  transition: opacity var(--transition);
}
.flash-close:hover { opacity: 1; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--r-md);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(139,53,168,.3);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-light);
  border-color: var(--accent-light);
  box-shadow: 0 0 28px rgba(168,85,247,.4);
  color: #fff;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--accent-light);
  border-color: var(--accent-border);
}
.btn-outline:hover:not(:disabled) {
  background: var(--accent-subtle);
  border-color: var(--accent-light);
  color: var(--text-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-light);
}
.btn-ghost:hover:not(:disabled) { background: var(--bg-raised); color: var(--text-primary); }

.btn-danger {
  background: rgba(239,68,68,.15);
  color: #fca5a5;
  border-color: rgba(239,68,68,.4);
}
.btn-danger:hover:not(:disabled) { background: rgba(239,68,68,.25); }

.btn-primary-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--r-md);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  padding: 7px 16px;
  font-size: .85rem;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(139,53,168,.3);
}
.btn-primary-sm:hover:not(:disabled) {
  background: var(--accent-light);
  border-color: var(--accent-light);
  box-shadow: 0 0 28px rgba(168,85,247,.4);
  color: #fff;
  transform: translateY(-1px);
}

.btn-outline-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--r-md);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  padding: 7px 16px;
  font-size: .85rem;
  background: transparent;
  color: var(--accent-light);
  border-color: var(--accent-border);
}
.btn-outline-sm:hover:not(:disabled) {
  background: var(--accent-subtle);
  border-color: var(--accent-light);
  color: var(--text-primary);
}

/* ── FORMS ───────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  margin-bottom: 7px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}
.form-label .req { color: var(--accent-light); }

.form-control {
  width: 100%;
  padding: 11px 15px;
  background: #07070e;
  border: 2px solid rgba(139, 53, 168, 0.6);
  border-radius: var(--r-md);
  color: #e8e8f4;
  font-size: .95rem;
  font-family: 'Outfit', sans-serif;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  display: block;
}
.form-control:focus {
  border-color: rgba(139,53,168,0.9);
  box-shadow: 0 0 0 3px rgba(139,53,168,.25);
}
.form-control::placeholder { color: #9898b8; opacity: 1; }
.form-control.error { border-color: rgba(239,68,68,.7); }

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

.form-hint { font-size: .8rem; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: .82rem; color: #fca5a5; margin-top: 5px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Input password wrapper */
.input-pass-wrap { position: relative; }
.input-pass-wrap .form-control { padding-right: 44px; }
.toggle-pass {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition);
  display: flex;
  align-items: center;
}
.toggle-pass:hover { color: var(--accent-light); }

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all var(--transition);
}
.card:hover { border-color: var(--accent-border); box-shadow: var(--shadow-accent); }

.card-body { padding: 24px; }
.card-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border-light);
}
.card-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .06em;
}

/* ── PRODUCT CARD ─────────────────────────────────────────── */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all 280ms cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  position: relative;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-border);
  box-shadow: 0 12px 40px rgba(0,0,0,.5), var(--shadow-accent);
}

.product-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--bg-raised);
  min-height: 0;
}
.product-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}
.product-card:hover .product-img-wrap img { transform: scale(1.06); }

.product-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--accent);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-full);
}
.product-badge.sale { background: #dc2626; }
.product-badge.new  { background: #16a34a; }

.product-wishlist-btn {
  position: absolute;
  top: 12px; right: 12px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(7,7,14,.7);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  backdrop-filter: blur(6px);
}
.product-wishlist-btn:hover,
.product-wishlist-btn.active { color: #ef4444; border-color: rgba(239,68,68,.5); }

.product-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.product-brand {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-light);
}
.product-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: .03em;
}
.product-desc {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}
.product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .8rem;
}
.stars { color: #f59e0b; letter-spacing: -1px; font-size: .9rem; }
.rating-count { color: var(--text-muted); font-size: .75rem; }

.product-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.product-price {
  display: flex;
  flex-direction: column;
}
.price-current {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}
.price-original {
  font-size: .78rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.btn-add-cart {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  border-radius: var(--r-md);
  color: var(--accent-light);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .05em;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn-add-cart:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 16px rgba(139,53,168,.4);
}

/* ── BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.badge-warning  { background: rgba(245,158,11,.15);  color: #fcd34d; border: 1px solid rgba(245,158,11,.3); }
.badge-info     { background: rgba(56,189,248,.15);  color: #7dd3fc; border: 1px solid rgba(56,189,248,.3); }
.badge-purple   { background: var(--accent-subtle);  color: var(--accent-light); border: 1px solid var(--accent-border); }
.badge-success  { background: rgba(34,197,94,.15);   color: #86efac; border: 1px solid rgba(34,197,94,.3); }
.badge-danger   { background: rgba(239,68,68,.15);   color: #fca5a5; border: 1px solid rgba(239,68,68,.3); }
.badge-secondary{ background: var(--bg-raised);      color: var(--text-muted); border: 1px solid var(--border-light); }

/* ── SECTION LAYOUT ─────────────────────────────────────── */
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }

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

.section-header {
  margin-bottom: 48px;
}
.section-label {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 10px;
  position: relative;
  padding-left: 20px;
}
.section-label::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 12px; height: 2px;
  background: var(--accent);
}
.section-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  letter-spacing: .02em;
}
.section-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 10px;
  max-width: 560px;
  line-height: 1.6;
}

/* ── GRID ─────────────────────────────────────────────── */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

/* ── HERO ─────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg-deep);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('/images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  opacity: .12;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(7,7,14,.98) 0%,
    rgba(7,7,14,.7) 50%,
    rgba(139,53,168,.08) 100%
  );
}

.hero-glow {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,53,168,.18) 0%, transparent 70%);
  top: -100px; right: -100px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 20px;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 28px; height: 1px;
  background: var(--accent);
}

.hero-title {
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: .02em;
  max-width: 700px;
  margin-bottom: 24px;
}
.hero-title .accent-line { color: var(--accent-light); display: block; }

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 540px;
  line-height: 1.7;
  margin-bottom: 40px;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--border-light);
}
.hero-stat-num {
  font-family: 'Rajdhani', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}
.hero-stat-num span { color: var(--accent-light); }
.hero-stat-label {
  font-size: .8rem;
  color: var(--text-muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ── CAR MODELS STRIP ─────────────────────────────────── */
.car-strip {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0;
  overflow: hidden;
}

.car-strip-inner {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}
.car-strip-inner::-webkit-scrollbar { display: none; }

.car-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 28px;
  border-right: 1px solid var(--border-light);
  text-decoration: none;
  transition: background var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.car-chip:hover { background: var(--accent-subtle); }

.car-chip-img {
  width: 64px; height: 40px;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-light);
}
.car-chip-brand {
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-light);
  font-weight: 700;
}
.car-chip-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: .04em;
}
.car-chip-hp {
  font-size: .75rem;
  color: var(--text-muted);
}

/* ── CATEGORY PILLS ───────────────────────────────────── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.category-pill {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px 20px;
  text-align: center;
  text-decoration: none;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.category-pill:hover {
  border-color: var(--accent);
  background: var(--accent-subtle);
  transform: translateY(-3px);
  box-shadow: var(--shadow-accent);
}
.category-pill-icon {
  width: 48px; height: 48px;
  background: var(--accent-subtle);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}
.category-pill-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--text-secondary);
  text-transform: uppercase;
}
.category-pill:hover .category-pill-name { color: var(--text-primary); }

/* ── PRODUCT PAGE LAYOUT ──────────────────────────────── */
.products-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}

.sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}
.sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}
.filter-group { margin-bottom: 24px; }
.filter-label {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: block;
}
.filter-options { display: flex; flex-direction: column; gap: 6px; }
.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .88rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  transition: all var(--transition);
  text-decoration: none;
}
.filter-option:hover, .filter-option.active {
  color: var(--text-primary);
  background: var(--accent-subtle);
}
.filter-option input[type=checkbox],
.filter-option input[type=radio] {
  accent-color: var(--accent);
}

.price-range-wrap { display: flex; gap: 10px; align-items: center; }
.price-input {
  flex: 1;
  min-width: 0;        /* fix: prevents number inputs from overflowing flex container */
  width: 0;            /* fix: forces flex to control width, not content */
  padding: 8px 6px;
  background: var(--bg-raised);
  border: 1px solid var(--border-light);
  border-radius: var(--r-sm);
  color: var(--text-primary);
  font-size: .85rem;
  font-family: 'Outfit', sans-serif;
  outline: none;
  text-align: center;
}
.price-input:focus { border-color: var(--border-focus); }

/* Sort bar */
.products-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
  flex-wrap: wrap;
}
.products-count {
  font-size: .9rem;
  color: var(--text-muted);
}
.sort-select {
  padding: 8px 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: .88rem;
  outline: none;
  cursor: pointer;
}

/* ── PRODUCT DETAIL ───────────────────────────────────── */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
  padding: 48px 0;
}

.product-gallery {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}
.product-main-img {
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--bg-raised);
  border: 1px solid var(--border);
}
.product-main-img img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.product-info {}
.product-category-link {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-light);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 10px;
}
.product-detail-name {
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.product-detail-brand {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 16px;
}
.product-detail-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: .9rem;
  color: var(--text-muted);
}

.product-detail-price {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 24px;
}
.detail-price-current {
  font-family: 'Rajdhani', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
}
.detail-price-original {
  font-size: 1rem;
  color: var(--text-muted);
  text-decoration: line-through;
}
.detail-price-saving {
  font-size: .82rem;
  background: rgba(34,197,94,.15);
  color: #86efac;
  border: 1px solid rgba(34,197,94,.3);
  border-radius: var(--r-full);
  padding: 3px 10px;
}

.product-desc-text {
  font-size: .95rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 28px;
}

.product-specs-table {
  background: var(--bg-raised);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 28px;
}
.specs-table-title {
  padding: 14px 18px;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
}
.spec-row {
  display: flex;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(255,255,255,.03);
}
.spec-row:last-child { border-bottom: none; }
.spec-key {
  width: 45%;
  font-size: .85rem;
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}
.spec-val {
  font-size: .85rem;
  color: var(--text-primary);
  font-weight: 600;
}

.add-to-cart-section {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}
.qty-control {
  display: flex;
  align-items: center;
  background: var(--bg-raised);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  overflow: hidden;
}
.qty-btn {
  width: 38px; height: 44px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--transition);
}
.qty-btn:hover { color: var(--accent-light); background: var(--accent-subtle); }
.qty-input {
  width: 50px;
  background: none;
  border: none;
  text-align: center;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  outline: none;
}
/* hide number arrows */
.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }

.stock-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  color: var(--success);
  margin-bottom: 20px;
}
.stock-info.low { color: var(--warning); }
.stock-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* ── CART PAGE ─────────────────────────────────────────── */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
  padding: 40px 0;
}

.cart-table { width: 100%; }
.cart-row {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 14px;
  transition: border-color var(--transition);
}
.cart-row:hover { border-color: var(--accent-border); }
.cart-img {
  width: 90px; height: 68px;
  object-fit: cover;
  border-radius: var(--r-md);
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-brand {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 3px;
}
.cart-item-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: .03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-sku {
  font-size: .74rem;
  color: var(--text-muted);
  margin-top: 3px;
}
.cart-item-price {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}
.cart-remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--r-sm);
  transition: all var(--transition);
}
.cart-remove-btn:hover { color: #ef4444; background: rgba(239,68,68,.12); }

/* Order summary */
.order-summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}
.order-summary h3 {
  font-size: 1.1rem;
  letter-spacing: .08em;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: .9rem;
  margin-bottom: 12px;
  color: var(--text-secondary);
}
.summary-row.total {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  font-family: 'Rajdhani', sans-serif;
}
.summary-row .saving { color: var(--success); font-size: .82rem; }

.free-shipping-bar {
  background: var(--bg-raised);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  padding: 12px;
  margin-bottom: 18px;
  font-size: .82rem;
  color: var(--text-muted);
}
.free-shipping-bar .progress {
  height: 4px;
  background: var(--bg-hover);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}
.free-shipping-bar .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent-light));
  border-radius: 2px;
  transition: width .5s ease;
}

/* ── AUTH PAGES ─────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  background: var(--bg-deep);
  position: relative;
}
.auth-page::before {
  content: '';
  position: absolute;
  width: 800px; height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,53,168,.12) 0%, transparent 70%);
  top: -200px; right: -200px;
  pointer-events: none;
  z-index: 0;
}
.auth-page::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,53,168,.08) 0%, transparent 70%);
  bottom: -100px; left: -100px;
  pointer-events: none;
  z-index: 0;
}

.auth-box {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 48px 44px;
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
  text-decoration: none;
}
.auth-logo-text {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--text-primary);
}
.auth-logo-text span { color: var(--accent-light); }

.auth-title {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: .03em;
  margin-bottom: 6px;
  text-align: center;
}
.auth-subtitle {
  font-size: .9rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 32px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}
.auth-divider span { font-size: .8rem; color: var(--text-muted); white-space: nowrap; }

.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 11px;
  background: var(--bg-surface);
  border: 1px solid var(--accent-border);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
}
.btn-google:hover {
  background: var(--bg-raised);
  border-color: var(--accent-light);
  color: var(--text-primary);
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: .88rem;
  color: var(--text-muted);
}
.auth-footer a { color: var(--accent-light); }
.auth-footer a:hover { color: var(--text-primary); }

/* ── DASHBOARD ─────────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  padding: 40px 0;
}

.dash-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  color: var(--text-secondary);
  font-size: .92rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
  border: 1px solid transparent;
}
.dash-nav-item svg { flex-shrink: 0; }
.dash-nav-item:hover {
  color: var(--text-primary);
  background: var(--accent-subtle);
  border-color: var(--accent-border);
}
.dash-nav-item.active {
  color: var(--accent-light);
  background: var(--accent-subtle);
  border-color: var(--accent-border);
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-label {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.stat-value {
  font-family: 'Rajdhani', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}
.stat-sub {
  font-size: .82rem;
  color: var(--text-muted);
}

/* ── ORDERS TABLE ─────────────────────────────────────── */
.orders-table {
  width: 100%;
  border-collapse: collapse;
}
.orders-table th {
  text-align: left;
  padding: 12px 18px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
}
.orders-table td {
  padding: 16px 18px;
  font-size: .9rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
  color: var(--text-secondary);
}
.orders-table tr:last-child td { border-bottom: none; }
.orders-table tr:hover td { background: rgba(139,53,168,.04); }

.order-num-link {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-light);
  text-decoration: none;
}
.order-num-link:hover { color: var(--text-primary); }

/* ── PAGINATION ────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  margin-top: 40px;
}
.page-btn {
  min-width: 38px; height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  text-decoration: none;
  transition: all var(--transition);
}
.page-btn:hover, .page-btn.active {
  color: var(--text-primary);
  background: var(--accent-subtle);
  border-color: var(--accent-border);
}
.page-btn.active { color: var(--accent-light); }

/* ── BREADCRUMB ────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--text-muted);
  padding: 20px 0;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; transition: color var(--transition); }
.breadcrumb a:hover { color: var(--accent-light); }
.breadcrumb .sep { opacity: .4; }
.breadcrumb .current { color: var(--text-secondary); }

/* ── PAGE HEADER ───────────────────────────────────────── */
.page-banner {
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-deep) 100%);
  border-bottom: 1px solid var(--border);
  padding: 48px 0 40px;
}
.page-banner h1 {
  font-size: clamp(1.8rem, 3vw, 3rem);
  letter-spacing: .03em;
}
.page-banner p { color: var(--text-muted); margin-top: 8px; font-size: .95rem; }

/* ── EMPTY STATE ───────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 24px;
}
.empty-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: .35;
}
.empty-state h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
  color: var(--text-secondary);
}
.empty-state p {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 24px;
}

/* ── CHECKOUT ──────────────────────────────────────────── */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  padding: 48px 0;
  align-items: start;
}
.checkout-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  margin-bottom: 20px;
}
.checkout-section-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.checkout-section-num {
  width: 26px; height: 26px;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  color: var(--accent-light);
  font-weight: 700;
  flex-shrink: 0;
}

.payment-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.payment-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 12px;
  background: var(--bg-raised);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--transition);
  font-size: .8rem;
  color: var(--text-muted);
}
.payment-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-subtle);
  color: var(--text-primary);
}
.payment-option input { display: none; }
.payment-option-icon { font-size: 1.5rem; }

/* ── PROFILE ───────────────────────────────────────────── */
.profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}
.profile-avatar-wrap {
  position: relative;
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 3px solid var(--accent-border);
  overflow: hidden;
  background: var(--bg-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.profile-avatar-wrap img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-initials {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-light);
}
.profile-info h2 { font-size: 1.4rem; }
.profile-info p { color: var(--text-muted); font-size: .88rem; margin-top: 3px; }

/* ── 2FA SETUP ─────────────────────────────────────────── */
.twofa-box {
  max-width: 520px;
  margin: 0 auto;
}
.qr-wrap {
  background: #fff;
  border-radius: var(--r-md);
  padding: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 16px 0;
}
.qr-wrap img { width: 180px; height: 180px; display: block; }

.totp-code-grid {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.totp-digit {
  width: 50px; height: 58px;
  background: var(--bg-raised);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Rajdhani', sans-serif;
  outline: none;
  transition: border-color var(--transition);
}
.totp-digit:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(139,53,168,.15); }

/* ── FOOTER ─────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding-top: 60px;
}
.footer-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 48px;
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.2fr;
  gap: 40px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--text-primary);
  text-decoration: none;
  margin-bottom: 14px;
}
.footer-logo span { color: var(--accent-light); }
.footer-tagline {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}
.footer-social { display: flex; gap: 10px; }
.social-link {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: var(--bg-raised);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  transition: all var(--transition);
}
.social-link:hover {
  color: var(--accent-light);
  border-color: var(--accent-border);
  background: var(--accent-subtle);
}

.footer-col h4 {
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
  font-size: .87rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--accent-light); }

.footer-trust {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.trust-badge {
  font-size: .78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding: 20px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-bottom p {
  font-size: .78rem;
  color: var(--text-muted);
}

/* ── ALERTS / NOTICES ──────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--r-md);
  font-size: .9rem;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-info    { background: rgba(56,189,248,.1);  border: 1px solid rgba(56,189,248,.3);  color: #7dd3fc; }
.alert-success { background: rgba(34,197,94,.1);   border: 1px solid rgba(34,197,94,.3);   color: #86efac; }
.alert-warning { background: rgba(245,158,11,.1);  border: 1px solid rgba(245,158,11,.3);  color: #fcd34d; }
.alert-danger  { background: rgba(239,68,68,.1);   border: 1px solid rgba(239,68,68,.3);   color: #fca5a5; }

/* ── TABS ────────────────────────────────────────────────── */
.tab-strip {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  gap: 4px;
  margin-bottom: 28px;
}
.tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: 'Rajdhani', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .05em;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active { color: var(--accent-light); border-bottom-color: var(--accent); }

/* ── MISC ───────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border-light); margin: 24px 0; }
.text-center { text-align: center; }
.text-accent { color: var(--accent-light); }
.text-muted  { color: var(--text-muted); }
.mt-auto { margin-top: auto; }
.gap-8 { gap: 8px; }
.d-flex { display: flex; align-items: center; }

/* Related / Featured strip */
.related-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }


/* ── BUTTON SIZE UTILITIES ──────────────────────────────── */
.btn-sm {
  padding: 6px 14px !important;
  font-size: .82rem !important;
}

.btn-block {
  display: flex;
  width: 100%;
  justify-content: center;
}

/* ── FORM UTILITY ───────────────────────────────────────── */
.form-group + .form-row { margin-top: 0; }
/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .grid-4, .related-grid { grid-template-columns: repeat(3, 1fr); }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-container { grid-template-columns: 1fr 1fr; gap: 32px; }
  .products-layout { grid-template-columns: 220px 1fr; }
}

@media (max-width: 900px) {
  .product-detail-grid, .cart-layout, .checkout-layout { grid-template-columns: 1fr; gap: 24px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .product-gallery { position: static; }
  .dash-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats { gap: 24px; }
}

@media (max-width: 768px) {
  .nav-links, .nav-search-form { display: none; }
  .nav-actions { gap: 4px; }
  .hamburger { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    z-index: 999;
    gap: 4px;
  }
  .products-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .grid-4, .related-grid, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .auth-box { padding: 32px 24px; }
  .payment-options { grid-template-columns: 1fr; }
  .hero-stats { flex-wrap: wrap; gap: 20px; }
}

@media (max-width: 520px) {
  .grid-4, .related-grid, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-stats { grid-template-columns: 1fr; }
}

/* ── BROKEN / MISSING IMAGE FALLBACK ────────────────────── */
img.img-broken {
  display: block;
  background: var(--bg-raised);
  border: 1px dashed var(--border-light);
}

/* Ensure product image wrap always shows background when img missing */
.product-img-wrap img[src=""],
.car-chip-img[src=""] {
  visibility: hidden;
}

/* ── AUTH BOX MOBILE FIX ─────────────────────────────────── */
@media (max-width: 420px) {
  .auth-box { padding: 28px 18px; }
  .totp-code-grid { gap: 5px; }
  .totp-digit { width: 42px; height: 50px; font-size: 1.2rem; }
  .payment-options { grid-template-columns: 1fr 1fr; }
}
/* Auth form extras */
.forgot-wrap {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}
.forgot-link {
  font-size: .82rem;
  color: var(--accent-light);
}
.btn-block {
  width: 100%;
  padding: 13px;
  font-size: 1rem;
  justify-content: center;
}
