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

/* ─────────────── DESIGN TOKENS ─────────────── */
:root {
  --color-white: #ffffff;
  --color-gray-50:  #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
  --color-green:        #16a34a;
  --color-green-light:  #dcfce7;
  --color-red:          #dc2626;
  --color-red-light:    #fee2e2;
  --color-amber:        #d97706;
  --color-amber-light:  #fef3c7;
  --color-blue:         #2563eb;
  --color-blue-light:   #dbeafe;

  --bg:          var(--color-white);
  --bg-subtle:   var(--color-gray-50);
  --bg-muted:    var(--color-gray-100);
  --bg-strong:   var(--color-gray-200);
  --text-primary:   var(--color-gray-900);
  --text-secondary: var(--color-gray-700);
  --text-muted:     var(--color-gray-500);
  --text-disabled:  var(--color-gray-400);
  --border-default: var(--color-gray-200);
  --border-strong:  var(--color-gray-300);

  --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.04);
  --shadow-2xl:0 25px 50px -12px rgba(0,0,0,.18);

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --transition: .18s ease;
  --header-height: 60px;
  --bottom-nav-height: 58px;
}

/* Dark mode */
[data-theme="dark"] {
  --bg:          #0d1117;
  --bg-subtle:   #161b22;
  --bg-muted:    #21262d;
  --bg-strong:   #30363d;
  --text-primary:   #e6edf3;
  --text-secondary: #c9d1d9;
  --text-muted:     #8b949e;
  --text-disabled:  #6e7681;
  --border-default: #30363d;
  --border-strong:  #3d444d;
  --shadow-xs: 0 1px 2px rgba(0,0,0,.3);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
  --shadow-md: 0 4px 6px rgba(0,0,0,.3);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.35);
  --shadow-xl: 0 20px 25px rgba(0,0,0,.4);
  --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,.25);
  --color-green-light: rgba(22, 163, 74, 0.15);
  --color-red-light: rgba(220, 38, 38, 0.15);
  --color-amber-light: rgba(217, 119, 6, 0.15);
  --color-blue-light: rgba(37, 99, 235, 0.15);
}

/* ─────────────── RESET & BASE FIX ─────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { 
  scroll-behavior: smooth; 
  -webkit-tap-highlight-color: transparent; 
  text-size-adjust: 100%;
  height: 100%;
}
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px; 
  line-height: 1.6; 
  color: var(--text-primary); 
  background: var(--bg);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow-x: hidden; 
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text-primary); text-decoration: none; transition: color var(--transition); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; outline: none; }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }

/* ─────────────── LAYOUT ─────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px)  { .container { padding: 0 20px; } }
@media (min-width: 1024px) { .container { padding: 0 28px; } }

/* ─────────────── MAIN CONTENT FIX ─────────────── */
.site-main { 
  flex: 1 0 auto;
  width: 100%;
}

/* ─────────────── TYPOGRAPHY ─────────────── */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; color: var(--text-primary); }
h1 { font-size: clamp(1.4rem, 5vw, 2.2rem); }
h2 { font-size: clamp(1.15rem, 3.5vw, 1.7rem); }
h3 { font-size: clamp(1rem, 2.5vw, 1.25rem); }
.text-sm    { font-size: .875rem; }
.text-xs    { font-size: .75rem; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--color-green); }
.text-danger  { color: var(--color-red); }
.hidden { display: none !important; }
@media (max-width: 639px)  { .hide-on-mobile  { display: none !important; } }
@media (min-width: 640px)  { .hide-on-desktop { display: none !important; } }

