/* ByLocal Web — Shared Design System v2 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── BRAND IDENTITY: ICE + GRAPHITE + ORANGE ── */
  --color-primary-500: #D97706;    /* Orange — brand primary (CTAs, links, highlights) */
  --color-primary-600: #B45309;    /* Orange dark — hover/pressed */
  --color-primary-100: #FEF3C7;    /* Orange light — highlight backgrounds */
  --color-accent-500: #16A34A;     /* Green — semantic success only */
  --color-accent-600: #15803D;
  --color-accent-100: #DCFCE7;
  --color-bg-base: #F8FAFC;
  --color-card: #FFFFFF;
  --color-border: #E2E8F0;
  --color-text-primary: #0F172A;
  --color-text-secondary: #475569;
  --color-text-muted: #94A3B8;
  --color-success: #16A34A;
  --color-warning: #F59E0B;
  --color-error: #DC2626;
  --color-info: #0369A1;           /* Steel blue — informational */

  /* ── BRAND ALIASES ── */
  --brand-orange: #D97706; --brand-orange-dark: #B45309; --brand-orange-light: #FEF3C7; --brand-orange-mid: #FDE68A;
  --brand-graphite: #0F172A; --brand-graphite-mid: #1E293B; --brand-graphite-light: #334155;
  --brand-ice: #F8FAFC; --brand-ice-warm: #FFFBEB;

  /* ── UI COLOR SYSTEM (graphite for navigation, links, interactive UI — orange reserved for conversion CTAs) ── */
  --color-ui-500: #0F172A;      /* Graphite — UI primary (links, nav, chips, focus) */
  --color-ui-600: #1E293B;      /* Graphite mid — hover states */
  --color-ui-100: #F1F5F9;      /* Graphite tint — light backgrounds */

  /* ── MODULE COLORS (kept for per-module nav active states) ── */
  --blue: #1E3A8A; --blue-dark: #1E40AF; --blue-xdark: #172554; --blue-light: #EFF6FF; --blue-mid: #DBEAFE;
  --green: #16A34A; --green-dark: #15803D; --green-light: #DCFCE7; --green-mid: #BBF7D0;
  --orange: #D97706; --orange-dark: #B45309; --orange-light: #FFFBEB; --orange-mid: #FEF3C7;
  --purple: #0369A1; --purple-dark: #0284C7; --purple-light: #F0F9FF; --purple-mid: #BAE6FD;
  --red: #DC2626; --red-light: #FEF2F2;
  --yellow: #F59E0B; --yellow-light: #FFFBEB;
  /* Neutral — Slate scale for better readability */
  --gray-50: #F8FAFC; --gray-100: #F1F5F9; --gray-200: #E2E8F0; --gray-300: #CBD5E1;
  --gray-400: #94A3B8; --gray-500: #64748B; --gray-600: #475569; --gray-700: #334155;
  --gray-800: #1E293B; --gray-900: #0F172A;
  /* Spacing */
  --radius-sm: 8px; --radius: 12px; --radius-lg: 16px; --radius-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 6px rgba(0,0,0,0.05), 0 10px 40px rgba(0,0,0,0.10);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
  --max-width: 1200px;
}

body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; color: var(--color-text-primary); background: var(--color-bg-base); line-height: 1.5; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ── TYPOGRAPHY ── */
h1 { font-size: clamp(32px, 5vw, 56px); font-weight: 900; letter-spacing: -2px; line-height: 1.1; }
h2 { font-size: clamp(24px, 3.5vw, 38px); font-weight: 800; letter-spacing: -1px; line-height: 1.2; }
h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }
h4 { font-size: 16px; font-weight: 700; }
.label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gray-400); }

/* ── NAV LOCATION BUTTON ── */
.nav-location-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius-sm); border: 1px solid var(--gray-200); background: white; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--gray-700); cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.nav-location-btn:hover { border-color: var(--color-ui-500); color: var(--color-ui-500); background: var(--color-ui-100); }
.nav-location-btn svg:first-child { color: var(--color-ui-500); }
/* .nav-location-mobile removed — location now in nav-mobile-row2 */

