/* ================================================================
   WhatsAppFood — Global CSS Design System
   Primary: #00C2B8 (Teal) | Dark: #1a1a2e | White: #ffffff
   ================================================================ */

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

/* ── CSS Variables ─────────────────────────────────────────────── */
:root {
  --primary:       #00b868;
  --primary-dark:  #009056;
  --primary-light: #e0f9f8;
  --primary-glow:  rgba(0, 194, 184, 0.25);
  --secondary:     #ff6b35;
  --accent:        #7c3aed;
  --success:       #10b981;
  --warning:       #f59e0b;
  --danger:        #ef4444;
  --info:          #3b82f6;

  --dark:          #1a1a2e;
  --dark-2:        #16213e;
  --dark-3:        #0f3460;
  --gray-900:      #111827;
  --gray-800:      #1f2937;
  --gray-700:      #374151;
  --gray-600:      #4b5563;
  --gray-500:      #6b7280;
  --gray-400:      #9ca3af;
  --gray-300:      #d1d5db;
  --gray-200:      #e5e7eb;
  --gray-100:      #f3f4f6;
  --gray-50:       #f9fafb;
  --white:         #ffffff;

  --font-main:  'Inter', sans-serif;
  --font-head:  'Poppins', sans-serif;

  --radius-sm:  6px;
  --radius:     12px;
  --radius-lg:  18px;
  --radius-xl:  24px;
  --radius-full: 999px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow:     0 4px 16px rgba(0,0,0,.10);
  --shadow-md:  0 8px 24px rgba(0,0,0,.12);
  --shadow-lg:  0 16px 48px rgba(0,0,0,.15);
  --shadow-primary: 0 8px 24px var(--primary-glow);

  --transition: .25s cubic-bezier(.4,0,.2,1);

  --container: 1280px;
  --nav-h: 72px;
  --bottom-nav-h: 64px;
}

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

html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }

body {
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--gray-50);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding-bottom: var(--bottom-nav-h);
}

@media (min-width: 768px) { body { padding-bottom: 0; } }

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
img { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; }

/* ── Container ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 768px) { .container { padding: 0 24px; } }

/* ── Typography ────────────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 { font-family: var(--font-head); line-height: 1.3; color: var(--gray-900); }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; }
h2 { font-size: clamp(1.375rem, 3vw, 1.875rem); font-weight: 700; }
h3 { font-size: clamp(1.125rem, 2vw, 1.375rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 12px 32px var(--primary-glow); color: var(--white); }
.btn-secondary { background: var(--white); color: var(--primary); border: 2px solid var(--primary); }
.btn-secondary:hover { background: var(--primary); color: var(--white); }
.btn-dark { background: var(--gray-900); color: var(--white); }
.btn-dark:hover { background: var(--gray-800); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-icon { padding: 10px; border-radius: 50%; }
.btn:disabled { opacity: .6; cursor: not-allowed; pointer-events: none; }

/* ── Forms ─────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-weight: 600; font-size: 13px; color: var(--gray-700); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
.form-control {
  width: 100%;
  padding: 11px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--gray-800);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-glow); }
.form-control::placeholder { color: var(--gray-400); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 20px; padding-right: 44px; }
.form-check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.form-check input[type="checkbox"], .form-check input[type="radio"] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }

/* ── Cards ──────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-body { padding: 20px; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--gray-100); display: flex; align-items: center; justify-content: space-between; }
.card-header h3 { font-size: 1rem; margin: 0; }

/* ── Navigation ────────────────────────────────────────────────── */
.nav-main {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-100);
  height: var(--nav-h);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.375rem;
  color: var(--gray-900);
  text-decoration: none;
}
.nav-logo-icon {
  width: 40px; height: 40px;
  background: var(--primary);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.25rem;
}
.nav-logo span { color: var(--primary); }
.nav-links { display: none; }
@media (min-width: 768px) {
  .nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
  }
}
.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-weight: 500;
  color: var(--gray-600);
  transition: all var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  background: var(--primary-light);
  color: var(--primary);
}
.nav-search {
  flex: 1;
  max-width: 340px;
  display: none;
  position: relative;
}
@media (min-width: 992px) { .nav-search { display: block; } }
.nav-search input {
  width: 100%;
  padding: 9px 16px 9px 42px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-full);
  background: var(--gray-50);
  outline: none;
  font-size: 14px;
  transition: border-color var(--transition);
}
.nav-search input:focus { border-color: var(--primary); background: var(--white); }
.nav-search .search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--gray-400); pointer-events: none; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-cart-btn {
  position: relative;
  width: 42px; height: 42px;
  background: var(--primary-light);
  border: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
}
.nav-cart-btn:hover { background: var(--primary); color: var(--white); }
.cart-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--secondary);
  color: white;
  font-size: 10px;
  font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid white;
}
.nav-user-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gray-100);
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-600);
  text-decoration: none;
  transition: all var(--transition);
}
.nav-user-btn:hover { background: var(--primary); color: white; }

