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

:root {
  --market-navy: #131921;
  --market-navy-light: #232f3e;
  --market-orange: #ff9900;
  --market-yellow: #ffd814;
  --market-link: #007185;
  --market-bg: #eaeded;
  /* Brand Colors */
  --primary: #1E3A8A;           /* Deep Blue */
  --primary-dark: #1E293B;      /* Dark Slate */
  --primary-light: #EEF2FF;     /* Soft Indigo Tint */
  --accent-indigo: #4F46E5;     /* Electric Indigo */
  --accent-coral: #EF4444;      /* High-Visibility Red CTA */
  --accent-coral-dark: #DC2626;
  --accent-emerald: #10B981;    /* Success / In-Stock */
  --accent-amber: #F59E0B;      /* Warning / Ratings */
  --dark-navy: #0F172A;         /* Darkest Slate Header/Footer */
  --navy: #1E293B;
  --navy-light: #334155;
  
  /* Neutrals */
  --gray-900: #0F172A;
  --gray-800: #1E293B;
  --gray-700: #334155;
  --gray-600: #475569;
  --gray-500: #64748B;
  --gray-400: #94A3B8;
  --gray-300: #CBD5E1;
  --gray-200: #E2E8F0;
  --gray-100: #F1F5F9;
  --gray-50: #F8FAFC;
  --white: #FFFFFF;
  
  /* Semantic */
  --bg-primary: #FFFFFF;
  --bg-secondary: var(--market-bg);
  --bg-tertiary: #F1F5F9;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --border-focus: #4F46E5;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md: 0 4px 6px rgba(15,23,42,0.06), 0 2px 4px rgba(15,23,42,0.04);
  --shadow-lg: 0 10px 25px rgba(15,23,42,0.08), 0 4px 10px rgba(15,23,42,0.04);
  --shadow-xl: 0 20px 40px rgba(15,23,42,0.12);
  --shadow-primary: 0 8px 25px rgba(79,70,229,0.25);
  
  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Transitions */
  --transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  --transition-slow: all 0.35s cubic-bezier(0.4,0,0.2,1);

  /* Brand Gradient */
  --brand-gradient: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  --brand-gradient-hover: linear-gradient(135deg, #4338CA 0%, #6D28D9 100%);
  --brand-gradient-subtle: linear-gradient(135deg, rgba(79,70,229,0.08) 0%, rgba(124,58,237,0.08) 100%);
  
  /* Glassmorphism */
  --glass-bg: rgba(255,255,255,0.7);
  --glass-bg-dark: rgba(255,255,255,0.05);
  --glass-border: rgba(255,255,255,0.2);
  --glass-blur: blur(20px);
  --glass-saturate: saturate(180%);
  
  /* Enhanced Shadows */
  --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-card-hover: 0 20px 40px rgba(79,70,229,0.12), 0 8px 16px rgba(0,0,0,0.08);
  --shadow-glass: 0 8px 32px rgba(0,0,0,0.08);
  --shadow-glow: 0 0 20px rgba(79,70,229,0.3);
  --shadow-btn-primary: 0 4px 14px rgba(79,70,229,0.4);
  
  /* Card */
  --radius-card: 14px;
  
  /* Animation */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 0.15s;
  --duration-normal: 0.25s;
  --duration-slow: 0.4s;
}

/* Dark Mode - WCAG 2.1 AA Compliant Contrast */
[data-theme="dark"] {
  --bg-primary: #0D1B2A;
  --bg-secondary: #162436;
  --bg-tertiary: #1E2D42;
  --text-primary: #FFFFFF;
  --text-secondary: #D1D5DB;
  --text-muted: #9CA3AF;
  --border: #374151;
  --primary-light: #25226E;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.5);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.6);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.7);
  --glass-bg: rgba(13,27,42,0.8);
  --glass-border: rgba(255,255,255,0.08);
}

/* ==========================================================================
   1. CSS Reset + Base
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  color: var(--primary-dark);
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

button, input, select, textarea {
  font-family: inherit;
  font-size: 100%;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

:focus-visible {
  outline: 2px solid var(--accent-indigo);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip-link { position: fixed; left: 1rem; top: .75rem; transform: translateY(-200%); background: #fff; color: #111; padding: .75rem 1rem; border-radius: 4px; z-index: 10001; box-shadow: var(--shadow-md); }
.skip-link:focus { transform: translateY(0); }

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* ==========================================================================
   3. Keyframe Animations
   ========================================================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes slideInLeft {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(108, 99, 255, 0.4); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(108, 99, 255, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(108, 99, 255, 0); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes slideInToast {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes badgeBump {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes floatUp {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 5px rgba(79,70,229,0.2); }
  50% { box-shadow: 0 0 20px rgba(79,70,229,0.4); }
}

/* ==========================================================================
   4. Utility Classes
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.grid { display: grid; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.bg-white { background-color: var(--bg-primary); }
.bg-light { background-color: var(--bg-secondary); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--duration-normal) var(--ease-smooth);
  text-align: center;
  user-select: none;
  position: relative;
  overflow: hidden;
  min-height: 44px;
  border: none;
  cursor: pointer;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-smooth);
  pointer-events: none;
}

.btn:hover::after {
  opacity: 1;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  min-height: 36px;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border-radius: var(--radius-lg);
  min-height: 52px;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--market-yellow);
  color: var(--market-navy);
  box-shadow: 0 2px 5px rgba(15,17,17,.15);
  border: 1px solid #fcd200;
  border-radius: 8px;
}

.btn-primary:hover {
  background: #f7ca00;
  border-color: #f2c200;
  box-shadow: 0 2px 5px rgba(15,17,17,.15);
}

.btn-primary:active {
  background: #f0b800;
  border-color: #008296;
  box-shadow: 0 0 0 3px rgba(0,130,150,.4) inset;
}

.btn-add-cart {
  background: var(--market-orange);
  color: var(--market-navy);
  box-shadow: 0 2px 5px rgba(15,17,17,.15);
  border: 1px solid #ff8f00;
  border-radius: 8px;
}

.btn-add-cart:hover {
  background: #fa8900;
  border-color: #e37e00;
  box-shadow: 0 2px 5px rgba(15,17,17,.15);
}

.btn-add-cart:active {
  background: #e37e00;
  border-color: #008296;
  box-shadow: 0 0 0 3px rgba(0,130,150,.4) inset;
}

.btn-secondary {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background-color: var(--gray-200);
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--accent-indigo);
  color: var(--accent-indigo);
  background: var(--brand-gradient-subtle);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--accent-indigo);
  padding: 0.5rem 1rem;
}

.btn-ghost:hover {
  background: var(--brand-gradient-subtle);
}

.btn-danger {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(239,68,68,0.3);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #DC2626, #B91C1C);
  transform: translateY(-1px);
}

.btn-amber {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: var(--white);
}

.btn-light {
  background: rgba(255,255,255,0.15);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(8px);
}

.btn-light:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-1px);
}

.btn-buy-now {
  background: linear-gradient(135deg, var(--accent-indigo), #7C3AED);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(79,70,229,0.35);
}

.btn-buy-now:hover {
  background: linear-gradient(135deg, #4338CA, #6D28D9);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79,70,229,0.45);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary { background-color: var(--primary-light); color: var(--primary); }
.badge-success { background-color: rgba(16, 185, 129, 0.1); color: var(--accent-emerald); }
.badge-warning { background-color: rgba(245, 158, 11, 0.1); color: var(--accent-amber); }
.badge-danger { background-color: rgba(255, 107, 107, 0.1); color: var(--accent-coral); }

/* Status Badges */
.badge-pending { background-color: rgba(245, 158, 11, 0.1); color: var(--accent-amber); }
.badge-processing { background-color: var(--primary-light); color: var(--primary); }
.badge-shipped { background-color: rgba(108, 99, 255, 0.1); color: var(--primary); }
.badge-delivered { background-color: rgba(16, 185, 129, 0.1); color: var(--accent-emerald); }
.badge-cancelled { background-color: rgba(255, 107, 107, 0.1); color: var(--accent-coral); }

/* Glass Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur) var(--glass-saturate);
  -webkit-backdrop-filter: var(--glass-blur) var(--glass-saturate);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-glass);
}

[data-theme="dark"] .glass-card {
  background: var(--glass-bg);
  border-color: var(--glass-border);
}

/* Gradient Text */
.gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section Divider */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 0;
  border: none;
}

