/* ============================================================
   MallExpress – User Panel Complete Stylesheet
   Professional | Modern | Fully Responsive
   Version 4.0.0
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  /* Colors */
  --bg: #f6f9fc;
  --card: #ffffff;
  --border: #e2e9f2;
  --text: #0a1e3a;
  --text-light: #5a6d86;
  --text-muted: #8a9bb5;
  --primary: #0f2b5a;
  --primary-light: #1a5cff;
  --primary-dark: #0b1f3f;
  --primary-gradient: linear-gradient(145deg, #0f2b5a, #1a5cff);
  --success: #22c55e;
  --success-bg: #dcfce7;
  --danger: #ef4444;
  --danger-bg: #fee2e2;
  --warning: #f59e0b;
  --warning-bg: #fef9c3;
  --info: #3b82f6;
  --info-bg: #dbeafe;
  --gold: #f59e0b;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(15, 43, 90, 0.04);
  --shadow: 0 2px 12px rgba(15, 43, 90, 0.06);
  --shadow-md: 0 4px 20px rgba(15, 43, 90, 0.08);
  --shadow-lg: 0 8px 40px rgba(15, 43, 90, 0.12);
  --shadow-xl: 0 16px 60px rgba(15, 43, 90, 0.18);

  /* Borders */
  --radius: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --radius-xs: 6px;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Typography */
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;

  /* Sizing */
  --nav-height: 64px;
  --topbar-height: 60px;
  --max-width: 1200px;

  /* Transitions */
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Dark Theme ---------- */
[data-theme="dark"] {
  --bg: #0b1426;
  --card: #162033;
  --border: #2a3a5c;
  --text: #f1f5f9;
  --text-light: #94a3b8;
  --text-muted: #64748b;
  --primary: #1a5cff;
  --primary-dark: #0f2b5a;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 16px 60px rgba(0, 0, 0, 0.6);
  --success-bg: #1a3a2a;
  --danger-bg: #3a1a1a;
  --warning-bg: #3a2a1a;
  --info-bg: #1a2a3a;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  padding-bottom: calc(var(--nav-height) + 1.5rem);
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 20px;
  transition: background var(--transition);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text);
}
a {
  text-decoration: none;
  color: inherit;
}
img {
  max-width: 100%;
  display: block;
}
button {
  font-family: var(--font);
}
input,
select,
textarea {
  font-family: var(--font);
}

/* ---------- Utilities ---------- */
.hidden {
  display: none !important;
}
.text-center {
  text-align: center;
}
.text-muted {
  color: var(--text-muted);
}
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.gap-sm {
  gap: var(--space-sm);
}
.gap-md {
  gap: var(--space-md);
}

/* ===== TOP BAR ===== */
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), border var(--transition), box-shadow var(--transition);
}
.topbar .container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

/* Brand */
.topbar .brand {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: color var(--transition);
  flex-shrink: 0;
}
.topbar .brand span {
  background: var(--primary-gradient);
  color: white;
  font-size: 0.55rem;
  padding: 0.1rem 0.6rem;
  border-radius: 40px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Actions */
.topbar .actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.topbar .actions .icon-btn {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  position: relative;
  padding: 0.4rem;
  border-radius: 50%;
  transition: color var(--transition), background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.topbar .actions .icon-btn:hover {
  color: var(--primary-light);
  background: var(--bg);
}
.topbar .actions .icon-btn .badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--danger);
  color: white;
  font-size: 0.55rem;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  padding: 0 4px;
  border: 2px solid var(--card);
}

/* Avatar Menu */
.topbar .actions .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
  flex-shrink: 0;
  user-select: none;
}
.topbar .actions .avatar:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}
.topbar .actions .avatar .dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  padding: 0.4rem 0;
  z-index: 60;
  border: 1px solid var(--border);
  animation: dropdownFade 0.2s ease;
  max-height: 80vh;
  overflow-y: auto;
}
.topbar .actions .avatar:hover .dropdown {
  display: block;
}
@keyframes dropdownFade {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.topbar .actions .avatar .dropdown a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.2rem;
  color: var(--text);
  font-size: 0.85rem;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}
.topbar .actions .avatar .dropdown a:hover {
  background: var(--bg);
  color: var(--primary-light);
}
.topbar .actions .avatar .dropdown .divider {
  height: 1px;
  background: var(--border);
  margin: 0.2rem 0.8rem;
}

