/* =====================================================
   NATUREBASKET - CART WEBSITE STYLES
   Professional Grocery Cart Look
   ===================================================== */

:root {
  --green: #1a6b3a;
  --green-dark: #0f4d28;
  --green-light: #e8f5ee;
  --green-mid: #2d9b56;
  --green-glow: rgba(45, 155, 86, 0.25);
  --amber: #f59e0b;
  --amber-light: #fef3c7;
  --red: #e53e3e;
  --bg: #f0f4f1;
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-green: 0 4px 20px rgba(26,107,58,0.25);
  --radius: 16px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

/* ── HEADER ── */
header {
  background: linear-gradient(135deg, #0f4d28 0%, #1a6b3a 40%, #2d9b56 100%);
  padding: 14px 18px 12px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
header::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}
.header-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 2; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 40px; height: 40px;
  border-radius: 12px; object-fit: cover;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.logo-text h1 {
  font-family: 'Playfair Display', serif;
  color: #fff; font-size: 20px; line-height: 1;
  text-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.logo-text p { color: rgba(255,255,255,0.75); font-size: 11px; margin-top: 2px; font-weight: 500; }

.cart-btn {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  border: none; border-radius: 14px;
  padding: 10px 16px; display: flex; align-items: center; gap: 6px;
  font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 14px;
  color: var(--text); cursor: pointer; position: relative;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 3px 12px rgba(245,158,11,0.4);
}
.cart-btn::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0) 100%);
  border-radius: 14px 14px 0 0;
  pointer-events: none;
}
.cart-btn:active { transform: scale(0.95); }

/* ─── HEADER ACTIONS + STORE SWITCH (Phase 1: multi-store) ─── */
.header-actions { display: flex; align-items: center; gap: 8px; }
.store-switch {
  display: flex; align-items: center; gap: 5px;
  padding: 8px 12px; border-radius: 12px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff; text-decoration: none;
  font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 12px;
  white-space: nowrap; cursor: pointer;
  transition: background 0.15s;
}
.store-switch:hover { background: rgba(255,255,255,0.25); }
@media (max-width: 420px) {
  .store-switch span { display: none; }
  .store-switch { padding: 9px 10px; }
}
.cart-count {
  background: var(--red); color: #fff;
  border-radius: 50%; min-width: 20px; height: 20px;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  position: absolute; top: -6px; right: -6px;
  transition: transform 0.2s;
  border: 2px solid #fff;
}
.cart-count.bump { animation: bump 0.3s ease; }
@keyframes bump { 0%,100%{transform:scale(1)} 50%{transform:scale(1.4)} }

/* ── HERO ── */
.hero {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 14px;
  padding: 16px 16px 0;
}
.hero::-webkit-scrollbar { display: none; }
.hero-slide {
  min-width: calc(100% - 28px);
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  padding: 28px 22px;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  min-height: 160px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.15), inset 0 -20px 40px rgba(255,255,255,0.08);
}
.hero-slide-content { flex: 1; z-index: 2; }
.hero-slide h2 {
  font-family: 'Playfair Display', serif;
  font-size: 24px; line-height: 1.2; margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.hero-slide p { font-size: 13px; opacity: 0.95; line-height: 1.5; text-shadow: 0 1px 4px rgba(0,0,0,0.15); }
.hero-badge {
  display: inline-block; background: linear-gradient(135deg, #f59e0b, #fbbf24); color: var(--text);
  border-radius: 20px; padding: 5px 14px; font-size: 11px; font-weight: 700;
  margin-top: 10px;
  box-shadow: 0 2px 8px rgba(245,158,11,0.35);
}
.hero-slide::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}
.hero-slide::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60%;
  background: linear-gradient(0deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}
.hero-dots {
  display: flex; justify-content: center; gap: 8px;
  padding: 14px 0 4px;
}
.hero-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: #c5d5c9; transition: all 0.3s;
}
.hero-dots span.active { background: var(--green); width: 22px; border-radius: 4px; }

