/* Fit & Fresh - Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --primary: #2d8a4e;
  --primary-dark: #1a5c34;
  --primary-light: #4db870;
  --secondary: #f0faf4;
  --accent: #ff6b35;
  --accent-light: #fff3ee;
  --white: #ffffff;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f8fdf9;
  --card-bg: #ffffff;
  --shadow: 0 4px 20px rgba(45,138,78,0.12);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-full: 999px;
  --nav-height: 64px;
  --bottom-nav: 68px;
  --font: 'Nunito', sans-serif;
  --font2: 'Poppins', sans-serif;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* APP SHELL */
.app-shell {
  padding-bottom: calc(var(--bottom-nav) + 16px);
  min-height: 100vh;
}

/* TOP NAV */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  height: var(--nav-height);
}
.nav-logo img { height: 36px; object-fit: contain; }
.nav-logo-text {
  font-size: 1.4rem;
  font-weight: 900;
  font-family: var(--font2);
  color: var(--primary);
  letter-spacing: -0.5px;
}
.nav-logo-text span { color: var(--accent); }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.nav-btn {
  width: 40px; height: 40px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--primary-dark);
  font-size: 1.1rem;
  position: relative;
  transition: var(--transition);
  text-decoration: none;
}
.nav-btn:active { transform: scale(0.92); }
.badge {
  position: absolute;
  top: -2px; right: -2px;
  background: var(--accent);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 18px; height: 18px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid white;
}

/* LOCATION BAR */
.location-bar {
  background: var(--primary-dark);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-size: 0.8rem;
}
.location-bar .icon { font-size: 0.9rem; }
.location-bar strong { font-size: 0.85rem; }
.location-change { margin-left: auto; font-size: 0.75rem; color: #a8f0c1; text-decoration: none; }

/* ORDER TIMER BANNER */
.order-timer-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  margin: 12px;
  border-radius: var(--radius);
  padding: 14px 16px;
  color: white;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
}
.timer-icon { font-size: 2rem; }
.timer-content h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 2px; }
.timer-content p { font-size: 0.75rem; opacity: 0.85; }
.timer-display {
  margin-left: auto;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  text-align: center;
}
.timer-display .time { font-size: 1.1rem; font-weight: 900; letter-spacing: 1px; }
.timer-display .label { font-size: 0.6rem; opacity: 0.8; }

/* SEARCH */
.search-bar {
  padding: 0 16px 12px;
}
.search-input-wrap {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  padding: 10px 16px;
  gap: 10px;
  transition: var(--transition);
}
.search-input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45,138,78,0.1);
}
.search-input-wrap input {
  flex: 1; border: none; outline: none;
  font-family: var(--font);
  font-size: 0.9rem; color: var(--text);
  background: transparent;
}
.search-icon { color: var(--text-muted); font-size: 1rem; }

/* BANNERS SLIDER */
.banners-section { padding: 0 16px 12px; }
.banner-slider { position: relative; border-radius: var(--radius); overflow: hidden; }
.banner-slides { display: flex; transition: transform 0.4s ease; }
.banner-slide {
  min-width: 100%;
  height: 160px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.banner-slide img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); position: absolute; inset: 0; }
.banner-content { position: relative; z-index: 2; }
.banner-content h2 { font-size: 1.2rem; font-weight: 900; color: white; line-height: 1.2; }
.banner-content p { font-size: 0.8rem; color: rgba(255,255,255,0.85); margin-top: 4px; }
.banner-content .btn-banner {
  display: inline-block;
  margin-top: 10px;
  background: var(--accent);
  color: white;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}
.banner-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 3;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: var(--transition);
}
.dot.active { background: white; width: 18px; }

/* SECTION */
.section { padding: 0 16px 8px; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.section-title { font-size: 1rem; font-weight: 800; color: var(--text); }
.see-all { font-size: 0.8rem; color: var(--primary); font-weight: 700; text-decoration: none; }

/* CATEGORIES */
.categories-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.categories-row::-webkit-scrollbar { display: none; }
.cat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 70px;
  cursor: pointer;
  text-decoration: none;
}
.cat-icon-wrap {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  transition: var(--transition);
  border: 2px solid transparent;
}
.cat-chip.active .cat-icon-wrap,
.cat-chip:hover .cat-icon-wrap {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.05);
}
.cat-name {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
}
.cat-chip.active .cat-name { color: var(--primary); }