/* ===== AUTH OVERLAY ===== */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 22, 44, 0.88);
  backdrop-filter: blur(16px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 1rem;
}
.auth-overlay.hidden {
  display: none;
}
.auth-box {
  background: var(--card);
  max-width: 420px;
  width: 100%;
  padding: 2.5rem 2rem;
  border-radius: 32px;
  box-shadow: var(--shadow-xl);
  transition: background var(--transition);
  animation: authSlideUp 0.4s ease;
}
@keyframes authSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.auth-box h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.2rem;
}
.auth-box .sub {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.auth-box input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  margin-bottom: 0.8rem;
  background: var(--bg);
  color: var(--text);
  transition: border var(--transition), background var(--transition), box-shadow var(--transition);
}
.auth-box input:focus {
  border-color: var(--primary-light);
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 92, 255, 0.1);
}
.auth-box .btn-primary {
  background: var(--primary-gradient);
  color: white;
  border: none;
  padding: 0.8rem;
  width: 100%;
  border-radius: 40px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 12px rgba(15, 43, 90, 0.2);
}
.auth-box .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 43, 90, 0.25);
}
.auth-box .btn-primary:disabled {
  opacity: 0.6;
  transform: none;
  cursor: not-allowed;
}
.auth-box .toggle-link {
  color: var(--primary-light);
  cursor: pointer;
  font-weight: 600;
  transition: opacity var(--transition);
}
.auth-box .toggle-link:hover {
  opacity: 0.8;
}
.auth-box .error-msg {
  color: var(--danger);
  font-size: 0.85rem;
  min-height: 1.5rem;
}
.auth-box .success-msg {
  color: var(--success);
  font-size: 0.85rem;
  min-height: 1.5rem;
}
.auth-box .success-msg.hidden {
  display: none;
}
.auth-box .checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}
.auth-box .checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary-light);
  flex-shrink: 0;
}
.auth-box .checkbox-group label {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.4;
}

/* ===== MAIN CONTENT ===== */
.main-content.hidden {
  display: none;
}
.page {
  display: none;
  padding: 1rem 0 1.5rem;
  animation: fadeIn 0.4s ease;
}
.page.active {
  display: block;
}
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== HERO SECTION ===== */
.hero {
  background: var(--primary-gradient);
  color: white;
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 32px rgba(15, 43, 90, 0.25);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  pointer-events: none;
}
.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
  position: relative;
  letter-spacing: -0.03em;
}
.hero p {
  opacity: 0.9;
  font-size: 1.05rem;
  max-width: 80%;
  position: relative;
}
.hero .cta-btn {
  display: inline-block;
  background: white;
  color: var(--primary);
  padding: 0.7rem 2.5rem;
  border-radius: 40px;
  font-weight: 700;
  margin-top: 1rem;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  position: relative;
}
.hero .cta-btn:hover {
  transform: scale(1.04) translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* ===== FLASH BANNER ===== */
.flash-banner {
  background: linear-gradient(135deg, #f59e0b, #dc2626);
  color: white;
  border-radius: var(--radius);
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin: 0.5rem 0 1rem;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.2);
}
.flash-banner .flash-icon {
  font-size: 1.6rem;
}
.flash-banner .flash-text {
  font-weight: 600;
  flex: 1;
  font-size: 0.95rem;
}
.flash-banner .flash-link {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.3rem 1.2rem;
  border-radius: 40px;
  font-weight: 700;
  font-size: 0.85rem;
  transition: background var(--transition);
}
.flash-banner .flash-link:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* ===== SEARCH BAR ===== */
.search-bar {
  margin: 0.5rem 0 1rem;
  position: relative;
}
.search-bar input {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 40px;
  background: var(--card);
  color: var(--text);
  transition: border var(--transition), background var(--transition), box-shadow var(--transition);
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
}
.search-bar input:focus {
  border-color: var(--primary-light);
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 92, 255, 0.08), var(--shadow);
}

/* Search Suggestions */
.search-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 60;
  max-height: 340px;
  overflow-y: auto;
  padding: 0.3rem 0;
}
.suggestion-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background var(--transition);
}
.suggestion-item:hover {
  background: var(--bg);
}
.suggestion-item img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: var(--radius-xs);
  background: var(--bg);
}
.suggestion-item span {
  font-size: 0.9rem;
}
.suggestion-item .price {
  margin-left: auto;
  font-weight: 600;
  color: var(--primary);
}