/* ── CITY PICKER MODAL ── */
.city-picker-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(4px); }
.city-picker-modal { background: white; border-radius: var(--radius-lg); width: 100%; max-width: 400px; max-height: 80vh; display: flex; flex-direction: column; box-shadow: var(--shadow-xl); animation: cityPickerIn 0.2s ease-out; }
@keyframes cityPickerIn { from { opacity: 0; transform: scale(0.95) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.city-picker-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 0; }
.city-picker-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; color: var(--gray-900); }
.city-picker-title svg { color: var(--color-ui-500); }
.city-picker-close { background: none; border: none; cursor: pointer; padding: 6px; border-radius: var(--radius-sm); color: var(--gray-400); transition: all 0.15s; }
.city-picker-close:hover { background: var(--gray-100); color: var(--gray-700); }
.city-picker-search { position: relative; margin: 14px 24px 0; }
.city-picker-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray-400); pointer-events: none; }
.city-picker-search-input { width: 100%; padding: 10px 36px 10px 36px; border: 1.5px solid var(--gray-200); border-radius: var(--radius); font-size: 16px; font-family: inherit; color: var(--gray-900); background: var(--gray-50); outline: none; transition: border-color 0.15s; }
.city-picker-search-input:focus { border-color: var(--color-ui-500); background: white; }
.city-picker-search-input::placeholder { color: var(--gray-400); }
.city-picker-search-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: var(--gray-200); border: none; border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--gray-500); }
.city-picker-geo-btn { display: flex; align-items: center; gap: 8px; margin: 10px 24px 0; padding: 10px 14px; border-radius: var(--radius); border: 1.5px solid var(--color-ui-500); background: var(--color-ui-100); color: var(--color-ui-500); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.city-picker-geo-btn:hover:not(:disabled) { background: var(--color-ui-500); color: white; }
.city-picker-geo-btn:disabled { opacity: 0.7; cursor: wait; }
.city-picker-spinner { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.city-picker-error { margin: 8px 24px 0; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--red-light); color: var(--red); font-size: 13px; }
.city-picker-list { overflow-y: auto; padding: 8px 12px 12px; margin-top: 8px; border-top: 1px solid var(--gray-100); }
.city-picker-state { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gray-400); padding: 12px 12px 4px; }
.city-picker-item { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 10px 12px; border-radius: var(--radius-sm); border: none; background: none; font-family: inherit; font-size: 14px; color: var(--gray-700); cursor: pointer; transition: all 0.15s; text-align: left; }
.city-picker-item:hover { background: var(--gray-50); color: var(--gray-900); }
.city-picker-item.active { background: var(--color-ui-100); color: var(--color-ui-500); font-weight: 600; }
.city-picker-item.active svg { color: var(--color-ui-500); }
.city-picker-empty { padding: 24px 12px; text-align: center; color: var(--gray-500); font-size: 14px; }
.city-picker-empty-sub { font-size: 12px; color: var(--gray-400); margin-top: 4px; }

/* ── NAVIGATION ── */
nav { position: sticky; top: 0; z-index: 100; background: white; border-bottom: 1px solid var(--gray-200); }

/* Row 1: Logo + Location | Auth + CTA */
.nav-top { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 24px; }
.nav-top-left { display: flex; align-items: center; gap: 16px; }
.nav-top-right { display: flex; align-items: center; gap: 10px; }

.logo { font-size: 26px; font-weight: 900; color: var(--gray-900); letter-spacing: -0.5px; white-space: nowrap; line-height: 1; display: flex; align-items: center; }
.logo strong { color: var(--orange); }
.logo em { color: var(--orange); font-style: normal; }

/* Row 2: Module links */
.nav-bar { background: var(--gray-50); border-top: 1px solid var(--gray-100); }
.nav-bar-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: center; gap: 0; height: 42px; }

.nav-module { display: flex; align-items: center; gap: 6px; padding: 6px 18px; font-size: 14px; font-weight: 600; color: var(--gray-600); transition: all 0.15s; white-space: nowrap; border-right: 1px solid var(--gray-200); }
.nav-module:last-child { border-right: none; }
.nav-module:hover { color: var(--gray-900); }
.nav-module svg { width: 16px; height: 16px; stroke-width: 2; }
.nav-module.active-dir { background: var(--blue-light); color: var(--blue); }
.nav-module.active-cal { background: var(--orange-light); color: var(--orange); }
.nav-module.active-ev { background: var(--green-light); color: var(--green); }
.nav-module.active-jobs { background: var(--purple-light); color: var(--purple); }
.dot-dir { background: var(--blue); }
.dot-cal { background: var(--orange); }
.dot-ev { background: var(--green); }
.dot-jobs { background: var(--purple); }

/* ── BUTTONS ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; border: none; transition: all 0.15s; white-space: nowrap; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: var(--radius); }
.btn-xl { padding: 16px 36px; font-size: 17px; border-radius: var(--radius); font-weight: 700; }
/* Primary CTA → Orange (action: buy, donate, apply, checkout) */
.btn-primary { background: var(--brand-orange); color: white; }
.btn-primary:hover { background: var(--brand-orange-dark); }
/* Secondary CTA → Graphite */
.btn-secondary { background: var(--gray-800); color: white; }
.btn-secondary:hover { background: var(--gray-900); }
/* Explicit aliases — use when module context requires it */
.btn-blue { background: var(--blue); color: white; }
.btn-blue:hover { background: var(--blue-dark); }
.btn-orange { background: var(--orange); color: white; }
.btn-orange:hover { background: var(--orange-dark); }
.btn-green { background: var(--green); color: white; }
.btn-green:hover { background: var(--green-dark); }
/* Jobs module (steel blue) */
.btn-purple { background: var(--purple); color: white; }
.btn-purple:hover { background: var(--purple-dark); }
.btn-outline { border: 1.5px solid var(--gray-200); background: white; color: var(--gray-700); }
.btn-outline:hover { border-color: var(--color-ui-500); color: var(--color-ui-500); }
.btn-ghost { background: transparent; color: var(--gray-600); }
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-900); }
.btn-white { background: white; color: var(--gray-900); }
.btn-white:hover { background: var(--gray-50); }
.btn-full { width: 100%; }

