/* ============================================
   E-COMMERCE DESIGN SYSTEM
   Premium Dark Theme with Vibrant Accents
   ============================================ */

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

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
  /* Primary Palette */
  --primary: #6C5CE7;
  --primary-light: #A29BFE;
  --primary-dark: #5A4BD1;
  --primary-glow: rgba(108, 92, 231, 0.3);

  /* Accent Colors */
  --accent: #00D2FF;
  --accent-warm: #FD79A8;
  --accent-success: #00B894;
  --accent-warning: #FDCB6E;
  --accent-danger: #FF6B6B;

  /* Backgrounds */
  --bg-primary: #0F0F1A;
  --bg-secondary: #1A1A2E;
  --bg-card: #16213E;
  --bg-card-hover: #1C2A4A;
  --bg-input: #1A1A2E;
  --bg-overlay: rgba(15, 15, 26, 0.85);

  /* Text */
  --text-primary: #EAEAEA;
  --text-secondary: #A0A0B8;
  --text-muted: #6C6C80;
  --text-accent: #6C5CE7;

  /* Borders */
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(108, 92, 231, 0.4);
  --border-focus: rgba(108, 92, 231, 0.8);

  /* Glassmorphism */
  --glass-bg: rgba(22, 33, 62, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6C5CE7, #A29BFE);
  --gradient-accent: linear-gradient(135deg, #00D2FF, #6C5CE7);
  --gradient-warm: linear-gradient(135deg, #FD79A8, #6C5CE7);
  --gradient-hero: linear-gradient(135deg, #0F0F1A 0%, #1A1A2E 50%, #16213E 100%);
  --gradient-card: linear-gradient(145deg, rgba(22, 33, 62, 0.8), rgba(26, 26, 46, 0.4));

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(108, 92, 231, 0.3);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 50%;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-xs: 0.75rem;
  --font-sm: 0.875rem;
  --font-base: 1rem;
  --font-lg: 1.125rem;
  --font-xl: 1.25rem;
  --font-2xl: 1.5rem;
  --font-3xl: 2rem;
  --font-4xl: 2.5rem;
  --font-5xl: 3.5rem;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

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

a:hover {
  color: var(--accent);
}

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

ul, ol {
  list-style: none;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-dark);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.page-wrapper {
  min-height: calc(100vh - 72px);
  padding-top: 72px;
}

.section {
  padding: var(--space-3xl) 0;
}

.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .container { padding: 0 var(--space-md); }
}

@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 15, 26, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: all var(--transition-base);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-xl);
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: var(--font-sm);
  padding: var(--space-sm) 0;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
  transition: width var(--transition-base);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.cart-btn {
  position: relative;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  padding: var(--space-sm);
  transition: color var(--transition-fast);
}

.cart-btn:hover {
  color: var(--primary-light);
}

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

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
  
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border);
    gap: var(--space-md);
  }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-weight: 600;
  font-size: var(--font-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
  outline: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px var(--primary-glow);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: var(--primary-light);
  border: 1px solid var(--primary);
}

.btn-secondary:hover {
  background: rgba(108, 92, 231, 0.1);
  border-color: var(--primary-light);
  color: var(--primary-light);
}

.btn-accent {
  background: var(--gradient-accent);
  color: white;
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 210, 255, 0.3);
  color: white;
}

.btn-danger {
  background: var(--accent-danger);
  color: white;
}

.btn-danger:hover {
  background: #ff5252;
  transform: translateY(-1px);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.btn-sm {
  padding: 8px 16px;
  font-size: var(--font-xs);
}

.btn-lg {
  padding: 16px 32px;
  font-size: var(--font-base);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--gradient-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--bg-secondary);
}

.card-body {
  padding: var(--space-lg);
}

