/* Qareeb — theme-aware UI (SafarPass indigo design system).
   DEFAULT = light (page #F4F7FB, white surfaces, slate text, indigo #5B5BD6 brand).
   [data-theme="dark"] = indigo-on-charcoal. Toggle persists in localStorage.
   Manrope headings + Plus Jakarta Sans body — matching SafarPass. */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  /* ── Light tokens — default (SafarPass indigo) ── */
  --canvas: #F4F7FB;
  --surface: #FFFFFF;
  --surface-2: #EEF2FF;
  --surface-3: #E2E8F0;
  --text: #0F172A;
  --text-2: #475569;
  --muted-solid: #64748B;
  --faint: #94A3B8;
  --gold: #5B5BD6;
  --gold-bright: #6E6EE4;
  --gold-dim: #4338CA;
  --gold-tint: rgba(91,91,214,.10);
  --gold-line: rgba(91,91,214,.24);
  --emerald: #12B981;
  --line: #E2E8F0;
  --red: #EF4444;
  --green: #12B981;
  --coral: #F59E0B;
  --topbar-bg: rgba(244,247,251,.9);
  --hero-bg: radial-gradient(900px 280px at 82% -30%, rgba(91,91,214,.14), transparent 60%), linear-gradient(180deg,#FFFFFF,#EEF2FF);
  --input-bg: #FFFFFF;
  --leaflet-bg: #e9eef0;
  --shadow: 0 1px 2px rgba(15,23,42,.06), 0 4px 14px rgba(15,23,42,.06);
  --shadow-lg: 0 18px 46px rgba(30,41,89,.16);
  --glow: 0 0 0 1px var(--gold-line), 0 12px 34px rgba(91,91,214,.16);

  /* semantic aliases used across the CSS/HTML */
  --ivory: var(--text);
  --ink: var(--text);
  --ink-2: var(--text-2);
  --bg: var(--canvas);
  --card: var(--surface);
  --amber: var(--gold-bright);
  --teal: var(--gold);
  --teal-050: var(--gold-tint);
  --blue: var(--gold);
  --blue-press: var(--gold-dim);
  --blue-050: var(--gold-tint);

  --radius: 12px;
  --radius-lg: 16px;
  --maxw: 1040px;
  --header-h: 58px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --serif: 'Manrope', 'Plus Jakarta Sans', system-ui, sans-serif;
}

[data-theme="dark"] {
  --canvas: #0B1020;
  --surface: #131A2E;
  --surface-2: #1B2440;
  --surface-3: #232F52;
  --text: #EEF2FF;
  --text-2: #C3CBE4;
  --muted-solid: #8C97BC;
  --faint: #5E6890;
  --gold: #8B8BF0;
  --gold-bright: #A6A6F7;
  --gold-dim: #6E6EE4;
  --gold-tint: rgba(139,139,240,.14);
  --gold-line: rgba(139,139,240,.26);
  --emerald: #34D399;
  --line: #26314F;
  --red: #F87171;
  --green: #34D399;
  --coral: #FBBF24;
  --topbar-bg: rgba(11,16,32,.82);
  --hero-bg: radial-gradient(900px 240px at 78% -20%, rgba(139,139,240,.22), transparent 60%), radial-gradient(700px 220px at 0% 120%, rgba(139,139,240,.08), transparent 60%), linear-gradient(180deg,#141B31,#0B1020);
  --input-bg: rgba(255,255,255,.04);
  --leaflet-bg: #0b0b0d;
  --shadow: 0 2px 10px rgba(0,0,0,.45);
  --shadow-lg: 0 20px 55px rgba(0,0,0,.6);
  --glow: 0 0 0 1px var(--gold-line), 0 10px 40px rgba(139,139,240,.14);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--canvas);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 80px;
  letter-spacing: .1px;
  transition: background .2s, color .2s;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 16px; }