/* ── BADGES ── */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 700; }
.badge-blue { background: var(--blue-mid); color: var(--blue); }
.badge-orange { background: var(--orange-mid); color: var(--orange); }
.badge-green { background: var(--green-mid); color: var(--green); }
.badge-purple { background: var(--purple-mid); color: var(--purple); }
.badge-red { background: var(--red-light); color: var(--red); }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }
.badge-white { background: rgba(255,255,255,0.15); color: white; border: 1px solid rgba(255,255,255,0.25); }
.badge-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ── CHIPS (filter pills) ── */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 7px 16px; border-radius: 100px; font-size: 13px; font-weight: 600; border: 1.5px solid var(--gray-200); background: white; color: var(--gray-600); cursor: pointer; transition: all 0.15s; }
.chip:hover { border-color: var(--color-ui-500); color: var(--color-ui-500); }
.chip.active { background: var(--color-ui-500); color: white; border-color: var(--color-ui-500); }

/* ── SEARCH BAR ── */
.search-wrap { background: white; border-radius: var(--radius); border: 1px solid var(--gray-200); display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 18px; box-shadow: var(--shadow); transition: box-shadow 0.2s; }
.search-wrap:focus-within { box-shadow: var(--shadow-lg); border-color: var(--color-ui-500); }
.search-wrap input { border: none; outline: none; font-size: 16px; font-family: inherit; flex: 1; color: var(--gray-900); min-width: 0; background: transparent; }
.search-wrap input::placeholder { color: var(--gray-400); }
.search-divider { width: 1px; height: 28px; background: var(--gray-200); flex-shrink: 0; }
.search-location { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gray-500); white-space: nowrap; padding: 0 8px; flex-shrink: 0; }
.search-location select { border: 1px solid var(--gray-200); background: var(--gray-50); border-radius: 6px; padding: 4px 8px; font: inherit; font-size: 13px; color: var(--gray-700); cursor: pointer; -webkit-appearance: auto; appearance: auto; }

/* ── CARDS ── */
.card { background: white; border-radius: var(--radius-lg); border: 1px solid var(--gray-200); overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-clickable { cursor: pointer; }

/* ── SIDEBAR CARD ── */
.sidebar-block { background: white; border-radius: var(--radius-lg); border: 1px solid var(--gray-200); padding: 22px; margin-bottom: 16px; }
.sidebar-block h3 { font-size: 14px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; }
.sidebar-block h3 a { font-size: 13px; color: var(--color-ui-500); font-weight: 600; }

/* ── PROGRESS ── */
.progress-bar { height: 8px; background: var(--gray-200); border-radius: 100px; overflow: hidden; }
.progress-bar-sm { height: 5px; }
.progress-fill { height: 100%; border-radius: 100px; }

/* ── DIVIDER ── */
.divider { height: 1px; background: var(--gray-100); margin: 12px 0; }

/* ── PAGE HEADER (module hero) ── */
.page-hero { padding: 52px 24px 60px; color: white; }
.page-hero-inner { max-width: var(--max-width); margin: 0 auto; }
.page-hero h1 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -1.5px; margin-bottom: 8px; }
.page-hero p { font-size: 17px; opacity: 0.8; margin-bottom: 32px; max-width: 520px; }

/* ── LAYOUT ── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.page-body { max-width: var(--max-width); margin: 0 auto; padding: 32px 24px; }
.two-col { display: grid; gap: 28px; grid-template-columns: 220px 1fr; }
.three-col { display: grid; gap: 24px; grid-template-columns: 220px 1fr 280px; }

/* ── FILTER SIDEBAR ── */
.filter-panel { display: flex; flex-direction: column; gap: 16px; }
.filter-block { background: white; border-radius: var(--radius); border: 1px solid var(--gray-200); padding: 18px 20px; }
.filter-block .label { margin-bottom: 14px; display: block; }
.filter-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--gray-50); }
.filter-row:last-child { border-bottom: none; padding-bottom: 0; }
.filter-row label { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--gray-700); cursor: pointer; }
.filter-row input[type=checkbox], .filter-row input[type=radio] { accent-color: var(--color-ui-500); width: 15px; height: 15px; }
.filter-count { font-size: 11px; background: var(--gray-100); color: var(--gray-500); padding: 2px 7px; border-radius: 100px; }
.cat-group { border-bottom: 1px solid var(--gray-100); padding-bottom: 4px; margin-bottom: 4px; }
.cat-group:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.cat-root { cursor: pointer; font-weight: 600; }
.cat-root label { font-weight: 600; }
.cat-arrow { font-size: 11px; color: var(--gray-400); margin-left: 4px; flex-shrink: 0; }
.cat-child { padding-left: 24px; }
.cat-child label { font-size: 13px; color: var(--gray-500); }