.card-title {
  font-size: var(--font-lg);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.card-text {
  color: var(--text-secondary);
  font-size: var(--font-sm);
  margin-bottom: var(--space-md);
  line-height: 1.5;
}

.card-footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ============================================
   PRODUCT CARD
   ============================================ */
.product-card {
  position: relative;
  background: var(--gradient-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  cursor: pointer;
}

.product-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(108, 92, 231, 0.15);
}

.product-card .product-image {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.product-card .product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: var(--font-xs);
  font-weight: 700;
  z-index: 2;
}

.badge-discount {
  background: var(--accent-danger);
  color: white;
  animation: pulse-badge 2s infinite;
}

.badge-expiring {
  background: var(--accent-warning);
  color: #1a1a1a;
}

.badge-expired {
  background: #666;
  color: white;
}

.badge-category {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  z-index: 2;
}

@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.product-info {
  padding: var(--space-md) var(--space-lg) var(--space-lg);
}

.product-name {
  font-size: var(--font-base);
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-desc {
  font-size: var(--font-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-pricing {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.product-price {
  font-size: var(--font-xl);
  font-weight: 800;
  color: var(--accent);
}

.product-original-price {
  font-size: var(--font-sm);
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-discount-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-danger);
  background: rgba(255, 107, 107, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

.product-actions {
  display: flex;
  gap: var(--space-sm);
}

.product-actions .btn {
  flex: 1;
}

.expiry-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--accent-warning);
  margin-bottom: var(--space-sm);
}

.expiry-indicator.danger {
  color: var(--accent-danger);
}

.expiry-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: var(--font-sm);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: var(--font-sm);
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-input::placeholder {
  color: var(--text-muted);
}

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

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23A0A0B8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.form-error {
  color: var(--accent-danger);
  font-size: var(--font-xs);
  margin-top: var(--space-xs);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
  padding: var(--space-lg);
}

.auth-container {
  width: 100%;
  max-width: 440px;
}

.auth-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  box-shadow: var(--glass-shadow);
}

.auth-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.auth-header h1 {
  font-size: var(--font-2xl);
  font-weight: 800;
  margin-bottom: var(--space-sm);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: var(--font-sm);
}

.auth-footer {
  text-align: center;
  margin-top: var(--space-lg);
  color: var(--text-secondary);
  font-size: var(--font-sm);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
  color: var(--text-muted);
  font-size: var(--font-sm);
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--primary-glow), transparent 70%);
  border-radius: 50%;
  animation: float-orb 8s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -15%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 210, 255, 0.15), transparent 70%);
  border-radius: 50%;
  animation: float-orb 10s ease-in-out infinite reverse;
}

@keyframes float-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 16px;
  background: rgba(108, 92, 231, 0.1);
  border: 1px solid rgba(108, 92, 231, 0.3);
  border-radius: 30px;
  font-size: var(--font-xs);
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: var(--space-lg);
}

.hero h1 {
  font-size: var(--font-5xl);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
}