/* ─────────────── HEADER FIXED ─────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: var(--header-height);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid var(--border-default);
  transition: transform .3s, box-shadow .3s;
  will-change: transform;
}
[data-theme="dark"] .site-header { background: rgba(13,17,23,.92); }
.site-header.is-hidden { transform: translateY(-100%); }

.header-inner { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  height: 100%;
}

.site-logo { 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  flex-shrink: 0;
  text-decoration: none;
}
.site-logo__icon {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  background: var(--color-gray-900);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: .7rem;
  flex-shrink: 0;
}
[data-theme="dark"] .site-logo__icon { 
  background: var(--color-white); 
  color: var(--color-gray-900); 
}
.site-logo img {
  height: 30px !important;
  width: auto !important;
  max-height: 30px !important;
  max-width: 120px !important;
  object-fit: contain;
  display: block;
}
.site-logo__name { 
  font-size: 0.95rem; 
  font-weight: 700; 
  letter-spacing: -.02em; 
  white-space: nowrap;
}
@media (max-width: 480px) {
  .site-logo__name {
    display: none;
  }
}

.main-nav { display: none; }
@media (min-width: 768px) {
  .main-nav { display: flex; }
  .main-nav__list { display: flex; gap: 4px; }
  .main-nav__link {
    display: flex; align-items: center; gap: 6px; padding: 6px 12px;
    border-radius: var(--radius-sm); font-size: .85rem; font-weight: 600;
    color: var(--text-muted); transition: all var(--transition);
  }
  .main-nav__link:hover, .main-nav__link.is-active { 
    color: var(--text-primary); 
    background: var(--bg-muted); 
  }
}

.header-search { 
  flex: 1; 
  max-width: 260px;
}
.header-search__form { position: relative; }
.header-search__icon { 
  position: absolute; left: 12px; top: 50%; 
  transform: translateY(-50%); 
  color: var(--text-disabled); 
  font-size: .75rem; 
}
.header-search__input {
  width: 100%; padding: 7px 12px 7px 34px;
  border: 1.5px solid var(--border-default); 
  border-radius: var(--radius-full);
  background: var(--bg-muted); 
  color: var(--text-primary); 
  font-size: .8rem;
  transition: all var(--transition);
}
.header-search__input:focus { 
  border-color: var(--color-gray-400); 
  background: var(--bg); 
  box-shadow: 0 0 0 3px rgba(0,0,0,.06); 
}

.header-actions { 
  display: flex; 
  align-items: center; 
  gap: 4px; 
  margin-left: auto;
  flex-shrink: 0;
}
.header-icon-btn {
  position: relative;
  width: 36px; 
  height: 36px; 
  border-radius: var(--radius-sm);
  color: var(--text-muted); 
  font-size: .9rem;
  transition: all var(--transition);
  cursor: pointer;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.header-icon-btn:hover { 
  background: var(--bg-muted); 
  color: var(--text-primary); 
}
.header-badge {
  position: absolute; 
  top: -2px; 
  right: -2px; 
  min-width: 16px; 
  height: 16px;
  padding: 0 4px; 
  background: var(--color-gray-900); 
  color: #fff;
  font-size: .55rem; 
  font-weight: 800; 
  border-radius: var(--radius-full);
  display: flex; 
  align-items: center; 
  justify-content: center; 
  border: 1.5px solid var(--bg);
  line-height: 1;
}
[data-theme="dark"] .header-badge { 
  background: var(--color-white); 
  color: var(--color-gray-900); 
}

.user-menu { position: relative; }
.user-menu__btn {
  display: flex; 
  align-items: center; 
  gap: 6px; 
  padding: 4px 10px;
  border-radius: var(--radius-full); 
  color: var(--text-secondary); 
  font-size: .8rem; 
  font-weight: 600;
  border: 1.5px solid var(--border-default); 
  transition: all var(--transition); 
  background: transparent;
  cursor: pointer;
}
.user-menu__btn:hover { 
  border-color: var(--border-strong); 
  background: var(--bg-subtle); 
}
.user-avatar {
  width: 26px; 
  height: 26px; 
  border-radius: 50%;
  background: var(--color-gray-900); 
  color: #fff;
  display: flex; 
  align-items: center; 
  justify-content: center;
  font-size: .7rem; 
  font-weight: 800; 
  flex-shrink: 0;
}
[data-theme="dark"] .user-avatar { 
  background: var(--color-white); 
  color: var(--color-gray-900); 
}
.user-menu__dropdown {
  position: absolute; 
  top: calc(100% + 7px); 
  right: 0; 
  min-width: 210px;
  background: var(--bg); 
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); 
  box-shadow: var(--shadow-2xl);
  padding: 5px; 
  display: none; 
  z-index: 200;
  animation: dropdown-appear .15s ease;
}
@keyframes dropdown-appear { 
  from { opacity: 0; transform: translateY(-5px) scale(.97); } 
  to { opacity: 1; transform: none; } 
}
.user-menu:hover .user-menu__dropdown,
.user-menu:focus-within .user-menu__dropdown { display: block; }
.user-menu__item {
  display: flex; 
  align-items: center; 
  gap: 10px; 
  padding: 8px 12px;
  border-radius: var(--radius-sm); 
  color: var(--text-secondary); 
  font-size: .8rem; 
  font-weight: 500;
  transition: background var(--transition);
  text-decoration: none;
}
.user-menu__item:hover { 
  background: var(--bg-muted); 
  color: var(--text-primary); 
}
.user-menu__wallet { 
  padding: 8px 12px; 
  font-size: .72rem; 
  color: var(--text-muted); 
  border-bottom: 1px solid var(--border-default); 
  margin-bottom: 3px; 
}
.user-menu__wallet strong { 
  color: var(--color-green); 
  font-size: .85rem; 
}
.user-menu__divider { 
  border-top: 1px solid var(--border-default); 
  margin: 5px 0; 
}

.hamburger-btn {
  display: flex; 
  flex-direction: column; 
  gap: 4px;
  width: 36px; 
  height: 36px; 
  align-items: center; 
  justify-content: center;
  padding: 8px; 
  border-radius: var(--radius-sm); 
  transition: background var(--transition);
  cursor: pointer;
}
.hamburger-btn__line { 
  display: block; 
  width: 18px; 
  height: 1.5px; 
  background: var(--text-secondary); 
  border-radius: 1px; 
  transition: .25s; 
}
.hamburger-btn:hover { background: var(--bg-muted); }
.hamburger-btn.is-open .hamburger-btn__line:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.hamburger-btn.is-open .hamburger-btn__line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger-btn.is-open .hamburger-btn__line:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
@media (min-width: 768px) { 
  .hamburger-btn { display: none; } 
}

.btn--sm {
  padding: 6px 14px;
  font-size: .75rem;
  min-height: 32px;
  border-radius: var(--radius-full);
}

/* Body padding for fixed header */
body {
  padding-top: var(--header-height);
}

/* Bottom nav padding only on mobile */
@media (max-width: 767px) {
  body {
    padding-bottom: var(--bottom-nav-height);
  }
}
@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

/* ─────────────── MOBILE NAV ─────────────── */
.mobile-nav-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 1000; backdrop-filter: blur(2px);
}
.mobile-nav-overlay.is-open { display: block; }
.mobile-nav {
  position: fixed; top: 0; left: -100%; bottom: 0; width: min(270px, 85vw);
  background: var(--bg); z-index: 1001; box-shadow: var(--shadow-2xl);
  transition: left .3s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column; overflow-y: auto;
}
.mobile-nav.is-open { left: 0; }
.mobile-nav__header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border-default); }
.mobile-nav__close { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; background: var(--bg-muted); border-radius: var(--radius-sm); color: var(--text-primary); font-size: .85rem; cursor: pointer; }
.mobile-nav__user { padding: 13px 16px; background: var(--bg-subtle); border-bottom: 1px solid var(--border-default); display: flex; align-items: center; gap: 11px; }
.mobile-nav__list { padding: 5px 0; flex: 1; }
.mobile-nav__link { display: flex; align-items: center; gap: 10px; padding: 11px 16px; color: var(--text-secondary); font-size: .9rem; font-weight: 500; border-left: 2px solid transparent; transition: all var(--transition); }
.mobile-nav__link:hover { background: var(--bg-subtle); color: var(--text-primary); border-left-color: var(--border-strong); }
.mobile-nav__link i { width: 16px; text-align: center; color: var(--text-disabled); font-size: .82rem; }
.mobile-nav__divider { border-top: 1px solid var(--border-default); margin: 4px 0; }