/* ── RESULTS HEADER ── */
.results-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.results-bar h2 { font-size: 15px; font-weight: 600; color: var(--gray-700); }
.results-bar h2 span { color: var(--gray-400); font-weight: 400; }
.sort-select { border: 1px solid var(--gray-200); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13px; font-family: inherit; color: var(--gray-700); background: white; cursor: pointer; }

/* ── FOOTER ── */
footer { background: var(--gray-900); color: white; padding: 64px 24px 32px; margin-top: 80px; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-logo { font-size: 20px; font-weight: 900; margin-bottom: 10px; }
.footer-logo strong { color: var(--orange); }
.footer-logo em { color: var(--orange); font-style: normal; }
.footer-tagline { font-size: 14px; color: var(--gray-500); line-height: 1.6; max-width: 260px; }
.footer-col h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gray-500); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 14px; color: var(--gray-500); margin-bottom: 9px; transition: color 0.15s; }
.footer-col a:hover { color: white; }
.footer-accordion-icon { display: none; }
.footer-accordion-body { display: contents; }
.footer-bottom { border-top: 1px solid var(--gray-800); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--gray-500); }
.footer-modules { display: flex; gap: 6px; }
.footer-mod-dot { width: 8px; height: 8px; border-radius: 50%; }

/* ── BREADCRUMB ── */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gray-400); margin-bottom: 24px; }
.breadcrumb a { color: var(--gray-400); }
.breadcrumb a:hover { color: var(--gray-700); }
.breadcrumb span { color: var(--gray-300); }

/* ── CROSS-MODULE STRIP ── */
.module-strip { background: white; border-top: 1px solid var(--gray-100); border-bottom: 1px solid var(--gray-100); }
.module-strip-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; display: flex; align-items: stretch; }
.module-strip-item { flex: 1; display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-right: 1px solid var(--gray-100); text-decoration: none; transition: background 0.15s; }
.module-strip-item:last-child { border-right: none; }
.module-strip-item:hover { background: var(--gray-50); }
.msitem-icon { width: 38px; height: 38px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.msitem-text { font-size: 13px; font-weight: 600; color: var(--gray-700); line-height: 1.3; }
.msitem-sub { font-size: 12px; color: var(--gray-400); font-weight: 400; }

/* ── STAR RATING ── */
.stars { color: var(--yellow); letter-spacing: 1px; }

/* ── AVATAR ── */
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--gray-200); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; overflow: hidden; }
.avatar-sm { width: 32px; height: 32px; font-size: 14px; }
.avatar-lg { width: 56px; height: 56px; font-size: 24px; }

/* ── ICON BOX ── */
.icon-box { border-radius: var(--radius); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.icon-box-sm { width: 36px; height: 36px; font-size: 18px; border-radius: var(--radius-sm); }
.icon-box-md { width: 48px; height: 48px; font-size: 22px; }
.icon-box-lg { width: 64px; height: 64px; font-size: 28px; }

/* ══════════════════════════════════════
   HAMBURGER BUTTON
   ══════════════════════════════════════ */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 10px 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: all 0.2s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -5px); }

/* ══════════════════════════════════════
   RESPONSIVE — Tablet (≤ 1024px)
   ══════════════════════════════════════ */