/* ===== FILTER & SORT BAR ===== */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  margin: 0.8rem 0 1rem;
  flex-wrap: wrap;
}
.filter-bar select {
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a6d86' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  transition: border var(--transition), box-shadow var(--transition);
}
.filter-bar select:focus {
  border-color: var(--primary-light);
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 92, 255, 0.08);
}

/* ===== CATEGORY GRID ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin: 1rem 0;
}
.category-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.8rem 0.6rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.category-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}
.category-item .icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.2rem;
}
.category-item .label {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text);
  display: block;
  line-height: 1.2;
}
@media (min-width: 768px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
}
@media (min-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* ===== BRAND TAGS ===== */
.brand-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0 1rem;
}
.brand-tag {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 40px;
  padding: 0.3rem 1.2rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  color: var(--text);
}
.brand-tag:hover {
  background: var(--primary-light);
  color: white;
  border-color: var(--primary-light);
  transform: scale(1.05) translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ===== PRODUCT GRID ===== */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 1rem;
}

/* ===== PRODUCT CARD ===== */
.product-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid var(--border);
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}
.product-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg);
  transition: transform var(--transition);
}
.product-card:hover img {
  transform: scale(1.02);
}
.product-card .badge-discount {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--danger);
  color: white;
  font-size: 0.6rem;
  padding: 0.1rem 0.6rem;
  border-radius: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.product-card .badge-stock {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: white;
  font-size: 0.55rem;
  padding: 0.1rem 0.5rem;
  border-radius: 20px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}
.product-card .badge-stock.out-of-stock {
  background: var(--danger);
}
.product-card h3 {
  font-size: 0.95rem;
  color: var(--text);
  margin: 0.5rem 0 0.2rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card .brand {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin: 0.1rem 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}
.product-card .price {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary);
}
.product-card .original-price {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 0.3rem;
}
.product-card .rating {
  font-size: 0.8rem;
  color: var(--gold);
  margin: 0.2rem 0;
}
.product-card .actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.6rem;
}
.product-card .actions .add-btn {
  background: #f59e0b;
  color: #0f2b5a;
  border: none;
  padding: 0.6rem;
  border-radius: 40px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.product-card .actions .add-btn:hover {
  background: #d97706;
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}
.product-card .actions .add-btn:active {
  transform: scale(0.97);
}
.product-card .actions .wish-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-light);
  padding: 0.4rem;
  border-radius: 40px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  flex-shrink: 0;
}
.product-card .actions .wish-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
  background: var(--bg);
}
.product-card .actions .wish-btn.liked {
  border-color: #db2777;
  color: #db2777;
  background: #fce7f3;
}

/* ===== DETAIL MODAL ===== */
.detail-modal .modal {
  max-width: 560px;
}
.detail-modal .modal img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.detail-modal .modal .info h2 {
  font-size: 1.4rem;
  margin-top: 0.5rem;
}
.detail-modal .modal .info .price {
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--primary);
}
.detail-modal .modal .info .original-price {
  font-size: 1rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 0.5rem;
}
.detail-modal .modal .info .desc-text {
  color: var(--text-light);
  line-height: 1.7;
  margin: 0.5rem 0;
}
.detail-modal .modal .info .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0.3rem 0;
}
.detail-modal .modal .info .meta span {
  background: var(--bg);
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
}
.detail-modal .modal .reviews {
  margin-top: 1rem;
}
.detail-modal .modal .reviews .review-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.detail-modal .modal .reviews .review-item .reviewer {
  font-weight: 600;
  font-size: 0.9rem;
}
.detail-modal .modal .reviews .review-item .review-rating {
  color: var(--gold);
  font-size: 0.8rem;
}
.detail-modal .modal .reviews .review-item .review-text {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.2rem;
}

