/* =========================================================
   Tarishka Homes design system
   Tokens → base → components → layouts → utilities
   ========================================================= */

:root {
  --primary: #0B4F4A;
  --primary-600: #0E6660;
  --primary-100: #DCEFEC;
  --primary-ink: #FFFFFF;
  --accent: #E0892E;
  --accent-600: #C9771F;
  --accent-100: #FBE9D6;
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --sand: #F4EDE3;
  --ink: #13202B;
  --muted: #5B6670;
  --line: #E6E0D6;
  --line-strong: #CFC6B8;
  --success: #1F7A4D;
  --warning: #B36B00;
  --danger: #B42318;
  --wa: #1F9E5B;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(19,32,43,.06);
  --shadow: 0 2px 6px rgba(19,32,43,.06), 0 12px 32px rgba(19,32,43,.08);
  --shadow-lg: 0 20px 50px rgba(19,32,43,.16);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1);
  --header-h: 64px;
}
/* Dark theme only when chosen via the toggle (data-theme="dark"); default is always light/white. */
:root[data-theme="dark"] {
  --primary: #3FA79B; --primary-600: #5BC0B3; --primary-100: #15302E; --primary-ink: #0F1416;
  --accent: #F0A24F; --accent-600: #F5B672; --accent-100: #3A2A17;
  --bg: #0F1416; --surface: #161D20; --sand: #1B2427; --ink: #ECEFE9; --muted: #9AA6A8; --line: #243033; --line-strong: #34454A;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 2px 6px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.45); --shadow-lg: 0 20px 50px rgba(0,0,0,.6);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font-body); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: clamp(22px, 2.6vw, 30px); }
h3 { font-size: 19px; font-family: var(--font-body); font-weight: 700; }
p { margin: 0 0 1em; }
[x-cloak] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Layout ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.section { padding: 36px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-head p { color: var(--muted); margin: 0; }
.section-head .link { color: var(--primary); font-weight: 700; font-size: 14px; white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack { display: grid; gap: 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--primary); letter-spacing: -0.01em; }
.brand-mark { width: 40px; height: 40px; border-radius: 10px; background: #0d1e30; object-fit: cover; flex: none; display: block; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { padding: 8px 12px; border-radius: var(--radius-pill); font-weight: 600; font-size: 14.5px; color: var(--ink); transition: background .2s var(--ease); }
.nav a:hover, .nav a.active { background: var(--sand); color: var(--primary); }
.nav-actions { display: flex; gap: 8px; align-items: center; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; font-weight: 800; font-size: 13px; object-fit: cover; }
.menu { position: relative; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; display: grid; }
.menu-panel a, .menu-panel button { text-align: left; padding: 9px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; background: none; border: 0; width: 100%; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--sand); }
.menu-panel hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.nav-actions .burger { display: none; }                 /* desktop: real nav, no drawer (specificity beats .btn) */
@media (min-width: 961px) { .mobile-nav { display: none !important; } }   /* !important: Alpine x-show would force display:block */
@media (max-width: 960px) {
  .nav { display: none; }
  .nav-actions .btn-ghost.hide-m { display: none; }
  .nav-actions .burger { display: inline-grid; }
}
/* Drawer hangs off the sticky header (absolute, not fixed: the header's backdrop-filter makes it the containing block). */
.mobile-nav { position: absolute; top: 100%; left: 0; right: 0; height: calc(100dvh - var(--header-h)); background: var(--bg); z-index: 39; padding: 16px; display: grid; gap: 6px; align-content: start; overflow: auto; }
.mobile-nav a { padding: 14px 16px; border-radius: var(--radius-sm); font-weight: 700; font-size: 17px; background: var(--surface); border: 1px solid var(--line); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 56px; border-top: 1px solid var(--line); background: var(--surface); padding: 40px 0 28px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h4 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.site-footer a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: var(--surface); font-weight: 700; font-size: 14.5px; line-height: 1; transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-600); }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-600); }
.btn-wa { background: var(--wa); color: #fff; border-color: var(--wa); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--sand); box-shadow: none; }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { padding: 8px 13px; font-size: 13px; }
.btn-lg { padding: 14px 24px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 50%; }
.btn[disabled], .btn.loading { opacity: .6; pointer-events: none; }

/* ---------- Chips / badges ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: var(--radius-pill); background: var(--sand); border: 1px solid transparent; font-size: 12.5px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.chip-primary { background: var(--primary); color: var(--primary-ink); }
.chip-accent { background: var(--accent); color: #fff; }
.chip-outline { background: transparent; border-color: var(--line-strong); }
.chip-success { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.chip-warning { background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--warning); }
.chip-danger { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.chip-muted { background: var(--sand); color: var(--muted); }
.chip button { background: none; border: 0; padding: 0; margin-left: 2px; color: inherit; font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.verified { color: var(--primary); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Forms ---------- */
.input, select.input, textarea.input { width: 100%; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; transition: border-color .2s, box-shadow .2s; }
select.input, .sort select { -webkit-appearance: none; appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235B6670' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; }
.sort select { padding-right: 34px; background-position: right 11px center; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
.input::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
textarea.input { resize: vertical; min-height: 90px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label, .label { font-size: 13px; font-weight: 700; color: var(--ink); }
.field .help { font-size: 12.5px; color: var(--muted); }
.field .error, .errorlist { color: var(--danger); font-size: 13px; margin: 0; padding: 0; list-style: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.radio-cards label { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; cursor: pointer; }
.radio-cards label:has(input:checked) { border-color: var(--primary); background: var(--primary-100); }
.radio-cards input { accent-color: var(--primary); }
.toggle-group { display: inline-flex; max-width: 100%; overflow-x: auto; background: var(--sand); padding: 4px; border-radius: var(--radius-pill); gap: 2px; }
.toggle-group label, .toggle-group button, .toggle-group a { padding: 8px 12px; white-space: nowrap; flex: 1; text-align: center; border-radius: var(--radius-pill); font-size: 13.5px; font-weight: 700; cursor: pointer; color: var(--muted); border: 0; background: transparent; }
.toggle-group label:has(input:checked), .toggle-group .active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.toggle-group input { position: absolute; opacity: 0; pointer-events: none; }
.pill-options { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-options label { padding: 7px 13px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); font-size: 13px; font-weight: 600; cursor: pointer; background: var(--surface); }
.pill-options label:has(input:checked) { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.pill-options input { position: absolute; opacity: 0; pointer-events: none; }

/* ---------- Cards ---------- */
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-media { position: relative; aspect-ratio: 4 / 3; background: var(--sand); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-media img { transform: scale(1.04); }
.card-media .chip { position: absolute; top: 10px; left: 10px; z-index: 2; }
.card-media .chip + .chip { left: auto; right: 10px; }
.card-media .save { position: absolute; right: 10px; bottom: 10px; z-index: 2; }
.card-media .count { position: absolute; left: 10px; bottom: 10px; z-index: 2; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 8px; }
.card-placeholder { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 13px; background: repeating-linear-gradient(45deg, var(--sand), var(--sand) 10px, color-mix(in srgb, var(--sand) 70%, var(--surface)) 10px, color-mix(in srgb, var(--sand) 70%, var(--surface)) 20px); }
.card-body { padding: 14px 16px 16px; display: grid; gap: 4px; }
.card-price { font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.card-price .unit { font-weight: 600; color: var(--muted); font-size: 12.5px; }
.card-title { font-weight: 700; font-size: 15.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--muted); }
.card.horizontal { flex-direction: row; }
.card.horizontal .card-media { width: 42%; aspect-ratio: auto; min-height: 210px; }
.card.horizontal .card-body { flex: 1; }
@media (max-width: 640px) { .card.horizontal { flex-direction: column; } .card.horizontal .card-media { width: 100%; aspect-ratio: 4 / 3; } }

.save-btn { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.92); border: 0; display: grid; place-items: center; color: #13202B; box-shadow: var(--shadow-sm); transition: transform .15s; }
.save-btn:hover { transform: scale(1.08); }
.save-btn.on { color: var(--danger); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 56px 0 40px; overflow: hidden; background: radial-gradient(1200px 500px at 15% -10%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 60%), radial-gradient(900px 400px at 90% 10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%), var(--bg); }
.hero h1 { font-size: clamp(32px, 5vw, 58px); max-width: 760px; }
.hero h1 em { font-style: italic; color: var(--primary); }
.hero .lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); max-width: 620px; margin-bottom: 26px; }
.search-box { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 12px; max-width: 980px; }
.search-tabs { display: flex; gap: 2px; margin: -4px 0 10px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.search-tabs button { background: none; border: 0; padding: 10px 14px; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.search-tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.search-row { display: grid; grid-template-columns: 1.7fr 1fr 1fr auto; gap: 8px; align-items: center; }
.search-actions { display: flex; gap: 8px; }
@media (max-width: 760px) { .search-row { grid-template-columns: 1fr 1fr; } .search-row .suggest-wrap, .search-row .search-actions { grid-column: 1 / -1; } .search-actions .btn { flex: 1; } }
.suggest-wrap { position: relative; }
.suggest-wrap .input { padding-left: 40px; }
.suggest-wrap .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); z-index: 30; overflow: hidden; max-height: 320px; overflow-y: auto; }
.suggest a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: 14px; }
.suggest a:hover, .suggest a.active { background: var(--sand); }
.suggest .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); min-width: 56px; }
.suggest .sub { color: var(--muted); font-size: 12.5px; margin-left: auto; }
.quick-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.quick-links a { font-size: 13px; font-weight: 600; color: var(--muted); padding: 6px 10px; border-radius: var(--radius-pill); border: 1px dashed var(--line-strong); }
.quick-links a:hover { color: var(--primary); border-color: var(--primary); }

/* ---------- Stat strip ---------- */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 760px) { .stat-strip { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stat strong { display: block; font-family: var(--font-display); font-size: 30px; line-height: 1; color: var(--primary); }
.stat span { color: var(--muted); font-size: 13px; }

/* ---------- Locality tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tile { position: relative; padding: 18px; border-radius: var(--radius); background: linear-gradient(160deg, var(--sand), var(--surface)); border: 1px solid var(--line); transition: transform .2s var(--ease), border-color .2s; }
.tile:hover { transform: translateY(-3px); border-color: var(--primary); }
.tile strong { display: block; font-size: 16px; }
.tile span { color: var(--muted); font-size: 13px; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step .n { width: 36px; height: 36px; border-radius: 10px; background: var(--primary-100); color: var(--primary); display: grid; place-items: center; font-weight: 800; margin-bottom: 12px; }
.cta-band { background: linear-gradient(120deg, var(--primary), color-mix(in srgb, var(--primary) 60%, var(--accent))); color: #fff; border-radius: 22px; padding: 36px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 4px; }
.cta-band p { margin: 0; opacity: .9; }

/* ---------- Search page ---------- */
.search-layout { display: grid; grid-template-columns: 290px 1fr; gap: 24px; align-items: start; }
@media (max-width: 960px) { .search-layout { grid-template-columns: 1fr; } .filters-panel { display: none; } .filters-panel.open { display: block; position: fixed; inset: 0; z-index: 50; background: var(--bg); overflow: auto; padding: 16px; } }
.filters-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; position: sticky; top: calc(var(--header-h) + 12px); max-height: calc(100vh - var(--header-h) - 24px); overflow: auto; }
.filters-panel details { border-top: 1px solid var(--line); padding: 10px 0; }
.filters-panel details:first-of-type { border-top: 0; }
.filters-panel summary { font-weight: 700; font-size: 14px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; padding: 4px 0; }
.filters-panel summary::after { content: "+"; color: var(--muted); }
.filters-panel details[open] summary::after { content: "–"; }
.filters-panel .body { padding-top: 8px; display: grid; gap: 8px; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.results-head h1 { font-size: 22px; margin: 0; }
.sort select { padding: 8px 12px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 600; }
.results { display: grid; gap: 16px; }
.results.cards { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.results.htmx-request { opacity: .5; transition: opacity .2s; }
.map-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 960px) { .map-layout { grid-template-columns: 1fr; } }
#map, .map { height: 520px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: var(--sand); }
.map-sm { height: 300px; }
.leaflet-popup-content { font-family: var(--font-body); margin: 10px 12px; }
.leaflet-popup-content img { border-radius: 8px; margin-bottom: 6px; width: 200px; height: 130px; object-fit: cover; }
.price-pin { background: var(--primary); color: var(--primary-ink); font-weight: 800; font-size: 12px; padding: 4px 8px; border-radius: 10px; white-space: nowrap; box-shadow: var(--shadow-sm); border: 2px solid #fff; }
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 26px; flex-wrap: wrap; }
.pager a, .pager span { padding: 8px 13px; border-radius: 10px; border: 1px solid var(--line); font-weight: 700; font-size: 13.5px; background: var(--surface); }
.pager .current { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.empty { padding: 48px 24px; text-align: center; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); }
.empty h3 { color: var(--ink); }
.skeleton { background: linear-gradient(90deg, var(--sand) 25%, var(--surface) 50%, var(--sand) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- Detail page ---------- */
.crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.crumbs a:hover { color: var(--primary); }
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-auto-rows: 190px; gap: 8px; margin-bottom: 20px; }
.gallery figure { margin: 0; border-radius: 12px; overflow: hidden; position: relative; cursor: zoom-in; background: var(--sand); }
.gallery figure.main { grid-row: span 2; }
.gallery figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.gallery figure:hover img { transform: scale(1.03); }
.gallery .more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.5); color: #fff; font-weight: 800; font-size: 18px; }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; } .gallery figure.main { grid-column: span 2; } .gallery figure:nth-child(n+5) { display: none; } }
.detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
@media (max-width: 960px) { .detail-grid { grid-template-columns: 1fr; } }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 18px 0; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.fact dt { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.fact dd { margin: 2px 0 0; font-weight: 700; font-size: 15px; }
.panel { position: sticky; top: calc(var(--header-h) + 12px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.price-big { font-family: var(--font-display); font-size: 34px; font-weight: 700; line-height: 1; letter-spacing: -0.01em; }
.poster-card { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; background: var(--sand); margin: 14px 0; }
.poster-card .avatar { width: 44px; height: 44px; font-size: 15px; }
.prose { max-width: 70ch; }
.prose p { margin-bottom: .8em; }
.highlights { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.highlights li { padding: 8px 12px 8px 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; position: relative; font-size: 14px; }
.highlights li::before { content: "✓"; position: absolute; left: 12px; color: var(--primary); font-weight: 800; }
.amenity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.amenity { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.emi { display: grid; gap: 10px; }
.emi .range { width: 100%; accent-color: var(--primary); }
.emi .out { font-family: var(--font-display); font-size: 26px; color: var(--primary); }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 100; display: grid; grid-template-rows: auto 1fr auto; color: #fff; }
.lightbox img { max-width: 92vw; max-height: 78vh; margin: auto; object-fit: contain; border-radius: 8px; }
.lightbox .bar { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; }
.lightbox .nav-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.14); color: #fff; border: 0; width: 46px; height: 46px; border-radius: 50%; font-size: 20px; }
.lightbox .prev { left: 14px; } .lightbox .next { right: 14px; }
.video-embed { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.video-embed iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Modal / toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(19,32,43,.55); z-index: 90; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 18px; width: min(520px, 100%); max-height: 92vh; overflow: auto; padding: 22px; box-shadow: var(--shadow-lg); animation: pop .25s var(--ease); }
@keyframes pop { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 95; display: grid; gap: 8px; max-width: 360px; }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); font-size: 14px; font-weight: 600; animation: pop .25s var(--ease); border-left: 4px solid var(--primary); }
.toast.error { border-left-color: var(--danger); } .toast.warning { border-left-color: var(--warning); } .toast.success { border-left-color: var(--success); }

/* ---------- Auth / forms pages ---------- */
.auth { max-width: 460px; margin: 40px auto; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow-sm); }
.auth h1 { font-size: 28px; }
.notice { padding: 12px 14px; border-radius: 12px; font-size: 14px; background: var(--primary-100); color: var(--primary); }
.notice.error { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); }
.notice.warning { background: color-mix(in srgb, var(--warning) 14%, transparent); color: var(--warning); }

/* ---------- Dashboard ---------- */
.dash { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .dash { grid-template-columns: 1fr; } }
.dash-nav { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: grid; gap: 2px; position: sticky; top: calc(var(--header-h) + 12px); }
.dash-nav a { padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; }
.dash-nav a.active, .dash-nav a:hover { background: var(--sand); color: var(--primary); }
.dash-nav .count { background: var(--accent); color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 10px; }
@media (max-width: 900px) { .dash-nav { position: static; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.kpi strong { display: block; font-family: var(--font-display); font-size: 28px; line-height: 1; }
.kpi span { color: var(--muted); font-size: 13px; }
.kpi.warn strong { color: var(--warning); } .kpi.good strong { color: var(--success); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--sand); }
.table tr:last-child td { border-bottom: 0; }
.table .thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; }
.table-wrap { overflow-x: auto; }
.wizard-steps { display: flex; gap: 6px; margin-bottom: 22px; }
.wizard-steps div { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.wizard-steps div.done { background: var(--primary); }
.wizard-steps div.now { background: var(--accent); }
.dropzone { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--muted); background: var(--sand); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.photo-grid figure { margin: 0; position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid .tools { position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; padding: 6px; background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.photo-grid .tools button { background: rgba(255,255,255,.9); border: 0; border-radius: 8px; padding: 3px 8px; font-size: 11px; font-weight: 700; }
.board { display: grid; grid-template-columns: repeat(6, minmax(190px, 1fr)); gap: 12px; overflow-x: auto; }
.column { background: var(--sand); border-radius: var(--radius); padding: 10px; min-height: 120px; }
.column h4 { margin: 4px 6px 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.lead-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 8px; font-size: 13px; }
.lead-card strong { display: block; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.timeline li { padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.timeline .meta { color: var(--muted); font-size: 12px; }

/* ---------- Utilities / motion ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.hide-m { } @media (max-width: 760px) { .hide-m { display: none !important; } }
.only-m { display: none !important; } @media (max-width: 760px) { .only-m { display: inherit !important; } }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.text-center { text-align: center; }
.bottom-nav { display: none; }
@media (max-width: 760px) {
  body { padding-bottom: 64px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); z-index: 38; }
  .bottom-nav a { display: grid; place-items: center; gap: 2px; padding: 8px 4px; font-size: 11px; font-weight: 700; color: var(--muted); }
  .bottom-nav a.active { color: var(--primary); }
  .bottom-nav svg { width: 22px; height: 22px; }
}

/* Map view side list: never let the scroll container shrink cards */
.map-layout .results { display: flex; flex-direction: column; align-content: start; }
.map-layout .results .card { flex: 0 0 auto; }

/* Compact brand on narrow screens */
@media (max-width: 520px) { .brand { font-size: 17px; white-space: nowrap; } .nav-actions .btn-accent { padding: 8px 10px; font-size: 12.5px; } }
@media (max-width: 520px) {
  .brand span:last-child { display: none; }
  .nav-actions { gap: 4px; }
  .nav-actions .btn-accent .tiny { display: none; }
  .site-header .wrap { gap: 8px; }
}

/* Staff analytics chart */
.bars { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding: 0 4px 22px; border-bottom: 1px solid var(--line); position: relative; }
.bar-group { flex: 1; display: flex; align-items: flex-end; gap: 2px; height: 100%; position: relative; min-width: 0; }
.bar { flex: 1; min-height: 2px; border-radius: 3px 3px 0 0; }
.bar.views { background: var(--sand-deep, #E8DCC8); }
.bar.visitors { background: var(--primary); }
.bar-label { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); font-size: 10.5px; color: var(--muted); white-space: nowrap; margin-top: 4px; }
.legend { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; }
.legend.views { background: var(--sand-deep, #E8DCC8); } .legend.visitors { background: var(--primary); }
.share { display: inline-block; width: var(--w); max-width: 120px; height: 8px; background: var(--primary); border-radius: 4px; vertical-align: middle; }
a.kpi { color: inherit; }

/* Test-environment strip (SITE_ENV_LABEL, e.g. QA). Never shown in production. */
.env-banner { background:#b45309; color:#fff; text-align:center; font-size:13px; font-weight:600; letter-spacing:.02em; padding:6px 16px; }

