/* ============================================================
   Onspot Delivery — Design System
   Fonts: Clash Display (headings) + Barlow Semi Condensed (body)
   ============================================================ */

@import url('https://api.fontshare.com/v2/css?f[]=clash-display@400,500,600,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:wght@300;400;500;600;700&display=swap');

/* ---- Design Tokens ---------------------------------------- */
:root {
  --c-primary:      #15248B;
  --c-accent:       #988FC6;
  --c-accent-soft:  #D4C2FC;
  --c-bg:           #F8F5FE;
  --c-surface:      #FFFFFF;
  --c-text:         #28252C;
  --c-muted:        #988FC6;
  --c-veg:          #2E7D32;
  --c-nonveg:       #C62828;
  --c-success:      #2E7D32;
  --c-danger:       #C62828;
  --c-border:       #E8E2F8;
  --c-shadow:       rgba(21,36,139,0.08);
  --c-shadow-lg:    rgba(21,36,139,0.15);

  --font-display: 'Clash Display', 'Sora', system-ui, sans-serif;
  --font-body:    'Barlow Semi Condensed', system-ui, sans-serif;

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --shadow-sm:  0 2px 8px var(--c-shadow);
  --shadow-md:  0 4px 20px var(--c-shadow);
  --shadow-lg:  0 8px 40px var(--c-shadow-lg);

  --transition: 0.2s ease;
  --max-width:  1200px;
  --nav-h:      68px;
}

/* ---- Reset ------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--c-bg);
  color: var(--c-text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}
img { display: block; max-width: 100%; }
a { color: var(--c-primary); text-decoration: none; }
button, input, select, textarea { font: inherit; }
ul { list-style: none; }

/* ---- Typography ------------------------------------------- */
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-text);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; }

.label-upper { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--c-muted); }
.text-muted   { color: var(--c-muted); }
.text-primary { color: var(--c-primary); }
.text-danger  { color: var(--c-danger); }
.text-success { color: var(--c-success); }