/* FOOD CARDS */
.food-grid { display: flex; flex-direction: column; gap: 12px; }
.food-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  display: flex;
  gap: 12px;
  padding: 12px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
}
.food-card:active { transform: scale(0.98); }
.food-img-wrap { position: relative; flex-shrink: 0; }
.food-img {
  width: 90px; height: 90px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
}
.veg-badge {
  position: absolute;
  top: 4px; left: 4px;
  width: 16px; height: 16px;
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
}
.veg-badge.veg { background: white; border: 1.5px solid #22c55e; }
.veg-badge.veg::after { content:''; width:8px; height:8px; border-radius:50%; background:#22c55e; }
.veg-badge.nonveg { background: white; border: 1.5px solid #ef4444; }
.veg-badge.nonveg::after { content:''; width:8px; height:8px; border-radius:50%; background:#ef4444; }
.food-info { flex: 1; }
.food-name { font-size: 0.92rem; font-weight: 800; color: var(--text); margin-bottom: 3px; }
.food-desc { font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.food-macros {
  display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap;
}
.macro-tag {
  font-size: 0.65rem;
  background: var(--secondary);
  color: var(--primary-dark);
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 700;
}
.food-footer { display: flex; align-items: center; justify-content: space-between; }
.food-price {
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--primary-dark);
}
.food-price .original-price {
  font-size: 0.75rem;
  text-decoration: line-through;
  color: var(--text-muted);
  font-weight: 400;
  margin-right: 4px;
}
.add-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  padding: 7px 14px;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
}
.add-btn:active { transform: scale(0.92); background: var(--primary-dark); }
.qty-control {
  display: flex;
  align-items: center;
  background: var(--primary);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.qty-btn {
  width: 30px; height: 30px;
  border: none;
  background: transparent;
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.qty-num { color: white; font-weight: 800; min-width: 20px; text-align: center; font-size: 0.9rem; }

/* FEATURED HORIZONTAL SCROLL */
.food-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.food-scroll::-webkit-scrollbar { display: none; }
.food-card-h {
  min-width: 160px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.food-card-h .food-img { width: 100%; height: 110px; border-radius: var(--radius-sm); margin-bottom: 8px; }
.food-card-h .food-name { font-size: 0.82rem; font-weight: 800; margin-bottom: 4px; }
.food-card-h .food-price { font-size: 0.85rem; font-weight: 900; color: var(--primary-dark); }

/* FLOATING CART */
.floating-cart {
  position: fixed;
  bottom: calc(var(--bottom-nav) + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(min(480px, 100vw) - 32px);
  background: var(--primary-dark);
  border-radius: var(--radius-full);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(26,92,52,0.4);
  z-index: 90;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}
.floating-cart:active { transform: translateX(-50%) scale(0.97); }
.cart-count-pill {
  background: var(--accent);
  color: white;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
}
.cart-info { flex: 1; color: white; }
.cart-info-items { font-size: 0.8rem; opacity: 0.85; }
.cart-info-total { font-size: 0.95rem; font-weight: 800; }
.cart-arrow { color: white; font-size: 1.2rem; }

/* BOTTOM NAV */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(480px, 100vw);
  background: white;
  border-top: 1px solid var(--border);
  display: flex;
  height: var(--bottom-nav);
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
}
.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 700;
  transition: var(--transition);
  padding: 8px 4px;
}
.nav-tab .icon { font-size: 1.3rem; }
.nav-tab.active { color: var(--primary); }
.nav-tab.active .icon { transform: scale(1.1); }

/* PAGE HEADER */
.page-header {
  background: white;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}
.back-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--secondary);
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  color: var(--primary-dark);
  text-decoration: none;
}
.page-title { font-size: 1.05rem; font-weight: 800; }

/* CART PAGE */
.cart-item {
  background: white;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}
.cart-item-img {
  width: 56px; height: 56px;
  border-radius: var(--radius-sm);
  background: var(--secondary);
  font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  object-fit: cover;
}
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 0.88rem; font-weight: 700; }
.cart-item-price { font-size: 0.82rem; color: var(--primary); font-weight: 700; }
.remove-btn { color: #ef4444; background: none; border: none; font-size: 1rem; cursor: pointer; }

/* BILL SECTION */
.bill-card {
  background: white;
  margin: 12px 16px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.bill-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
}
.bill-row:last-child { border-bottom: none; }
.bill-row.total { font-weight: 800; font-size: 0.95rem; color: var(--primary-dark); }
.bill-row.saving { color: #22c55e; }

/* CHECKOUT */
.delivery-date-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  margin: 12px;
  border-radius: var(--radius);
  padding: 14px;
  color: white;
  display: flex;
  align-items: center;
  gap: 12px;
}
.delivery-date-icon { font-size: 2rem; }
.delivery-date-info h3 { font-size: 0.85rem; opacity: 0.85; margin-bottom: 2px; }
.delivery-date-info strong { font-size: 1.1rem; font-weight: 800; }
.delivery-date-info p { font-size: 0.75rem; opacity: 0.75; margin-top: 2px; }

/* FORM STYLES */
.form-section {
  background: white;
  margin: 0 0 8px;
  padding: 16px;
}
.form-section-title { font-size: 0.9rem; font-weight: 800; margin-bottom: 12px; color: var(--text); }
.form-group { margin-bottom: 12px; }
.form-label { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); margin-bottom: 5px; display: block; }
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.88rem;
  color: var(--text);
  outline: none;
  transition: var(--transition);
  background: var(--bg);
}
.form-control:focus { border-color: var(--primary); background: white; }

/* PAYMENT METHODS */
.payment-options { display: flex; flex-direction: column; gap: 8px; }
.payment-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.payment-option.selected { border-color: var(--primary); background: var(--secondary); }
.payment-option input { display: none; }
.payment-icon { font-size: 1.3rem; width: 32px; text-align: center; }
.payment-label { font-size: 0.88rem; font-weight: 700; }
.payment-label small { display: block; font-size: 0.72rem; font-weight: 400; color: var(--text-muted); }
.radio-circle {
  margin-left: auto;
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  position: relative;
}
.payment-option.selected .radio-circle { border-color: var(--primary); }
.payment-option.selected .radio-circle::after {
  content: '';
  position: absolute;
  width: 10px; height: 10px;
  background: var(--primary);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

/* COUPON */
.coupon-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: white;
  margin-bottom: 8px;
}
.coupon-row input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.88rem;
  outline: none;
}
.coupon-row input:focus { border-color: var(--primary); }
.apply-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-family: var(--font);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.85rem;
}

