/* ===== CSS RESET & VARIABLES ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Light Theme (Default) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card: #f1f3f5;
  --bg-elevated: #eeeff2;

  /* Accent Colors */
  --accent-primary: #8b1528;
  --accent-secondary: #6d0f1f;
  --accent-gradient: linear-gradient(135deg, #8b1528 0%, #6d0f1f 100%);

  /* Text Colors */
  --text-primary: #1a1a1a;
  --text-secondary: #545454;
  --text-muted: #9a9a9a;

  /* Status Colors */
  --success: #8b1528;
  --error: #ff6b6b;
  --warning: #ffd93d;
  --whatsapp: #25d366;
  --mpesa: #4cb050;

  /* Borders & Shadows */
  --border-color: #e0e0e0;
  --border-light: #f0f0f0;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 30px rgba(139, 21, 40, 0.1);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 6px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-2xl: 28px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 50%;

  /* Typography */
  --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Mono', monospace;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;
}

/* Dark Theme */
html.dark-theme {
  --bg-primary: #0d0d0f;
  --bg-secondary: #151519;
  --bg-card: #1c1c22;
  --bg-elevated: #232329;

  --text-primary: #ffffff;
  --text-secondary: #a0a0a8;
  --text-muted: #6b6b73;

  --border-color: #2a2a32;
  --border-light: #3a3a44;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(139, 21, 40, 0.2);
}

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-sm) var(--space-md);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

html.dark-theme .header {
  background: rgba(13, 13, 15, 0.95);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-lg);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  transition: opacity var(--transition-normal);
}

.logo:hover {
  opacity: 0.8;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-icons {
  display: flex;
  gap: var(--space-md);
}

.nav-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
  position: relative;
}

.nav-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(0, 212, 170, 0.1);
}

.nav-btn svg {
  width: 20px;
  height: 20px;
}

.cart-btn {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--accent-primary);
  color: var(--bg-primary);
  border-radius: var(--radius-full);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  transform: scale(0.5);
  transition: all var(--transition-normal);
}

.cart-count.show {
  opacity: 1;
  transform: scale(1);
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  margin-top: 70px;
  padding: var(--space-md) var(--space-md);
}

.page {
  display: none;
  animation: fadeIn 0.3s ease;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== HERO SECTION ===== */
.hero {
  text-align: center;
  margin-bottom: var(--space-lg);
  padding: var(--space-lg) var(--space-md);
  background: linear-gradient(135deg, rgba(139, 21, 40, 0.1), rgba(109, 15, 31, 0.05));
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.hero-content h1 {
  font-size: 36px;
  font-weight: 800;
  margin: var(--space-md) 0;
  line-height: 1.2;
}

.hero-badge {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  background: rgba(139, 21, 40, 0.15);
  color: var(--accent-primary);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-content p {
  font-size: 16px;
  color: var(--text-secondary);
}

/* ===== SEARCH BAR ===== */
.search-bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.search-bar svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 16px;
  outline: none;
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

/* ===== CATEGORIES ===== */
.categories {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  overflow-x: auto;
  padding: var(--space-sm);
  -webkit-overflow-scrolling: touch;
}

.categories::-webkit-scrollbar {
  height: 4px;
}

.categories::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

.categories::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

.cat-btn {
  padding: var(--space-sm) var(--space-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-normal);
  font-size: 14px;
  font-weight: 500;
}

.cat-btn:hover,
.cat-btn.active {
  background: var(--accent-gradient);
  color: white;
  border-color: var(--accent-primary);
}

/* ===== PRODUCTS GRID ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}

.product-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

.product-badge {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  z-index: 10;
  padding: var(--space-xs) var(--space-sm);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-badge.sale {
  background: #ff6b6b;
  color: white;
}

.product-badge.new {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

.product-badge.hot {
  background: #ff4757;
  color: white;
}

.product-badge.limited {
  background: #6c5ce7;
  color: white;
}

.product-badge.exclusive {
  background: #fdcb6e;
  color: #2d3436;
}

.product-badge.low-stock {
  background: var(--warning);
  color: var(--bg-primary);
}

.product-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-md);
}

.product-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.3;
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.price-current {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-primary);
}

.price-original {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.stock-info {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.stock-info.low {
  color: var(--warning);
  font-weight: 600;
}

.product-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: auto;
}

.action-btn {
  flex: 1;
  padding: 4px 8px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.action-btn svg {
  width: 12px;
  height: 12px;
}

.action-btn.view:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.action-btn.cart:hover:not(:disabled) {
  background: rgba(139, 21, 40, 0.1);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.action-btn.buy {
  background: var(--accent-gradient);
  color: var(--bg-primary);
  border-color: var(--accent-primary);
  font-weight: 600;
}

.action-btn.buy:hover:not(:disabled) {
  opacity: 0.9;
}

.action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== PRODUCT DETAIL PAGE ===== */
.back-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  cursor: pointer;
  margin-bottom: var(--space-xl);
  transition: all var(--transition-normal);
}

.back-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.back-btn svg {
  width: 20px;
  height: 20px;
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
}

.detail-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.detail-category {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: rgba(139, 21, 40, 0.15);
  color: var(--accent-primary);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-lg);
}

.detail-name {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: var(--space-md);
  line-height: 1.2;
}

.detail-price {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.detail-price .price-current {
  font-size: 24px;
  font-weight: 800;
}

.detail-desc {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
  font-size: 14px;
}

.detail-stock {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  font-size: 14px;
}

.stock-dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--accent-primary);
}