/* ─────────────── BOTTOM NAV ─────────────── */
.bottom-nav {
  display: flex; position: fixed; bottom: 0; left: 0; right: 0; height: var(--bottom-nav-height);
  background: rgba(255,255,255,.95); backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-default); z-index: 800;
  box-shadow: 0 -1px 6px rgba(0,0,0,.05);
}
[data-theme="dark"] .bottom-nav { background: rgba(13,17,23,.95); }
@media (min-width: 768px) { .bottom-nav { display: none; } }
.bottom-nav__item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--text-disabled); font-size: .58rem; font-weight: 600;
  position: relative; transition: color var(--transition); border: none; background: transparent; cursor: pointer; padding: 6px 0;
}
.bottom-nav__item i { font-size: 1.05rem; transition: transform .18s; }
.bottom-nav__item.is-active { color: var(--text-primary); }
.bottom-nav__item.is-active i { transform: scale(1.1); }
.bottom-nav__badge {
  position: absolute; top: 5px; right: calc(50% - 15px);
  background: var(--color-red); color: #fff; font-size: .52rem; font-weight: 800;
  min-width: 15px; height: 15px; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center; padding: 0 3px; border: 1.5px solid var(--bg);
}

/* Cart FAB */
.cart-fab {
  display: none; position: fixed; bottom: 68px; right: 14px; z-index: 700;
  width: 48px; height: 48px; border-radius: var(--radius-full);
  background: var(--color-gray-900); color: #fff; box-shadow: var(--shadow-lg);
  align-items: center; justify-content: center; font-size: 1.05rem; transition: transform .18s;
}
.cart-fab:active { transform: scale(.93); }
.cart-fab__badge { position: absolute; top: -3px; right: -3px; background: var(--color-red); color: #fff; border-radius: var(--radius-full); min-width: 18px; height: 18px; font-size: .58rem; font-weight: 800; display: flex; align-items: center; justify-content: center; padding: 0 3px; border: 1.5px solid var(--bg); }
[data-theme="dark"] .cart-fab { background: var(--color-white); color: var(--color-gray-900); }
@media (max-width: 767px) { .cart-fab { display: flex; } }

/* Cart Drawer */
.cart-drawer-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1100; backdrop-filter: blur(2px); }
.cart-drawer-overlay.is-open { display: block; }
.cart-drawer {
  position: fixed; top: 0; right: -105%; bottom: 0; width: min(400px, 100vw);
  background: var(--bg); z-index: 1101; box-shadow: var(--shadow-2xl);
  transition: right .3s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column;
}
.cart-drawer.is-open { right: 0; }
.cart-drawer__header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border-default); flex-shrink: 0; }
.cart-drawer__body { flex: 1; overflow-y: auto; padding: 14px 18px; -webkit-overflow-scrolling: touch; }
.cart-drawer__footer { padding: 14px 18px; border-top: 1px solid var(--border-default); flex-shrink: 0; background: var(--bg); }

/* Scroll to top */
.scroll-to-top { position: fixed; bottom: 72px; right: 14px; width: 34px; height: 34px; background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); display: none; align-items: center; justify-content: center; color: var(--text-muted); font-size: .78rem; cursor: pointer; z-index: 600; box-shadow: var(--shadow-sm); transition: all var(--transition); }
.scroll-to-top.is-visible { display: flex; }
.scroll-to-top:hover { background: var(--bg-muted); color: var(--text-primary); }
@media (max-width: 767px) { .scroll-to-top { bottom: 130px; } }