@media (max-width: 1024px) {
  .three-col { grid-template-columns: 200px 1fr; }
  .three-col > :last-child { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .nav-top { gap: 12px; }
}

/* ── Hidden on desktop, shown on mobile ── */
.mobile-bottom-nav { display: none; }
.nav-mobile-actions { display: none; }
.nav-mobile-row2 { display: none; }
.app-banner { display: none; }

/* ══════════════════════════════════════
   RESPONSIVE — Mobile (≤ 680px)
   ══════════════════════════════════════ */
@media (max-width: 680px) {

  /* ── NAV ROW 1: Hamburger (left) | Logo (center) | Open App (right) ── */
  .nav-location-btn { display: none; }
  .nav-hamburger { display: flex; order: 1; margin-left: 0; margin-right: 0; }
  .nav-hamburger span { width: 18px; height: 1.5px; }
  .nav-top { padding: 0 12px; gap: 6px; height: 48px; }
  .nav-top-left { order: 2; flex: 1; }
  .nav-top-left .logo { font-size: 20px; }
  .nav-top-right { display: none; }
  .nav-mobile-actions { display: flex; align-items: center; order: 3; flex-shrink: 0; }

  /* ── APP BANNER (Open App CTA) ── */
  .app-banner { display: flex; align-items: center; flex-shrink: 0; }
  .app-banner-btn {
    display: inline-flex; align-items: center;
    padding: 6px 14px;
    background: var(--orange); color: white;
    font-size: 13px; font-weight: 700;
    border-radius: 20px;
    white-space: nowrap; min-height: 32px;
    font-family: inherit; text-decoration: none;
    transition: background 0.15s;
  }
  .app-banner-btn:hover { background: var(--orange-dark); }

  /* ── NAV ROW 2: Location (left) | Bell + Cart (right) ── */
  .nav-mobile-row2 {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 14px 8px;
    background: white;
    border-top: 1px solid var(--gray-100);
  }
  .nav-mobile-location {
    flex: 1; min-width: 0;
    display: flex; align-items: center; gap: 3px;
    padding: 0; border: none; background: none;
    font-family: inherit; font-size: 14px; font-weight: 600;
    color: var(--gray-900); cursor: pointer;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  }
  .nav-mobile-location svg:first-child { display: none; }
  .nav-mobile-location svg:last-child { color: var(--gray-400); flex-shrink: 0; }
  .nav-mobile-location span { overflow: hidden; text-overflow: ellipsis; }
  .nav-mobile-location:active { opacity: 0.7; }
  .nav-mobile-row2-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

  /* ── NAV ROW 2: Cart pill (DoorDash-style) ── */
  .nav-cart-pill {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 6px 10px;
    background: var(--orange); color: white;
    border-radius: 20px; border: none;
    font-family: inherit; font-size: 13px; font-weight: 700;
    cursor: pointer; white-space: nowrap;
    min-height: 32px;
    transition: background 0.15s;
  }
  .nav-cart-pill:hover { background: var(--orange-dark); }
  .nav-cart-pill svg { flex-shrink: 0; }

  /* ── BOTTOM NAV BAR (mobile) ── */
  .mobile-bottom-nav {
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    background: white; border-top: 1px solid var(--gray-200);
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
  }
  .mobile-bottom-nav a, .mobile-bottom-nav button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    font-size: 10px; font-weight: 600; color: var(--gray-400);
    text-decoration: none; background: none; border: none; cursor: pointer; font-family: inherit;
    padding: 8px 0; position: relative; transition: color 0.15s; min-height: 48px;
  }
  .mobile-bottom-nav a.active, .mobile-bottom-nav button.active { color: var(--color-ui-500); }
  .mobile-bottom-nav .cart-badge {
    position: absolute; top: 2px; right: calc(50% - 18px);
    background: var(--red); color: white; font-size: 9px; font-weight: 700;
    min-width: 16px; height: 16px; border-radius: 100px; display: flex;
    align-items: center; justify-content: center; padding: 0 4px;
  }

  /* ── Page content needs bottom padding for the nav ── */
  footer { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .nav-bar { display: none; }
  .nav-bar.open {
    display: block;
    position: absolute;
    top: 106px; left: 0; right: 0;
    background: white;
    border-bottom: 2px solid var(--gray-200);
    padding: 10px 12px 14px;
    box-shadow: var(--shadow-lg);
    z-index: 200;
  }
  .nav-bar.open .nav-bar-inner {
    flex-direction: column;
    height: auto;
    align-items: stretch;
    gap: 0;
    padding: 0;
  }
  .nav-bar.open .nav-module { padding: 13px 14px; border-radius: var(--radius-sm); font-size: 15px; border-right: none; }

  /* ── LAYOUT ── */
  .two-col { grid-template-columns: 1fr; }
  .three-col { grid-template-columns: 1fr; }
  .three-col > :last-child { display: block; }
  .page-body { padding: 20px 16px; }
  .container { padding: 0 16px; }

  /* ── PAGE HERO ── */
  .page-hero { padding: 28px 16px 32px; }
  .page-hero h1 { font-size: 26px; letter-spacing: -0.5px; }
  .page-hero p { font-size: 14px; margin-bottom: 18px; }

  /* ── SEARCH BAR ── */
  .search-divider { display: none; }
  .search-wrap { padding: 6px 6px 6px 14px; flex-wrap: wrap; }
  .search-location { width: 100%; padding: 4px 0 2px; border-top: 1px solid var(--gray-200); margin-top: 2px; }
  .search-location select { flex: 1; }

  /* ── CHIPS ── */
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }

  /* ── RESULTS BAR ── */
  .results-bar { flex-direction: column; align-items: flex-start; gap: 10px; }

  /* ── FILTER SIDEBAR ── */
  .filter-panel { display: none; }

  /* ── MODULE STRIP ── */
  .module-strip-inner { flex-wrap: wrap; }
  .module-strip-item { width: 50%; border-right: none; border-bottom: 1px solid var(--gray-100); }
  .module-strip-item:nth-child(odd) { border-right: 1px solid var(--gray-100); }
  .module-strip-item:last-child { border-bottom: none; }
  .module-strip-item:nth-child(even):last-child { border-bottom: none; }

  /* ── SIDEBAR BLOCKS ── */
  .sidebar-block { padding: 16px; }

  /* ── FOOTER (accordion on mobile) ── */
  footer { padding: 32px 16px 24px; margin-top: 48px; }
  .footer-grid { grid-template-columns: 1fr; gap: 0; }
  .footer-grid > :first-child { margin-bottom: 20px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; font-size: 12px; }

  .footer-accordion { border-bottom: 1px solid var(--gray-800); }
  .footer-accordion h4 {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 0; margin-bottom: 0; cursor: pointer;
    font-size: 13px; color: var(--gray-400); user-select: none;
    -webkit-tap-highlight-color: transparent;
  }
  .footer-accordion-icon {
    display: inline-block; width: 12px; height: 12px; position: relative; flex-shrink: 0;
  }
  .footer-accordion-icon::before,
  .footer-accordion-icon::after {
    content: ''; position: absolute; background: var(--gray-500);
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    transition: transform 0.2s ease;
  }
  .footer-accordion-icon::before { width: 12px; height: 1.5px; }
  .footer-accordion-icon::after { width: 1.5px; height: 12px; }
  .footer-accordion-open .footer-accordion-icon::after { transform: translate(-50%, -50%) rotate(90deg); height: 0; }

  .footer-accordion-body {
    display: block; max-height: 0; overflow: hidden; transition: max-height 0.25s ease;
  }
  .footer-accordion-open .footer-accordion-body { max-height: 240px; }
  .footer-accordion-body a { padding: 6px 0; font-size: 14px; }

  /* ── BREADCRUMB ── */
  .breadcrumb { font-size: 12px; }

  /* ── BUTTONS (touch-friendly) ── */
  .btn-xl { padding: 14px 24px; font-size: 15px; }
  .btn-lg { padding: 12px 20px; font-size: 14px; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 44px; padding: 8px 14px; }

  /* ── INPUTS (prevent iOS auto-zoom) ── */
  input, select, textarea { font-size: 16px !important; }

  /* ── HERO CTA HIDE ── */
  .hero-cta-desktop { display: none; }
}