.stock-dot.low {
  background: var(--warning);
}

.stock-dot.out {
  background: var(--error);
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.quantity-label {
  font-weight: 500;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
}

.qty-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition-normal);
}

.qty-btn:hover:not(:disabled) {
  color: var(--accent-primary);
}

.qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.qty-value {
  min-width: 40px;
  text-align: center;
  font-weight: 600;
}

.detail-actions {
  display: flex;
  gap: var(--space-md);
}

.detail-btn {
  flex: 1;
  padding: var(--space-lg) var(--space-lg);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

.detail-btn svg {
  width: 20px;
  height: 20px;
}

.detail-btn.add-cart {
  background: var(--bg-secondary);
  color: var(--accent-primary);
  border: 1px solid var(--border-color);
}

.detail-btn.add-cart:hover:not(:disabled) {
  border-color: var(--accent-primary);
  background: rgba(139, 21, 40, 0.1);
}

.detail-btn.buy-now {
  background: var(--accent-gradient);
  color: var(--bg-primary);
}

.detail-btn.buy-now:hover:not(:disabled) {
  opacity: 0.9;
}

.detail-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .product-detail {
    grid-template-columns: 1fr;
  }

  .detail-name {
    font-size: 24px;
  }

  .detail-img {
    height: 300px;
  }
}

/* ===== CART PAGE ===== */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.page-header h2 {
  font-size: 24px;
  font-weight: 700;
}

.item-count {
  color: var(--text-secondary);
  font-size: 14px;
}

.cart-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-sm);
}

.cart-item-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.cart-item-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.cart-item-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: var(--space-md);
}

.cart-qty-controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: fit-content;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-xs);
}

.cart-qty-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition-normal);
}

.cart-qty-btn:hover:not(:disabled) {
  color: var(--accent-primary);
}

.cart-qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.cart-qty-value {
  min-width: 30px;
  text-align: center;
  font-weight: 600;
}

.remove-btn {
  background: transparent;
  border: 1px solid var(--error);
  color: var(--error);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
}

.remove-btn:hover {
  background: var(--error);
  color: white;
}

.remove-btn svg {
  width: 20px;
  height: 20px;
}

.empty-cart {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  text-align: center;
  background: var(--bg-secondary);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
}

.empty-cart svg {
  width: 80px;
  height: 80px;
  margin-bottom: var(--space-lg);
  opacity: 0.5;
}

.empty-cart h3 {
  font-size: 18px;
  margin-bottom: var(--space-sm);
}

.empty-cart p {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.shop-btn {
  padding: var(--space-md) var(--space-xl);
  background: var(--accent-gradient);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 600;
  transition: opacity var(--transition-normal);
}

.shop-btn:hover {
  opacity: 0.9;
}

.cart-footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.promo-section {
  display: flex;
  gap: var(--space-sm);
  background: var(--bg-secondary);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.promo-section input {
  flex: 1;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-primary);
}

.promo-section input::placeholder {
  color: var(--text-muted);
}

.promo-btn {
  padding: var(--space-md) var(--space-lg);
  background: var(--accent-gradient);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: opacity var(--transition-normal);
}

.promo-btn:hover {
  opacity: 0.9;
}

.promo-msg {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 14px;
  font-weight: 500;
}

.promo-msg.success {
  background: rgba(139, 21, 40, 0.1);
  color: var(--success);
}

.promo-msg.error {
  background: rgba(255, 107, 107, 0.1);
  color: var(--error);
}

.cart-summary {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-secondary);
}