/* ===== CART ===== */
.cart-item {
  display: flex;
  gap: 1rem;
  background: var(--card);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  margin-bottom: 0.6rem;
  border: 1px solid var(--border);
  align-items: center;
  box-shadow: var(--shadow-sm);
  transition: border var(--transition);
}
.cart-item img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg);
  flex-shrink: 0;
}
.cart-item .info {
  flex: 1;
  min-width: 0;
}
.cart-item .info .name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item .info .price {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 600;
}
.cart-item .qty-control {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.cart-item .qty-control button {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 40px;
  width: 32px;
  height: 32px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 1rem;
}
.cart-item .qty-control button:hover {
  background: var(--primary-light);
  color: white;
  border-color: var(--primary-light);
}
.cart-item .qty-control span {
  min-width: 24px;
  text-align: center;
  font-weight: 600;
}
.cart-item .remove-btn {
  background: var(--danger);
  color: white;
  border: none;
  border-radius: 40px;
  padding: 0.2rem 0.8rem;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  flex-shrink: 0;
}
.cart-item .remove-btn:hover {
  background: #b91c1c;
}

.cart-summary {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.2rem;
  border: 1px solid var(--border);
  margin-top: 1rem;
  box-shadow: var(--shadow);
}
.cart-summary .row {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
}
.cart-summary .total {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  border-top: 1px solid var(--border);
  padding-top: 0.6rem;
  margin-top: 0.3rem;
}
.cart-summary .pay-btn {
  background: var(--primary-gradient);
  color: white;
  border: none;
  padding: 0.8rem;
  width: 100%;
  border-radius: 40px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 0.8rem;
  box-shadow: 0 4px 12px rgba(15, 43, 90, 0.15);
}
.cart-summary .pay-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 43, 90, 0.2);
}

/* ===== ORDERS ===== */
.order-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  margin-bottom: 0.6rem;
  border-left: 4px solid var(--border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.order-item:hover {
  box-shadow: var(--shadow-md);
}
.order-item .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.order-item .status {
  padding: 0.15rem 0.6rem;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.order-item .status.approved {
  background: var(--success-bg);
  color: #166534;
}
.order-item .status.rejected {
  background: var(--danger-bg);
  color: #991b1b;
}
.order-item .status.pending {
  background: var(--warning-bg);
  color: #854d0e;
}
.order-item .status.processing {
  background: var(--info-bg);
  color: #1e40af;
}
.order-item .status.shipped {
  background: #e0f2fe;
  color: #0369a1;
}
[data-theme="dark"] .order-item .status.approved {
  color: #4ade80;
}
[data-theme="dark"] .order-item .status.rejected {
  color: #f87171;
}
[data-theme="dark"] .order-item .status.pending {
  color: #fbbf24;
}
[data-theme="dark"] .order-item .status.processing {
  color: #60a5fa;
}
[data-theme="dark"] .order-item .status.shipped {
  color: #38bdf8;
}
.order-item .meta {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ===== NOTIFICATIONS ===== */
.notification-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  margin-bottom: 0.5rem;
  border-left: 4px solid var(--primary-light);
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.notification-item .icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
}
.notification-item .content {
  flex: 1;
  min-width: 0;
}
.notification-item .content .title {
  font-weight: 600;
  color: var(--text);
}
.notification-item .content .body {
  font-size: 0.85rem;
  color: var(--text-light);
}
.notification-item .content .time {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
  margin-top: 0.2rem;
}
.notification-item.unread {
  background: var(--info-bg);
  border-left-color: var(--primary);
}
[data-theme="dark"] .notification-item.unread {
  background: rgba(26, 92, 255, 0.08);
}

/* ===== PROFILE ===== */
.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}
.profile-stats .stat {
  background: var(--card);
  padding: 0.8rem;
  border-radius: var(--radius);
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.profile-stats .stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.profile-stats .stat .number {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
}
.profile-stats .stat .label {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.2rem;
}

.profile-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  max-width: 600px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}
.profile-card .field {
  margin-bottom: 0.8rem;
}
.profile-card .field label {
  display: block;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
  font-size: 0.85rem;
}
.profile-card .field input,
.profile-card .field textarea,
.profile-card .field select {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--text);
  transition: border var(--transition), background var(--transition), box-shadow var(--transition);
}
.profile-card .field textarea {
  resize: vertical;
  min-height: 60px;
}
.profile-card .field input:focus,
.profile-card .field textarea:focus,
.profile-card .field select:focus {
  border-color: var(--primary-light);
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 92, 255, 0.08);
}
.profile-card .btn-save {
  background: var(--primary-gradient);
  color: white;
  border: none;
  padding: 0.7rem 2rem;
  border-radius: 40px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 12px rgba(15, 43, 90, 0.15);
}
.profile-card .btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 43, 90, 0.2);
}