/* ── GLOBAL SEARCH DROPDOWN ── */
.search-wrapper { position: relative; max-width: 640px; margin: 0 auto 48px; z-index: 50; }
.search-clear { background: none; border: none; cursor: pointer; color: var(--gray-400); padding: 8px; display: flex; align-items: center; transition: color 0.15s; }
.search-clear:hover { color: var(--gray-600); }

.search-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: white; border-radius: var(--radius-lg);
  box-shadow: 0 12px 48px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.05);
  max-height: 420px; overflow-y: auto; z-index: 100;
  animation: searchDropIn 0.15s ease-out;
}
@keyframes searchDropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.search-section { padding: 4px 0; }
.search-section + .search-section { border-top: 1px solid var(--gray-100); }

.search-section-label {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 16px 4px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--gray-400);
}

.search-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; text-decoration: none; color: var(--gray-900);
  cursor: pointer; transition: background 0.1s;
}
.search-item:hover, .search-item.active { background: var(--gray-50); }

.search-item-name { font-size: 14px; font-weight: 600; }
.search-item-meta { font-size: 12px; color: var(--gray-400); white-space: nowrap; }

.search-see-all {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 16px; font-size: 13px; font-weight: 600;
  color: var(--brand-orange); text-decoration: none; cursor: pointer;
  border-top: 1px solid var(--gray-100); transition: background 0.1s;
}
.search-see-all:hover, .search-see-all.active { background: var(--gray-50); }

.search-empty {
  padding: 24px 16px; text-align: center;
  font-size: 14px; color: var(--gray-400);
}

@media (max-width: 680px) {
  .search-wrapper { margin: 0 auto 36px; }
  .search-dropdown { max-height: 320px; }
}

/* ── NOTIFICATION DROPDOWN ── */
.notif-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 1000;
  width: 380px; max-height: 520px; display: flex; flex-direction: column;
  background: white; border: 1px solid var(--gray-100); border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
  overflow: hidden;
}
.notif-dropdown-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--gray-100);
}
.notif-dropdown-list {
  flex: 1; overflow-y: auto; max-height: 400px;
}
.notif-dropdown-footer {
  display: block; text-align: center; padding: 12px; font-size: 13px; font-weight: 600;
  color: var(--color-ui-500); border-top: 1px solid var(--gray-100); text-decoration: none;
  transition: background 0.15s;
}
.notif-dropdown-footer:hover { background: var(--gray-50); }
.notif-item {
  display: flex; align-items: flex-start; gap: 12px; width: 100%;
  padding: 12px 16px; text-align: left; cursor: pointer;
  background: transparent; border: none; border-bottom: 1px solid var(--gray-50);
  transition: background 0.15s; font-family: inherit;
}
.notif-item:hover { background: var(--gray-50); }
.notif-item.unread { background: var(--brand-ice-warm); }
.notif-item.unread:hover { background: var(--color-ui-100); }
.notif-item-icon {
  width: 40px; height: 40px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
}
.notif-item-content { flex: 1; min-width: 0; }
.notif-item-title {
  font-size: 13px; font-weight: 600; color: var(--gray-900);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notif-item-body {
  font-size: 12px; color: var(--gray-500); margin-top: 2px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.notif-item-time {
  font-size: 11px; color: var(--gray-400); white-space: nowrap; flex-shrink: 0; margin-top: 2px;
}
.notif-item-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--color-ui-500);
  flex-shrink: 0; margin-top: 6px;
}
.notif-item-delete {
  position: absolute; top: 8px; right: 8px;
  width: 24px; height: 24px; border-radius: 50%; border: none;
  background: var(--gray-100); color: var(--gray-500);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; transition: opacity 0.15s;
}
.notif-item:hover .notif-item-delete { opacity: 1; }
.notif-item-delete:hover { background: var(--color-error); color: white; }