.summary-row.total {
  border-top: 1px solid var(--border-color);
  padding-top: var(--space-sm);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.summary-row.discount-row {
  color: var(--success);
}

.checkout-btns {
  display: flex;
  gap: var(--space-md);
}

.checkout-btn {
  flex: 1;
  padding: var(--space-lg) var(--space-lg);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

.checkout-btn svg {
  width: 20px;
  height: 20px;
}

.checkout-btn.primary {
  background: var(--accent-gradient);
  color: var(--bg-primary);
}

.checkout-btn.primary:hover {
  opacity: 0.9;
}

.checkout-btn.whatsapp {
  background: var(--whatsapp);
  color: white;
}

.checkout-btn.whatsapp:hover {
  opacity: 0.9;
}

/* ===== CHECKOUT PAGE ===== */
.checkout-form {
  max-width: 800px;
  margin: 0 auto;
}

.form-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.form-section h3 {
  font-size: 16px;
  margin-bottom: var(--space-md);
}

.form-hint {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: var(--space-lg);
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: 500;
  font-size: 13px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: var(--space-md);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 14px;
  transition: border-color var(--transition-normal);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.payment-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.payment-option {
  position: relative;
  cursor: pointer;
}

.payment-option input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.payment-card {
  padding: var(--space-lg);
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  transition: all var(--transition-normal);
}

.payment-option input:checked ~ .payment-card {
  border-color: var(--accent-primary);
  background: rgba(139, 21, 40, 0.1);
}

.payment-logo {
  height: 40px;
  object-fit: contain;
}

.card-icon {
  width: 40px;
  height: 40px;
  color: var(--accent-primary);
}

.order-summary {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.order-summary h3 {
  margin-bottom: var(--space-md);
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-color);
}

.checkout-item:last-child {
  border-bottom: none;
}

.checkout-item-name {
  flex: 1;
  font-size: 13px;
}}

.checkout-item-qty {
  color: var(--text-secondary);
  margin: 0 var(--space-lg);
}

.checkout-item-price {
  font-weight: 600;
  min-width: 100px;
  text-align: right;
}

.place-order-btn {
  width: 100%;
  padding: var(--space-lg);
  background: var(--accent-gradient);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  transition: all var(--transition-normal);
}

.place-order-btn:hover {
  opacity: 0.9;
}

/* ===== ACCOUNT PAGE ===== */
.auth-container {
  max-width: 400px;
  margin: 0 auto;
}

.auth-tabs {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-color);
}

.auth-tab {
  flex: 1;
  padding: var(--space-md);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  transition: all var(--transition-normal);
}

.auth-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent-primary);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.auth-btn {
  padding: var(--space-lg);
  background: var(--accent-gradient);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  transition: all var(--transition-normal);
}

.auth-btn:hover {
  opacity: 0.9;
}

.profile-container {
  max-width: 600px;
  margin: 0 auto;
}

.profile-header {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  background: var(--accent-gradient);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: var(--bg-primary);
  flex-shrink: 0;
}

.profile-info {
  flex: 1;
}

.profile-info h3 {
  font-size: 18px;
  margin-bottom: var(--space-sm);
}

.profile-info p {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: var(--space-xs);
}}

.logout-btn {
  padding: var(--space-md) var(--space-lg);
  background: rgba(139, 21, 40, 0.1);
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition-normal);
}

.logout-btn:hover {
  background: var(--accent-primary);
  color: white;
}

.order-history-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}

.order-history-section h3 {
  margin-bottom: var(--space-md);
}

.order-item {
  padding: var(--space-md);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
}

.order-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.order-id {
  font-weight: 600;
}

.order-date {
  color: var(--text-secondary);
  font-size: 12px;
}

.order-total {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-primary);
}

.no-orders {
  text-align: center;
  color: var(--text-secondary);
  padding: var(--space-xl);
}

/* ===== SUCCESS PAGE ===== */
.success-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  text-align: center;
  padding: var(--space-md);
}

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  margin-bottom: var(--space-lg);
  color: var(--bg-primary);
}

.success-container h2 {
  font-size: 28px;
  margin-bottom: var(--space-md);
}}

.success-container p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  font-size: 16px;
}

.success-btn {
  padding: var(--space-lg) var(--space-xl);
  background: var(--accent-gradient);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  transition: opacity var(--transition-normal);
  margin-top: var(--space-lg);
}

.success-btn:hover {
  opacity: 0.9;
}

/* ===== TOAST NOTIFICATION ===== */
.toast {
  position: fixed;
  bottom: -100px;
  left: var(--space-lg);
  right: var(--space-lg);
  max-width: 500px;
  padding: var(--space-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transition: bottom 0.3s ease;
  z-index: 200;
}

.toast.show {
  bottom: var(--space-lg);
}

.toast.success {
  border-color: var(--success);
  background: rgba(139, 21, 40, 0.1);
  color: var(--success);
}

.toast.error {
  border-color: var(--error);
  background: rgba(255, 107, 107, 0.1);
  color: var(--error);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  :root {
    font-size: 14px;
  }

  .hero-content h1 {
    font-size: 32px;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
  }

  .checkout-btns {
    flex-direction: column;
  }

  .payment-methods {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .profile-header {
    flex-direction: column;
    text-align: center;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }
}

@media (max-width: 480px) {
  .header-content {
    gap: var(--space-sm);
  }

  .logo-text {
    display: none;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .hero-content h1 {
    font-size: 24px;
  }

  .hero {
    padding: var(--space-lg);
  }

  .product-detail {
    grid-template-columns: 1fr;
  }

  .detail-actions {
    flex-direction: column;
  }

  .cart-item {
    flex-direction: column;
  }

  .cart-item-img {
    width: 100%;
    height: 200px;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}