/* ---- Layout ----------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}
.section { padding: 56px 0; }
.section-sm { padding: 32px 0; }

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

.flex       { display: flex; }
.flex-col   { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

/* ---- Navigation ------------------------------------------- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
}
.navbar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--c-primary);
}
.navbar-brand img { width: 38px; height: 38px; border-radius: 10px; }
.navbar-brand span { color: var(--c-text); }
.navbar-brand strong { color: var(--c-primary); }

.navbar-search {
  flex: 1; max-width: 440px;
  position: relative;
}
.navbar-search input {
  width: 100%;
  background: var(--c-bg);
  border: 1.5px solid var(--c-border);
  border-radius: 50px;
  padding: 10px 20px 10px 44px;
  font-size: 14px;
  transition: border-color var(--transition);
}
.navbar-search input:focus { outline: none; border-color: var(--c-accent); }
.navbar-search .search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--c-muted); pointer-events: none;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  background: transparent;
  color: var(--c-text);
}
.nav-btn:hover { background: var(--c-bg); }
.nav-btn.primary { background: var(--c-primary); color: #fff; }
.nav-btn.primary:hover { background: #1a2ea8; }
.nav-btn.cart-btn { position: relative; }
.cart-badge {
  position: absolute; top: 2px; right: 4px;
  width: 18px; height: 18px;
  background: var(--c-danger);
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  display: none;
}
.cart-badge.show { display: flex; }

.city-picker {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border-radius: 50px;
  border: 1.5px solid var(--c-border);
  background: var(--c-surface);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--c-text);
  transition: border-color var(--transition);
}
.city-picker:hover { border-color: var(--c-accent); }
.city-picker svg { color: var(--c-primary); }

.lang-toggle {
  padding: 7px 14px;
  border-radius: 50px;
  border: 1.5px solid var(--c-border);
  background: var(--c-surface);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: var(--c-primary);
  transition: all var(--transition);
}
.lang-toggle:hover,
.lang-toggle.active { background: var(--c-accent-soft); border-color: var(--c-accent); }

.page-body { padding-top: var(--nav-h); }

/* ---- Hero Slider ------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  background: var(--c-primary);
  height: clamp(300px, 50vw, 520px);
}
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  display: flex;
  align-items: center;
}
.hero-slide.active { opacity: 1; }
.hero-slide img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.hero-slide::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(21,36,139,0.75) 0%, rgba(21,36,139,0.1) 70%);
}
.hero-content {
  position: relative; z-index: 1;
  max-width: 540px;
  padding: 0 48px;
  color: #fff;
}
.hero-content h1 { color: #fff; margin-bottom: 12px; }
.hero-content p  { font-size: 1.1rem; opacity: 0.9; margin-bottom: 24px; }
.hero-cta-row    { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-dots {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 2;
}
.hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all var(--transition);
}
.hero-dot.active { width: 24px; border-radius: 4px; background: #fff; }

/* ---- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: #1a2ea8; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--c-surface); color: var(--c-primary); border: 2px solid var(--c-primary); }
.btn-secondary:hover { background: var(--c-bg); }
.btn-accent { background: var(--c-accent-soft); color: var(--c-primary); }
.btn-accent:hover { background: #c4b3f8; }
.btn-ghost { background: transparent; color: var(--c-primary); }
.btn-ghost:hover { background: var(--c-bg); }
.btn-danger { background: var(--c-danger); color: #fff; }
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 16px 36px; font-size: 16px; }
.btn:disabled { opacity: 0.5; pointer-events: none; }

/* ---- Cards ------------------------------------------------ */
.card {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.card-body { padding: 16px; }

/* ---- Store Card ------------------------------------------- */
.store-card {
  cursor: pointer;
}
.store-card .card-img { aspect-ratio: 3/2; }
.store-card .store-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 6px;
}
.store-card .store-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.store-card .store-type-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 50px;
  background: var(--c-accent-soft);
  color: var(--c-primary);
}
.store-card .promoted-badge {
  background: var(--c-accent-soft);
  color: var(--c-primary);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.store-logo-overlay {
  position: absolute;
  bottom: -24px; left: 16px;
  width: 48px; height: 48px;
  border-radius: 12px;
  border: 3px solid var(--c-surface);
  background: var(--c-surface);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* ---- Product Card ----------------------------------------- */
.product-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.product-card .card-img {
  aspect-ratio: 4/3;
  flex-shrink: 0;
}
.product-card .product-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 2px;
}
.product-card .product-name-ta {
  font-size: 0.82rem;
  color: var(--c-muted);
  margin-bottom: 6px;
}
.veg-marker {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px;
  border-radius: 3px;
  border: 2px solid;
  flex-shrink: 0;
}
.veg-marker.veg   { border-color: var(--c-veg);    }
.veg-marker.veg   .dot { background: var(--c-veg); }
.veg-marker.nonveg { border-color: var(--c-nonveg); }
.veg-marker.nonveg .dot { background: var(--c-nonveg); }
.veg-marker .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
}
.product-price {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-text);
}
.add-btn {
  margin-top: auto;
  background: var(--c-accent-soft);
  color: var(--c-primary);
  border: none;
  border-radius: var(--radius-md);
  padding: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 4px;
  width: 100%;
}
.add-btn:hover { background: var(--c-primary); color: #fff; }

.qty-control {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--c-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.qty-control button {
  background: none; border: none; color: #fff;
  padding: 8px 12px;
  font-size: 1.1rem; font-weight: 700;
  cursor: pointer;
}
.qty-control span {
  color: #fff; font-weight: 700; min-width: 24px; text-align: center;
}

/* ---- Rating stars ----------------------------------------- */
.stars { display: flex; align-items: center; gap: 2px; }
.stars .star { color: #F59E0B; font-size: 13px; }
.rating-text { font-size: 13px; font-weight: 700; color: var(--c-text); margin-left: 4px; }
.review-count { font-size: 12px; color: var(--c-muted); }

/* ---- Section Header --------------------------------------- */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-header h2 { margin-bottom: 0; }
.see-all-link {
  font-size: 13px; font-weight: 700; color: var(--c-primary);
  display: flex; align-items: center; gap: 4px;
  white-space: nowrap;
}

/* ---- Filters ---------------------------------------------- */
.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }

.filter-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: 50px;
  border: 1.5px solid var(--c-border);
  background: var(--c-surface);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  color: var(--c-text);
}
.filter-chip:hover,
.filter-chip.active {
  background: var(--c-accent-soft);
  border-color: var(--c-accent);
  color: var(--c-primary);
}
.filter-chip.active { font-weight: 700; }

/* ---- Modal ------------------------------------------------ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(21,36,139,0.35);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.show { opacity: 1; pointer-events: all; }
.modal {
  background: var(--c-surface);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%; max-width: 440px;
  transform: translateY(20px);
  transition: transform 0.25s ease;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-overlay.show .modal { transform: translateY(0); }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--c-bg); border: none;
  width: 32px; height: 32px;
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--c-muted);
  font-size: 1.1rem;
}
.modal h3 { margin-bottom: 4px; }
.modal .subtitle { color: var(--c-muted); font-size: 14px; margin-bottom: 24px; }

/* ---- Form elements ---------------------------------------- */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--c-text); }
.form-input {
  width: 100%;
  background: var(--c-bg);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 15px;
  transition: border-color var(--transition);
  color: var(--c-text);
}
.form-input:focus { outline: none; border-color: var(--c-primary); background: var(--c-surface); }
.form-input.error { border-color: var(--c-danger); }
.form-error { font-size: 12px; color: var(--c-danger); margin-top: 4px; }
.form-hint  { font-size: 12px; color: var(--c-muted); margin-top: 4px; }