/* ===== SETTINGS ===== */
.settings-list {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}
.settings-item:last-child {
  border-bottom: none;
}
.settings-item:hover {
  background: var(--bg);
}
.settings-item .left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.settings-item .left .material-icons-outlined {
  color: var(--text-light);
  font-size: 1.4rem;
}
.settings-item .right {
  color: var(--text-light);
  font-size: 0.85rem;
}
.settings-section {
  margin-bottom: 1.5rem;
}
.settings-section h4 {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* ===== MODALS ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  justify-content: center;
  align-items: center;
  z-index: 999;
  padding: 1rem;
}
.modal-overlay.open {
  display: flex;
}
.modal {
  background: var(--card);
  max-width: 540px;
  width: 100%;
  padding: 2rem;
  border-radius: 28px;
  position: relative;
  box-shadow: var(--shadow-xl);
  max-height: 90vh;
  overflow-y: auto;
  transition: background var(--transition);
  animation: modalFadeIn 0.3s ease;
}
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.modal .close {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 1.4rem;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text-light);
  transition: color var(--transition);
  padding: 0.2rem;
  line-height: 1;
}
.modal .close:hover {
  color: var(--text);
}
.modal h2 {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 0.2rem;
}
.modal .sub {
  color: var(--text-light);
  margin-bottom: 1.2rem;
  font-size: 0.9rem;
}
.modal .field {
  margin-bottom: 0.8rem;
}
.modal .field label {
  display: block;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
  font-size: 0.85rem;
}
.modal .field input,
.modal .field textarea,
.modal .field select {
  width: 100%;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  background: var(--bg);
  color: var(--text);
  transition: border var(--transition), background var(--transition), box-shadow var(--transition);
}
.modal .field textarea {
  resize: vertical;
  min-height: 60px;
}
.modal .field input:focus,
.modal .field textarea:focus,
.modal .field select:focus {
  border-color: var(--primary-light);
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 92, 255, 0.08);
}
.modal .btn-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.modal .btn-row .btn {
  flex: 1;
  justify-content: center;
  min-width: 80px;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 40px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
}

/* ===== DETAIL GRID ===== */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.detail-grid .full {
  grid-column: 1 / -1;
}
.detail-label {
  font-weight: 600;
  color: var(--text-light);
  font-size: 0.8rem;
  display: block;
}
.detail-value {
  font-weight: 500;
}

/* ===== OTP BOX ===== */
.otp-box {
  background: var(--warning-bg);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 4px;
  border: 2px dashed var(--warning);
}

/* ===== OTP INPUT ===== */
.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.3s ease;
}
.step-dot.active {
  background: var(--primary-light);
  width: 32px;
  border-radius: 12px;
}
.step-dot.done {
  background: var(--success);
}
.otp-group {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}
.otp-group input {
  width: 52px;
  height: 62px;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  transition: all var(--transition);
  caret-color: var(--primary-light);
  font-feature-settings: "tnum";
}
.otp-group input:focus {
  border-color: var(--primary-light);
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 92, 255, 0.15);
  background: var(--card);
}
.otp-group input::-webkit-outer-spin-button,
.otp-group input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.otp-group input[type="number"] {
  -moz-appearance: textfield;
}

/* ===== PAY BUTTON ===== */
.pay-btn {
  background: var(--primary-gradient);
  color: white;
  border: none;
  padding: 0.8rem;
  width: 100%;
  border-radius: 40px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 0.6rem;
  box-shadow: 0 4px 12px rgba(15, 43, 90, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.pay-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 43, 90, 0.2);
}
.pay-btn:disabled {
  opacity: 0.6;
  transform: none;
  cursor: not-allowed;
}

/* ===== SPINNER ===== */
.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top: 4px solid var(--primary-light);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 0.8rem 2rem;
  border-radius: 40px;
  z-index: 2000;
  display: none;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  max-width: 90%;
  text-align: center;
  font-size: 0.95rem;
  transition: opacity 0.3s ease, background var(--transition);
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.toast.error {
  background: var(--danger);
}
.toast.success {
  background: var(--success);
}