/* ── SECTION TITLE ── */
.section-title {
  padding: 20px 20px 12px;
  font-family: 'Playfair Display', serif;
  font-size: 22px; color: var(--green);
}
.section-subtitle { font-family: 'DM Sans', sans-serif; font-size: 13px; color: var(--muted); font-weight: 400; display: block; margin-top: 2px; }

/* ── CATEGORY GRID ── */
.categories {
  padding: 0 16px 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.cat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 18px 10px 14px;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  box-shadow: var(--shadow);
  transition: all 0.25s;
  user-select: none;
  position: relative;
  overflow: hidden;
}
.cat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
  border-radius: 14px 14px 0 0;
}
.cat-card:active { transform: scale(0.96); }
.cat-card:hover { box-shadow: var(--shadow-lg); border-color: var(--green-mid); }
.cat-card.active {
  border-color: var(--green);
  background: linear-gradient(135deg, #e8f5ee, #d4edda);
  box-shadow: var(--shadow-green);
}
.cat-icon { font-size: 32px; margin-bottom: 8px; line-height: 1; position: relative; z-index: 2; }
.cat-name { font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.3; position: relative; z-index: 2; }
.cat-count { font-size: 11px; color: var(--muted); margin-top: 2px; position: relative; z-index: 2; }

/* ── ITEMS PANEL ── */
#items-panel { display: none; }
#items-panel.visible { display: block; }

.items-header {
  padding: 0 20px 12px;
  display: flex; align-items: center; gap: 10px;
}
.items-header-icon { font-size: 22px; }
.items-header h3 { font-family: 'Playfair Display', serif; font-size: 20px; color: var(--green); }
.items-header span { font-size: 12px; color: var(--muted); }

/* Subcategory chips (shown inside a category that has subcategories) */
.subcat-bar {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 14px 14px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.subcat-bar::-webkit-scrollbar { display: none; }
.subcat-chip {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 7px 14px; border: 1.5px solid var(--border); border-radius: 999px;
  background: var(--card-bg); color: var(--text); cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 600;
  transition: border-color .15s, background .15s, color .15s;
}
.subcat-chip i { font-style: normal; font-size: 16px; line-height: 1; }
.subcat-chip img { width: 20px; height: 20px; object-fit: contain; border-radius: 5px; }
.subcat-chip em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--muted); }
.subcat-chip:hover { border-color: var(--green-mid); }
.subcat-chip.active { background: var(--green); border-color: var(--green); color: #fff; }
.subcat-chip.active em { color: rgba(255,255,255,.85); }

.items-grid {
  padding: 0 16px 32px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.item-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1.5px solid var(--border);
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.item-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
  border-radius: 14px 14px 0 0;
}
.item-card:hover { border-color: var(--green-mid); box-shadow: var(--shadow-lg); }
.item-card.in-cart { border-color: var(--green); background: linear-gradient(135deg, #f0fdf4, #ecfdf5); }

.item-emoji {
  font-size: 36px; text-align: center; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  height: 70px; position: relative; z-index: 2;
}
.item-emoji img {
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.item-name { font-weight: 600; font-size: 13px; color: var(--text); line-height: 1.3; position: relative; z-index: 2; }
.item-unit { font-size: 11px; color: var(--muted); position: relative; z-index: 2; }
.item-price {
  font-family: 'Playfair Display', serif;
  font-size: 17px; color: var(--green); font-weight: 700;
  position: relative; z-index: 2;
}
.item-price span { font-family: 'DM Sans', sans-serif; font-size: 11px; color: var(--muted); font-weight: 400; }

.item-stock-status {
  font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 8px;
  display: inline-block; width: fit-content; position: relative; z-index: 2;
}
.item-stock-status.low { background: var(--amber-light); color: #92400e; }
.item-stock-status.out { background: #fef2f2; color: #991b1b; }

.qty-control {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #e8f5ee, #d4edda);
  border-radius: 10px; overflow: hidden;
  position: relative; z-index: 2;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}
.qty-btn {
  background: none; border: none;
  width: 36px; height: 36px;
  font-size: 18px; font-weight: 700; color: var(--green);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.qty-btn:active { background: rgba(0,0,0,0.08); }
.qty-num { font-weight: 700; font-size: 15px; color: var(--green); min-width: 24px; text-align: center; }

.add-btn {
  width: 100%; color: #fff;
  border: none; border-radius: 10px; padding: 10px;
  font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 13px;
  cursor: pointer; transition: all 0.2s;
  background: linear-gradient(135deg, #1a6b3a, #2d9b56);
  box-shadow: 0 3px 12px rgba(26,107,58,0.3);
  position: relative; z-index: 2;
}
.add-btn::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 100%);
  border-radius: 10px 10px 0 0;
  pointer-events: none;
}
.add-btn:active { transform: scale(0.97); background: linear-gradient(135deg, #145c30, #1a6b3a); }
.add-btn.added {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: var(--text);
  box-shadow: 0 3px 12px rgba(245,158,11,0.3);
}
.add-btn:disabled { background: var(--muted); cursor: not-allowed; box-shadow: none; }

/* ── CART DRAWER ── */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 200; display: none; opacity: 0;
  transition: opacity 0.3s;
  backdrop-filter: blur(4px);
}
.cart-overlay.open { display: block; opacity: 1; }

.cart-drawer {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff; border-radius: 24px 24px 0 0;
  z-index: 300; height: 90vh; max-height: 90vh;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.18);
  overflow: hidden;
}
.cart-drawer.open { transform: translateY(0); }

.drawer-handle {
  width: 40px; height: 4px; background: var(--border);
  border-radius: 2px; margin: 12px auto 4px;
  flex-shrink: 0;
}
.drawer-header {
  padding: 14px 20px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
}
.drawer-header h3 { font-family: 'Playfair Display', serif; font-size: 20px; color: var(--green); }
.close-btn {
  background: var(--border); border: none; border-radius: 50%;
  width: 32px; height: 32px; font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.close-btn:hover { background: #d1d5db; }

.cart-items {
  overflow-y: auto;
  flex: 0 1 auto;
  min-height: 0;
  max-height: 38vh;
  padding: 12px 20px;
}

.cart-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }
.ci-emoji { font-size: 28px; }
.ci-info { flex: 1; }
.ci-name { font-weight: 600; font-size: 14px; }
.ci-unit { font-size: 11px; color: var(--muted); }
.ci-qty-ctrl {
  display: flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #e8f5ee, #d4edda);
  border-radius: 8px; padding: 4px 8px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}
.ci-qty-btn {
  background: none; border: none; font-size: 16px; font-weight: 700;
  color: var(--green); cursor: pointer; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
}
.ci-qty-num { font-weight: 700; font-size: 14px; color: var(--green); min-width: 16px; text-align: center; }
.ci-price { font-weight: 700; font-size: 15px; color: var(--green); min-width: 52px; text-align: right; }

.empty-cart { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-cart .ec-icon { font-size: 48px; margin-bottom: 12px; }
.empty-cart p { font-size: 15px; }

.cart-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, #fff 0%, #f8fdf9 100%);
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.total-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.total-label { font-size: 14px; color: var(--muted); font-weight: 500; }
.total-amount { font-family: 'Playfair Display', serif; font-size: 24px; color: var(--green); font-weight: 700; }

/* ── DELIVERY CHARGE ROW ── */
.delivery-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; font-size: 13px;
}
.delivery-label { color: var(--muted); font-weight: 500; }
.delivery-amount { font-weight: 600; color: var(--green); }
.delivery-free { color: var(--green); font-weight: 600; }

/* Customer inputs */
.input-group { flex: 1; }
.input-group.full { flex: none; width: 100%; margin-bottom: 12px; }
.input-group.half { flex: none; width: calc(50% - 6px); margin-bottom: 12px; display: inline-block; }
.input-group label { font-size: 12px; color: var(--muted); font-weight: 600; display: block; margin-bottom: 4px; }
.name-input {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 14px;
  outline: none; transition: all 0.2s;
  background: #f8faf9;
}
.name-input:focus { border-color: var(--green); background: #fff; box-shadow: 0 0 0 3px rgba(26,107,58,0.1); }
.name-input.error { border-color: var(--red); }
.name-input:disabled { opacity: 0.6; }

select.name-input {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 14px;
  outline: none; transition: all 0.2s;
  background: #f8faf9; appearance: auto;
}
select.name-input:focus { border-color: var(--green); background: #fff; }

.order-btn {
  width: 100%; color: #fff;
  border: none; border-radius: 14px; padding: 16px;
  font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 16px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  gap: 10px; transition: all 0.2s;
  background: linear-gradient(135deg, #1a6b3a 0%, #2d9b56 100%);
  box-shadow: 0 4px 20px rgba(26,107,58,0.4);
  position: relative;
}
.order-btn::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
  border-radius: 14px 14px 0 0;
  pointer-events: none;
}
.order-btn:active { transform: scale(0.98); }
.order-btn:disabled { background: var(--muted); box-shadow: none; cursor: default; }

/* Sending state */
.order-btn.sending { opacity: 0.8; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff; border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
.order-btn.sending .spinner { display: block; }
.order-btn.sending .btn-icon { display: none; }

/* ── OTP MODAL ── */
.otp-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  z-index: 400; display: none; opacity: 0;
  transition: opacity 0.3s;
  align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.otp-overlay.open { display: flex; opacity: 1; }

.otp-modal {
  background: #fff; border-radius: 24px; padding: 32px 24px;
  max-width: 380px; width: 90%; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  position: relative;
  overflow: hidden;
}
.otp-modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--green), var(--green-mid), var(--green));
}
.otp-modal h3 {
  font-family: 'Playfair Display', serif;
  font-size: 22px; color: var(--green); margin-bottom: 8px;
}
.otp-modal p { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.otp-modal .otp-phone { font-weight: 600; color: var(--text); }

.otp-inputs {
  display: flex; gap: 8px; justify-content: center; margin-bottom: 20px;
}
.otp-input {
  width: 48px; height: 56px; text-align: center; font-size: 24px;
  font-weight: 700; border: 2px solid var(--border); border-radius: 12px;
  outline: none; transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
  background: #f8faf9;
}
.otp-input:focus { border-color: var(--green); background: #fff; box-shadow: 0 0 0 3px rgba(26,107,58,0.1); }
.otp-input.error { border-color: var(--red); }

.otp-actions { display: flex; flex-direction: column; gap: 10px; }
.otp-verify-btn {
  width: 100%; color: #fff;
  border: none; border-radius: 12px; padding: 14px;
  font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 15px;
  cursor: pointer; transition: all 0.2s;
  background: linear-gradient(135deg, #1a6b3a, #2d9b56);
  box-shadow: 0 3px 12px rgba(26,107,58,0.3);
}
.otp-verify-btn:disabled { background: var(--muted); cursor: default; box-shadow: none; }
.otp-resend {
  background: none; border: none; color: var(--green);
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 600;
  cursor: pointer; padding: 8px;
}
.otp-resend:disabled { color: var(--muted); cursor: default; }
.otp-timer { font-size: 12px; color: var(--muted); }

/* ── ORDER CONFIRMATION MODAL ── */
.confirm-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  z-index: 500; display: none; opacity: 0;
  transition: opacity 0.3s;
  align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.confirm-overlay.open { display: flex; opacity: 1; }

.confirm-modal {
  background: #fff; border-radius: 24px; padding: 32px 24px;
  max-width: 420px; width: 90%; max-height: 85vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  position: relative;
}
.confirm-modal::before {
  content: '';
  position: sticky; top: -32px; left: -24px; right: -24px;
  height: 4px; display: block;
  background: linear-gradient(90deg, var(--green), var(--green-mid), var(--green));
  margin: -32px -24px 20px;
  border-radius: 24px 24px 0 0;
  z-index: 1;
}
.confirm-modal .check-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, #e8f5ee, #d4edda);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 32px; margin: 0 auto 16px;
  box-shadow: 0 4px 16px rgba(26,107,58,0.2);
}
.confirm-modal h3 {
  font-family: 'Playfair Display', serif;
  font-size: 22px; color: var(--green); text-align: center; margin-bottom: 4px;
}
.confirm-modal .order-num {
  text-align: center; font-size: 14px; color: var(--muted); margin-bottom: 20px;
}
.confirm-modal .order-num strong { color: var(--text); }

.confirm-details { border-top: 1px solid var(--border); padding-top: 16px; }
.confirm-section { margin-bottom: 14px; }
.confirm-section h4 { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.confirm-section p { font-size: 14px; line-height: 1.5; }

.confirm-items { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; }
.confirm-item {
  display: flex; justify-content: space-between; padding: 6px 0;
  font-size: 13px;
}
.confirm-item-name { flex: 1; }
.confirm-item-qty { color: var(--muted); min-width: 60px; text-align: center; }
.confirm-item-price { font-weight: 600; min-width: 60px; text-align: right; }

.confirm-totals { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; }
.confirm-total-row {
  display: flex; justify-content: space-between; padding: 4px 0;
  font-size: 14px;
}
.confirm-total-row.grand { font-weight: 700; font-size: 16px; color: var(--green); margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--border); }

.confirm-close-btn {
  width: 100%; color: #fff;
  border: none; border-radius: 12px; padding: 14px;
  font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 15px;
  cursor: pointer; margin-top: 20px; transition: all 0.2s;
  background: linear-gradient(135deg, #1a6b3a, #2d9b56);
  box-shadow: 0 3px 12px rgba(26,107,58,0.3);
}

/* ── TRACK ORDER ── */
.track-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  z-index: 500; display: none; opacity: 0;
  transition: opacity 0.3s;
  align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.track-overlay.open { display: flex; opacity: 1; }

.track-modal {
  background: #fff; border-radius: 24px; padding: 32px 24px;
  max-width: 420px; width: 90%; max-height: 80vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  position: relative;
  overflow: hidden;
}
.track-modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--green), var(--green-mid), var(--green));
}
.track-modal h3 {
  font-family: 'Playfair Display', serif;
  font-size: 22px; color: var(--green); text-align: center; margin-bottom: 20px;
}

.track-search {
  display: flex; gap: 8px; margin-bottom: 20px;
}
.track-search input {
  flex: 1; padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 14px;
  outline: none; background: #f8faf9; transition: all 0.2s;
}
.track-search input:focus { border-color: var(--green); background: #fff; }
.track-search-btn {
  color: #fff; border: none; border-radius: var(--radius-sm);
  padding: 10px 16px; font-weight: 700; cursor: pointer;
  background: linear-gradient(135deg, #1a6b3a, #2d9b56);
  box-shadow: 0 2px 8px rgba(26,107,58,0.3);
}

.timeline { padding: 0; }
.timeline-item {
  display: flex; gap: 12px; padding-bottom: 20px; position: relative;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--border); flex-shrink: 0; margin-top: 4px;
}
.timeline-item.active .timeline-dot { background: var(--green); box-shadow: 0 0 0 4px rgba(26,107,58,0.2); }
.timeline-item.completed .timeline-dot { background: var(--green); }
.timeline-content { flex: 1; }
.timeline-content .tl-title { font-size: 14px; font-weight: 600; }
.timeline-content .tl-time { font-size: 11px; color: var(--muted); }
.timeline-line {
  position: absolute; left: 5px; top: 16px; bottom: 0;
  width: 2px; background: var(--border);
}
.timeline-item.completed .timeline-line { background: var(--green); }

.track-close-btn {
  width: 100%; background: var(--border); color: var(--text);
  border: none; border-radius: 12px; padding: 12px;
  font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 14px;
  cursor: pointer; margin-top: 16px;
  transition: background 0.2s;
}
.track-close-btn:hover { background: #d1d5db; }

/* ── MIN ORDER WARNING ── */
.min-order-warning {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-radius: var(--radius-sm); padding: 10px 14px;
  margin-bottom: 12px; font-size: 12px; color: #92400e; display: none;
  border: 1px solid #fde68a;
}
.min-order-warning.show { display: block; }

/* ── SUCCESS TOAST ── */
.toast {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%) translateY(20px);
  color: #fff; border-radius: 14px;
  padding: 12px 20px; font-weight: 600; font-size: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  opacity: 0; transition: opacity 0.3s, transform 0.3s;
  z-index: 600; white-space: nowrap; max-width: 90%; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(135deg, #1a6b3a, #2d9b56);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error-toast { background: linear-gradient(135deg, #c0392b, #e74c3c); }

/* ── FLOATING CART BTN ── */
.fab {
  position: fixed; bottom: 24px; right: 20px;
  color: #fff;
  border: none; border-radius: 20px; padding: 14px 20px;
  font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 14px;
  cursor: pointer; display: none; align-items: center; gap: 8px;
  z-index: 150; transition: transform 0.2s, box-shadow 0.2s;
  background: linear-gradient(135deg, #1a6b3a 0%, #2d9b56 100%);
  box-shadow: 0 6px 28px rgba(26,107,58,0.45);
  position: fixed;
}
.fab::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
  border-radius: 20px 20px 0 0;
  pointer-events: none;
}
.fab.visible { display: flex; }
.fab:active { transform: scale(0.96); }
.fab-badge {
  background: linear-gradient(135deg, #f59e0b, #fbbf24); color: var(--text);
  border-radius: 10px; padding: 2px 8px; font-size: 12px; font-weight: 800;
  position: relative; z-index: 2;
  box-shadow: 0 1px 4px rgba(245,158,11,0.3);
}

main { padding-bottom: 100px; }

/* ── SEARCH ── */
.search-wrap { padding: 12px 16px 0; }
.search-box {
  display: flex; align-items: center;
  background: #fff; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  padding: 10px 14px; gap: 8px;
  box-shadow: var(--shadow);
  transition: all 0.2s;
}
.search-box:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(26,107,58,0.1); }
.search-box input {
  flex: 1; border: none; outline: none;
  font-family: 'DM Sans', sans-serif; font-size: 14px;
  background: transparent; color: var(--text);
}
.search-icon { color: var(--muted); font-size: 16px; }

/* ── BACK BUTTON ── */
.back-btn {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none;
  color: var(--green); font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 600; cursor: pointer;
  padding: 0 20px 0 16px; margin-bottom: 4px;
}

/* ── LOADING SKELETON ── */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

.skeleton-card {
  height: 180px;
  border-radius: var(--radius);
}

/* ── TRACK ORDER BUTTON ── */
.track-order-btn {
  display: block; width: 100%; margin-top: 12px;
  color: var(--green);
  border: 1.5px solid var(--green); border-radius: var(--radius-sm);
  padding: 10px; font-family: 'DM Sans', sans-serif;
  font-weight: 600; font-size: 13px; cursor: pointer;
  text-align: center; transition: all 0.2s;
  background: transparent;
}
.track-order-btn:active { background: var(--green-light); }

/* ── DELIVERY FIELDS ── */
.delivery-fields { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; }
.delivery-fields h4 { font-size: 13px; font-weight: 600; color: var(--green); margin-bottom: 10px; }

/* ── TEXTAREA ── */
textarea.name-input {
  resize: vertical; min-height: 60px;
}

/* ── DELIVERY TYPE BUTTONS ── */
.delivery-type-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px; border-radius: 12px;
  border: 2px solid var(--border);
  background: #fff; color: var(--muted);
  font-weight: 600; font-size: 13px; cursor: pointer;
  transition: all 0.25s;
  font-family: 'DM Sans', sans-serif;
  position: relative; overflow: hidden;
}
.delivery-type-btn::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
  border-radius: 10px 10px 0 0;
  opacity: 0;
  transition: opacity 0.2s;
}
.delivery-type-btn.active {
  border-color: var(--green);
  background: linear-gradient(135deg, #1a6b3a, #2d9b56);
  color: #fff;
  box-shadow: 0 3px 12px rgba(26,107,58,0.3);
}
.delivery-type-btn.active::after { opacity: 1; }
.delivery-type-btn:active { transform: scale(0.97); }

/* ── DETECT LOCATION BTN ── */
.detect-loc-btn {
  padding: 10px 12px; border-radius: 12px;
  border: 2px solid var(--green);
  background: linear-gradient(135deg, #1a6b3a, #2d9b56);
  color: #fff; font-size: 13px; cursor: pointer;
  white-space: nowrap; font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  box-shadow: 0 2px 8px rgba(26,107,58,0.25);
  transition: all 0.2s;
}
.detect-loc-btn:active { transform: scale(0.96); }

/* ── COUPON APPLY BTN ── */
.coupon-apply-btn {
  padding: 10px 16px; border-radius: 12px;
  border: 2px solid var(--green);
  background: linear-gradient(135deg, #1a6b3a, #2d9b56);
  color: #fff; font-weight: 700; font-size: 13px; cursor: pointer;
  white-space: nowrap; font-family: 'DM Sans', sans-serif;
  box-shadow: 0 2px 8px rgba(26,107,58,0.25);
  transition: all 0.2s;
}
.coupon-apply-btn:active { transform: scale(0.96); }

/* ── STORE PICKUP CARD ── */
.store-pickup-card {
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border: 2px solid var(--green);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(26,107,58,0.1);
}
.store-map-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px;
  background: linear-gradient(135deg, #1a6b3a, #2d9b56);
  color: #fff; font-size: 12px; font-weight: 600;
  text-decoration: none; transition: opacity 0.2s;
  box-shadow: 0 2px 6px rgba(26,107,58,0.25);
}
.store-map-link:active { opacity: 0.85; }

/* ── RESPONSIVE ── */
@media (min-width: 480px) {
  .items-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
  .categories { grid-template-columns: repeat(4, 1fr); }
  .items-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── CART DRAWER MOBILE ── */
@media (max-width: 480px) {
  .cart-drawer {
    max-height: 95vh;
    border-radius: 20px 20px 0 0;
  }

  .drawer-header { padding: 10px 16px 10px; }
  .drawer-header h3 { font-size: 17px; }

  .cart-items { padding: 8px 16px; }

  .cart-item { gap: 8px; padding: 10px 0; }
  .ci-emoji { font-size: 22px; }
  .ci-name { font-size: 13px; }
  .ci-unit { font-size: 10px; }
  .ci-qty-ctrl { gap: 4px; padding: 3px 6px; }
  .ci-qty-btn { width: 22px; height: 22px; font-size: 14px; }
  .ci-qty-num { font-size: 13px; min-width: 14px; }
  .ci-price { font-size: 13px; min-width: 44px; }

  .cart-footer {
    padding: 12px 16px;
    max-height: 55vh;
    overflow-y: auto;
  }

  .total-amount { font-size: 20px; }

  .input-group.full { margin-bottom: 8px; }
  .input-group label { font-size: 11px; margin-bottom: 3px; }
  .name-input { padding: 8px 12px; font-size: 13px; }
  textarea.name-input { min-height: 48px; }

  .order-btn { padding: 14px; font-size: 15px; border-radius: 12px; }
  .track-order-btn { padding: 9px; font-size: 12px; }

  .otp-input { width: 40px; height: 48px; font-size: 20px; }
  .otp-modal { padding: 24px 18px; border-radius: 20px; }
  .otp-modal h3 { font-size: 19px; }

  .hero-slide h2 { font-size: 20px; }
  .hero-slide p { font-size: 12px; }
  .hero { gap: 10px; padding: 12px 12px 0; }
  .hero-slide { min-width: calc(100% - 20px); padding: 22px 16px; border-radius: 16px; min-height: 140px; }
  .section-title { font-size: 19px; padding: 16px 16px 10px; }

  .cat-card { padding: 14px 8px 12px; }
  .cat-icon { font-size: 28px; margin-bottom: 6px; }
  .cat-name { font-size: 11px; }
  .cat-count { font-size: 10px; }
}

@media (max-width: 360px) {
  .cart-drawer { max-height: 98vh; }
  .cart-footer { padding: 10px 12px; max-height: 60vh; }
  .otp-inputs { gap: 5px; }
  .otp-input { width: 36px; height: 44px; font-size: 18px; }
  .categories { gap: 8px; padding: 0 10px 20px; }
  .items-grid { gap: 8px; padding: 0 10px 24px; }
}