.hero h1 span {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: var(--font-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: var(--space-2xl);
  margin-top: var(--space-3xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

.hero-stat h3 {
  font-size: var(--font-3xl);
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat p {
  font-size: var(--font-sm);
  color: var(--text-muted);
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .hero h1 { font-size: var(--font-3xl); }
  .hero-stats { gap: var(--space-lg); }
  .hero-stat h3 { font-size: var(--font-2xl); }
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-header h2 {
  font-size: var(--font-3xl);
  font-weight: 800;
  margin-bottom: var(--space-sm);
}

.section-header h2 span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-header p {
  color: var(--text-secondary);
  font-size: var(--font-base);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   FILTERS & SEARCH
   ============================================ */
.filters-bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--font-sm);
  outline: none;
  transition: border-color var(--transition-fast);
}

.search-box input:focus {
  border-color: var(--primary);
}

.search-box::before {
  content: '🔍';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
}

.filter-select {
  padding: 10px 36px 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--font-sm);
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23A0A0B8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.filter-select option {
  background: var(--bg-secondary);
}

/* ============================================
   CART PAGE
   ============================================ */
.cart-page {
  padding: var(--space-2xl) 0;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.cart-item {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--gradient-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-fast);
}

.cart-item:hover {
  border-color: var(--border-hover);
}

.cart-item-image {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
}

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

.cart-item-name {
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.cart-item-price {
  color: var(--accent);
  font-weight: 700;
  font-size: var(--font-lg);
}

.cart-item-original {
  color: var(--text-muted);
  text-decoration: line-through;
  font-size: var(--font-sm);
  margin-left: var(--space-sm);
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.quantity-control button {
  width: 36px;
  height: 36px;
  background: var(--bg-secondary);
  border: none;
  color: var(--text-primary);
  font-size: var(--font-lg);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.quantity-control button:hover {
  background: var(--primary-dark);
}

.quantity-control span {
  width: 40px;
  text-align: center;
  font-weight: 600;
  font-size: var(--font-sm);
}

.cart-item-total {
  font-weight: 700;
  font-size: var(--font-lg);
  color: var(--text-primary);
  min-width: 100px;
  text-align: right;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: var(--space-sm);
  transition: color var(--transition-fast);
}

.cart-item-remove:hover {
  color: var(--accent-danger);
}

@media (max-width: 768px) {
  .cart-item {
    flex-wrap: wrap;
  }
  .cart-item-image { width: 70px; height: 70px; }
}

/* Cart Summary */
.cart-summary {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  position: sticky;
  top: 90px;
}

.cart-summary h3 {
  font-size: var(--font-xl);
  font-weight: 700;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

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

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

.summary-row .discount {
  color: var(--accent-success);
}

/* ============================================
   ORDER PAGES
   ============================================ */
.order-card {
  background: var(--gradient-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  transition: border-color var(--transition-fast);
}

.order-card:hover {
  border-color: var(--border-hover);
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.order-id {
  font-weight: 700;
  font-size: var(--font-base);
}

.order-date {
  color: var(--text-muted);
  font-size: var(--font-sm);
}

.order-status {
  padding: 4px 14px;
  border-radius: 20px;
  font-size: var(--font-xs);
  font-weight: 600;
}

.status-pending { background: rgba(253, 203, 110, 0.15); color: var(--accent-warning); }
.status-confirmed { background: rgba(108, 92, 231, 0.15); color: var(--primary-light); }
.status-shipped { background: rgba(0, 210, 255, 0.15); color: var(--accent); }
.status-delivered { background: rgba(0, 184, 148, 0.15); color: var(--accent-success); }
.status-cancelled { background: rgba(255, 107, 107, 0.15); color: var(--accent-danger); }

.order-items-list {
  margin-bottom: var(--space-md);
}

.order-item-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--font-sm);
}

.order-item-row:last-child {
  border-bottom: none;
}

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

.order-total {
  text-align: right;
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--accent);
}

/* ============================================
   CHECKOUT PAGE
   ============================================ */
.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: var(--space-xl);
  align-items: start;
}

@media (max-width: 768px) {
  .checkout-grid { grid-template-columns: 1fr; }
}

/* ============================================
   ADMIN LAYOUT
   ============================================ */
.admin-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: var(--space-lg);
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.admin-sidebar .logo {
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: var(--font-sm);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.sidebar-link:hover {
  background: rgba(108, 92, 231, 0.1);
  color: var(--text-primary);
}

.sidebar-link.active {
  background: var(--gradient-primary);
  color: white;
}

.sidebar-link .icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.admin-main {
  margin-left: 260px;
  padding: var(--space-xl);
  min-height: 100vh;
}

.admin-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.admin-page-header h1 {
  font-size: var(--font-2xl);
  font-weight: 800;
}

/* Dashboard Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}

.stat-card {
  background: var(--gradient-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-base);
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: var(--space-md);
}

.stat-card .stat-value {
  font-size: var(--font-2xl);
  font-weight: 800;
  margin-bottom: var(--space-xs);
}

.stat-card .stat-label {
  font-size: var(--font-sm);
  color: var(--text-muted);
}

.stat-icon.purple { background: rgba(108, 92, 231, 0.15); }
.stat-icon.blue { background: rgba(0, 210, 255, 0.15); }
.stat-icon.green { background: rgba(0, 184, 148, 0.15); }
.stat-icon.pink { background: rgba(253, 121, 168, 0.15); }
.stat-icon.orange { background: rgba(253, 203, 110, 0.15); }
.stat-icon.red { background: rgba(255, 107, 107, 0.15); }

/* ============================================
   TABLES
   ============================================ */
.table-container {
  background: var(--gradient-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  background: var(--bg-secondary);
  padding: 14px 16px;
  font-size: var(--font-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 14px 16px;
  font-size: var(--font-sm);
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  width: 90%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: transform var(--transition-base);
}

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

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

.modal-header h2 {
  font-size: var(--font-xl);
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  padding: var(--space-xs);
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-primary);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: var(--font-sm);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-width: 300px;
  max-width: 450px;
  animation: slide-in 0.3s ease, fade-out 0.3s ease 3.7s forwards;
  box-shadow: var(--shadow-lg);
}

.toast-success {
  background: rgba(0, 184, 148, 0.15);
  border: 1px solid rgba(0, 184, 148, 0.3);
  color: var(--accent-success);
}

.toast-error {
  background: rgba(255, 107, 107, 0.15);
  border: 1px solid rgba(255, 107, 107, 0.3);
  color: var(--accent-danger);
}

.toast-warning {
  background: rgba(253, 203, 110, 0.15);
  border: 1px solid rgba(253, 203, 110, 0.3);
  color: var(--accent-warning);
}

.toast-info {
  background: rgba(0, 210, 255, 0.15);
  border: 1px solid rgba(0, 210, 255, 0.3);
  color: var(--accent);
}

@keyframes slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fade-out {
  from { opacity: 1; }
  to { opacity: 0; transform: translateX(50px); }
}

/* ============================================
   LOADING STATES
   ============================================ */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-card) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

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

/* ============================================
   EMPTY STATES
   ============================================ */
.empty-state {
  text-align: center;
  padding: var(--space-3xl);
}

.empty-state .icon {
  font-size: 64px;
  margin-bottom: var(--space-lg);
  opacity: 0.5;
}

.empty-state h3 {
  font-size: var(--font-xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

/* ============================================
   INVOICE
   ============================================ */
.invoice-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  max-width: 600px;
  margin: 0 auto;
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 2px solid var(--border);
}

.invoice-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  font-size: var(--font-sm);
}

.invoice-total {
  font-size: var(--font-xl);
  font-weight: 800;
  color: var(--accent);
  padding-top: var(--space-md);
  border-top: 2px solid var(--border);
  margin-top: var(--space-md);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: var(--space-2xl) 0;
  margin-top: var(--space-3xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand p {
  color: var(--text-muted);
  font-size: var(--font-sm);
  margin-top: var(--space-md);
  line-height: 1.6;
}

.footer-col h4 {
  font-size: var(--font-sm);
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: var(--font-sm);
  padding: var(--space-xs) 0;
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  text-align: center;
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: var(--font-xs);
}

/* ============================================
   RESPONSIVE ADMIN
   ============================================ */
@media (max-width: 768px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform var(--transition-base);
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .admin-main {
    margin-left: 0;
    padding: var(--space-md);
  }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary-light) !important; }
.text-success { color: var(--accent-success) !important; }
.text-danger { color: var(--accent-danger) !important; }
.text-warning { color: var(--accent-warning) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-accent { color: var(--accent) !important; }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.hidden { display: none !important; }
.visible { display: block !important; }

.w-full { width: 100%; }
.rounded { border-radius: var(--radius-md); }

/* ============================================
   FORGOT PASSWORD FLOW
   ============================================ */
.forgot-password-link {
  text-align: right;
  margin-top: -12px;
  margin-bottom: 20px;
}

.forgot-password-link a {
  font-size: var(--font-xs);
  color: var(--accent);
  font-weight: 500;
  transition: color var(--transition-fast);
}

.forgot-password-link a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

.forgot-icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.forgot-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: rgba(108, 92, 231, 0.15);
  border: 2px solid rgba(108, 92, 231, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  animation: pulse-icon 2s ease-in-out infinite;
}

.forgot-icon.success-icon {
  background: rgba(0, 184, 148, 0.15);
  border-color: rgba(0, 184, 148, 0.3);
}

@keyframes pulse-icon {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.3); }
  50% { transform: scale(1.05); box-shadow: 0 0 20px 5px rgba(108, 92, 231, 0.15); }
}

/* ============================================
   AUTH PAGE PARTICLES
   ============================================ */
.auth-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  opacity: 0.3;
  animation: float-particle 15s linear infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 18s; width: 4px; height: 4px; }
.particle:nth-child(2) { left: 30%; animation-delay: 3s; animation-duration: 22s; width: 8px; height: 8px; opacity: 0.2; }
.particle:nth-child(3) { left: 50%; animation-delay: 6s; animation-duration: 16s; width: 5px; height: 5px; }
.particle:nth-child(4) { left: 70%; animation-delay: 2s; animation-duration: 20s; width: 7px; height: 7px; opacity: 0.15; }
.particle:nth-child(5) { left: 90%; animation-delay: 5s; animation-duration: 14s; width: 4px; height: 4px; }

@keyframes float-particle {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.3; }
  90% { opacity: 0.3; }
  100% { transform: translateY(-10vh) rotate(720deg); opacity: 0; }
}

.auth-page {
  position: relative;
}

.auth-container {
  position: relative;
  z-index: 1;
}

/* ============================================
   PAYMENT METHOD SELECTOR
   ============================================ */
.payment-method-selector {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.payment-option {
  display: block;
  cursor: pointer;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  transition: all var(--transition-fast);
  position: relative;
}

.payment-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.payment-option:hover {
  border-color: var(--border-hover);
  background: rgba(108, 92, 231, 0.05);
}

.payment-option.selected {
  border-color: var(--primary);
  background: rgba(108, 92, 231, 0.08);
  box-shadow: 0 0 0 1px var(--primary), 0 0 15px rgba(108, 92, 231, 0.1);
}

.payment-option-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.payment-option-icon {
  font-size: 28px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.payment-option-title {
  font-weight: 600;
  font-size: var(--font-sm);
  color: var(--text-primary);
  margin-bottom: 2px;
}

.payment-option-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================
   UPI PAYMENT MODAL
   ============================================ */
.upi-payment-body {
  padding: 0 4px;
}

.upi-qr-wrapper {
  background: white;
  border-radius: var(--radius-lg);
  padding: 12px;
  max-width: 280px;
  margin: 0 auto 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition-base);
}

.upi-qr-wrapper:hover {
  transform: scale(1.02);
}

.upi-qr-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.upi-id-display {
  text-align: center;
  padding: 12px 20px;
  background: rgba(108, 92, 231, 0.1);
  border: 1px solid rgba(108, 92, 231, 0.25);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.upi-label {
  font-size: var(--font-xs);
  color: var(--text-muted);
  font-weight: 500;
}

.upi-value {
  font-size: var(--font-base);
  font-weight: 700;
  color: var(--primary-light);
  letter-spacing: 1px;
}

.upi-amount-display {
  text-align: center;
  padding: 10px;
  background: rgba(0, 184, 148, 0.1);
  border: 1px solid rgba(0, 184, 148, 0.25);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: var(--font-sm);
  color: var(--accent-success);
}

.upi-amount-display strong {
  font-size: var(--font-xl);
  color: var(--accent-success);
}

.upi-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* ============================================
   BUTTON SPINNER
   ============================================ */
.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