/* ===== FLOATING CART ===== */
.floating-cart {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  box-shadow: 0 4px 20px rgba(15, 43, 90, 0.3);
  cursor: pointer;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.floating-cart:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 32px rgba(15, 43, 90, 0.4);
}
.floating-cart .material-icons-outlined {
  font-size: 1.8rem;
}
.floating-cart .floating-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  border-radius: 50%;
  min-width: 22px;
  height: 22px;
  display: none;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  padding: 0 4px;
  border: 2px solid var(--card);
}

/* ===== BACK TO TOP ===== */
.back-top {
  position: fixed;
  bottom: 80px;
  left: 20px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.4rem;
  box-shadow: 0 4px 16px rgba(15, 43, 90, 0.2);
  cursor: pointer;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}
.back-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}
.back-top:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(15, 43, 90, 0.3);
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: var(--nav-height);
  z-index: 100;
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.04);
  transition: background var(--transition), border var(--transition);
}
.bottom-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-light);
  font-size: 0.6rem;
  transition: color var(--transition);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  position: relative;
  gap: 0.1rem;
}
.bottom-nav .nav-item .material-icons-outlined {
  font-size: 1.6rem;
  transition: color var(--transition);
}
.bottom-nav .nav-item.active {
  color: var(--primary-light);
}
.bottom-nav .nav-item .badge {
  position: absolute;
  top: -2px;
  right: -4px;
  background: var(--danger);
  color: white;
  font-size: 0.55rem;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  padding: 0 4px;
  border: 2px solid var(--card);
}

/* ===== HELP & SUPPORT ===== */
.help-search {
  margin-bottom: 1rem;
}
.help-search input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: 40px;
  background: var(--card);
  color: var(--text);
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
  transition: border var(--transition), box-shadow var(--transition);
}
.help-search input:focus {
  border-color: var(--primary-light);
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 92, 255, 0.08);
}
.help-faqs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.faq-item {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 0.8rem 1.2rem;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.faq-item:hover {
  box-shadow: var(--shadow-md);
}
.faq-item .faq-q {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 0.95rem;
}
.faq-item .faq-toggle {
  font-weight: 700;
  color: var(--primary-light);
  transition: transform var(--transition);
  font-size: 1.2rem;
}
.faq-item.open .faq-toggle {
  transform: rotate(180deg);
}
.faq-item .faq-a {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  line-height: 1.6;
}

/* ===== TRACK ORDER ===== */
.track-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  background: var(--card);
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.track-form input {
  flex: 1;
  min-width: 200px;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  transition: border var(--transition), box-shadow var(--transition);
}
.track-form input:focus {
  border-color: var(--primary-light);
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 92, 255, 0.08);
}
.track-form .pay-btn {
  width: auto;
  padding: 0.6rem 2rem;
  margin-top: 0;
}
.track-result {
  margin-top: 1rem;
}
.recent-order-item {
  cursor: pointer;
  transition: background var(--transition);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
}
.recent-order-item:hover {
  background: var(--bg);
}

/* ===== SUPPORT FORM ===== */
.support-form textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--text);
  min-height: 100px;
  resize: vertical;
  transition: border var(--transition), background var(--transition), box-shadow var(--transition);
}
.support-form textarea:focus {
  border-color: var(--primary-light);
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 92, 255, 0.08);
}
.support-form .pay-btn {
  width: auto;
  padding: 0.6rem 2rem;
  margin-top: 0.5rem;
}

/* ===== ONBOARDING ===== */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1.5rem;
}
.onboarding-modal {
  background: var(--card);
  max-width: 520px;
  width: 100%;
  padding: 2rem 2rem 1.8rem;
  border-radius: 28px;
  box-shadow: var(--shadow-xl);
  position: relative;
  animation: modalFadeIn 0.4s ease;
}
.onboarding-modal .close-onboarding {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 1.4rem;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  transition: color var(--transition);
}
.onboarding-modal .close-onboarding:hover {
  color: var(--text);
}
.onboarding-modal h2 {
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 0.3rem;
}
.onboarding-steps {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin: 1rem 0;
}
.onboarding-step {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 0.8rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary-light);
  transition: background var(--transition);
}
.onboarding-step .step-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}
.onboarding-step strong {
  display: block;
  font-size: 0.9rem;
}
.onboarding-step p {
  font-size: 0.8rem;
  color: var(--text-light);
  margin: 0;
}
.onboarding-modal .pay-btn {
  margin-top: 0.5rem;
}