/* ── Bottom Navigation (Mobile) ────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-h);
  background: white;
  border-top: 1px solid var(--gray-100);
  display: flex;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}
.bottom-nav .nav-item-wrap {
  flex: 1;
  display: flex;
  height: 100%;
}
.bottom-nav .nav-item-wrap a {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-500);
  transition: color var(--transition);
  text-decoration: none;
  position: relative;
}
.bottom-nav .nav-item-wrap a.active, .bottom-nav .nav-item-wrap a:hover { color: var(--primary); }
.bottom-nav .nav-item-wrap a.active::before {
  content: '';
  position: absolute;
  top: 0; left: 25%; right: 25%;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 4px 4px;
}
.bottom-nav .nav-item-wrap .cart-link { position: relative; }
.bottom-nav .nav-item-wrap .cart-link .cart-badge { top: 8px; }
@media (min-width: 768px) { .bottom-nav { display: none; } }

/* ── Hero Slider ────────────────────────────────────────────────── */
.hero-slider {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin: 16px 0;
  height: 220px;
}
@media (min-width: 768px) { .hero-slider { height: 340px; margin: 24px 0; } }
@media (min-width: 1024px) { .hero-slider { height: 420px; } }
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .6s ease;
}
.slide.active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 24px 32px;
  background: rgba(0, 0, 0, 0);
  color: white;
}
.slide-content h2 { color: white; font-size: clamp(1.25rem, 4vw, 2.25rem); max-width: 600px; }
.slide-content p { opacity: .9; max-width: 500px; margin: 8px 0 20px; }
.slider-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.slider-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.5); border: none; cursor: pointer; transition: all var(--transition); padding: 0; }
.slider-dot.active { background: white; width: 24px; border-radius: 4px; }
.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.2); backdrop-filter: blur(8px); border: none; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; cursor: pointer; transition: background var(--transition); z-index: 5; }
.slider-arrow:hover { background: rgba(255,255,255,.4); }
.slider-prev { left: -12px; }
.slider-next { right: -12px; }

/* ── Section Headers ────────────────────────────────────────────── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-header h2 { font-size: 1.25rem; }
.view-all-link { font-size: 13px; font-weight: 600; color: var(--primary); display: flex; align-items: center; gap: 4px; }
.view-all-link:hover { color: var(--primary-dark); }

/* ── Category Carousel ──────────────────────────────────────────── */
.category-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.category-scroll::-webkit-scrollbar { display: none; }
.category-card {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  min-width: 80px;
  border: 2px solid transparent;
}
.category-card:hover, .category-card.active { border-color: var(--primary); background: var(--primary-light); }
.category-img {
  width: 52px; height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--gray-100);
}
.category-card span { font-size: 11px; font-weight: 600; color: var(--gray-700); text-align: center; white-space: nowrap; }
.category-card:hover span, .category-card.active span { color: var(--primary); }