/* Shimmer Loading */
.shimmer-bg {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

/* Accent line (top border gradient) */
.accent-line-top {
  position: relative;
}
.accent-line-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--brand-gradient);
  border-radius: 3px 3px 0 0;
}

/* Savings badge */
.savings-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
}

/* Status dot */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.status-dot--success { background: var(--accent-emerald); }
.status-dot--warning { background: var(--accent-amber); }
.status-dot--danger { background: var(--accent-coral); }

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input, .select, .textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition);
}

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

.form-error {
  display: block;
  color: var(--accent-coral);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* ==========================================================================
   5. Navbar / Header
   ========================================================================== */
/* Top Announcement Ticker Bar */
.top-announcement-bar {
  background: var(--brand-gradient);
  color: var(--white);
  font-size: 0.8rem;
  padding: 0.45rem 1rem;
  text-align: center;
  font-weight: 500;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.top-announcement-bar strong {
  color: #FDE047;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: var(--glass-blur) var(--glass-saturate);
  -webkit-backdrop-filter: var(--glass-blur) var(--glass-saturate);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

.navbar .navbar-inner { color: var(--text-primary); }
.navbar .navbar-logo { color: var(--text-primary); }
.navbar .logo-mall { color: var(--text-primary); }
.navbar .nav-greeting { color: var(--text-muted); }
.navbar .nav-account-label { color: var(--text-primary); }

.cat-strip { background: var(--market-navy-light); border: 0; }
.cat-strip-inner {
  display: flex;
  gap: 1.25rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: .55rem 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-strip-inner::-webkit-scrollbar { display: none; }
.cat-link { color: #fff; white-space: nowrap; font-size: .875rem; }
.cat-link:hover, .cat-link.active { color: var(--market-orange); }

.navbar-scrolled {
  background-color: rgba(19, 25, 33, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .navbar-scrolled { background-color: rgba(13, 27, 42, 0.96); }

.navbar-inner, .navbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.navbar-logo, .navbar-brand {
  display: flex;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
}

.logo-trust, .navbar-brand span:first-child {
  color: var(--primary);
}

.logo-mall {
  color: var(--text-primary);
}

.navbar-search {
  flex: 1;
  max-width: 550px;
  margin: 0 2rem;
  position: relative;
}

.search-input-wrap, .search-bar {
  display: flex;
  align-items: center;
  background-color: var(--bg-tertiary);
  border-radius: 4px;
  padding: 0.25rem 0.5rem 0.25rem 1rem;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.search-input-wrap:focus-within, .search-bar:focus-within {
  border-color: var(--primary);
  background-color: var(--bg-primary);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

.search-icon {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  margin-right: 0.5rem;
}

.search-cat-select {
  background: transparent;
  border: none;
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  border-right: 1px solid var(--border);
  outline: none;
  cursor: pointer;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.5rem;
  color: var(--text-primary);
  outline: none;
}

.search-btn {
  background-color: var(--market-orange);
  color: #111;
  color: var(--white);
  padding: 0.5rem 1.25rem;
  border-radius: 0 3px 3px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  transition: var(--transition);
}

.search-btn:hover {
  background-color: var(--primary-dark);
}

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.5rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 51;
}

.navbar-search:focus-within .search-suggestions {
  /* Display handled by JS typically, but setting up block */
  display: block;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-action-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
}

.nav-action-link svg {
  width: 24px;
  height: 24px;
  margin-bottom: 0.25rem;
}

.nav-action-link:hover {
  color: var(--primary);
}

.cart-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: var(--accent-coral);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: bold;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-strip {
  border-top: 1px solid var(--border);
  background-color: var(--bg-primary);
}

.category-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  padding: 0.75rem 0;
}

.category-nav::-webkit-scrollbar {
  display: none;
}

.category-link {
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  font-size: 0.9rem;
}

.category-link:hover {
  color: var(--primary);
}

.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  visibility: hidden;
  transition: visibility 0.3s ease;
}

.nav-drawer.nav-drawer--open {
  visibility: visible;
}

.nav-drawer-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-drawer.nav-drawer--open .nav-drawer-overlay {
  opacity: 1;
}

.nav-drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 300px;
  background-color: var(--bg-primary);
  box-shadow: var(--shadow-xl);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

.nav-drawer.nav-drawer--open .nav-drawer-panel {
  transform: translateX(0);
}

/* ==========================================================================
   6. Flash Messages / Toasts
   ========================================================================== */
.flash {
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-md);
  border-left: 4px solid;
  background-color: var(--bg-primary);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: slideInRight 0.3s ease-out;
}

.flash-success { border-color: var(--accent-emerald); }
.flash-error { border-color: var(--accent-coral); }
.flash-warning { border-color: var(--accent-amber); }
.flash-info { border-color: var(--primary); }

.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.toast {
  background-color: var(--bg-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 300px;
  animation: slideInRight 0.3s ease-out;
}

.toast-success { border-left: 4px solid var(--accent-emerald); }
.toast-error { border-left: 4px solid var(--accent-coral); }
.toast-warning { border-left: 4px solid var(--accent-amber); }
.toast-info { border-left: 4px solid var(--primary); }

/* ==========================================================================
   7. Homepage
   ========================================================================== */
.hero-carousel {
  position: relative;
  width: 100%;
  height: clamp(280px, 36vw, 440px);
  overflow: hidden;
  background-color: var(--dark-navy);
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  display: flex;
  align-items: center;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(13,27,42,0.8) 0%, rgba(13,27,42,0.2) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  max-width: 600px;
  width: min(1280px, calc(100% - 3rem));
  margin-inline: auto;
}

.hero-content h1 {
  font-size: 3.5rem;
  color: var(--white);
  margin-bottom: 1rem;
  animation: fadeInUp 0.8s ease-out;
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  animation: fadeInUp 1s ease-out;
}

.hero-dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 0.5rem;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background-color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: var(--transition);
}

.hero-dot.active {
  background-color: var(--primary);
  width: 30px;
}

.hero-arrows {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 2rem;
  transform: translateY(-50%);
  z-index: 10;
  pointer-events: none;
}

.hero-arrow {
  pointer-events: auto;
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
  background-color: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.hero-arrow:hover {
  background-color: var(--primary);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  margin-bottom: 0;
}

.section-inner {
  width: min(1280px, calc(100% - 3rem));
  margin-inline: auto;
}

.categories-section, .deals-section, .products-section, .trust-pillars {
  padding: 5rem 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5rem;
}

.category-card {
  position: relative;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  transition: all var(--duration-normal) var(--ease-smooth);
  box-shadow: var(--shadow-card);
  text-decoration: none;
}

.category-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand-gradient-subtle);
  color: var(--accent-indigo);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--duration-fast) var(--ease-spring);
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(79, 70, 229, 0.25);
  box-shadow: var(--shadow-card-hover);
}

.category-card:hover .category-card-icon {
  transform: scale(1.15) rotate(4deg);
  background: var(--brand-gradient);
  color: var(--white);
}

.category-card-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.category-card-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}

.category-card-arrow {
  font-size: 0.85rem;
  color: var(--accent-indigo);
  opacity: 0;
  transform: translateX(-5px);
  transition: all var(--duration-fast) var(--ease-smooth);
}

.category-card:hover .category-card-arrow {
  opacity: 1;
  transform: translateX(0);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.25rem;
}

.product-card {
  background-color: var(--bg-primary);
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: all var(--duration-normal) var(--ease-smooth);
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(79, 70, 229, 0.2);
}

.product-card__img-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background-color: var(--bg-tertiary);
}

.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
  transition: transform 0.4s var(--ease-smooth);
}

.product-card:hover .product-card__img {
  transform: scale(1.08);
}

.product-card__badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: linear-gradient(135deg, #EF4444, #DC2626);
  color: var(--white);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
  z-index: 2;
}