/* ===== PAGINATION ===== */
.pagination-controls {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin: 1.5rem 0 0.5rem;
  flex-wrap: wrap;
}
.page-btn {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.page-btn:hover:not(:disabled) {
  background: var(--primary-light);
  color: white;
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}
.page-btn.active {
  background: var(--primary-light);
  color: white;
  border-color: var(--primary-light);
}
.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===== TOOLTIPS ===== */
.custom-tooltip {
  position: fixed;
  background: var(--primary);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  z-index: 3000;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  animation: tooltipFade 0.2s ease;
}
.custom-tooltip::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: var(--primary);
}
@keyframes tooltipFade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== TRANSACTION CLICKABLE ===== */
#walletTransactions > div {
  cursor: pointer;
  transition: background var(--transition);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.5rem;
}
#walletTransactions > div:hover {
  background: var(--bg);
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-light);
}
.empty-state .icon {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 0.5rem;
}
.empty-state h3 {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* ---------- Tablets & Small Laptops ---------- */
@media (min-width: 768px) {
  .products {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
  }
  .hero h1 {
    font-size: 2.6rem;
  }
  .hero {
    padding: 3rem 2.5rem;
  }
  .otp-group input {
    width: 60px;
    height: 70px;
    font-size: 1.8rem;
  }
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .topbar .brand {
    font-size: 1.5rem;
  }
  .product-card img {
    height: 170px;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 480px) {
  .products {
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
  }
  .profile-stats {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }
  .topbar .brand {
    font-size: 1.1rem;
  }
  .topbar .brand span {
    font-size: 0.5rem;
  }
  .modal {
    padding: 1.2rem;
    border-radius: 20px;
  }
  .otp-group input {
    width: 44px;
    height: 54px;
    font-size: 1.4rem;
  }
  .hero {
    padding: 1.5rem 1.2rem;
  }
  .hero h1 {
    font-size: 1.6rem;
  }
  .hero p {
    max-width: 100%;
    font-size: 0.95rem;
  }
  .auth-box {
    padding: 1.5rem;
  }
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
  .category-item .icon {
    font-size: 1.6rem;
  }
  .category-item .label {
    font-size: 0.72rem;
  }
  .detail-modal .modal img {
    height: 200px;
  }
  .floating-cart {
    width: 48px;
    height: 48px;
    bottom: 76px;
    right: 12px;
  }
  .floating-cart .material-icons-outlined {
    font-size: 1.5rem;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .topbar .actions .avatar .dropdown {
    right: -10px;
    min-width: 190px;
  }
  .cart-item {
    flex-wrap: wrap;
    gap: 0.6rem;
  }
  .cart-item img {
    width: 60px;
    height: 60px;
  }
  .cart-item .info .name {
    font-size: 0.85rem;
  }
  .product-card img {
    height: 120px;
  }
  .product-card h3 {
    font-size: 0.85rem;
  }
  .product-card .price {
    font-size: 1rem;
  }
  .product-card .actions .add-btn {
    font-size: 0.75rem;
    padding: 0.5rem;
  }
  .product-card .actions .wish-btn {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
  .bottom-nav .nav-item .material-icons-outlined {
    font-size: 1.4rem;
  }
  .bottom-nav .nav-item {
    font-size: 0.55rem;
  }
  .flash-banner {
    padding: 0.6rem 1rem;
  }
  .flash-banner .flash-text {
    font-size: 0.85rem;
  }
  .toast {
    bottom: 70px;
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }
}

/* ---------- Very Small Phones ---------- */
@media (max-width: 360px) {
  .products {
    grid-template-columns: 1fr;
  }
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .topbar .container {
    padding: 0 0.6rem;
  }
  .topbar .actions {
    gap: 0.2rem;
  }
  .topbar .actions .icon-btn {
    padding: 0.3rem;
  }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  .topbar,
  .bottom-nav,
  .floating-cart,
  .back-top,
  .flash-banner,
  .search-bar,
  .filter-bar,
  .pagination-controls,
  .modal-overlay,
  .toast,
  .onboarding-overlay {
    display: none !important;
  }
  .page {
    display: block !important;
    padding: 0 !important;
  }
  .main-content {
    padding: 0 !important;
  }
  body {
    background: white !important;
    color: black !important;
  }
  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }
  .product-card {
    break-inside: avoid;
    page-break-inside: avoid;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
  }
  .products {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}