/* ── Product Cards ──────────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
@media (min-width: 768px) { .products-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; } }
.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.product-card-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--gray-100);
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition); }
.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-badge {
  position: absolute;
  top: 8px; left: 8px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.badge-new { background: var(--primary); color: white; }
.badge-sale { background: var(--secondary); color: white; }
.badge-popular { background: var(--accent); color: white; }
.product-fav-btn {
  position: absolute;
  top: 8px; right: 8px;
  width: 30px; height: 30px;
  background: rgba(255,255,255,.9);
  border: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--gray-400);
  transition: all var(--transition);
  font-size: 14px;
}
.product-fav-btn:hover, .product-fav-btn.active { color: var(--secondary); background: white; }
.product-card-body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; }
.product-name { font-weight: 600; font-size: 14px; margin-bottom: 4px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-desc { font-size: 12px; color: var(--gray-500); margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.product-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.product-price { font-weight: 700; font-size: 16px; color: var(--gray-900); }
.product-price .original { text-decoration: line-through; color: var(--gray-400); font-size: 12px; font-weight: 400; margin-right: 4px; }
.product-price .sale { color: var(--primary); }
.add-btn {
  width: 32px; height: 32px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 18px;
  font-weight: 300;
  transition: all var(--transition);
  flex-shrink: 0;
}
.add-btn:hover { background: var(--primary-dark); transform: scale(1.1); }

/* ── Product Modal ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
@media (min-width: 640px) { .modal-overlay { align-items: center; padding: 16px; } }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: white;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.34,1.56,.64,1);
}
@media (min-width: 640px) { .modal { border-radius: var(--radius-xl); transform: scale(.9); } }
.modal-overlay.open .modal { transform: translateY(0); }
@media (min-width: 640px) { .modal-overlay.open .modal { transform: scale(1); } }
.modal-img { aspect-ratio: 16/9; overflow: hidden; background: var(--gray-100); }
.modal-img img { width: 100%; height: 100%; object-fit: cover; }
.modal-body { padding: 20px; }
.modal-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.modal-price { font-size: 1.5rem; font-weight: 800; color: var(--primary); margin-bottom: 12px; }
.modal-desc { color: var(--gray-600); font-size: 14px; margin-bottom: 16px; line-height: 1.7; }
.qty-control { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.qty-btn { width: 36px; height: 36px; border: 2px solid var(--primary); border-radius: 50%; background: white; color: var(--primary); font-size: 20px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all var(--transition); font-weight: 300; line-height: 1; }
.qty-btn:hover { background: var(--primary); color: white; }
.qty-display { font-size: 18px; font-weight: 700; min-width: 32px; text-align: center; }
.modal-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 36px; height: 36px;
  background: rgba(0,0,0,.5);
  border: none;
  border-radius: 50%;
  color: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 18px;
  z-index: 5;
}

/* ── Cart Page ──────────────────────────────────────────────────── */
.cart-page { padding: 24px 0; }
.cart-items { display: flex; flex-direction: column; gap: 12px; }
.cart-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: white;
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.cart-item-img { width: 72px; height: 72px; border-radius: var(--radius); object-fit: cover; background: var(--gray-100); flex-shrink: 0; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.cart-item-price { color: var(--primary); font-weight: 700; }
.cart-qty { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.cart-qty-btn { width: 28px; height: 28px; border: 2px solid var(--primary); border-radius: 50%; background: white; color: var(--primary); font-size: 16px; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all var(--transition); }
.cart-qty-btn:hover { background: var(--primary); color: white; }
.cart-qty-num { font-weight: 700; min-width: 24px; text-align: center; }
.cart-item-subtotal { font-weight: 700; font-size: 15px; margin-left: auto; flex-shrink: 0; }
.cart-remove-btn { color: var(--gray-400); background: none; border: none; cursor: pointer; padding: 4px; transition: color var(--transition); }
.cart-remove-btn:hover { color: var(--danger); }

.cart-summary {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(var(--nav-h) + 16px);
}
.cart-summary-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--gray-100); font-size: 14px; }
.cart-summary-row:last-child { border-bottom: none; }
.cart-total { font-size: 18px; font-weight: 800; color: var(--gray-900); }
.coupon-form { display: flex; gap: 8px; margin: 16px 0; }
.coupon-form input { flex: 1; min-width: 0; }
.coupon-applied { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--primary-light); border-radius: var(--radius); margin: 12px 0; }
.coupon-applied span { font-size: 13px; font-weight: 600; color: var(--primary); }