.product-card__wishlist {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background-color: var(--white);
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.product-card__wishlist:hover {
  color: var(--accent-coral);
  transform: scale(1.1);
}

.product-card__body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card__name {
  font-family: var(--font-heading);
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card__rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--accent-amber);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.product-card__rating span {
  color: var(--text-muted);
  margin-left: 0.25rem;
}

.product-card__price {
  margin-top: auto;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.product-card__price .sale,
.product-card__price .price-current {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.price-old,
.product-card__price .old,
.product-card__price .price-old {
  font-size: 0.85rem !important;
  color: #94a3b8 !important;
  text-decoration: line-through !important;
  opacity: 0.8 !important;
  margin-left: 0.5rem !important;
  display: inline-block !important;
}

.price-current,
.product-card__price .price-current {
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  display: inline-block !important;
}

.product-card__actions .btn {
  width: 100%;
}

.trust-pillars {
  background-color: var(--primary-light);
  border-radius: var(--radius-xl);
  margin: 4rem auto;
  padding: 4rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

[data-theme="dark"] .trust-pillars {
  background-color: var(--bg-tertiary);
}

.pillar-card {
  text-align: center;
}

.pillar-card svg {
  width: 48px;
  height: 48px;
  color: var(--primary);
  margin: 0 auto 1rem;
}

.pillar-card h4 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.pillar-card p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* ==========================================================================
   8. Shop Page
   ========================================================================== */
.shop-layout {
  display: flex;
  gap: 2rem;
  padding: 3rem 0;
}

.filter-sidebar {
  width: 280px;
  flex-shrink: 0;
}

.filter-section {
  background-color: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.filter-section h4 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.filter-list-scrollable {
  max-height: 180px;
  overflow-y: auto;
  padding-left: 0;
  list-style: none;
}

.filter-item {
  margin-bottom: 0.5rem;
}

.filter-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--text-secondary);
}

.filter-action-btn {
  margin-top: 1rem;
}

.filter-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.filter-checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.price-range-slider {
  width: 100%;
  margin: 1rem 0;
}

.filter-stars {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-stars button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
}

.filter-stars button:hover, .filter-stars button.active {
  color: var(--accent-amber);
}

.shop-main {
  flex: 1;
}

.shop-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-primary);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-chip {
  background-color: var(--primary-light);
  color: var(--primary-dark);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-chip button {
  color: var(--primary-dark);
}

.products-list-view {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.product-list-card {
  display: flex;
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.product-list-card .product-card__img-wrap {
  width: 250px;
  flex-shrink: 0;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.pagination-item {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-weight: 500;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.pagination-item.active, .pagination-item:hover {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.empty-state {
  text-align: center;
  padding: 5rem 0;
}

.empty-state svg {
  width: 150px;
  height: 150px;
  margin: 0 auto 1.5rem;
  color: var(--gray-300);
}

/* ==========================================================================
   9. Product Detail Page
   ========================================================================== */
.product-detail {
  padding: 3rem 0;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 2fr 3fr 1.5fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.gallery-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: var(--bg-primary);
  aspect-ratio: 1;
  cursor: zoom-in;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumbs {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.gallery-thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
}

.gallery-thumb.active {
  border-color: var(--primary);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  display: flex;
  flex-direction: column;
}

.product-breadcrumb {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.product-title {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.product-rating-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stars {
  display: inline-flex;
  align-items: center;
  color: var(--accent-amber);
  gap: 2px;
}
.star {
  width: 1em;
  height: 1em;
  fill: currentColor;
}
.product-rating-row .stars {
  color: var(--accent-amber);
}

.product-price-block {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.product-price-block .sale {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

.product-price-block .old {
  font-size: 1.25rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-variants {
  margin-bottom: 2rem;
}

.variant-group {
  margin-bottom: 1.5rem;
}

.variant-group h5 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.variant-swatches {
  display: flex;
  gap: 0.75rem;
}

.variant-swatch {
  min-width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  transition: var(--transition);
}

.variant-swatch.color {
  border-radius: var(--radius-full);
}

.variant-swatch.active, .variant-swatch:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.product-description {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.product-features {
  list-style: disc;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

.buy-box {
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 100px;
  height: fit-content;
}

.qty-stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  width: max-content;
  margin-bottom: 1.5rem;
}

.qty-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.qty-input {
  width: 50px;
  text-align: center;
  border: none;
  font-weight: 600;
  background: transparent;
  color: var(--text-primary);
}

.buy-box .btn {
  margin-bottom: 1rem;
}

.delivery-info {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.delivery-info svg {
  color: var(--accent-emerald);
  flex-shrink: 0;
}

.share-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.reviews-section {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}

.reviews-summary {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.review-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.review-bar .progress {
  flex: 1;
  height: 8px;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.review-bar .progress-fill {
  height: 100%;
  background-color: var(--accent-amber);
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.review-card {
  background-color: var(--bg-primary);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.review-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.review-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.review-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.review-form {
  background-color: var(--bg-primary);
  padding: 2rem;
  border-radius: var(--radius-lg);
  margin-top: 3rem;
}

.star-selector {
  display: flex;
  gap: 0.5rem;
  color: var(--gray-300);
  font-size: 1.5rem;
  cursor: pointer;
  margin-bottom: 1.5rem;
}

.star-selector .active, .star-selector:hover {
  color: var(--accent-amber);
}

/* ==========================================================================
   10. Cart Page
   ========================================================================== */
.cart-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  padding: 3rem 0;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 100px 1fr auto auto;
  gap: 1.5rem;
  align-items: center;
  background-color: var(--bg-primary);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.cart-item__img {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
  object-fit: cover;
}

.cart-item__name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: block;
}

.cart-item__price {
  color: var(--text-secondary);
}

.cart-item-actions {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.cart-item-actions button {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.cart-item-actions button:hover {
  color: var(--accent-coral);
}

.cart-summary {
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 100px;
  height: fit-content;
}

.coupon-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.summary-price-table {
  width: 100%;
  margin-bottom: 1.5rem;
}

.summary-price-table tr td {
  padding: 0.5rem 0;
  color: var(--text-secondary);
}

.summary-price-table tr td:last-child {
  text-align: right;
  font-weight: 500;
  color: var(--text-primary);
}

.summary-total-row td {
  font-size: 1.25rem;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  border-top: 1px solid var(--border);
  padding-top: 1rem !important;
}

/* ==========================================================================
   11. Checkout Page
   ========================================================================== */
.checkout-steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 600px;
  margin: 3rem auto;
  position: relative;
}

.checkout-steps::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--border);
  z-index: 1;
}

.checkout-step {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--bg-secondary);
  padding: 0 1rem;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background-color: var(--bg-primary);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--text-muted);
}

.checkout-step.active .step-circle {
  border-color: var(--primary);
  background-color: var(--primary);
  color: var(--white);
}

.checkout-step.completed .step-circle {
  border-color: var(--accent-emerald);
  background-color: var(--accent-emerald);
  color: var(--white);
}

.checkout-main {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.checkout-card {
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.payment-method-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.payment-method-card:hover {
  border-color: var(--primary-light);
}

.payment-method-card.selected {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.payment-method-card input[type="radio"] {
  accent-color: var(--primary);
  width: 1.25rem;
  height: 1.25rem;
}

.order-success {
  text-align: center;
  padding: 5rem 0;
}

.success-icon {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  background-color: var(--accent-emerald);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-icon svg {
  width: 50px;
  height: 50px;
}

/* ==========================================================================
   12. Orders Page
   ========================================================================== */
.orders-page {
  padding: 3rem 0;
}

.orders-filter-tabs {
  display: flex;
  gap: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.order-tab {
  padding: 1rem 0;
  color: var(--text-secondary);
  font-weight: 500;
  border-bottom: 2px solid transparent;
}

.order-tab.active, .order-tab:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.order-card {
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  overflow: hidden;
}

.order-card__header {
  padding: 1.5rem;
  background-color: var(--bg-tertiary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.order-status-timeline {
  display: flex;
  justify-content: space-between;
  padding: 2rem;
  position: relative;
}

.timeline-connector {
  position: absolute;
  top: 3rem;
  left: 10%;
  right: 10%;
  height: 2px;
  background-color: var(--border);
  z-index: 1;
}

.timeline-step {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--bg-primary);
  padding: 0 1rem;
}

.order-items-row {
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  border-top: 1px solid var(--border);
}

.order-items-row img {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

/* ==========================================================================
   13. Account / Profile
   ========================================================================== */
.account-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 3rem;
  padding: 3rem 0;
}

.account-sidebar {
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 1.5rem 0;
  box-shadow: var(--shadow-sm);
  height: fit-content;
}

.account-tab-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  color: var(--text-secondary);
  font-weight: 500;
  border-left: 3px solid transparent;
}

.account-tab-link:hover, .account-tab-link.active {
  background-color: var(--primary-light);
  color: var(--primary);
  border-left-color: var(--primary);
}

.account-content {
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-full);
  background-color: var(--bg-tertiary);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.address-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  position: relative;
}

/* ==========================================================================
   14. Auth Pages (Login/Register)
   ========================================================================== */
.auth-layout {
  display: flex;
  min-height: 100vh;
}

.auth-form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background-color: var(--bg-primary);
}

.auth-hero {
  flex: 1;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  padding: 3rem;
}

.auth-card {
  width: 100%;
  max-width: 450px;
}

.divider-or {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  margin: 1.5rem 0;
}

.divider-or::before, .divider-or::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.divider-or::before { margin-right: 1rem; }
.divider-or::after { margin-left: 1rem; }

.social-login-buttons {
  display: flex;
  gap: 1rem;
}

.social-login-buttons .btn {
  flex: 1;
}

/* ==========================================================================
   15. Modals & Tables
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: translateY(20px);
  transition: var(--transition);
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

/* Tables */
.tbl-responsive {
  overflow-x: auto;
}

.tbl {
  width: 100%;
  border-collapse: collapse;
}

.tbl th {
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1rem;
  text-align: left;
}

.tbl td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

.tbl tbody tr:hover {
  background-color: var(--bg-secondary);
}

/* ==========================================================================
   16. Skeleton Loaders
   ========================================================================== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--gray-200) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--gray-700) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
}

.skeleton-card { height: 350px; }
.skeleton-img { height: 200px; }
.skeleton-text { height: 1rem; margin-bottom: 0.5rem; }
.skeleton-title { height: 1.5rem; margin-bottom: 1rem; width: 70%; }

/* ==========================================================================
   17. Theme Toggle
   ========================================================================== */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background-color: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: var(--transition);
}

.theme-toggle:hover {
  background-color: var(--border);
}

/* ==========================================================================
   18. Responsive Breakpoints
   ========================================================================== */

/* Tablet (1024px) */
@media (max-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .trust-pillars {
    grid-template-columns: repeat(2, 1fr);
    padding: 2rem;
  }
  
  .product-detail-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .buy-box {
    grid-column: 1 / -1;
    position: static;
  }
  
  .cart-layout, .checkout-main {
    grid-template-columns: 1fr;
  }
  
  .account-layout {
    grid-template-columns: 1fr;
  }
}

/* Mobile (640px) */
/* ==========================================================================
   19. Mobile Bottom Navigation Bar
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 15px rgba(0,0,0,0.08);
  z-index: 99;
  justify-content: space-around;
  align-items: center;
  padding: 0 0.5rem;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  position: relative;
  font-size: 0.7rem;
  font-weight: 500;
  text-decoration: none;
  position: relative;
  width: 20%;
  height: 100%;
  transition: var(--transition);
}

.mobile-nav-item svg {
  width: 22px;
  height: 22px;
  margin-bottom: 2px;
}

.mobile-nav-item.active, .mobile-nav-item:hover {
  color: var(--primary);
}

.mobile-nav-item .cart-badge {
  top: 4px;
  right: 18px;
}

/* ==========================================================================
   20. Instant Cart Drawer
   ========================================================================== */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-slow);
}

.cart-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background-color: var(--bg-primary);
  box-shadow: var(--shadow-xl);
  z-index: 10000;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

/* Skeleton Loading Shimmer for Cart Drawer */
.cart-skeleton-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.cart-skeleton-img {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-md);
}

.cart-skeleton-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cart-drawer-overlay.active .cart-drawer {
  transform: translateX(0);
}

.cart-drawer-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-drawer-header h3 {
  font-size: 1.25rem;
  margin: 0;
}

.cart-drawer-close {
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.cart-drawer-close:hover {
  color: var(--accent-coral);
  background-color: var(--bg-tertiary);
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-drawer-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.cart-drawer-item img {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-md);
  object-fit: cover;
}

.cart-drawer-item-details {
  flex: 1;
}

.cart-drawer-item-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  display: block;
}

.cart-drawer-item-price {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 700;
}

.cart-drawer-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  background-color: var(--bg-secondary);
}

.cart-drawer-subtotal {
  display: flex;
  justify-content: space-between;
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

/* ==========================================================================
   21. Live Search Suggestions
   ========================================================================== */
.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-primary);
}

.search-suggestion-item:hover {
  background-color: var(--primary-light);
}

.search-suggestion-item img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.search-suggestion-info {
  flex: 1;
}

.search-suggestion-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.search-suggestion-price {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 700;
}

/* ==========================================================================
   22. Accordion One-Page Checkout
   ========================================================================== */
.checkout-accordion-step {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
  overflow: hidden;
  background-color: var(--bg-primary);
  box-shadow: var(--shadow-sm);
}

.checkout-accordion-header {
  padding: 1.25rem 1.5rem;
  background-color: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.checkout-accordion-header h3 {
  margin: 0;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background-color: var(--primary);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
}

.checkout-accordion-body {
  padding: 1.5rem;
  display: block;
}

.checkout-accordion-step.collapsed .checkout-accordion-body {
  display: none;
}

@media (max-width: 640px) {
  .navbar-inner { height: auto; min-height: 64px; padding: .6rem .75rem; flex-wrap: wrap; }
  .navbar-logo { font-size: 1.35rem; }
  .navbar-search { order: 3; flex-basis: 100%; width: 100%; max-width: 100%; margin: .5rem 0 0; padding: 0; box-sizing: border-box; }
  .search-input-wrap, .search-bar { width: 100%; max-width: 100%; box-sizing: border-box; }
  .navbar-actions { gap: .5rem; }
  .navbar-actions .theme-toggle-btn, .navbar-actions .nav-icon-btn,
  .navbar-actions .nav-account-wrap, .navbar-actions .nav-signin-btn,
  .navbar-actions .nav-cart-btn { display: none; }
  .search-cat-select { display: none; }
  .hero-content { padding: 1rem; }
  .hero-content h1 { font-size: 2rem; }
  .hero-content p { font-size: 1rem; margin-bottom: 1rem; }
  .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .product-card__body { padding: .7rem; }
  .product-card__name { font-size: .85rem; }
  .product-card__price .sale { font-size: 1rem; }
  .shop-toolbar { padding: .75rem; margin-bottom: 1rem; }
  .shop-layout { padding: 1rem 0; }
  .cart-item { grid-template-columns: 72px 1fr; gap: .75rem; padding: .75rem; }
  .cart-item__img { width: 72px; height: 72px; }
  .cart-item > :nth-child(n+3) { grid-column: 2; }
  .mobile-bottom-nav {
    display: flex;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    height: calc(64px + env(safe-area-inset-bottom, 0px));
  }
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   TrustMall modernization layer
   Shared tokens and responsive corrections. Keep page-specific rules above
   this layer so existing PHP functionality and dashboard layouts remain intact.
   ========================================================================== */
:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #EFF6FF;
  --accent-indigo: #2563EB;
  --accent-emerald: #16A34A;
  --accent-coral: #DC2626;
  --accent-amber: #F59E0B;
  --bg-secondary: #F8FAFC;
  --text-primary: #111827;
  --text-secondary: #6B7280;
  --border: #E5E7EB;
  --radius-card: 16px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
}

html { font-size: clamp(15px, .18vw + 14px, 16px); }
body { background: var(--bg-secondary); }
.container, .section-inner, .footer-inner { width: min(100% - 2rem, 1280px); }
.section-inner { margin-inline: auto; }

.btn, .input, .select, .textarea { min-height: 44px; border-radius: 10px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-add-cart { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-add-cart:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); }

.navbar { background: rgba(17, 24, 39, .96); }
.navbar-inner { min-height: 76px; height: auto; gap: 20px; }
.navbar-search { max-width: none; margin-inline: 0; }
.search-input-wrap { min-height: 46px; border-radius: 12px; background: #fff; border-color: transparent; }
.search-input { min-width: 0; font-size: 1rem; }
.search-btn { min-height: 38px; border-radius: 8px; background: var(--primary); color: #fff; }
.cat-strip { background: #1F2937; }

.category-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-4); }
.category-card, .product-card, .checkout-accordion-step, .cart-item, .buy-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.category-card { background: #fff; transition: transform .2s ease, box-shadow .2s ease; }
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
.category-card-img { height: 140px !important; }
.products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6); }
.product-card { display: flex; flex-direction: column; background: #fff; min-width: 0; transition: transform .2s ease, box-shadow .2s ease; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.product-card__img-wrap { aspect-ratio: 1 / 1; background: #F8FAFC; }
.product-card__img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.product-card__body { display: flex; flex: 1; flex-direction: column; padding: var(--space-4); }
.product-card__name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-height: 2.8em; }
.product-card__price { margin-top: auto; padding-top: var(--space-3); }
.product-card__add-cart { margin-top: var(--space-3); }

.hero-carousel { border-radius: 0 0 var(--radius-card) var(--radius-card); overflow: hidden; }
.hero-title { font-size: clamp(2rem, 4vw, 4rem); }
.modal-overlay { padding: 16px; overflow-y: auto; }
.modal { max-height: calc(100dvh - 32px); overflow-y: auto; }
table { display: block; max-width: 100%; overflow-x: auto; }

@media (min-width: 1280px) { .products-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
@media (max-width: 768px) { .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .navbar-inner { gap: 10px; } .cat-strip-inner { padding-inline: 1rem; } }
@media (max-width: 480px) {
  .container, .section-inner, .footer-inner { width: min(100% - 1.25rem, 1280px); }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .category-card-img { height: 110px !important; }
  .products-grid { gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-card__body { padding: 10px; }
  .product-card__name { font-size: .875rem; }
  .product-card__wishlist { width: 36px; height: 36px; }
  .top-announcement-bar { font-size: .7rem; }
}
@media (max-width: 360px) {
  .products-grid { grid-template-columns: 1fr; }
}

/* Fixes for the current PHP template state */
.nav-account-wrap { position: relative; }
.nav-dropdown {
  position: absolute; top: calc(100% + .75rem); right: 0; width: 290px;
  padding: .75rem .5rem; background: #FFFFFF; color: #0F172A;
  border: 1.5px solid #E2E8F0; border-radius: 20px;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(15, 23, 42, 0.04);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-8px) scale(0.97); transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1); z-index: 9999;
}
.nav-dropdown.dropdown-open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1); }
.dropdown-header { display: flex; gap: .85rem; align-items: center; padding: .85rem 1rem; background: #F8FAFC; border: 1px solid #F1F5F9; border-radius: 14px; margin: .2rem .35rem .5rem .35rem; }
.dropdown-name, .dropdown-email { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown-name { font-weight: 800; color: #0F172A; font-family: 'Outfit', sans-serif; font-size: 1.05rem; }
.dropdown-email { font-size: .82rem; color: #64748B; font-weight: 500; }
.dropdown-item { display: flex; align-items: center; gap: .85rem; padding: .75rem 1rem; margin: .15rem .35rem; border-radius: 12px; color: #1E293B; font-weight: 700; font-size: .95rem; text-decoration: none; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
.dropdown-item svg { color: #4F46E5; stroke: #4F46E5; stroke-width: 2.2; flex-shrink: 0; }
.dropdown-item:hover { background: #EEF2FF; color: #4F46E5; transform: translateX(3px); }
.dropdown-divider { height: 1px; background: #F1F5F9; margin: .4rem .5rem; }
.hero-slide--active { opacity: 1; z-index: 1; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 0; }
.hero-bg-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13,27,42,.86), rgba(13,27,42,.22)); z-index: 1; }
.hero-content-inner { position: relative; z-index: 2; }
.hero-title { color: #fff; }
.hero-subtitle { color: rgba(255,255,255,.9); }
.hero-cta-btn { display: inline-flex; align-items: center; justify-content: center; padding: .75rem 1.25rem; border-radius: 4px; background: var(--market-yellow); color: #111; font-weight: 700; }
.hero-cta-btn:hover { background: var(--market-orange); color: #111; }
.hero-dot--active { background-color: var(--market-orange); width: 30px; }

/* Marketplace component polish */
.main-content { min-height: 55vh; }
.section-inner, .container { max-width: 1280px; }
.section-header { gap: 1rem; }
.section-header h2 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); letter-spacing: -.02em; }
.section-header a { color: var(--market-link); font-weight: 600; white-space: nowrap; }
.category-card { border-radius: 8px; background: var(--bg-primary); border: 1px solid var(--border); }
.category-card img { object-fit: contain; padding: 1.25rem; background: #fff; }
.category-card span { color: var(--text-primary); background: rgba(255,255,255,.94); bottom: 0; left: 0; right: 0; padding: .7rem 1rem; font-size: 1rem; }
.category-card::after { display: none; }
.product-card__rating { color: #de7921; }
.product-card__rating span { color: var(--market-link); }
.product-card__price .sale { color: #b12704; }
.product-card__actions { display: grid; gap: .5rem; }
.product-card__wishlist { width: 40px; height: 40px; top: .65rem; right: .65rem; border: 1px solid var(--border); }
.filter-section, .shop-toolbar, .checkout-card, .cart-summary { border-radius: 6px; box-shadow: none; border: 1px solid var(--border); }
.shop-toolbar { border: 1px solid var(--border); }
.pagination-item { border-radius: 5px; }
.search-suggestions { border-radius: 4px; overflow: hidden; }
.suggestion-item { display: flex; align-items: center; gap: .75rem; padding: .7rem .9rem; color: var(--text-primary); border-bottom: 1px solid var(--border); }
.suggestion-item:hover, .suggestion-item:focus-visible { background: var(--primary-light); }
.suggestion-img { width: 42px; height: 42px; object-fit: contain; background: #fff; border: 1px solid var(--border); }
.suggestion-text { min-width: 0; }
.suggestion-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn, .form-control, .input, .select { min-height: 44px; }
.btn-primary { border: 1px solid #fcd200; }
.btn-outline:hover { background: var(--primary-light); }
.cart-badge:empty { display: none; }
.empty-state { background: var(--bg-primary); border: 1px solid var(--border); border-radius: 8px; }
.cart-item { border: 1px solid var(--border); border-radius: 8px; }
.cart-summary { background: var(--bg-primary) !important; position: sticky; top: 104px; }
.checkout-container { max-width: 1280px; margin-inline: auto; padding-inline: 1.5rem; }
.checkout-sidebar { position: sticky; top: 104px; height: fit-content; }
.payment-method-card, .address-card { border-radius: 6px; }
.site-footer { border-top: 1px solid var(--border); }

@media (max-width: 900px) {
  .section-inner, .hero-content { width: min(100% - 2rem, 760px); }
  .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
  .trust-pillars { margin-inline: 1rem; }
  .checkout-sidebar { position: static; }
}

/* Role gateway: keeps buyer and seller journeys clear on every screen. */
.portal-body { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; background: var(--bg-secondary); color: var(--text-primary); }
.portal-shell { width: min(100%, 980px); text-align: center; }
.portal-brand { display: inline-block; margin-bottom: 2.5rem; color: var(--text-primary); font: 800 2rem/1 'Outfit', sans-serif; text-decoration: none; }
.portal-brand span { color: var(--market-orange); }
.portal-eyebrow { color: var(--market-orange); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.portal-shell h1 { margin: .75rem 0 .6rem; font: 800 clamp(2rem, 4vw, 3.25rem)/1.05 'Outfit', sans-serif; }
.portal-intro { max-width: 620px; margin: 0 auto 2rem; color: var(--text-secondary); font-size: 1.05rem; }
.portal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; text-align: left; }
.portal-card { display: flex; min-height: 280px; flex-direction: column; padding: 2rem; border: 1px solid var(--border); border-radius: 18px; background: var(--bg-primary); box-shadow: var(--shadow-md); color: inherit; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.portal-card:hover, .portal-card--selected { border-color: var(--market-orange); box-shadow: 0 18px 42px rgba(15, 23, 42, .14); transform: translateY(-4px); }
.portal-card.seller:hover, .portal-card--selected.seller { border-color: var(--market-navy); }
.portal-card--admin:hover { border-color: #7c3aed; }
.portal-icon { font-size: 2.3rem; margin-bottom: 1.5rem; }
.portal-card-kicker { color: var(--text-secondary); font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.portal-card h2 { margin: .4rem 0 .65rem; font: 800 1.6rem/1.1 'Outfit', sans-serif; }
.portal-card p { margin: 0; color: var(--text-secondary); line-height: 1.6; }
.portal-cta { margin-top: auto; padding-top: 1.5rem; color: var(--market-link); font-weight: 800; }
.portal-footer { margin-top: 2rem; color: var(--text-secondary); font-size: .9rem; }
.portal-footer a { color: var(--market-link); font-weight: 700; }
@media (max-width: 640px) { .portal-body { padding: 1.25rem; } .portal-brand { margin-bottom: 1.75rem; } .portal-grid { grid-template-columns: 1fr; } .portal-card { min-height: 220px; padding: 1.5rem; } }
.seller-product-form { max-width: 900px; padding: clamp(1rem, 3vw, 2rem); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-primary); }
.seller-product-form .form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-help { display: block; margin-top: .4rem; color: var(--text-secondary); font-size: .8rem; }
@media (max-width: 640px) { .seller-product-form .form-row { grid-template-columns: 1fr; } .admin-topbar { gap: .75rem; align-items: flex-start; } }

/* ==========================================================================
   Phase 2 — Buyer Experience Styles
   ========================================================================== */
#gallery-main-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  cursor: zoom-in;
}
#gallery-main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.1s ease-out;
}
.gallery-zoom-hint {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  pointer-events: none;
}
.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}
.gallery-thumb {
  border: 2px solid var(--border);
  border-radius: 6px;
  padding: 2px;
  background: #fff;
  width: 60px;
  height: 60px;
  cursor: pointer;
  transition: var(--transition);
}
.gallery-thumb.active, .gallery-thumb:hover {
  border-color: var(--primary);
}

/* Pincode checker widget */
.pincode-checker {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-secondary);
}
.pincode-checker h4 {
  margin: 0 0 0.5rem 0;
  font-size: 0.92rem;
  color: var(--text-primary);
}
.pincode-input-wrap {
  display: flex;
  gap: 0.5rem;
}
.pincode-input-wrap input {
  flex: 1;
  min-height: 38px;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.9rem;
}
.pincode-check-btn {
  padding: 0.25rem 1rem;
  border: 1px solid var(--primary);
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}
.pincode-check-btn:hover {
  background: var(--primary-dark);
}
.pincode-estimate-output {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Dynamic Carousels */
.products-carousel-wrap {
  position: relative;
  overflow: hidden;
  margin-top: 1rem;
  margin-bottom: 2rem;
}
.products-carousel-list {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding: 0.5rem 0.25rem 1.5rem;
  scrollbar-width: thin;
}
.products-carousel-list::-webkit-scrollbar {
  height: 6px;
}
.products-carousel-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}
.products-carousel-item {
  flex: 0 0 200px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}
.products-carousel-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Seller card details */
.seller-card {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-secondary);
}
.seller-card-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}
.seller-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.seller-card-name a {
  color: var(--primary);
  text-decoration: none;
}
.seller-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}

/* ==========================================================================
   21. Advanced Design Elements Overhaul
   ========================================================================== */

/* Cart Checkout Steps progress */
.checkout-steps-tracker {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2rem 0;
  padding: 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
}
.checkout-steps-tracker::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--border);
  z-index: 1;
  transform: translateY(-50%);
}
.checkout-step-node {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}
.checkout-step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition);
}
.checkout-step-node.active .checkout-step-circle {
  border-color: var(--accent-indigo);
  background: var(--accent-indigo);
  color: var(--white);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}
.checkout-step-node.completed .checkout-step-circle {
  border-color: var(--accent-emerald);
  background: var(--accent-emerald);
  color: var(--white);
}
.checkout-step-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.checkout-step-node.active .checkout-step-label {
  color: var(--accent-indigo);
}

/* Free Shipping Tracker */
.free-shipping-tracker {
  padding: 1.25rem;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  border: 1px solid rgba(79, 70, 229, 0.1);
}
.free-shipping-msg {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.free-shipping-progress-bg {
  height: 8px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.free-shipping-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-indigo) 0%, var(--accent-emerald) 100%);
  border-radius: 10px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Order timeline visualization */
.order-timeline-vertical {
  position: relative;
  padding-left: 2rem;
  margin: 1.5rem 0;
}
.order-timeline-vertical::before {
  content: '';
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 7px;
  width: 2px;
  background: var(--border);
}
.order-timeline-node {
  position: relative;
  padding-bottom: 1.5rem;
}
.order-timeline-node:last-child {
  padding-bottom: 0;
}
.order-timeline-dot {
  position: absolute;
  left: -2rem;
  top: 0.25rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--border);
  z-index: 2;
  transition: var(--transition);
}
.order-timeline-node.completed .order-timeline-dot {
  border-color: var(--accent-emerald);
  background: var(--accent-emerald);
}
.order-timeline-node.active .order-timeline-dot {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}
.order-timeline-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.order-timeline-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}
.order-timeline-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Dual Column Auth & Choose Layouts */
.auth-split-grid {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}
@media (min-width: 992px) {
  .auth-split-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.auth-form-side {
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--bg-primary);
}
.auth-hero-side {
  display: none;
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  position: relative;
  overflow: hidden;
  padding: 4rem;
  color: var(--white);
  flex-direction: column;
  justify-content: center;
}
@media (min-width: 992px) {
  .auth-hero-side {
    display: flex;
  }
}
.auth-hero-decor {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: radial-gradient(var(--accent-indigo) 1px, transparent 1px);
  background-size: 24px 24px;
}
.auth-benefit-list {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 460px;
}
.auth-benefit-item {
  display: flex;
  gap: 1rem;
}
.auth-benefit-icon {
  font-size: 1.5rem;
  color: var(--market-yellow);
}
.auth-benefit-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.auth-benefit-text {
  font-size: 0.9rem;
  color: var(--gray-300);
  line-height: 1.5;
}

/* Reviews Histogram Breakdown */
.reviews-histogram {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 2rem;
}
.histogram-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}
.histogram-label {
  width: 50px;
  color: var(--text-secondary);
}
.histogram-bar-bg {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.histogram-bar-fill {
  height: 100%;
  background: var(--accent-amber);
  border-radius: 4px;
}
.histogram-percent {
  width: 40px;
  text-align: right;
  color: var(--text-muted);
}

/* ==========================================================================
   Visual Polish Pass Extensions
   ========================================================================== */

/* Image Zoom on Hover */
.product-card__img-wrap img {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.product-card:hover .product-card__img-wrap img {
  transform: scale(1.05);
}

/* Keyboard accessibility outlines */
:focus-visible {
  outline: 3px solid var(--accent-indigo) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.25) !important;
}

/* Premium Empty State Layout */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  max-width: 500px;
  margin: 3rem auto;
}
.empty-state svg {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.25rem;
  color: var(--gray-400);
}
.empty-state h2, .empty-state h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.empty-state p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* Toast Notification Styles */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--accent-indigo);
  box-shadow: var(--shadow-lg);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  min-width: 280px;
  animation: slideInToast 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.toast-item.success {
  border-left-color: var(--accent-emerald);
}
.toast-item.error {
  border-left-color: var(--accent-coral);
}
@keyframes slideInToast {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero Glass Card Overlay */
.hero-glass-card {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-card);
  padding: 2.5rem 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  max-width: 540px;
}

/* Buy Box Trust Badges */
.buy-box-trust {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.trust-item svg {
  color: var(--accent-indigo);
}

/* Checkout Progress Stepper */
.checkout-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.step.active, .step.completed {
  color: var(--accent-indigo);
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  transition: all var(--duration-fast) var(--ease-smooth);
}

.step.active .step-circle {
  background: var(--brand-gradient);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.step.completed .step-circle {
  background: var(--accent-emerald);
  color: var(--white);
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 1rem;
  transition: background var(--duration-normal) var(--ease-smooth);
}

.step-line.completed {
  background: var(--accent-emerald);
}

/* ==========================================================================
   9. Cart Page Components
   ========================================================================== */
.cart-layout {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 2rem 0;
}

.cart-main {
  flex: 1;
  min-width: 300px;
}

.cart-main-heading {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  font-family: var(--font-heading);
}

.cart-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.cart-item-img-link {
  flex-shrink: 0;
}

.cart-item-img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.cart-item-details {
  flex: 1;
}

.cart-item-details .item-cat {
  font-size: 0.85rem;
  color: var(--accent-indigo);
  font-weight: 600;
}

.cart-item-name {
  margin: 0.25rem 0 0.5rem 0;
  font-size: 1.1rem;
  font-family: var(--font-heading);
}

.cart-item-name a {
  color: var(--text-primary);
}

.cart-item-name a:hover {
  color: var(--accent-indigo);
}

.cart-item-details .item-price {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.cart-item-details .item-stock {
  color: var(--accent-emerald);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
}

.cart-item-details .item-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.qty-stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-primary);
}

.qty-stepper .qty-btn {
  padding: 0.25rem 0.75rem;
  background: var(--bg-tertiary);
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  font-weight: 700;
  transition: background var(--duration-fast) var(--ease-smooth);
}

.qty-stepper .qty-btn:hover {
  background: var(--gray-300);
}

.qty-stepper .qty-input {
  width: 44px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  outline: none;
  font-family: inherit;
  font-weight: 600;
  background: transparent;
  color: var(--text-primary);
}

.cart-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--duration-fast) var(--ease-smooth);
}

.cart-action-remove {
  color: var(--accent-coral);
  margin-right: 1rem;
}

.cart-action-remove:hover {
  color: var(--accent-coral-dark);
  text-decoration: underline;
}

.cart-action-save {
  color: var(--accent-indigo);
}

.cart-action-save:hover {
  text-decoration: underline;
}

.cart-item-total {
  font-weight: 700;
  font-size: 1.15rem;
  text-align: right;
  color: var(--text-primary);
}

.cart-footer {
  text-align: right;
  margin-top: 1.5rem;
  font-size: 1.2rem;
  color: var(--text-primary);
}

.cart-summary {
  width: 350px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  padding: 2rem;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  height: fit-content;
}

.cart-summary-heading {
  margin-bottom: 1.5rem;
  font-family: var(--font-heading);
}

.free-shipping-tracker {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--brand-gradient-subtle);
  border-radius: var(--radius-md);
  border: 1px solid rgba(79, 70, 229, 0.15);
}

.free-shipping-msg {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.free-shipping-msg--success {
  color: var(--accent-emerald);
}

.free-shipping-progress-bg {
  height: 6px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.free-shipping-progress-fill {
  height: 100%;
  background: var(--brand-gradient);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.coupon-section {
  margin-bottom: 1.5rem;
  display: flex;
  gap: 0.5rem;
}

.coupon-input {
  flex: 1;
}

.coupon-msg {
  font-size: 0.85rem;
  margin-top: -1rem;
  margin-bottom: 1rem;
}

.summary-breakdown {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-bottom: 1.5rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.summary-row--discount {
  color: var(--accent-emerald);
  font-weight: 600;
}

.summary-free {
  color: var(--accent-emerald);
  font-weight: 700;
}

.summary-row--total {
  margin-top: 1rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.cart-checkout-btn {
  padding: 1rem;
  font-size: 1.05rem;
}

.cart-trust-badges {
  display: flex;
  justify-content: space-around;
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.cart-trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  font-weight: 500;
}

.cart-trust-item svg {
  color: var(--accent-indigo);
}

/* ==========================================================================
   10. Product Detail & Review Component Classes
   ========================================================================== */
.stock-low-tag {
  color: var(--accent-amber);
  margin-left: 1rem;
  font-weight: 600;
  font-size: 0.875rem;
}

.buy-now-form {
  margin-top: 0.5rem;
  display: block;
  width: 100%;
}

.pincode-checker {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.seller-card {
  margin-top: 1.25rem;
  padding: 1.25rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.reviews-section {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.review-card {
  margin-bottom: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  box-shadow: var(--shadow-card);
}

.review-form-wrap {
  margin-top: 2rem;
  padding: 1.75rem;
  background: var(--tm-surface) !important;
  border: 1px solid var(--tm-line) !important;
  border-radius: var(--tm-radius) !important;
  box-shadow: var(--tm-shadow) !important;
}

.star-selector {
  font-size: 1.5rem;
  cursor: pointer;
  margin-bottom: 1rem;
  display: flex;
  gap: 0.25rem;
}

.star-opt {
  color: var(--gray-300);
  transition: color var(--duration-fast) var(--ease-smooth);
}

.star-opt:hover, .star-opt.active {
  color: var(--accent-amber);
}

.review-input {
  display: block;
  margin-bottom: 1rem;
  width: 100%;
}

.review-login-prompt {
  padding: 2.25rem 1.5rem;
  border: 1px solid var(--tm-line);
  border-radius: var(--tm-radius);
  text-align: center;
  background: var(--tm-canvas) !important;
  margin-top: 1rem;
}

.review-login-prompt p {
  color: var(--tm-muted) !important;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.related-products-section {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   11. Trust Pillars & Promo Banner Enhancements
   ========================================================================== */
.trust-pillar {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: var(--radius-card);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: all var(--duration-normal) var(--ease-smooth);
}

.trust-pillar:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(79, 70, 229, 0.25);
}

.trust-pillar .trust-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--brand-gradient-subtle);
  color: var(--accent-indigo);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  transition: transform var(--duration-normal) var(--ease-spring);
}

.trust-pillar:hover .trust-icon {
  transform: scale(1.12) rotate(6deg);
  background: var(--brand-gradient);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.promo-banner {
  background: var(--brand-gradient);
  border-radius: var(--radius-xl);
  padding: 3rem;
  color: var(--white);
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(79, 70, 229, 0.25);
}

.promo-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: var(--glass-blur);
  pointer-events: none;
}




/* ==========================================================================
   AMAZON CLONE REDESIGN OVERRIDES
   ========================================================================== */

/* Body Background */
body {
    background-color: var(--market-bg) !important;
}

/* Product Card - Amazon Style */
.product-card {
    background-color: #fff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 1rem;
    position: relative;
}

.product-card:hover {
    box-shadow: 0 14px 28px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.08);
    transform: translateY(-4px);
}

.product-card__img-wrap {
    background-color: #fff;
    padding: 1rem;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
}

.product-card__img-wrap img {
    transition: filter 0.3s ease, transform 0.3s ease !important;
}

.product-card:hover .product-card__img-wrap img {
    filter: brightness(80%);
    transform: scale(1.02);
}

/* Hover View Button Overlay */
.product-card__view-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    background-color: #fff;
    color: var(--market-navy);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    z-index: 10;
    border: 1px solid #ddd;
}

.product-card:hover .product-card__view-btn {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Card Text */
.product-card__name {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--market-link);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.product-card__name:hover {
    color: #c45500;
    text-decoration: underline;
}

.product-card__price .sale {
    font-size: 1.25rem;
    font-weight: 700;
    color: #B12704;
}

.product-card__price .old {
    color: #565959;
    font-size: 0.85rem;
}


/* Support shop.php card image wrapper */
.card-img-wrap {
    background-color: #fff;
    padding: 1rem;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
}

.card-img-wrap img {
    transition: filter 0.3s ease, transform 0.3s ease !important;
}

.product-card:hover .card-img-wrap img {
    filter: brightness(80%);
    transform: scale(1.02);
}

.product-card:hover .product-card__view-btn {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.btn-buy-now {
  background: var(--market-orange) !important;
  color: var(--market-navy) !important;
  box-shadow: 0 2px 5px rgba(15,17,17,.15) !important;
  border: 1px solid #ff8f00 !important;
  border-radius: 8px !important;
}

.btn-buy-now:hover {
  background: #fa8900 !important;
  border-color: #e37e00 !important;
}

.btn-add-cart {
  background: var(--market-yellow) !important;
  color: var(--market-navy) !important;
  box-shadow: 0 2px 5px rgba(15,17,17,.15) !important;
  border: 1px solid #fcd200 !important;
  border-radius: 8px !important;
}

.btn-add-cart:hover {
  background: #f7ca00 !important;
  border-color: #f2c200 !important;
}

.buy-box {
  background: #fff;
  border: 1px solid #D5D9D9;
  border-radius: 8px;
  padding: 1.25rem;
}


/* Amazon Hero Overrides */
.hero-glass-card {
    background: #fff !important;
    backdrop-filter: none !important;
    border: 1px solid #ddd !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    border-radius: 8px !important;
}

.hero-cta-btn {
    background: var(--market-yellow) !important;
    color: var(--market-navy) !important;
    border: 1px solid #fcd200 !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 5px rgba(15,17,17,.15) !important;
}


/* Details/Summary Filter styling */
details.filter-section summary {
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none; /* Hide default arrow in some browsers */
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

details.filter-section summary::-webkit-details-marker {
    display: none;
}

details.filter-section summary::after {
    content: '+';
    font-size: 1.25rem;
    font-weight: normal;
}

details[open].filter-section summary::after {
    content: '-';
}

details.filter-section {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border: none;
}


/* Product Page Mobile Sticky CTAs */
@media (max-width: 768px) {
    .product-detail-page .buy-box {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        margin: 0;
        border-radius: 12px 12px 0 0;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.1) !important;
        background: #fff;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        padding: 1rem;
        border-top: 1px solid #ddd;
    }
    .product-detail-page .buy-box > * {
        display: none; /* Hide extraneous buy box info on mobile fixed row */
    }
    .product-detail-page .buy-box > .btn-add-cart,
    .product-detail-page .buy-box > .buy-now-form {
        display: block;
        flex: 1;
        margin: 0;
    }
    .product-detail-page .buy-box > .buy-now-form .btn {
        margin: 0;
    }
    /* Add padding to the body so content isn't hidden behind the fixed buy box */
    .product-detail-page {
        padding-bottom: 80px;
    }
}

/* Amazon Footer Overrides */
.site-footer {
    background-color: #232F3E;
    color: #fff;
    padding: 3rem 0;
    margin-top: 3rem;
    font-family: Arial, sans-serif;
}

.site-footer a {
    color: #DDD;
    text-decoration: none;
    font-size: 0.95rem;
}

.site-footer a:hover {
    text-decoration: underline;
    color: #fff;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-top-row {
    text-align: center;
    background-color: #37475A;
    margin: -3rem -1.5rem 2rem -1.5rem;
    padding: 1rem;
}

.back-to-top-btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.back-to-top-btn svg {
    margin-right: 0.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #3a4553;
}

.footer-brand-col .footer-logo {
    font-size: 1.5rem;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 1rem;
    color: #fff;
}

.logo-trust { color: #fff; }
.logo-mall { color: #f7ca00; }

.footer-brand-tagline {
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.footer-newsletter {
    margin-bottom: 1.5rem;
}

.newsletter-label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-input {
    flex: 1;
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid #ccc;
    color: #000;
}

.newsletter-btn {
    background: var(--market-yellow);
    color: #111;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: bold;
}

.footer-socials {
    display: flex;
    gap: 1rem;
}

.social-link {
    color: #fff;
}

.footer-col-heading {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-trust-badges {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 2rem 0;
    border-bottom: 1px solid #3a4553;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
}

.trust-badge strong {
    display: block;
    font-size: 1rem;
}

.trust-badge span {
    font-size: 0.85rem;
    color: #ccc;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    font-size: 0.9rem;
    color: #ccc;
}

.footer-payment-icons {
    display: flex;
    gap: 0.5rem;
}

.payment-icon {
    background: #fff;
    color: #111;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-trust-badges {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* ────────────────────────────────────────────────────────
   PREMIUM MOBILE + DESKTOP RESPONSIVE LAYOUT & DESIGN SYSTEM
   ──────────────────────────────────────────────────────── */
:root {
  --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --hover-gradient: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
  --shadow-premium: 0 10px 30px -10px rgba(79, 70, 229, 0.15), 0 1px 3px rgba(0, 0, 0, 0.05);
}

body {
  background-color: #f8fafc;
  color: #1e293b;
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* Modern Card Layout */
.glass-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: var(--shadow-premium);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 35px -10px rgba(79, 70, 229, 0.22), 0 4px 6px rgba(0, 0, 0, 0.03);
}

/* Responsive Grid overrides */
@media (max-width: 1024px) {
  .checkout-container {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
}

@media (max-width: 768px) {
  /* Cart & Table cards for mobile */
  .cart-table thead {
    display: none;
  }
  .cart-table, .cart-table tbody, .cart-table tr, .cart-table td {
    display: block;
    width: 100%;
  }
  .cart-table tr {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 1rem;
    padding: 1rem;
    box-shadow: var(--shadow-premium);
  }
  .cart-table td {
    text-align: right;
    padding: 0.5rem 0;
    border: none;
    position: relative;
  }
  .cart-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    font-weight: 700;
    color: #64748b;
    font-size: 0.8rem;
    text-transform: uppercase;
  }
  .cart-table td.product-cell {
    text-align: left;
    padding-left: 0;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.75rem;
  }
  .cart-table td.product-cell::before {
    display: none;
  }
}

/* Beautiful Interactive Buttons */
.btn-primary {
  background: var(--primary-gradient) !important;
  border: none !important;
  color: #fff !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3) !important;
  transition: all 0.2s ease !important;
}
.btn-primary:hover {
  background: var(--hover-gradient) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45) !important;
}

/* Styled Forms */
.form-control {
  border-radius: 8px !important;
  border: 1px solid #cbd5e1 !important;
  padding: 0.75rem 1rem !important;
  transition: all 0.2s ease !important;
}
.form-control:focus {
  border-color: #4f46e5 !important;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15) !important;
}

/* ============================================================
   PHASE 7 UI ENHANCEMENTS — Premium Marketplace Upgrades
   ============================================================ */

/* Hero Section */
.hero-banner {
  background: var(--brand-gradient);
  min-height: 420px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  padding: 3rem;
  color: white;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-primary);
}

/* Premium Product Card enhancements */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.5rem;
}

.product-card {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
}

.product-card__img, .card-img-wrap img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-card__img, .product-card:hover .card-img-wrap img {
  transform: scale(1.05);
}

.discount-badge, .product-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent-coral);
  color: white;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: bold;
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Better section headers */
.premium-section-header {
  position: relative;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.premium-section-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--brand-gradient);
  border-radius: 2px;
}

.premium-section-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0;
}

/* Sticky filter sidebar */
.filter-sidebar {
  position: sticky;
  top: 100px; /* Account for navbar */
  height: max-content;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  border-right: 1px solid var(--border);
  padding-right: 1.5rem;
}

.filter-sidebar::-webkit-scrollbar {
  width: 4px;
}

.shop-toolbar {
  position: sticky;
  top: 80px;
  z-index: 10;
  background: var(--bg-secondary);
  padding: 1rem 0;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

/* Active Filters */
.active-filters-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-chip {
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
}

/* Premium Empty State */
.premium-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border);
  margin-bottom: 3rem;
}

.premium-empty-state .empty-state-icon {
  width: 80px;
  height: 80px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.premium-empty-state h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.premium-empty-state p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* Premium Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.pagination .btn {
  min-height: 40px;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
}

.pagination .btn-primary {
  background: var(--brand-gradient);
  color: white;
  border: none;
}