/* ─────────────── TOAST ─────────────── */
#toast-container { position: fixed; top: calc(var(--header-height) + 10px); right: 14px; z-index: 9999; display: flex; flex-direction: column; gap: 7px; pointer-events: none; max-width: 320px; width: calc(100vw - 28px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 15px; border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); font-size: .84rem; font-weight: 600; animation: toast-slide-in .35s cubic-bezier(.34,1.56,.64,1); pointer-events: all; cursor: pointer; position: relative; overflow: hidden; }
@keyframes toast-slide-in { from { opacity: 0; transform: translateX(110%) scale(.85); } to { opacity: 1; transform: none; } }
.toast__progress { position: absolute; bottom: 0; left: 0; height: 2px; background: rgba(255,255,255,.3); animation: toast-progress var(--duration, 3.5s) linear forwards; }
@keyframes toast-progress { from { width: 100%; } to { width: 0; } }
.toast--success { background: #15803d; color: #fff; }
.toast--danger   { background: #dc2626; color: #fff; }
.toast--warning  { background: #d97706; color: #fff; }
.toast--info     { background: #1e293b; color: #fff; }

/* ─────────────── BUTTONS ─────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px; border-radius: var(--radius-sm); font-size: .875rem; font-weight: 700;
  cursor: pointer; transition: all var(--transition); white-space: nowrap; min-height: 44px;
  border: none; position: relative; overflow: hidden; letter-spacing: .005em;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }
.btn--primary { background: var(--color-gray-900); color: #fff; }
.btn--primary:hover { background: var(--color-gray-800); transform: translateY(-1px); box-shadow: var(--shadow-lg); color: #fff; }
.btn--primary:active { transform: translateY(0) scale(0.97); }
[data-theme="dark"] .btn--primary { background: var(--color-white); color: var(--color-gray-900); }
[data-theme="dark"] .btn--primary:hover { background: var(--color-gray-100); }
.btn--secondary { background: var(--bg-muted); color: var(--text-secondary); border: 1.5px solid var(--border-default); }
.btn--secondary:hover { background: var(--bg-strong); color: var(--text-primary); }
.btn--outline { background: transparent; border: 1.5px solid var(--border-strong); color: var(--text-secondary); }
.btn--outline:hover { border-color: var(--color-gray-500); color: var(--text-primary); }
.btn--success { background: var(--color-green); color: #fff; }
.btn--success:hover { background: #15803d; transform: translateY(-1px); color: #fff; }
.btn--danger { background: var(--color-red); color: #fff; }
.btn--danger:hover { background: #b91c1c; color: #fff; }
.btn--lg  { padding: 13px 26px; font-size: .95rem; min-height: 50px; }
.btn--full { width: 100%; }
.btn--icon { width: 38px; height: 38px; padding: 0; border-radius: var(--radius-sm); }

/* ─────────────── FORMS ─────────────── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: .78rem; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.form-control {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border-default);
  border-radius: var(--radius-sm); background: var(--bg); color: var(--text-primary);
  font-size: .9rem; transition: all var(--transition); min-height: 44px;
}
.form-control:focus { border-color: var(--color-gray-400); box-shadow: 0 0 0 3px rgba(0,0,0,.07); }
.form-control.has-error { border-color: var(--color-red); }
textarea.form-control { min-height: 96px; resize: vertical; }
select.form-control { cursor: pointer; }
.form-hint { font-size: .72rem; color: var(--text-disabled); margin-top: 4px; }

/* ─────────────── CARD ─────────────── */
.card { background: var(--bg); border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-xs); transition: box-shadow var(--transition); }
.card__header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 13px; margin-bottom: 13px; border-bottom: 1px solid var(--border-default); gap: 10px; }
.card__title { font-size: .95rem; font-weight: 700; display: flex; align-items: center; gap: 7px; }

/* ─────────────── ALERTS ─────────────── */
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: var(--radius-sm); font-size: .875rem; margin-bottom: 12px; border-left: 3px solid; }
.alert--success { background: var(--color-green-light); color: #166534; border-color: var(--color-green); }
.alert--danger  { background: var(--color-red-light);   color: #991b1b;  border-color: var(--color-red);   }
.alert--warning { background: var(--color-amber-light); color: #92400e;  border-color: var(--color-amber); }
.alert--info    { background: var(--color-blue-light);  color: #1e40af;  border-color: var(--color-blue);  }
[data-theme="dark"] .alert--success { background: rgba(22,163,74,.1);  color: #86efac; }
[data-theme="dark"] .alert--danger  { background: rgba(220,38,38,.1);  color: #fca5a5; }
[data-theme="dark"] .alert--warning { background: rgba(217,119,6,.1);  color: #fcd34d; }
[data-theme="dark"] .alert--info    { background: rgba(37,99,235,.1);  color: #93c5fd; }

/* ─────────────── BADGE ─────────────── */
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: var(--radius-full); font-size: .68rem; font-weight: 700; }
.badge--primary   { background: var(--color-gray-900); color: #fff; }
.badge--success   { background: var(--color-green-light); color: #166534; }
.badge--danger    { background: var(--color-red-light);   color: #991b1b; }
.badge--warning   { background: var(--color-amber-light); color: #92400e; }
.badge--info      { background: var(--color-blue-light);  color: #1e40af; }
.badge--secondary { background: var(--bg-muted); color: var(--text-muted); border: 1px solid var(--border-default); }

/* ─────────────── MODAL ─────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(4px); animation: fade-in .18s ease; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--bg); border-radius: var(--radius-xl); width: 100%; max-width: 460px; box-shadow: var(--shadow-2xl); animation: modal-appear .25s cubic-bezier(.34,1.56,.64,1); max-height: 90vh; overflow-y: auto; border: 1px solid var(--border-default); }
@keyframes modal-appear { from { opacity: 0; transform: scale(.9) translateY(14px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .modal-overlay { align-items: flex-end; padding: 0; } .modal { border-radius: var(--radius-xl) var(--radius-xl) 0 0; max-height: 88vh; } }
.modal__header { display: flex; align-items: center; justify-content: space-between; padding: 17px 19px 13px; border-bottom: 1px solid var(--border-default); }
.modal__header h3 { font-size: .95rem; font-weight: 700; }
.modal__close { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; background: var(--bg-muted); border-radius: var(--radius-xs); color: var(--text-muted); font-size: .82rem; cursor: pointer; transition: all var(--transition); }
.modal__close:hover { background: var(--color-red-light); color: var(--color-red); }
.modal__body { padding: 17px 19px; }
.modal__footer { display: flex; gap: 8px; justify-content: flex-end; padding: 13px 19px; border-top: 1px solid var(--border-default); }

/* ─────────────── HERO ─────────────── */
.hero { position: relative; overflow: hidden; background: var(--color-gray-900); color: #fff; min-height: 380px; display: flex; align-items: center; }
@media (min-width: 768px) { .hero { min-height: 460px; } }
.hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity .65s ease; display: flex; align-items: center; pointer-events: none; }
.hero__slide.is-active { opacity: 1; position: relative; pointer-events: auto; }
.hero__bg-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(0,0,0,.75) 0%, rgba(0,0,0,.4) 100%); }
.hero__content { position: relative; z-index: 1; padding: 44px 0 64px; width: 100%; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); padding: 5px 13px; border-radius: var(--radius-full); font-size: .75rem; font-weight: 600; margin-bottom: 14px; color: rgba(255,255,255,.88); }
.hero h1 { font-size: clamp(1.7rem, 5.5vw, 3.2rem); font-weight: 700; line-height: 1.1; margin-bottom: 12px; color: #fff; letter-spacing: -.02em; }
.hero p  { font-size: clamp(.9rem, 2.5vw, 1.08rem); opacity: .75; margin-bottom: 24px; max-width: 480px; line-height: 1.65; }
.hero__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-btn--primary { padding: 12px 24px; background: #fff; color: var(--color-gray-900); font-weight: 700; border-radius: var(--radius-sm); font-size: .9rem; transition: all .22s; min-height: 46px; display: inline-flex; align-items: center; gap: 7px; }
.hero-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,255,255,.22); color: var(--color-gray-900); }
.hero-btn--secondary { padding: 12px 24px; background: rgba(255,255,255,.1); color: #fff; border: 1.5px solid rgba(255,255,255,.28); font-weight: 600; border-radius: var(--radius-sm); font-size: .9rem; transition: all .22s; min-height: 46px; display: inline-flex; align-items: center; gap: 7px; }
.hero-btn--secondary:hover { background: rgba(255,255,255,.18); color: #fff; }
.slider-dots { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 2; }
.slider-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.4); cursor: pointer; transition: all .3s; }
.slider-dot.is-active { background: #fff; width: 20px; border-radius: 3px; }
.slider-arrows { position: absolute; top: 50%; transform: translateY(-50%); width: 100%; display: flex; justify-content: space-between; padding: 0 12px; z-index: 2; pointer-events: none; }
.slider-arrow { width: 36px; height: 36px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; color: #fff; cursor: pointer; transition: background .2s; font-size: .8rem; pointer-events: auto; }
.slider-arrow:hover { background: rgba(255,255,255,.22); }
.hero__wave { position: absolute; bottom: -1px; left: 0; right: 0; line-height: 0; pointer-events: none; }
.hero-static { background: var(--bg-subtle); border-bottom: 1px solid var(--border-default); padding: 36px 0 44px; text-align: center; }

/* ─────────────── SECTION ─────────────── */
.section { padding: 36px 0; }
@media (min-width: 768px) { .section { padding: 52px 0; } }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 10px; flex-wrap: wrap; }
.section-title { font-size: 1.15rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ''; display: block; width: 3px; height: 20px; background: var(--color-gray-900); border-radius: 1.5px; flex-shrink: 0; }
[data-theme="dark"] .section-title::before { background: var(--color-white); }
.page-hero { background: var(--bg-subtle); border-bottom: 1px solid var(--border-default); padding: 20px 0; margin-bottom: 22px; }
.page-hero h1 { font-size: clamp(1.2rem, 3vw, 1.6rem); display: flex; align-items: center; gap: 8px; }

/* ─────────────── PRODUCT GRID ─────────────── */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 540px)  { .product-grid { gap: 13px; } }
@media (min-width: 768px)  { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } }

/* ─────────────── PRODUCT CARD ─────────────── */
.product-card { background: var(--bg); border: 1px solid var(--border-default); border-radius: var(--radius-lg); overflow: hidden; transition: box-shadow .22s, transform .22s; position: relative; -webkit-tap-highlight-color: transparent; }
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.product-card__image-wrap { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--bg-muted); }
.product-card__image { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .product-card__image { transform: scale(1.05); }
.product-card__badges { position: absolute; top: 8px; left: 8px; display: flex; flex-direction: column; gap: 3px; z-index: 1; }
.product-badge { padding: 2px 8px; border-radius: var(--radius-full); font-size: .58rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.product-badge--sale    { background: var(--color-gray-900); color: #fff; }
.product-badge--new     { background: var(--color-green); color: #fff; }
.product-badge--hot     { background: var(--color-amber); color: #fff; }
.product-badge--out     { background: var(--color-gray-300); color: var(--color-gray-600); }
[data-theme="dark"] .product-badge--sale { background: var(--color-white); color: var(--color-gray-900); }
.product-card__wish-btn { 
  position: absolute; top: 8px; right: 8px; z-index: 1; width: 30px; height: 30px; 
  border-radius: 50%; background: rgba(255,255,255,.92); border: 1px solid var(--border-default); 
  color: var(--text-disabled); display: flex; align-items: center; justify-content: center; 
  cursor: pointer; transition: all var(--transition); font-size: .78rem; opacity: 0;
  transform: scale(0.75);
}
.product-card:hover .product-card__wish-btn { opacity: 1; transform: scale(1); }
.product-card__wish-btn.is-active, .product-card__wish-btn:hover { background: var(--color-red-light); color: var(--color-red); border-color: #fca5a5; }
.product-card__quick-add { position: absolute; bottom: 0; left: 0; right: 0; padding: 8px; background: linear-gradient(to top, rgba(0,0,0,.58), transparent); opacity: 0; transform: translateY(5px); transition: all .22s; }
.product-card:hover .product-card__quick-add { opacity: 1; transform: none; }
.product-card__body { padding: 11px 12px 13px; }
.product-card__category { font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-disabled); margin-bottom: 4px; }
.product-card__name { font-size: .875rem; font-weight: 600; color: var(--text-primary); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 6px; }
.product-card__rating { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.star-icons { color: var(--color-amber); font-size: .68rem; letter-spacing: 1px; }
.review-count { font-size: .7rem; color: var(--text-disabled); }
.product-card__price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-bottom: 9px; }
.price-current  { font-size: .975rem; font-weight: 700; color: var(--text-primary); }
.price-original { font-size: .78rem; color: var(--text-disabled); text-decoration: line-through; }
.price-discount { font-size: .6rem; font-weight: 700; background: var(--color-green-light); color: var(--color-green); padding: 2px 6px; border-radius: var(--radius-full); }
.btn-add-to-cart { width: 100%; padding: 9px; border-radius: var(--radius-sm); background: var(--color-gray-900); color: #fff; border: none; font-size: .8rem; font-weight: 700; cursor: pointer; transition: all var(--transition); min-height: 40px; -webkit-tap-highlight-color: transparent; }
.btn-add-to-cart:hover { background: var(--color-gray-800); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-add-to-cart:active { transform: scale(0.98); }
.btn-add-to-cart:disabled { background: var(--bg-strong); color: var(--text-disabled); cursor: not-allowed; transform: none; box-shadow: none; }
[data-theme="dark"] .btn-add-to-cart { background: var(--color-white); color: var(--color-gray-900); }

/* Size selector */
.size-selector { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.size-btn { min-width: 44px; height: 44px; border: 1.5px solid var(--border-default); border-radius: var(--radius-sm); background: var(--bg); color: var(--text-secondary); font-size: .82rem; font-weight: 700; cursor: pointer; transition: all var(--transition); display: flex; align-items: center; justify-content: center; }
.size-btn:hover { border-color: var(--border-strong); color: var(--text-primary); }
.size-btn.is-selected { background: var(--color-gray-900); border-color: var(--color-gray-900); color: #fff; }
.size-btn.is-unavailable { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
[data-theme="dark"] .size-btn.is-selected { background: var(--color-white); border-color: var(--color-white); color: var(--color-gray-900); }

/* ─────────────── SKELETON ─────────────── */
.skeleton { background: linear-gradient(90deg, var(--bg-muted) 25%, var(--bg-strong) 50%, var(--bg-muted) 75%); background-size: 200% 100%; animation: skeleton-shimmer 1.4s ease-in-out infinite; border-radius: var(--radius-sm); }
@keyframes skeleton-shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* ─────────────── FILTERS ─────────────── */
.filters-panel { background: var(--bg); border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: 15px; box-shadow: var(--shadow-xs); }
.filter-label { font-size: .65rem; font-weight: 700; color: var(--text-disabled); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 6px; display: block; }
.filter-chip { padding: 5px 11px; border-radius: var(--radius-full); border: 1px solid var(--border-strong); background: var(--bg); color: var(--text-muted); font-size: .76rem; font-weight: 600; cursor: pointer; transition: all var(--transition); display: inline-flex; align-items: center; gap: 4px; -webkit-tap-highlight-color: transparent; }
.filter-chip:hover, .filter-chip.is-active { border-color: var(--color-gray-700); background: var(--color-gray-900); color: #fff; }
[data-theme="dark"] .filter-chip:hover, [data-theme="dark"] .filter-chip.is-active { background: var(--color-white); border-color: var(--color-white); color: var(--color-gray-900); }
.range-slider { width: 100%; -webkit-appearance: none; height: 4px; background: var(--bg-strong); border-radius: 2px; outline: none; cursor: pointer; }
.range-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--color-gray-900); cursor: pointer; box-shadow: var(--shadow-sm); border: 2px solid var(--bg); }
[data-theme="dark"] .range-slider::-webkit-slider-thumb { background: var(--color-white); }

.filters-group { display: flex; flex-direction: column; gap: 16px; }
.filter-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.range-inputs { display: flex; gap: 8px; margin-top: 8px; }
.range-input { flex: 1; padding: 8px 10px; border: 1px solid var(--border-default); border-radius: var(--radius-sm); background: var(--bg); color: var(--text-primary); font-size: .8rem; }

/* ─────────────── PAGINATION ─────────────── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap; margin-top: 24px; }
.pagination__btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border-default); border-radius: var(--radius-sm); background: var(--bg); color: var(--text-muted); font-size: .84rem; font-weight: 600; cursor: pointer; transition: all var(--transition); text-decoration: none; }
.pagination__btn:hover { border-color: var(--border-strong); color: var(--text-primary); }
.pagination__btn.is-active { background: var(--color-gray-900); border-color: var(--color-gray-900); color: #fff; }
[data-theme="dark"] .pagination__btn.is-active { background: var(--color-white); border-color: var(--color-white); color: var(--color-gray-900); }

/* ─────────────── CART ─────────────── */
.cart-layout { display: grid; gap: 18px; }
@media (min-width: 768px) { .cart-layout { grid-template-columns: 1fr 320px; } }
.cart-item { display: flex; gap: 12px; padding: 13px; background: var(--bg); border: 1px solid var(--border-default); border-radius: var(--radius-lg); align-items: center; transition: box-shadow var(--transition); }
.cart-item:hover { box-shadow: var(--shadow-sm); }
.cart-item__image { width: 68px; height: 68px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; background: var(--bg-muted); }
.cart-item__info { flex: 1; min-width: 0; }
.cart-item__name  { font-weight: 600; font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
.cart-item__price { font-size: .84rem; font-weight: 700; }
.cart-item__variant { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }
.qty-control { display: flex; align-items: center; gap: 6px; margin-top: 7px; }
.qty-btn { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-xs); background: var(--bg-muted); border: 1px solid var(--border-default); color: var(--text-secondary); cursor: pointer; font-size: .78rem; transition: all var(--transition); }
.qty-btn:hover { background: var(--bg-strong); }
.qty-value { min-width: 28px; text-align: center; font-weight: 700; font-size: .9rem; }
.cart-item__delete { color: var(--text-disabled); font-size: .85rem; cursor: pointer; padding: 4px; transition: color var(--transition); margin-left: auto; flex-shrink: 0; }
.cart-item__delete:hover { color: var(--color-red); }
.cart-summary { background: var(--bg); border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: 16px; height: fit-content; position: sticky; top: calc(var(--header-height) + 14px); box-shadow: var(--shadow-xs); }
.cart-summary__row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border-default); font-size: .875rem; color: var(--text-secondary); }
.cart-summary__row--total    { border: none; padding-top: 11px; font-weight: 700; font-size: 1.05rem; color: var(--text-primary); }
.cart-summary__row--discount { color: var(--color-green); }
.coupon-row { display: flex; gap: 7px; margin-bottom: 12px; }
.coupon-row .form-control { flex: 1; }

/* ─────────────── CHECKOUT ─────────────── */
.checkout-steps { display: flex; gap: 3px; background: var(--bg-muted); border-radius: var(--radius-lg); padding: 3px; margin-bottom: 20px; }
.checkout-step { flex: 1; padding: 8px 6px; text-align: center; font-size: .7rem; font-weight: 700; color: var(--text-disabled); border-radius: var(--radius-sm); transition: all var(--transition); }
.checkout-step.is-active { background: var(--bg); color: var(--text-primary); box-shadow: var(--shadow-xs); }
.checkout-step.is-done   { color: var(--color-green); }
.checkout-layout { display: grid; gap: 18px; }
@media (min-width: 768px) { .checkout-layout { grid-template-columns: 1fr 340px; align-items: start; } }
.payment-card { background: var(--color-gray-900); color: #fff; border-radius: var(--radius-lg); padding: 17px; margin: 13px 0; position: relative; overflow: hidden; }
[data-theme="dark"] .payment-card { background: var(--bg-muted); border: 1px solid var(--border-strong); }
.payment-card::before { content: ''; position: absolute; top: -30px; right: -30px; width: 110px; height: 110px; background: rgba(255,255,255,.04); border-radius: 50%; }
.card-number-display { font-family: ui-monospace, monospace; font-size: 1.05rem; font-weight: 700; letter-spacing: 2px; background: rgba(255,255,255,.1); padding: 10px 13px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: space-between; cursor: pointer; transition: background .18s; margin: 9px 0; border: 1px solid rgba(255,255,255,.1); }
.card-number-display:hover { background: rgba(255,255,255,.18); }
.upload-area { border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); padding: 22px 16px; text-align: center; cursor: pointer; transition: all .22s; background: var(--bg-muted); }
.upload-area:hover, .upload-area.is-dragover { border-color: var(--color-gray-500); background: var(--bg-strong); }
.upload-area.is-uploaded { border-color: var(--color-green); background: var(--color-green-light); }
.upload-area i { font-size: 2rem; color: var(--text-disabled); margin-bottom: 7px; display: block; transition: color .22s; }
.upload-area:hover i { color: var(--text-muted); }
.upload-area.is-uploaded i { color: var(--color-green); }
.balance-toggle { display: flex; align-items: center; justify-content: space-between; padding: 11px 13px; background: var(--color-green-light); border: 1px solid #86efac; border-radius: var(--radius-sm); margin-bottom: 11px; }
[data-theme="dark"] .balance-toggle { background: rgba(22,163,74,.1); border-color: rgba(22,163,74,.22); }
.toggle-switch { width: 40px; height: 22px; background: var(--color-gray-300); border-radius: var(--radius-full); position: relative; cursor: pointer; transition: background .18s; border: none; flex-shrink: 0; }
.toggle-switch.is-on { background: var(--color-green); }
.toggle-switch::after { content: ''; width: 16px; height: 16px; background: #fff; border-radius: 50%; position: absolute; top: 3px; left: 3px; transition: transform .18s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle-switch.is-on::after { transform: translateX(18px); }
.region-select-wrap { position: relative; }
.region-price-hint { font-size: .75rem; color: var(--color-green); font-weight: 600; margin-top: 4px; }

/* ─────────────── PROFILE ─────────────── */
.profile-layout { display: grid; gap: 18px; }
@media (min-width: 768px) { .profile-layout { grid-template-columns: 230px 1fr; align-items: start; } }
.profile-sidebar { background: var(--bg); border: 1px solid var(--border-default); border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-xs); position: sticky; top: calc(var(--header-height) + 14px); }
.profile-sidebar__top { padding: 20px; text-align: center; background: var(--color-gray-900); color: #fff; }
[data-theme="dark"] .profile-sidebar__top { background: var(--bg-muted); }
.profile-avatar { width: 62px; height: 62px; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700; margin: 0 auto 9px; border: 2px solid rgba(255,255,255,.25); }
.profile-nav__link { display: flex; align-items: center; gap: 9px; padding: 11px 15px; color: var(--text-secondary); font-size: .875rem; font-weight: 500; border-left: 2px solid transparent; transition: all var(--transition); }
.profile-nav__link:hover { background: var(--bg-subtle); color: var(--text-primary); border-left-color: var(--border-strong); }
.profile-nav__link.is-active { background: var(--bg-subtle); color: var(--text-primary); border-left-color: var(--color-gray-900); font-weight: 700; }
[data-theme="dark"] .profile-nav__link.is-active { border-left-color: var(--color-white); }
.profile-nav__link i { width: 16px; text-align: center; color: var(--text-disabled); font-size: .82rem; }

/* ─────────────── TRACKER ─────────────── */
.order-tracker { display: flex; overflow-x: auto; padding-bottom: 3px; margin-top: 13px; -webkit-overflow-scrolling: touch; }
.tracker-step { flex: 1; min-width: 60px; text-align: center; position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.tracker-step::before { content: ''; position: absolute; top: 14px; left: 50%; right: -50%; height: 1.5px; background: var(--border-strong); z-index: 0; }
.tracker-step:last-child::before { display: none; }
.tracker-step.is-done::before { background: var(--color-gray-900); }
[data-theme="dark"] .tracker-step.is-done::before { background: var(--color-white); }
.tracker-dot { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--bg-muted); color: var(--text-disabled); border: 1.5px solid var(--border-strong); z-index: 1; font-size: .75rem; transition: all .25s; }
.tracker-step.is-done   .tracker-dot { background: var(--color-gray-900); border-color: var(--color-gray-900); color: #fff; }
.tracker-step.is-active .tracker-dot { background: var(--color-gray-900); border-color: var(--color-gray-900); color: #fff; box-shadow: 0 0 0 4px rgba(0,0,0,.09); }
[data-theme="dark"] .tracker-step.is-done   .tracker-dot,
[data-theme="dark"] .tracker-step.is-active .tracker-dot { background: var(--color-white); border-color: var(--color-white); color: var(--color-gray-900); }
.tracker-label { font-size: .58rem; font-weight: 600; color: var(--text-disabled); white-space: nowrap; }
.tracker-step.is-done   .tracker-label,
.tracker-step.is-active .tracker-label { color: var(--text-secondary); }

/* ─────────────── TABLE ─────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.data-table th { text-align: left; padding: 9px 12px; background: var(--bg-subtle); color: var(--text-disabled); font-weight: 700; font-size: .65rem; text-transform: uppercase; letter-spacing: .07em; border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
.data-table td { padding: 11px 12px; border-bottom: 1px solid var(--border-default); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--bg-subtle); }
@media (max-width: 640px) {
  .data-table thead { display: none; }
  .data-table tr { display: flex; flex-wrap: wrap; gap: 3px; padding: 11px; border-bottom: 1px solid var(--border-default); }
  .data-table td { border: none; padding: 2px 0; display: flex; align-items: center; gap: 5px; font-size: .8rem; }
  .data-table td::before { content: attr(data-label); font-weight: 700; color: var(--text-disabled); font-size: .65rem; min-width: 76px; }
}

/* ─────────────── WALLET ─────────────── */
.wallet-card { background: var(--color-gray-900); color: #fff; border-radius: var(--radius-xl); padding: 20px; position: relative; overflow: hidden; }
[data-theme="dark"] .wallet-card { background: var(--bg-muted); border: 1px solid var(--border-strong); }
.wallet-card::before { content: ''; position: absolute; top: -25px; right: -20px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.05); }
.wallet-balance { font-size: 1.9rem; font-weight: 700; position: relative; z-index: 1; }
.wallet-label   { font-size: .75rem; opacity: .6; margin-bottom: 3px; position: relative; z-index: 1; }
.recharge-amounts { display: flex; flex-wrap: wrap; gap: 7px; margin: 11px 0; }
.recharge-amount-btn { padding: 6px 13px; border-radius: var(--radius-sm); border: 1.5px solid var(--border-default); background: var(--bg); color: var(--text-secondary); font-size: .78rem; font-weight: 600; cursor: pointer; transition: all var(--transition); }
.recharge-amount-btn:hover, .recharge-amount-btn.is-active { border-color: var(--color-gray-600); background: var(--color-gray-900); color: #fff; }
[data-theme="dark"] .recharge-amount-btn:hover, [data-theme="dark"] .recharge-amount-btn.is-active { background: var(--color-white); border-color: var(--color-white); color: var(--color-gray-900); }

/* ─────────────── BLOG ─────────────── */
.blog-card { background: var(--bg); border: 1px solid var(--border-default); border-radius: var(--radius-lg); overflow: hidden; transition: all var(--transition); }
.blog-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.blog-card__image { aspect-ratio: 16/9; overflow: hidden; background: var(--bg-muted); }
.blog-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.blog-card:hover .blog-card__image img { transform: scale(1.04); }
.blog-card__body { padding: 15px; }
.blog-card__tag { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-disabled); margin-bottom: 5px; }
.blog-card__title { font-size: .95rem; font-weight: 700; line-height: 1.4; margin-bottom: 7px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text-primary); }
.blog-card__excerpt { font-size: .82rem; color: var(--text-muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 10px; }
.blog-card__meta { font-size: .72rem; color: var(--text-disabled); display: flex; align-items: center; gap: 8px; }

/* ─────────────── FOOTER FIXED ─────────────── */
.site-footer {
  background: var(--color-gray-900);
  color: var(--color-gray-500);
  padding: 32px 0 0;
  flex-shrink: 0;
  width: 100%;
  margin-top: auto;
}

[data-theme="dark"] .site-footer {
  background: #0d1117;
  border-top: 1px solid var(--border-default);
}

.footer-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
  padding-bottom: 24px;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
}
.footer-brand__icon {
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gray-900);
  font-weight: 700;
  font-size: .7rem;
}
.footer-brand__name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}
.footer-desc {
  font-size: 0.7rem;
  color: var(--color-gray-500);
  margin: 8px 0 12px;
  line-height: 1.5;
}
.footer-social {
  display: flex;
  gap: 8px;
}
.footer-social a {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: transform var(--transition);
}
.footer-social a:hover {
  transform: translateY(-2px);
}
.footer-col__title {
  color: #e5e7eb;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 10px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-col__title i {
  font-size: 0.65rem;
  transition: transform .3s;
}
.footer-col__title.is-open i {
  transform: rotate(180deg);
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li {
  margin-bottom: 6px;
}
.footer-links a {
  color: var(--color-gray-500);
  text-decoration: none;
  font-size: 0.7rem;
  transition: color var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-links a i {
  font-size: 0.6rem;
}
.footer-links a:hover {
  color: #fff;
}
.footer-bottom {
  padding: 12px 0;
  margin-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.65rem;
}
.footer-bottom span,
.footer-bottom a {
  color: var(--color-gray-600);
}
.footer-bottom a:hover {
  color: #fff;
}
.footer-bottom-links {
  display: flex;
  gap: 16px;
}

/* Mobile footer accordion */
@media (max-width: 767px) {
  .footer-links {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
  }
  .footer-col__title.is-open + .footer-links,
  .footer-col__title.is-open ~ .footer-links {
    max-height: 200px;
    margin-top: 8px;
    margin-bottom: 12px;
  }
}

/* Desktop footer no accordion */
@media (min-width: 768px) {
  .footer-col__title {
    cursor: default;
  }
  .footer-col__title i {
    display: none;
  }
  .footer-links {
    max-height: none !important;
    overflow: visible !important;
  }
}

/* ─────────────── ADMIN ─────────────── */
.admin-sidebar { background: var(--color-gray-900); display: flex; flex-direction: column; }
[data-theme="dark"] .admin-sidebar { background: #0d1117; border-right: 1px solid var(--border-default); }
.admin-nav__link { display: flex; align-items: center; gap: 9px; padding: 9px 15px; color: var(--color-gray-400); font-size: .8rem; font-weight: 500; border-left: 2px solid transparent; transition: all var(--transition); cursor: pointer; text-decoration: none; border-top: none; border-right: none; border-bottom: none; width: 100%; background: none; }
.admin-nav__link:hover, .admin-nav__link.is-active { background: rgba(255,255,255,.06); color: #e5e7eb; border-left-color: #fff; }
.admin-nav__link.is-active { color: #fff; font-weight: 600; }
.admin-nav__link i { width: 15px; text-align: center; font-size: .8rem; opacity: .7; }
.admin-nav__badge { margin-left: auto; background: rgba(220,38,38,.8); color: #fff; font-size: .58rem; font-weight: 800; padding: 1px 5px; border-radius: var(--radius-full); }

/* ─────────────── MISC ─────────────── */
.empty-state { text-align: center; padding: 48px 16px; color: var(--text-disabled); }
.empty-state i { font-size: 3rem; margin-bottom: 13px; display: block; opacity: .18; }
.empty-state h3 { color: var(--text-secondary); margin-bottom: 7px; }
.divider { border: none; border-top: 1px solid var(--border-default); margin: 16px 0; }
.notif-item { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--border-default); transition: background var(--transition); }
.notif-item:hover { background: var(--bg-subtle); }
.notif-item.is-unread { background: var(--bg-subtle); }
.notif-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .78rem; }
.notif-icon--success { background: var(--color-green-light); color: var(--color-green); }
.notif-icon--info    { background: var(--color-blue-light);  color: var(--color-blue);  }
.notif-icon--warning { background: var(--color-amber-light); color: var(--color-amber); }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.animate-fade-up { animation: fade-up .32s ease both; }