/* ── Checkout ───────────────────────────────────────────────────── */
.checkout-page { padding: 24px 0; }
.checkout-form { background: white; border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.delivery-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.delivery-opt {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.delivery-opt.selected { border-color: var(--primary); background: var(--primary-light); }
.delivery-opt input { display: none; }
.delivery-opt-icon { font-size: 28px; margin-bottom: 6px; }
.delivery-opt-label { font-weight: 600; font-size: 14px; }
.wa-btn {
  width: 100%;
  padding: 14px;
  background: #25D366;
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all var(--transition);
  margin-top: 20px;
}
.wa-btn:hover { background: #20b558; transform: translateY(-1px); }

/* ── Alerts ─────────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
}
.alert-success { background: #d1fae5; color: #065f46; border-left: 4px solid var(--success); }
.alert-error   { background: #fee2e2; color: #991b1b; border-left: 4px solid var(--danger); }
.alert-info    { background: #dbeafe; color: #1e40af; border-left: 4px solid var(--info); }
.alert-warning { background: #fef3c7; color: #92400e; border-left: 4px solid var(--warning); }

/* ── Footer ────────────────────────────────────────────────────── */
.footer {
  background: var(--dark);
  color: var(--gray-400);
  padding: 48px 0 24px;
  margin-top: 60px;
}
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand p { font-size: 14px; margin-top: 12px; line-height: 1.8; }
.footer h4 { color: white; font-size: 15px; margin-bottom: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 14px; color: var(--gray-400); transition: color var(--transition); }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; font-size: 13px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 36px; height: 36px; background: rgba(255,255,255,.08); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--gray-400); transition: all var(--transition); }
.footer-social a:hover { background: var(--primary); color: white; }

/* ── Offers ─────────────────────────────────────────────────────── */
.offers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.offer-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.offer-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.offer-card-img { aspect-ratio: 2/1; overflow: hidden; background: var(--gray-100); }
.offer-card-img img { width: 100%; height: 100%; object-fit: cover; }
.offer-card-body { padding: 16px; }
.offer-badge { display: inline-block; padding: 4px 12px; background: var(--secondary); color: white; border-radius: var(--radius-full); font-size: 12px; font-weight: 700; margin-bottom: 10px; }

/* ── Auth Pages ─────────────────────────────────────────────────── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: linear-gradient(135deg, var(--primary-light) 0%, #f0fffe 100%); }
.auth-card { width: 100%; max-width: 440px; background: white; border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); padding: 40px; }
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .logo-icon { width: 60px; height: 60px; background: var(--primary); border-radius: 18px; display: flex; align-items: center; justify-content: center; color: white; font-size: 28px; margin: 0 auto 12px; }
.auth-logo h1 { font-size: 1.75rem; }
.auth-divider { text-align: center; position: relative; margin: 20px 0; }
.auth-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--gray-200); }
.auth-divider span { position: relative; background: white; padding: 0 12px; color: var(--gray-500); font-size: 13px; }

/* ── Profile Page ───────────────────────────────────────────────── */
.profile-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 40px 0;
  margin-bottom: 32px;
}
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; background: rgba(255,255,255,.3); border: 4px solid rgba(255,255,255,.5); display: flex; align-items: center; justify-content: center; font-size: 2rem; margin-bottom: 12px; }
.profile-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--gray-200); margin-bottom: 24px; }
.profile-tab { padding: 10px 20px; font-weight: 600; font-size: 14px; color: var(--gray-500); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all var(--transition); }
.profile-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ── Order Status Badges ─────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}
.status-pending    { background: #fef3c7; color: #92400e; }
.status-confirmed  { background: #dbeafe; color: #1e40af; }
.status-preparing  { background: #fce7f3; color: #9d174d; }
.status-ready      { background: #d1fae5; color: #065f46; }
.status-out_for_delivery { background: #ede9fe; color: #5b21b6; }
.status-delivered  { background: #d1fae5; color: #065f46; }
.status-cancelled  { background: #fee2e2; color: #991b1b; }

/* ── Pagination ─────────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 32px; }
.page-btn { width: 38px; height: 38px; border: 2px solid var(--gray-200); border-radius: var(--radius); background: white; color: var(--gray-600); font-weight: 600; font-size: 14px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all var(--transition); text-decoration: none; }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: white; }
.page-btn:hover:not(.active) { border-color: var(--primary); color: var(--primary); }

/* ── Toast Notification ─────────────────────────────────────────── */
.toast-container { position: fixed; top: 80px; right: 16px; z-index: 999; display: flex; flex-direction: column; gap: 10px; max-width: 320px; pointer-events: none; }
.toast {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  pointer-events: all;
  animation: slideInRight .4s cubic-bezier(.34,1.56,.64,1);
  border-left: 4px solid var(--primary);
}
.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }
@keyframes slideInRight {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);   opacity: 1; }
}

/* ── PWA Install Popup ───────────────────────────────────────────── */
.pwa-popup {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 222px);
  left: 12px; right: 12px;
  background: white;
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transform: translateY(120%);
  transition: transform .5s cubic-bezier(.34,1.56,.64,1);
  max-width: 420px;
  margin: 0 auto;
}
@media (min-width: 768px) { .pwa-popup { bottom: 24px; right: 24px; left: auto; } }
.pwa-popup.show { transform: translateY(0); }
.pwa-popup-icon { width: 52px; height: 52px; background: var(--primary); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.pwa-popup-content { flex: 1; }
.pwa-popup-content h4 { font-size: 15px; margin-bottom: 4px; }
.pwa-popup-content p { font-size: 13px; color: var(--gray-500); margin-bottom: 14px; }
.pwa-popup-actions { display: flex; gap: 8px; }
.pwa-dismiss { background: none; border: none; cursor: pointer; color: var(--gray-400); position: absolute; top: 12px; right: 12px; font-size: 18px; line-height: 1; padding: 4px; }

/* ── Admin Layout ───────────────────────────────────────────────── */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 260px;
  background: var(--dark);
  flex-shrink: 0;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  overflow-y: auto;
  z-index: 50;
  transition: transform var(--transition);
}
.sidebar-logo { padding: 24px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-logo a { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.sidebar-logo .logo-text { font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; color: white; }
.sidebar-logo .logo-text span { color: var(--primary); }
.sidebar-nav { padding: 16px 12px; }
.sidebar-section-label { padding: 8px 8px 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--gray-600); }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius);
  color: var(--gray-400);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 2px;
}
.sidebar-link svg, .sidebar-link .icon { width: 20px; height: 20px; flex-shrink: 0; font-size: 16px; text-align: center; }
.sidebar-link:hover, .sidebar-link.active { background: rgba(0,194,184,.15); color: var(--primary); }
.sidebar-link .badge { margin-left: auto; background: var(--primary); color: white; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.admin-main { flex: 1; margin-left: 260px; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar {
  height: 64px;
  background: white;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--shadow-sm);
}
.admin-topbar-left { display: flex; align-items: center; gap: 12px; }
.admin-page-title { font-size: 1.1rem; font-weight: 700; }
.admin-topbar-right { display: flex; align-items: center; gap: 12px; }
.admin-user { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.admin-user-avatar { width: 36px; height: 36px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; }
.admin-content { padding: 24px; flex: 1; }

/* ── Admin Stats Widgets ─────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 24px; }
@media (min-width: 1024px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.stat-icon.teal   { background: #e0f9f8; color: var(--primary); }
.stat-icon.orange { background: #fff3e0; color: var(--secondary); }
.stat-icon.purple { background: #f3e8ff; color: var(--accent); }
.stat-icon.green  { background: #d1fae5; color: var(--success); }
.stat-label { font-size: 12px; color: var(--gray-500); font-weight: 500; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.stat-value { font-size: 1.625rem; font-weight: 800; color: var(--gray-900); line-height: 1; }

/* ── Admin Charts Grid ───────────────────────────────────────────── */
.charts-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 24px; }
@media (min-width: 1024px) { .charts-grid { grid-template-columns: 2fr 1fr; } }
.chart-card { background: white; border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); }
.chart-card h3 { font-size: 15px; margin-bottom: 16px; }

/* ── Admin Tables ───────────────────────────────────────────────── */
.admin-table-card { background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.admin-table-header { padding: 16px 20px; border-bottom: 1px solid var(--gray-100); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.admin-table-header h3 { font-size: 15px; margin: 0; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { padding: 12px 16px; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--gray-500); background: var(--gray-50); border-bottom: 1px solid var(--gray-100); }
.admin-table td { padding: 14px 16px; border-bottom: 1px solid var(--gray-50); font-size: 14px; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--gray-50); }
.admin-table-img { width: 48px; height: 48px; border-radius: var(--radius); object-fit: cover; background: var(--gray-100); }
.table-actions { display: flex; gap: 6px; }
.action-btn { width: 32px; height: 32px; border: none; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px; transition: all var(--transition); text-decoration: none; }
.action-btn.edit   { background: #dbeafe; color: var(--info); }
.action-btn.delete { background: #fee2e2; color: var(--danger); }
.action-btn:hover { filter: brightness(.9); }
.table-responsive { overflow-x: auto; }

/* ── Admin Order Stats Mini ──────────────────────────────────────── */
.order-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (min-width: 640px) { .order-stats-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .order-stats-grid { grid-template-columns: repeat(8, 1fr); } }
.order-stat { text-align: center; padding: 14px; background: white; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.order-stat-val { font-size: 1.5rem; font-weight: 800; }
.order-stat-label { font-size: 11px; color: var(--gray-500); margin-top: 2px; }

/* ── Misc Utilities ─────────────────────────────────────────────── */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-gray { color: var(--gray-500); }
.text-sm { font-size: 13px; }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }
.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.bg-white { background: white; }
.shadow { box-shadow: var(--shadow); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.overlay-spinner { position: fixed; inset: 0; background: rgba(255,255,255,.8); z-index: 9999; display: flex; align-items: center; justify-content: center; }
.spinner { width: 44px; height: 44px; border: 4px solid var(--primary-light); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeInUp .5s ease both; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
.delay-4 { animation-delay: .4s; }

/* Mobile sidebar toggle */
.admin-sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 49; }
.sidebar-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; color: var(--gray-600); }
@media (max-width: 1024px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-sidebar-overlay.open { display: block; }
  .admin-main { margin-left: 0; }
  .sidebar-toggle { display: flex; align-items: center; }
}

/* ── Sidebar Drawer ──────────────────────────────────────────────── */
.sidebar-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6); z-index: 1000;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.sidebar-overlay.show { opacity: 1; pointer-events: auto; }

.sidebar-drawer {
  position: fixed; top: 0; right: -100%; width: 100%; max-width: 440px; height: 100%;
  background: white; z-index: 1001; box-shadow: -4px 0 24px rgba(0,0,0,0.1);
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column;
}
.sidebar-drawer.open { right: 0; }

.sidebar-header {
  padding: 16px 20px; border-bottom: 1px solid var(--gray-200);
  display: flex; justify-content: space-between; align-items: center;
  background: var(--gray-50);
}
.sidebar-header h3 { margin: 0; font-size: 1.2rem; }
.sidebar-close {
  background: none; border: none; font-size: 1.5rem; line-height: 1;
  cursor: pointer; color: var(--gray-500); transition: color var(--transition);
}
.sidebar-close:hover { color: var(--danger); }
.sidebar-content { flex: 1; overflow-y: auto; padding: 16px; }

/* Force single column inside sidebar */
.sidebar-content .cart-layout, .sidebar-content .checkout-layout { grid-template-columns: 1fr !important; }
.sidebar-content .cart-page h1, .sidebar-content .checkout-page h1 { display: none; }
.sidebar-content .cart-page, .sidebar-content .checkout-page { padding: 0; }

/* ── PWA Popup ──────────────────────────────────────────────────── */
.pwa-popup {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 16px);
  left: 16px;
  right: 16px;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 16px;
  transform: translateY(150%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}
@media (min-width: 768px) {
  .pwa-popup {
    bottom: 24px;
    left: 24px;
    right: auto;
    width: 380px;
  }
}
.pwa-popup.show {
  transform: translateY(0);
}
.pwa-popup-icon {
  font-size: 32px;
  flex-shrink: 0;
  background: var(--primary-light);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
}
.pwa-popup-content {
  flex: 1;
}
.pwa-popup-content h4 {
  margin: 0 0 4px 0;
  font-size: 15px;
}
.pwa-popup-content p {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.4;
}
.pwa-popup-actions {
  display: flex;
  gap: 8px;
}
.pwa-dismiss {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}
.pwa-dismiss:hover {
  color: var(--gray-700);
}