.otp-row { display: flex; gap: 8px; }
.otp-input {
  flex: 1;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  font-family: var(--font-display);
  padding: 12px 8px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-md);
  background: var(--c-bg);
  max-width: 52px;
}
.otp-input:focus { outline: none; border-color: var(--c-primary); background: var(--c-surface); }

/* ---- Cart sidebar ----------------------------------------- */
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 150;
  width: min(420px, 100vw);
  background: var(--c-surface);
  box-shadow: -4px 0 40px rgba(0,0,0,0.15);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.cart-drawer.open { transform: translateX(0); }
.cart-drawer-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: space-between;
}
.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}
.cart-drawer-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--c-border);
}
.cart-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--c-border);
}
.cart-item img { width: 60px; height: 60px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.cart-item-info { flex: 1; }
.cart-item-name  { font-weight: 600; font-size: 14px; }
.cart-item-price { font-size: 13px; color: var(--c-muted); }

.charges-table { width: 100%; }
.charges-table td { padding: 4px 0; font-size: 13px; }
.charges-table td:last-child { text-align: right; font-weight: 600; }
.charges-table .total-row td { font-size: 16px; font-weight: 700; color: var(--c-primary); padding-top: 10px; border-top: 1.5px solid var(--c-border); }

/* ---- Toast notifications ---------------------------------- */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 300; pointer-events: none;
}
.toast {
  background: var(--c-text);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  max-width: 300px;
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.3s ease;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast.success { background: var(--c-success); }
.toast.error   { background: var(--c-danger); }
.toast.info    { background: var(--c-primary); }

/* ---- City Picker Modal ------------------------------------ */
.city-modal .city-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
}
.city-option {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--c-border);
  cursor: pointer;
  font-weight: 600;
  text-align: center;
  transition: all var(--transition);
}
.city-option:hover, .city-option.selected {
  background: var(--c-accent-soft);
  border-color: var(--c-accent);
  color: var(--c-primary);
}

/* ---- OTP Channel selector --------------------------------- */
.channel-tabs {
  display: flex; gap: 8px;
  margin-bottom: 20px;
}
.channel-tab {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--c-border);
  background: var(--c-bg);
  text-align: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition);
}
.channel-tab.active {
  background: var(--c-accent-soft);
  border-color: var(--c-primary);
  color: var(--c-primary);
}