@media (max-width: 680px) {
  .notif-dropdown {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; max-height: 100%; border-radius: 0; border: none;
  }
  .notif-dropdown-list { max-height: unset; flex: 1; }
}

/* ── Subscribe / Checkout page ── */
.subscribe-page { max-width: var(--max-width); margin: 0 auto; padding: 32px 24px; }
.subscribe-grid { display: grid; grid-template-columns: 1fr 360px; gap: 32px; }
.subscribe-section {
  background: var(--color-card); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px;
}
.subscribe-section-title {
  font-size: 11px; font-weight: 700; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px;
}
.subscribe-summary {
  position: sticky; top: 24px; background: var(--color-card);
  border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 24px;
}
.subscribe-cta {
  width: 100%; padding: 16px 0; background: var(--brand-graphite); color: white;
  border: none; border-radius: 999px; font-size: 16px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 0.15s; min-height: 52px;
}
.subscribe-cta:hover { background: var(--brand-graphite-mid); }
.subscribe-cta:disabled { opacity: 0.6; cursor: wait; }
.subscribe-secure {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  margin-top: 8px; font-size: 11px; color: var(--gray-400);
}
.subscribe-qty-btn {
  width: 44px; height: 44px; border-radius: var(--radius);
  border: 1px solid var(--gray-200); background: white;
  font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.subscribe-qty-btn:hover:not(:disabled) { background: var(--gray-50); }
.subscribe-qty-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.subscribe-footer-fixed { display: none; }
.subscribe-summary-mobile { display: none; }

@media (max-width: 680px) {
  .subscribe-page { padding: 0 16px 180px; }
  .subscribe-grid { grid-template-columns: 1fr; gap: 0; }
  .subscribe-summary-desktop { display: none; }
  .subscribe-summary-mobile {
    display: flex !important; background: var(--color-card);
    border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
    padding: 16px; margin-bottom: 16px; align-items: center; justify-content: space-between;
  }
  .subscribe-section { padding: 16px; }
  .subscribe-cta-desktop { display: none; }
  .subscribe-footer-fixed {
    display: block; position: fixed;
    bottom: calc(60px + env(safe-area-inset-bottom));
    left: 0; right: 0;
    background: var(--color-card); border-top: 1px solid var(--gray-200);
    padding: 12px 16px; z-index: 90;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
  }
}

/* ═══════════════════════════════════════════════════════
   City Onboarding — first-visit modal
   ═══════════════════════════════════════════════════════ */

.city-onboarding-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  animation: coFadeIn 0.3s ease-out;
}
.city-onboarding-modal {
  position: relative;
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 440px; max-height: 90vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: coSlideUp 0.4s ease-out;
}
.city-onboarding-close {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  background: var(--gray-100); border: none; border-radius: 50%;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--gray-600);
  transition: background 0.15s;
}
.city-onboarding-close:hover { background: var(--gray-200); }

/* ── Step 1: Location ── */
.city-onboarding-location {
  display: flex; flex-direction: column;
  align-items: center; padding: 48px 32px 32px;
  text-align: center;
}
.city-onboarding-brand {
  font-size: 30px; font-weight: 900; letter-spacing: -0.5px;
  margin-bottom: 40px;
}
.city-onboarding-brand-by { color: var(--brand-graphite); }
.city-onboarding-brand-local { color: var(--brand-orange); }

.city-onboarding-hero {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.city-onboarding-icon-wrap {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand-graphite-mid); margin-bottom: 8px;
}
.city-onboarding-title {
  font-size: 26px; font-weight: 800; color: var(--gray-900);
  letter-spacing: -0.3px; line-height: 1.2; margin: 0;
}
.city-onboarding-subtitle {
  font-size: 16px; color: var(--gray-600); line-height: 1.5; margin: 0;
}