::selection { background: var(--gold); color: #fff; }
html { scroll-behavior: smooth; }
/* Keyboard-only focus ring (mouse clicks stay clean; inputs keep their own ring). */
a:focus-visible, button:focus-visible, [role="button"]:focus-visible, select:focus-visible, .chip:focus-visible, .card:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted-solid); }
.eyebrow { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); font-weight: 700; }

/* ── Top bar ─────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--topbar-bg); backdrop-filter: saturate(140%) blur(14px);
  height: var(--header-h); display: flex; align-items: center; border-bottom: 1px solid var(--line);
}
.topbar .container { display: flex; align-items: center; gap: 10px; width: 100%; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 26px; letter-spacing: .5px; color: var(--text); display: flex; align-items: baseline; gap: 8px; }
.brand::first-letter { color: var(--gold); }
.brand small { font-family: var(--font); font-weight: 500; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted-solid); }
.topbar .loc { margin-left: auto; display: flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); padding: 8px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; max-width: 180px; }
.topbar .loc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { background: transparent; border: none; color: var(--text-2); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; position: relative; }
.icon-btn:hover { background: var(--surface-2); color: var(--gold); }
.badge-dot { position: absolute; top: 3px; right: 3px; background: var(--gold); color: #fff; font-size: 10px; font-weight: 800; min-width: 16px; height: 16px; border-radius: 999px; display: grid; place-items: center; padding: 0 3px; border: 2px solid var(--canvas); }

/* ── Hero ────────────────────────────────────────────────── */
.searchwrap { position: relative; color: var(--text); padding: 40px 0 30px; overflow: hidden; background: var(--hero-bg); border-bottom: 1px solid var(--line); }
.searchwrap .hero-title { font-family: var(--serif); font-size: 40px; font-weight: 600; letter-spacing: .3px; margin: 6px 0 4px; line-height: 1.02; }
.searchwrap .hero-title em { font-style: italic; background: linear-gradient(90deg, var(--gold), #8B5CF6, #D97706, var(--gold)); background-size: 250% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: heroShine 7s linear infinite; }
@keyframes heroShine { to { background-position: 250% center; } }
@media (prefers-reduced-motion: reduce) { .searchwrap .hero-title em { animation: none; color: var(--gold); background: none; } }
.searchwrap .hero-sub { font-size: 14px; color: var(--muted-solid); margin: 0 0 20px; max-width: 34ch; }
/* one-tap popular searches under the hero search bar — soft tinted pills,
   no label word, generous spacing so they read as suggestions not a form row */
.trendrow { display: flex; align-items: center; gap: 8px; margin: 18px 0 2px; flex-wrap: wrap; }
.trendrow button { border: none; background: var(--gold-tint, rgba(91,91,214,.09)); color: var(--gold); font-size: 12.5px; font-weight: 700; padding: 8px 15px; border-radius: 999px; cursor: pointer; transition: all .15s; letter-spacing: -.1px; }
.trendrow button:hover { background: var(--gold); color: #fff; transform: translateY(-1px); box-shadow: 0 5px 14px rgba(91,91,214,.28); }
@media (max-width: 520px) { .trendrow { gap: 7px; margin-top: 14px; } .trendrow button { font-size: 12px; padding: 7px 13px; } }
.searchbar { display: flex; gap: 8px; max-width: 620px; }
.searchbar input { flex: 1; border: 1px solid var(--gold-line); border-radius: 999px; padding: 15px 20px; outline: none; font-size: 15px; background: var(--input-bg); color: var(--text); box-shadow: var(--shadow); }
.searchbar input::placeholder { color: var(--faint); }
.searchbar input:focus { border-color: var(--gold); }
.searchbar .btn-search { background: linear-gradient(180deg, var(--gold-bright), var(--gold)); color: #fff; border: none; border-radius: 999px; padding: 0 24px; font-weight: 700; font-size: 15px; }

/* ── Category tile grid ──────────────────────────────────── */
/* Quick-action row — the app's four core jobs, one tap from the top */
.qa-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0 2px; }
.qa { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 13px 8px 11px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 3px; box-shadow: 0 2px 8px rgba(15,23,42,.05); transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s; }
.qa:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(30,41,89,.13); }
.qa .qi { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; font-size: 23px; margin-bottom: 3px; box-shadow: inset 0 -3px 8px rgba(15,23,42,.06); }
.qa b { font-size: 12.5px; color: var(--text); line-height: 1.2; }
.qa small { font-size: 10.5px; color: var(--muted-solid); line-height: 1.2; }
@media (max-width: 420px) { .qa small { display: none; } }
/* Single-line horizontal category strip with a slim drag-bar underneath —
   grab it and pull left/right, or swipe on touch. */
.cat-grid { display: flex; gap: 10px; margin: 18px 0 6px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--gold) var(--surface-2); }
.cat-grid::-webkit-scrollbar { height: 8px; }
.cat-grid::-webkit-scrollbar-track { background: var(--surface-2); border-radius: 99px; }
.cat-grid::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 99px; }
.cat-grid::-webkit-scrollbar-thumb:hover { background: var(--gold-bright, var(--gold-dim)); }
.cat-tile { flex: 0 0 auto; width: 88px; scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 10px 4px 9px; text-align: center; cursor: pointer; transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s, border-color .18s; display: flex; flex-direction: column; align-items: center; gap: 7px; box-shadow: 0 2px 8px rgba(15,23,42,.05); }
.cat-tile:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(30,41,89,.14); border-color: transparent; }
.cat-tile:active { transform: translateY(-1px) scale(.97); }
.cat-tile .ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 21px; box-shadow: inset 0 -3px 8px rgba(15,23,42,.06), 0 4px 10px rgba(15,23,42,.08); transition: transform .18s cubic-bezier(.34,1.56,.64,1); }
.cat-tile:hover .ic { transform: scale(1.09) rotate(-3deg); }
.cat-tile .nm { font-size: 11.5px; font-weight: 700; color: var(--text); line-height: 1.2; letter-spacing: -.1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 82px; }
/* Playful rotating pastel palette for the icon tiles */
.cat-tile:nth-child(8n+1) .ic { background: linear-gradient(145deg,#EEF2FF,#C7D2FE); }
.cat-tile:nth-child(8n+2) .ic { background: linear-gradient(145deg,#FFE4E6,#FECDD3); }
.cat-tile:nth-child(8n+3) .ic { background: linear-gradient(145deg,#FEF3C7,#FDE68A); }
.cat-tile:nth-child(8n+4) .ic { background: linear-gradient(145deg,#D1FAE5,#A7F3D0); }
.cat-tile:nth-child(8n+5) .ic { background: linear-gradient(145deg,#E0F2FE,#BAE6FD); }
.cat-tile:nth-child(8n+6) .ic { background: linear-gradient(145deg,#F3E8FF,#E9D5FF); }
.cat-tile:nth-child(8n+7) .ic { background: linear-gradient(145deg,#FFEDD5,#FED7AA); }
.cat-tile:nth-child(8n+8) .ic { background: linear-gradient(145deg,#CCFBF1,#99F6E4); }

/* ── Horizontal rails (compact one-line sections: ending soon, live pros) ── */
.rail { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.rail::-webkit-scrollbar { display: none; }
.mini-card { flex: 0 0 152px; scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; text-decoration: none; color: var(--text); box-shadow: 0 2px 8px rgba(15,23,42,.05); transition: transform .15s, box-shadow .15s; }
.mini-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(30,41,89,.12); }
.mini-card .im { height: 96px; background: var(--surface-2); display: grid; place-items: center; font-size: 26px; position: relative; overflow: hidden; background-size: cover; background-position: center; }
.mini-card .bd { padding: 8px 10px 10px; }
.mini-card .pr { font-weight: 800; font-size: 13.5px; }
.mini-card .tt { font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.mini-card .mt { font-size: 10.5px; color: var(--muted-solid); margin-top: 3px; display: flex; align-items: center; gap: 4px; }
.mini-card .tag2 { position: absolute; top: 6px; left: 6px; background: var(--gold); color: #fff; font-size: 9.5px; font-weight: 800; padding: 2px 7px; border-radius: 99px; }
.mini-card .tag2.grn { background: var(--green); }
/* rail arrows in the section header — desktop only (touch swipes natively) */
.railnav { display: none; gap: 6px; }
@media (hover: hover) { .railnav { display: flex; } }
.railnav button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--text-2); font-size: 15px; line-height: 1; display: grid; place-items: center; padding: 0; }
.railnav button:hover { border-color: var(--gold); color: var(--gold); }
/* ── Chips ───────────────────────────────────────────────── */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 14px 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 8px 15px; font-size: 13px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 6px; white-space: nowrap; transition: all .12s; }
.chip:hover { border-color: var(--gold-line); }
.chip.active { background: linear-gradient(180deg, var(--gold-bright), var(--gold)); color: #fff; border-color: var(--gold); }

/* ── Section headers ─────────────────────────────────────── */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 14px; }
.section-head h2 { font-family: var(--serif); font-size: 24px; margin: 0; font-weight: 600; letter-spacing: .3px; }
.section-head a { font-size: 12px; color: var(--gold); font-weight: 700; letter-spacing: .04em; }

/* ── Cards ───────────────────────────────────────────────── */
.crumb { color: var(--muted-solid); font-weight: 600; }
.crumb:hover { color: var(--gold); }
.crumbsep { color: var(--faint); margin: 0 2px; }
.sortsel { border: 1px solid var(--line); background: var(--surface); color: var(--text-2); border-radius: 9px; padding: 7px 10px; font-size: 12.5px; font-weight: 600; outline: none; cursor: pointer; }
.sortsel:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-tint); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .18s, transform .18s, border-color .18s; box-shadow: var(--shadow); }
.card:hover { box-shadow: var(--glow); transform: translateY(-3px); border-color: var(--gold-line); }
.card .thumb { aspect-ratio: 1 / 1; background: var(--surface-2) center/cover no-repeat; position: relative; }
.card .thumb .noimg { width: 100%; height: 100%; display: grid; place-items: center; color: var(--faint); font-size: 30px; }
.card .tag { position: absolute; top: 8px; left: 8px; background: rgba(20,17,10,.82); color: var(--gold-bright); font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 5px; text-transform: uppercase; letter-spacing: .5px; border: 1px solid var(--gold-line); backdrop-filter: blur(4px); }
.card .tag.auction { background: var(--gold); color: #fff; border-color: transparent; }
.card .tag.live { background: var(--green); color: #fff; border-color: transparent; }
.card .tag.sold { left: auto; right: 8px; background: rgba(15,23,42,.82); color: #fff; border-color: transparent; }
.card .tag.urgent { top: 32px; background: var(--red); color: #fff; border-color: transparent; }
/* Urdu mode: layout stays LTR; translated text gets an Urdu-friendly font stack */
.lang-ur [data-i18n], .lang-ur .bottomnav a { font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', 'Urdu Typesetting', var(--font), sans-serif; }
.card .fav { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,.94); border: none; color: var(--gold); width: 32px; height: 32px; border-radius: 50%; font-size: 16px; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(15,23,42,.16); cursor: pointer; transition: transform .12s; z-index: 2; }
.card .fav:hover { transform: scale(1.08); }
.card .fav.on { color: var(--red); }
.card .body { padding: 11px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.card .price { font-weight: 800; font-size: 16px; color: var(--text); letter-spacing: -.3px; }
.card .title { font-size: 13px; color: var(--text-2); line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 35px; font-weight: 500; }
.card .srow { display: flex; align-items: center; gap: 6px; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted-solid); min-width: 0; }
.card .srow .av { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; background: var(--gold-tint) center/cover no-repeat; color: var(--gold); font-weight: 800; font-size: 10px; display: grid; place-items: center; border: 1px solid var(--gold-line); }
.card .srow .sname { font-weight: 700; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vchk { flex: 0 0 auto; width: 14px; height: 14px; border-radius: 50%; background: var(--gold); color: #fff; font-size: 9px; font-weight: 900; display: inline-grid; place-items: center; }
.vbadge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; color: var(--gold); background: var(--gold-tint); border: 1px solid var(--gold-line); padding: 2px 8px; border-radius: 999px; }
.card .srow .sloc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .meta { font-size: 11px; color: var(--muted-solid); display: flex; gap: 5px; align-items: center; margin-top: 2px; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 999px; padding: 13px 24px; font-weight: 600; font-size: 15px; transition: all .14s; letter-spacing: .01em; }
.btn-primary { background: linear-gradient(180deg, var(--gold-bright), var(--gold)); color: #fff; }
.btn-primary:hover { box-shadow: 0 8px 22px rgba(156,111,36,.30); transform: translateY(-1px); }
.btn-dark { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.btn-dark:hover { border-color: var(--gold-line); }
.btn-coral { background: var(--coral); color: #fff; }
.btn-emerald { background: var(--emerald); color: #fff; }
.btn-ghost { background: var(--gold-tint); color: var(--gold); border: 1px solid var(--gold-line); }
.btn-outline { background: var(--surface); color: var(--text); border: 1px solid var(--gold-line); }
.btn-outline:hover { background: var(--gold-tint); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; }

/* ── Bottom nav + FAB ────────────────────────────────────── */
.bottomnav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(15,23,42,.08); display: flex; align-items: flex-end; justify-content: space-around; padding: 7px 6px calc(9px + env(safe-area-inset-bottom, 0px)); max-width: var(--maxw); margin: 0 auto; border-radius: 18px 18px 0 0; }
.bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; letter-spacing: .01em; color: var(--muted-solid); font-weight: 600; flex: 1; position: relative; padding: 3px 0 1px; border-radius: 12px; transition: color .15s; }
.bottomnav a .ic { font-size: 21px; line-height: 1; padding: 5px 16px; border-radius: 999px; transition: background .18s, transform .18s; }
.bottomnav a.active { color: var(--gold); font-weight: 800; }
.bottomnav a.active .ic { background: var(--gold-tint); }
.bottomnav a:not(.post-btn):active .ic { transform: scale(.9); }
.bottomnav .post-btn { color: #fff; flex: 0 0 62px; margin-top: -30px; padding: 0; }
.bottomnav .post-btn .plus { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 27px; font-weight: 600; background: linear-gradient(160deg, var(--gold-bright), var(--gold) 55%, var(--gold-dim)); box-shadow: 0 0 0 5px var(--surface), 0 8px 20px rgba(91,91,214,.42), inset 0 1.5px 2px rgba(255,255,255,.45); transition: transform .18s cubic-bezier(.34,1.56,.64,1); }
.bottomnav .post-btn:hover .plus { transform: scale(1.07); }
.bottomnav .post-btn:active .plus { transform: scale(.94); }
.bottomnav .post-btn .lbl2 { font-size: 10.5px; font-weight: 800; color: var(--gold); margin-top: 3px; display: block; }
@keyframes haloPulse { 0% { transform: scale(1); opacity: .8; } 70% { transform: scale(1.35); opacity: 0; } 100% { opacity: 0; } }
.bottomnav .post-btn span.lbl { display: none; }

/* ── Panels / forms ──────────────────────────────────────── */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; margin: 14px 0; box-shadow: var(--shadow); }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--muted-solid); margin-bottom: 7px; letter-spacing: .04em; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 13px; outline: none; background: var(--surface); color: var(--text); }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-tint); }
.field select option { background: var(--surface); color: var(--text); }
.field .hint { font-size: 12px; color: var(--muted-solid); margin-top: 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: .03em; }
.pill.green { background: rgba(18,185,129,.14); color: var(--green); }
.pill.amber { background: var(--gold-tint); color: var(--gold-dim); }
.pill.gray { background: var(--surface-3); color: var(--muted-solid); }
.pill.red { background: rgba(194,59,38,.12); color: var(--red); }
.pill.blue { background: var(--gold-tint); color: var(--gold-dim); }

/* ── Toast + modal ───────────────────────────────────────── */
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: #231F17; color: #F5F0E6; padding: 13px 22px; border-radius: 999px; font-size: 14px; font-weight: 600; z-index: 200; box-shadow: var(--shadow-lg); border: 1px solid var(--gold-line); opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.toast.err { border-color: rgba(194,59,38,.6); color: #FCA;}
/* z-index 1200: must sit ABOVE Leaflet maps (their panes/controls go up to
   1000) — otherwise sheets open underneath the map on services/shops pages */
.modal-bg { position: fixed; inset: 0; background: rgba(20,17,12,.5); backdrop-filter: blur(3px); z-index: 1200; display: none; align-items: flex-end; justify-content: center; }
.modal-bg.open { display: flex; }
.modal { background: var(--surface); border: 1px solid var(--line); width: 100%; max-width: var(--maxw); border-radius: 20px 20px 0 0; padding: 24px 18px 26px; max-height: 88vh; overflow-y: auto; animation: slideup .24s ease; box-shadow: var(--shadow-lg); }
@media (min-width: 640px) { .modal-bg { align-items: center; } .modal { border-radius: 18px; max-width: 460px; } }
/* phone bottom-sheet: grab-handle cue so it reads as a swipeable sheet */
@media (max-width: 639px) {
  .modal::after { content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
    width: 42px; height: 4px; border-radius: 99px; background: var(--line); }
  .modal { position: relative; padding-top: 26px; }
}
@keyframes slideup { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.modal h3 { margin: 0 0 14px; font-family: var(--serif); font-size: 24px; font-weight: 600; letter-spacing: .3px; }

.center-narrow { max-width: 440px; margin: 0 auto; }
.empty { text-align: center; color: var(--muted-solid); padding: 56px 20px; }
.empty .big { font-size: 46px; margin-bottom: 12px; }
.skeleton { background: linear-gradient(90deg,var(--surface-2) 25%,var(--surface-3) 37%,var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite; border-radius: var(--radius); }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ── View toggle + map ───────────────────────────────────── */
.viewtoggle { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.viewtoggle button { border: none; background: transparent; padding: 7px 16px; border-radius: 999px; font-weight: 600; font-size: 13px; color: var(--muted-solid); }
.viewtoggle button.active { background: var(--surface); color: var(--gold); box-shadow: var(--shadow); }
#map { width: 100%; height: calc(100vh - 230px); min-height: 380px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); }
.leaflet-container { background: var(--leaflet-bg); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--text); border: 1px solid var(--gold-line); }
.leaflet-popup-content { margin: 10px 12px; font-family: var(--font); }
.map-pop { width: 150px; }
.map-pop img, .map-pop .noimg { width: 100%; height: 90px; object-fit: cover; border-radius: 6px; background: var(--surface-3); display:grid; place-items:center; }
.map-pop .p { font-weight: 700; font-size: 14px; margin: 6px 0 2px; color: var(--gold); }
.map-pop .t { font-size: 12px; color: var(--text-2); line-height: 1.3; }
.price-marker { background: linear-gradient(180deg, var(--gold-bright), var(--gold)); color: #fff; font-weight: 700; font-size: 12px; padding: 4px 9px; border-radius: 999px; white-space: nowrap; box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.5); }
.price-marker.auction { background: var(--coral); }
.live-marker { width: 34px; height: 34px; }
.live-marker .dot { width: 16px; height: 16px; border-radius: 50%; background: var(--green); border: 3px solid #fff; margin: 9px auto; box-shadow: 0 0 0 rgba(18,185,129,.6); animation: livePulse 1.8s infinite; }
.live-marker.busy .dot { background: var(--coral); animation: none; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(18,185,129,.5); } 70% { box-shadow: 0 0 0 14px rgba(18,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(18,185,129,0); } }

/* ── Theme toggle (injected into topbar) ─────────────────── */
.theme-toggle { background: var(--surface-2); border: 1px solid var(--line); }