/* ---- Status badge ----------------------------------------- */
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.status-placed         { background: #EEF2FF; color: #3730A3; }
.status-accepted       { background: #FFF7ED; color: #C2410C; }
.status-preparing      { background: #FFFBEB; color: #B45309; }
.status-out_for_delivery { background: #EFF6FF; color: #1D4ED8; }
.status-delivered      { background: #F0FDF4; color: #15803D; }
.status-cancelled      { background: #FEF2F2; color: #B91C1C; }

/* ---- Progress stepper ------------------------------------- */
.order-stepper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 0;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  position: relative;
}
.step::before {
  content: '';
  position: absolute;
  top: 20px; right: 50%;
  width: 100%; height: 2px;
  background: var(--c-border);
  z-index: 0;
}
.step:first-child::before { display: none; }
.step.done::before { background: var(--c-success); }
.step-dot {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid var(--c-border);
  background: var(--c-surface);
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
  font-size: 1rem;
  transition: all var(--transition);
}
.step.done .step-dot { background: var(--c-success); border-color: var(--c-success); color: #fff; }
.step.active .step-dot { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.step-label { font-size: 11px; font-weight: 700; text-align: center; color: var(--c-muted); }
.step.done .step-label,
.step.active .step-label { color: var(--c-text); }

/* ---- Skeleton loader -------------------------------------- */
.skeleton {
  background: linear-gradient(90deg, var(--c-border) 25%, #f0eaf8 50%, var(--c-border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ---- Empty state ------------------------------------------ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--c-muted);
}
.empty-state .icon { font-size: 3.5rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { color: var(--c-text); margin-bottom: 8px; }

/* ---- Footer ----------------------------------------------- */
footer {
  background: var(--c-primary);
  color: rgba(255,255,255,0.85);
  padding: 48px 0 24px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-brand img { width: 40px; height: 40px; border-radius: 10px; }
.footer-brand span { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: #fff; }
footer h4 { color: #fff; font-size: 0.9rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; }
footer a { color: rgba(255,255,255,0.7); display: block; margin-bottom: 8px; font-size: 14px; transition: color var(--transition); }
footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 20px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: rgba(255,255,255,0.5);
}

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

@media (max-width: 768px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .navbar-search { display: none; }
  .hero-content { padding: 0 24px; }
  .hero-content h1 { font-size: 1.8rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 36px 0; }
}

@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
  .hero { height: 240px; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
  .hero-cta-row { flex-direction: column; }
  .hero-content p { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .cart-drawer { width: 100vw; }
  .modal { padding: 24px 18px; }
  .navbar-actions .lang-toggle,
  .navbar-actions .city-picker { display: flex; }
}

/* ---- Scroll to top ---------------------------------------- */
.scroll-top {
  position: fixed; bottom: 24px; left: 24px; z-index: 90;
  width: 44px; height: 44px;
  background: var(--c-primary); color: #fff;
  border-radius: 50%;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
.scroll-top.show { opacity: 1; pointer-events: all; }

/* ---- Promoted ad banner ----------------------------------- */
.ad-banner {
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow var(--transition);
  display: block;
}
.ad-banner:hover { box-shadow: var(--shadow-md); }
.ad-banner img { width: 100%; display: block; }

/* ---- Initiative strip ------------------------------------- */
.initiative-strip {
  background: linear-gradient(135deg, var(--c-accent-soft) 0%, var(--c-bg) 100%);
  border-radius: var(--radius-xl);
  padding: 32px 40px;
  margin: -24px 0 40px;
  position: relative;
  border: 1px solid var(--c-border);
}
.initiative-strip h3 { color: var(--c-primary); margin-bottom: 8px; }
.initiative-strip p  { max-width: 640px; color: var(--c-text); opacity: 0.85; }

/* ---- Checkout form ---------------------------------------- */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}
.checkout-sidebar {
  position: sticky; top: calc(var(--nav-h) + 20px);
}
@media (max-width: 900px) {
  .checkout-layout { grid-template-columns: 1fr; }
  .checkout-sidebar { position: static; }
}

/* ---- Profile page ----------------------------------------- */
.profile-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: start;
}
.profile-nav {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  padding: 8px;
  box-shadow: var(--shadow-sm);
  position: sticky; top: calc(var(--nav-h) + 16px);
}
.profile-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
  cursor: pointer;
  transition: all var(--transition);
}
.profile-nav-link:hover,
.profile-nav-link.active { background: var(--c-accent-soft); color: var(--c-primary); }
.profile-nav-link svg { opacity: 0.7; }
@media (max-width: 700px) {
  .profile-layout { grid-template-columns: 1fr; }
  .profile-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .profile-nav-link { flex: none; font-size: 13px; padding: 10px 12px; }
}

/* ---- Shop page filters sidebar ---------------------------- */
.shop-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
}
.filter-sidebar {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: sticky; top: calc(var(--nav-h) + 16px);
}
.filter-sidebar h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--c-muted); margin: 16px 0 8px; }
.filter-sidebar h4:first-child { margin-top: 0; }

.price-range-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--c-muted); margin-top: 4px; }
input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px;
  background: var(--c-accent-soft); border-radius: 2px; cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%; background: var(--c-primary);
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

@media (max-width: 860px) {
  .shop-layout { grid-template-columns: 1fr; }
  .filter-sidebar { display: none; }
  .filter-sidebar.mobile-open { display: block; position: fixed; bottom: 0; left: 0; right: 0; z-index: 200; border-radius: var(--radius-xl) var(--radius-xl) 0 0; max-height: 70vh; overflow-y: auto; }
}

/* ---- Animations ------------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.4s ease both; }
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.10s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.20s; }