.city-onboarding-actions {
  margin-top: 40px; width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.city-onboarding-primary-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 56px; border-radius: 999px;
  background: var(--brand-graphite-mid); color: #fff;
  font-size: 17px; font-weight: 600; border: none; cursor: pointer;
  box-shadow: 0 4px 12px rgba(15,23,42,0.15);
  transition: background 0.15s;
}
.city-onboarding-primary-btn:hover { background: var(--brand-graphite); }

.city-onboarding-secondary-btn {
  background: none; border: none; cursor: pointer;
  font-size: 15px; font-weight: 500; color: var(--gray-600);
  padding: 12px; transition: color 0.15s;
}
.city-onboarding-secondary-btn:hover { color: var(--gray-900); }

.city-onboarding-detecting {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 56px; color: var(--gray-600); font-size: 15px;
}
.city-onboarding-spinner { animation: coSpin 1s linear infinite; }

.city-onboarding-privacy {
  font-size: 12px; color: var(--gray-400); margin: 4px 0 0; line-height: 1.4;
}

/* ── Step 2: Choose city ── */
.city-onboarding-choose {
  display: flex; flex-direction: column; max-height: 90vh;
}
.city-onboarding-choose-header {
  padding: 32px 24px 16px;
}
.city-onboarding-choose-title {
  font-size: 26px; font-weight: 800; color: var(--gray-900);
  letter-spacing: -0.3px; margin: 0;
}
.city-onboarding-choose-subtitle {
  font-size: 15px; color: var(--gray-600); margin: 6px 0 0; line-height: 1.4;
}
.city-onboarding-detected-badge {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px; padding: 6px 12px;
  background: var(--gray-100); border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--brand-graphite-mid);
}

.city-onboarding-search {
  display: flex; align-items: center; gap: 8px;
  margin: 0 24px 12px; padding: 0 14px;
  height: 44px; border-radius: var(--radius);
  border: 1px solid var(--gray-200); background: var(--gray-50);
  color: var(--gray-400);
  transition: border-color 0.15s;
}
.city-onboarding-search:focus-within {
  border-color: var(--brand-graphite-light); background: #fff;
}
.city-onboarding-search input {
  flex: 1; border: none; background: none; outline: none;
  font-size: 15px; color: var(--gray-900);
}
.city-onboarding-search input::placeholder { color: var(--gray-400); }
.city-onboarding-search button {
  background: none; border: none; cursor: pointer;
  color: var(--gray-400); padding: 4px;
  display: flex; align-items: center;
}

.city-onboarding-list {
  flex: 1; overflow-y: auto; padding: 0 24px 8px;
  display: flex; flex-direction: column; gap: 8px;
  max-height: 340px;
}
.city-onboarding-empty {
  text-align: center; color: var(--gray-400);
  padding: 32px 0; font-size: 15px;
}

.city-onboarding-city-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200); background: #fff;
  cursor: pointer; transition: all 0.15s;
  text-align: left; width: 100%;
}
.city-onboarding-city-row:hover { border-color: var(--gray-300); background: var(--gray-50); }
.city-onboarding-city-row.selected {
  border-color: var(--brand-graphite-mid); background: var(--gray-100);
}
.city-onboarding-city-row.selected svg { color: var(--brand-graphite-mid); }

.city-onboarding-radio {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--gray-300);
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s;
}
.city-onboarding-radio.active { border-color: var(--brand-graphite-mid); }
.city-onboarding-radio-inner {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--brand-graphite-mid);
}

.city-onboarding-city-info {
  flex: 1; display: flex; flex-direction: column; gap: 2px;
}
.city-onboarding-city-name {
  font-size: 15px; font-weight: 600; color: var(--gray-900);
}
.city-onboarding-city-name.selected { color: var(--brand-graphite-mid); }
.city-onboarding-city-distance {
  font-size: 12px; color: var(--gray-400);
}

.city-onboarding-footer {
  padding: 16px 24px 24px;
}
.city-onboarding-confirm-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 56px; border-radius: 999px;
  background: var(--brand-graphite-mid); color: #fff;
  font-size: 17px; font-weight: 600; border: none; cursor: pointer;
  box-shadow: 0 4px 12px rgba(15,23,42,0.15);
  transition: background 0.15s;
}
.city-onboarding-confirm-btn:hover { background: var(--brand-graphite); }
.city-onboarding-confirm-btn.disabled {
  background: var(--gray-200); color: var(--gray-400);
  box-shadow: none; cursor: not-allowed;
}

/* ── Animations ── */
@keyframes coFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes coSlideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes coSpin { to { transform: rotate(360deg); } }

/* ── Mobile: full-screen modal ── */
@media (max-width: 680px) {
  .city-onboarding-modal {
    width: 100%; height: 100%; max-height: 100%;
    border-radius: 0;
  }
  .city-onboarding-location { padding: 60px 24px 32px; }
  .city-onboarding-list { max-height: none; flex: 1; }
  .city-onboarding-choose { height: 100%; }
  .city-onboarding-primary-btn,
  .city-onboarding-confirm-btn { min-height: 56px; }
}