/* PLACE ORDER BUTTON */
.place-order-bar {
  position: fixed;
  bottom: var(--bottom-nav);
  left: 50%;
  transform: translateX(-50%);
  width: min(480px, 100vw);
  padding: 10px 16px;
  background: white;
  border-top: 1px solid var(--border);
  z-index: 90;
}
.place-order-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-full);
  padding: 14px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}
.place-order-btn:active { transform: scale(0.98); }

/* ORDER STATUS */
.status-stepper { padding: 20px 16px; }
.step {
  display: flex;
  gap: 14px;
  position: relative;
}
.step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 30px;
  bottom: -10px;
  width: 2px;
  background: var(--border);
}
.step.done::before { background: var(--primary); }
.step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  background: white;
  z-index: 1;
}
.step.done .step-dot { background: var(--primary); border-color: var(--primary); color: white; }
.step.active .step-dot { border-color: var(--primary); color: var(--primary); }
.step-content { padding-bottom: 20px; }
.step-label { font-size: 0.88rem; font-weight: 700; }
.step-time { font-size: 0.75rem; color: var(--text-muted); }

/* EMPTY STATE */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 30px;
  text-align: center;
}
.empty-icon { font-size: 4rem; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.1rem; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }
.empty-state a {
  margin-top: 20px;
  background: var(--primary);
  color: white;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.9rem;
  display: inline-block;
}

/* TOAST */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  background: var(--primary-dark);
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  z-index: 9999;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  max-width: 90vw;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--primary); }
.toast.error { background: #ef4444; }

/* CHIPS/TAGS */
.tags-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tag-chip {
  padding: 4px 12px;
  background: var(--secondary);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary-dark);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: var(--transition);
}
.tag-chip.active, .tag-chip:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

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

/* SUCCESS PAGE */
.success-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 30px 30px;
  text-align: center;
}
.success-animation {
  width: 100px; height: 100px;
  background: var(--secondary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  margin-bottom: 20px;
  animation: pop 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes pop {
  0% { transform: scale(0); }
  80% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* UTILITIES */
.text-green { color: var(--primary); }
.text-orange { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.fw-bold { font-weight: 800; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.p-16 { padding: 16px; }
.mt-8 { margin-top: 8px; }
.mb-8 { margin-bottom: 8px; }
.hidden { display: none; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
