/* ============================================================
   ZOOLIA.AI — MAIN STYLESHEET
   Clean · Modern · AI-Forward
   ============================================================ */

/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* --- Design Tokens --- */
:root {
  --brand:          #5F5CE8;
  --brand-dark:     #4745B5;
  --brand-light:    #EEEEFF;
  --brand-glow:     rgba(95, 92, 232, 0.15);

  --bg:             #FFFFFF;
  --bg-soft:        #F8F8FC;
  --bg-subtle:      #F3F3FA;

  --text:           #000000;
  --text-muted:     #6B7280;
  --text-light:     #9CA3AF;

  --border:         #E5E7EB;
  --border-light:   #F1F1F6;

  --green:          #10B981;
  --amber:          #F59E0B;
  --red:            #EF4444;

  --radius-xs:      4px;
  --radius-sm:      8px;
  --radius-md:      12px;
  --radius-lg:      16px;
  --radius-xl:      24px;
  --radius-2xl:     32px;
  --radius-full:    9999px;

  --shadow-xs:      0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm:      0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:      0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg:      0 8px 40px rgba(0,0,0,0.10);
  --shadow-xl:      0 16px 60px rgba(0,0,0,0.12);
  --shadow-brand:   0 0 0 3px var(--brand-glow);

  --nav-h:          72px;
  --container:      1280px;
  --ease:           cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a   { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul  { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1 { font-size: clamp(2.25rem, 4.5vw, 3.75rem); font-weight: 800; line-height: 1.12; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.5rem, 2.5vw, 2rem);  font-weight: 700; line-height: 1.2;  letter-spacing: -0.02em; }
h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.3; }
h4 { font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }

.gradient-text {
  background: linear-gradient(135deg, #5F5CE8 0%, #8B5CF6 50%, #EC4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav gets full-width container so logo/actions hug the edges */
.nav .container {
  max-width: 100%;
  padding: 0 40px;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255,255,255,0.90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  z-index: 200;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-wordmark {
  font-size: 2.15rem;
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #000000;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.logo-tagline {
  font-size: 0.48rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}


/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.18s var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--bg-soft);
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}


/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s var(--ease);
  border: 1.5px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.btn-primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover {
  background: var(--bg-soft);
  color: var(--text);
}

.btn-outline {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand);
}
.btn-outline:hover {
  background: var(--brand-light);
}

.btn-white {
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.btn-white:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 0.9375rem;
  border-radius: var(--radius-full);
}

/* ============================================================
   BADGES / TAGS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-brand    { background: var(--brand-light); color: var(--brand); }
.badge-green    { background: #ECFDF5; color: #065F46; }
.badge-amber    { background: #FFFBEB; color: #92400E; }
.badge-red      { background: #FEF2F2; color: #991B1B; }
.badge-dark     { background: rgba(0,0,0,0.7); color: #fff; backdrop-filter: blur(4px); }

.ai-icon { font-size: 0.7em; }

/* ============================================================
   SECTION SCAFFOLD
   ============================================================ */
section { padding: 80px 0; }

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--brand-light);
  color: var(--brand);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 56px;
}

.section-header h2 { margin-bottom: 12px; }
.section-header p  { color: var(--text-muted); font-size: 1.0625rem; }

.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

.section-header-row h2 { margin-bottom: 6px; }
.section-header-row p  { color: var(--text-muted); }

/* ============================================================
   HAMBURGER BUTTON
   ============================================================ */
.hamburger-btn {
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.hamburger-btn:hover {
  border-color: var(--brand);
  background: var(--brand-light);
}

.hamburger-btn {
  display: grid;
  grid-template-columns: repeat(3, 5px);
  grid-template-rows: repeat(3, 5px);
  gap: 3.5px;
  justify-content: center;
  align-content: center;
}

.hamburger-btn span {
  display: block;
  width: 5px;
  height: 5px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1),
              opacity   0.3s cubic-bezier(0.4,0,0.2,1),
              background 0.18s var(--ease);
}

.hamburger-btn:hover span { background: var(--brand); }

/* Open state — dots scatter outward */
.hamburger-btn.open span:nth-child(1) { transform: translate(-2px, -2px) scale(0.7); opacity: 0.4; }
.hamburger-btn.open span:nth-child(2) { transform: translateY(-2px) scale(0.7);       opacity: 0.4; }
.hamburger-btn.open span:nth-child(3) { transform: translate(2px, -2px) scale(0.7);  opacity: 0.4; }
.hamburger-btn.open span:nth-child(4) { transform: translateX(-2px) scale(0.7);       opacity: 0.4; }
.hamburger-btn.open span:nth-child(5) { transform: scale(1.3); background: var(--brand); opacity: 1; }
.hamburger-btn.open span:nth-child(6) { transform: translateX(2px) scale(0.7);        opacity: 0.4; }
.hamburger-btn.open span:nth-child(7) { transform: translate(-2px, 2px) scale(0.7);  opacity: 0.4; }
.hamburger-btn.open span:nth-child(8) { transform: translateY(2px) scale(0.7);        opacity: 0.4; }
.hamburger-btn.open span:nth-child(9) { transform: translate(2px, 2px) scale(0.7);   opacity: 0.4; }

/* ============================================================
   MENU OVERLAY + SLIDE-IN PANEL
   ============================================================ */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}

.menu-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 340px;
  max-width: 88vw;
  background: var(--bg);
  z-index: 301;
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -12px 0 60px rgba(0,0,0,0.12);
  overflow-y: auto;
}

.menu-panel.open {
  transform: translateX(0);
}

.menu-panel-inner {
  display: flex;
  flex-direction: column;
  padding: 28px 32px 40px;
  min-height: 100%;
}

.menu-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}


.menu-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s var(--ease);
}

.menu-close-btn:hover {
  border-color: var(--text);
  color: var(--text);
}

.menu-nav {
  display: flex;
  flex-direction: column;
}

.menu-nav a {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
  transition: color 0.15s var(--ease);
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.01em;
}

.menu-nav a:first-child { border-top: 1px solid var(--border-light); }

.menu-nav a:hover { color: var(--brand); }

.menu-nav.menu-nav-secondary a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.menu-nav.menu-nav-secondary a:hover { color: var(--text); }

.menu-divider {
  height: 1px;
  background: var(--border-light);
  margin: 24px 0;
}

.menu-panel-footer {
  margin-top: auto;
  padding-top: 32px;
}

/* ============================================================
   HERO — HOMEPAGE
   ============================================================ */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + 80px) 0 80px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 60% at 60% -10%, rgba(95,92,232,0.10) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 10% 80%,  rgba(139,92,246,0.06) 0%, transparent 60%),
    var(--bg);
}

.hero-content {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.hero h1 { margin-bottom: 20px; }

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.65;
}

/* AI Search Bar — sits directly below subtitle now, no toggle above */
.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 8px 8px 8px 22px;
  box-shadow: var(--shadow-lg);
  transition: all 0.2s var(--ease);
  margin-bottom: 18px;
}

.search-bar:focus-within {
  border-color: var(--brand);
  box-shadow: var(--shadow-brand), var(--shadow-lg);
}

.search-ai-icon {
  color: var(--brand);
  flex-shrink: 0;
  opacity: 0.7;
  display: flex;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  color: var(--text);
  background: transparent;
  font-family: inherit;
  padding-left: 12px;
}

.search-input::placeholder { color: var(--text-light); }

.search-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: all 0.18s var(--ease);
  flex-shrink: 0;
}

.search-submit:hover {
  opacity: 0.9;
  transform: scale(1.08);
  box-shadow: var(--shadow-md);
}

/* Suggestions */
.search-suggestions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.suggestions-label {
  font-size: 0.8125rem;
  color: var(--text-light);
  font-weight: 500;
}

.suggestion-chip {
  padding: 7px 14px;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s var(--ease);
  font-family: inherit;
}

.suggestion-chip:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-light);
  transform: translateY(-1px);
}

/* Hero BG decoration */
.hero-bg-decoration {
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(95,92,232,0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* ============================================================
   AGENCY TICKER
   ============================================================ */
.agency-ticker {
  padding: 32px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-soft);
  overflow: hidden;
}

.ticker-label {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-light);
  text-transform: uppercase;
  margin-bottom: 20px;
}

.ticker-track-wrap {
  overflow: hidden;
  /* fade edges */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 56px;
  width: max-content;
  animation: ticker-scroll 28s linear infinite;
}

.ticker-track img {
  height: 52px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  filter: grayscale(100%) opacity(0.45);
  transition: filter 0.2s ease;
}

.ticker-track img:hover {
  filter: grayscale(100%) opacity(0.7);
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   FEATURES SECTION
   ============================================================ */
.features-section { background: var(--bg); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 28px;
  background: var(--bg-soft);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  transition: all 0.2s var(--ease);
}

.feature-card:hover {
  background: #fff;
  border-color: var(--border);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-icon {
  width: 46px; height: 46px;
  background: var(--brand-light);
  color: var(--brand);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.feature-card h3 { margin-bottom: 10px; }
.feature-card p  { color: var(--text-muted); font-size: 0.9375rem; line-height: 1.65; }

/* ============================================================
   PROPERTY LISTING CARDS
   ============================================================ */
.listings-section { background: var(--bg-soft); }

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

.listing-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
  transition: all 0.22s var(--ease);
  display: block;
  cursor: pointer;
}

.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border);
}

.listing-image-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-soft);
}

.listing-image-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}

.listing-card:hover .listing-image-wrap img {
  transform: scale(1.04);
}

.listing-badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 10px;
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.listing-badge-new     { background: var(--green); }
.listing-badge-reduced { background: var(--amber); color: var(--text); }

.listing-save {
  position: absolute;
  top: 10px; right: 10px;
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.92);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: all 0.18s var(--ease);
  backdrop-filter: blur(4px);
}

.listing-save:hover {
  color: var(--red);
  background: #fff;
  transform: scale(1.1);
}

.listing-save.saved { color: var(--red); }
.listing-save.saved svg { fill: currentColor; }

.listing-info { padding: 16px; }

.listing-ai-tag {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--brand);
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}

.listing-ai-tag svg {
  flex-shrink: 0;
}

.listing-price {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 5px;
}

.listing-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.listing-specs {
  display: flex;
  gap: 10px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.listing-specs span {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* ============================================================
   POPULAR AREAS
   ============================================================ */
.areas-section { background: var(--bg); }

.areas-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 220px 220px;
  gap: 16px;
}

/* South Africa gets extra width */
.areas-grid .area-card:nth-child(1) { grid-column: span 2; }

.area-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: block;
  background: var(--bg-soft);
}


.area-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}

.area-card:hover img { transform: scale(1.05); }

.area-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px 20px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 100%);
  color: #fff;
}

.area-overlay h3 {
  font-size: 1.125rem;
  color: #fff;
  margin-bottom: 3px;
}

.area-overlay span {
  font-size: 0.8125rem;
  opacity: 0.8;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 32px;
}

.footer .logo-wordmark { color: #fff; }
.footer .logo-tagline  { color: rgba(255,255,255,0.45); }

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 60px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 28px;
}

.footer-brand p {
  margin-top: 16px;
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 280px;
}

.footer-brand p a {
  color: rgba(255,255,255,0.8);
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer-col h4 {
  color: rgba(255,255,255,0.4);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 10px; }

.footer-col a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  transition: color 0.15s;
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
}

.footer-bottom-links a {
  color: rgba(255,255,255,0.4);
  transition: color 0.15s;
}

.footer-bottom-links a:hover { color: rgba(255,255,255,0.8); }

.footer-bottom a {
  color: rgba(255,255,255,0.5);
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.menu-panel-footer .btn-primary {
  width: 100%;
  justify-content: center;
}

/* ============================================================
   RESULTS PAGE
   ============================================================ */

/* Compact search bar for results/detail nav */
.nav-search-compact {
  flex: 1;
  max-width: 500px;
  margin: 0 24px;
}

.search-bar-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 9px 9px 9px 16px;
  transition: all 0.18s var(--ease);
}

.search-bar-compact:focus-within {
  background: #fff;
  border-color: var(--brand);
  box-shadow: var(--shadow-brand);
}

.search-bar-compact input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.875rem;
  color: var(--text);
  background: transparent;
  font-family: inherit;
}

.search-bar-compact input::placeholder { color: var(--text-light); }

.search-bar-compact button {
  width: 32px; height: 32px;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.search-bar-compact button:hover { background: var(--brand-dark); }

/* Results Layout */
.results-page { padding-top: var(--nav-h); }

.results-filters-bar {
  background: #fff;
  border-bottom: 1px solid var(--border-light);
  padding: 14px 0;
  position: sticky;
  top: var(--nav-h);
  z-index: 100;
}

.filters-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 0 24px;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  background: #fff;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s var(--ease);
  font-family: inherit;
}

.filter-btn:hover, .filter-btn.active {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-light);
}

.filter-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  flex-shrink: 0;
}

.filter-ai-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  font-family: inherit;
  margin-left: auto;
}

.filter-ai-btn:hover { background: var(--brand-dark); }

/* Split Layout */
.results-split {
  display: grid;
  grid-template-columns: 56% 44%;
  min-height: calc(100vh - var(--nav-h) - 57px);
}

.results-list-panel {
  padding: 24px 100px 48px;
  overflow-y: auto;
  border-right: 1px solid var(--border-light);
}

.results-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.results-count {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.results-count strong { color: var(--text); }

.results-ai-summary {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  background: var(--brand-light);
  border: 1px solid rgba(95,92,232,0.15);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.results-ai-summary .ai-icon-circle {
  width: 28px; height: 28px;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.results-ai-summary p {
  font-size: 0.875rem;
  color: var(--brand-dark);
  line-height: 1.55;
}

.results-ai-summary p strong { font-weight: 600; }

.sort-select {
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  background: #fff;
  cursor: pointer;
  outline: none;
  font-family: inherit;
}

/* Results List - Horizontal Cards */
.results-listings { display: flex; flex-direction: column; gap: 16px; }

.result-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  transition: all 0.2s var(--ease);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.result-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.result-card.highlighted {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-glow);
}

.result-image {
  position: relative;
  overflow: hidden;
  background: var(--bg-soft);
}

.result-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}

.result-card:hover .result-image img { transform: scale(1.04); }

.result-image .listing-badge {
  top: 8px; left: 8px;
  font-size: 0.65rem;
}

.result-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.result-price {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.result-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.35;
}

.result-location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.result-specs {
  display: flex;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 12px;
}

.result-ai-insights {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

.insight-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.insight-chip.ai {
  background: var(--brand-light);
  border-color: transparent;
  color: var(--brand);
}

/* Map Panel */
.results-map-panel {
  position: sticky;
  top: calc(var(--nav-h) + 57px);
  height: calc(100vh - var(--nav-h) - 57px);
  background: #E8EDF3;
  overflow: hidden;
}

.map-placeholder {
  width: 100%;
  height: 100%;
  position: relative;
  background:
    linear-gradient(rgba(200,210,225,0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,210,225,0.3) 1px, transparent 1px),
    linear-gradient(160deg, #D4E0ED 0%, #E8EDF3 40%, #D8E4EF 100%);
  background-size: 40px 40px, 40px 40px, 100% 100%;
}

.map-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  cursor: pointer;
}

.map-pin-bubble {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  transition: all 0.15s var(--ease);
}

.map-pin:hover .map-pin-bubble,
.map-pin.active .map-pin-bubble {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  transform: scale(1.05);
}

.map-pin-dot {
  width: 8px; height: 8px;
  background: var(--brand);
  border-radius: 50%;
  margin: 3px auto 0;
}

.map-controls {
  position: absolute;
  bottom: 24px; right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.map-ctrl-btn {
  width: 38px; height: 38px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: all 0.15s;
}

.map-ctrl-btn:hover { box-shadow: var(--shadow-md); color: var(--text); }

.map-type-btn {
  position: absolute;
  bottom: 24px; left: 16px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  font-family: inherit;
}

/* ============================================================
   PROPERTY DETAIL PAGE
   ============================================================ */
.detail-page { padding-top: var(--nav-h); }

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 460px;
  gap: 6px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin: 20px 0;
}

.gallery-main {
  position: relative;
  overflow: hidden;
  background: var(--bg-soft);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.gallery-main img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}

.gallery-main:hover img { transform: scale(1.03); }

.gallery-thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  height: 460px;
}

.gallery-thumb {
  position: relative;
  overflow: hidden;
  background: var(--bg-soft);
  min-height: 0;
  min-width: 0;
}

.gallery-thumb:nth-child(2) { border-radius: 0 var(--radius-lg) 0 0; }
.gallery-thumb:nth-child(4) { border-radius: 0 0 var(--radius-lg) 0; }

.gallery-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}

.gallery-thumb:hover img { transform: scale(1.04); }

.gallery-view-all {
  position: absolute;
  bottom: 12px; right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(255,255,255,0.95);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.15s var(--ease);
  backdrop-filter: blur(4px);
}

.gallery-view-all:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

/* Detail Layout */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 48px;
  padding: 40px 0 80px;
  align-items: start;
}

.detail-main { min-width: 0; }

.detail-header { margin-bottom: 28px; }

.detail-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.detail-price {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.detail-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.detail-location {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.detail-specs-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 32px;
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spec-label {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.spec-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

/* AI Insights Panel */
.ai-insights-panel {
  background: linear-gradient(135deg, var(--brand-light) 0%, rgba(139,92,246,0.05) 100%);
  border: 1px solid rgba(95,92,232,0.15);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
}

.ai-insights-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.ai-insights-icon {
  width: 36px; height: 36px;
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
}

.ai-insights-header h3 { font-size: 1rem; }
.ai-insights-header p  { font-size: 0.8125rem; color: var(--text-muted); }

.insights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.insight-card {
  background: rgba(255,255,255,0.8);
  border-radius: var(--radius-md);
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.6);
}

.insight-card-icon {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.insight-card-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.insight-card-value {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
}

.insight-card-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Description */
.detail-section { margin-bottom: 36px; }
.detail-section h3 { margin-bottom: 14px; }
.detail-section p  { color: var(--text-muted); font-size: 0.9375rem; line-height: 1.75; }

.detail-section p + p { margin-top: 12px; }

/* Features List */
.features-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.features-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.features-list li::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--brand);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Map Placeholder (Detail) */
.detail-map {
  height: 320px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background:
    linear-gradient(rgba(200,210,225,0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,210,225,0.3) 1px, transparent 1px),
    linear-gradient(160deg, #D4E0ED 0%, #E8EDF3 40%, #D8E4EF 100%);
  background-size: 40px 40px, 40px 40px, 100% 100%;
  position: relative;
  margin-bottom: 36px;
}

.detail-map-pin {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -100%);
}

/* Contact Sidebar */
.contact-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

.contact-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.contact-card-price {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.contact-card-sub {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.contact-agent {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.agent-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--bg-soft);
  overflow: hidden;
  flex-shrink: 0;
}

.agent-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.agent-name  { font-weight: 600; font-size: 0.9rem; }
.agent-agency {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.contact-btns { display: flex; flex-direction: column; gap: 10px; }

.contact-btns .btn {
  border-radius: var(--radius-md);
  padding: 13px 20px;
  font-size: 0.9375rem;
  justify-content: center;
}

.bond-calc-card {
  background: var(--bg-soft);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.bond-calc-card h4 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 16px;
}

.bond-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-light);
}

.bond-row:last-of-type { border-bottom: none; font-weight: 700; }
.bond-row span:first-child { color: var(--text-muted); }

/* Similar Properties */
.similar-section {
  padding: 60px 0;
  background: var(--bg-soft);
  border-top: 1px solid var(--border-light);
}

/* ============================================================
   UTILITY
   ============================================================ */
.text-muted   { color: var(--text-muted); }
.text-sm      { font-size: 0.875rem; }
.text-xs      { font-size: 0.75rem; }
.font-semibold { font-weight: 600; }
.font-bold    { font-weight: 700; }
.mt-4  { margin-top: 16px; }
.mb-4  { margin-bottom: 16px; }
.flex  { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ============================================================
   RESPONSIVE — TABLET  (max 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .features-grid    { grid-template-columns: repeat(2, 1fr); }
  .listings-grid    { grid-template-columns: repeat(2, 1fr); }
  .detail-layout    { grid-template-columns: 1fr; }
  .contact-sidebar  { position: static; }
  .results-split    { grid-template-columns: 1fr; }
  .results-map-panel { display: none; }
  .footer-top       { grid-template-columns: 1fr; gap: 36px; }
  .footer-links     { grid-template-columns: repeat(3, 1fr); }
  .areas-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 160px);
  }
}

/* ============================================================
   RESPONSIVE — MOBILE  (max 640px)
   ============================================================ */
@media (max-width: 640px) {

  /* --- Nav --- */
  .nav-links { display: none; }
  .nav-icon-btn .nav-icon-label { display: none; }
  .nav-icon-btn { padding: 8px; }
  .nav .btn-ghost { display: inline-flex; }
  .btn-primary { padding: 9px 14px; font-size: 0.8125rem; }
  .nav-picker { right: 8px; }

  /* --- Container --- */
  .container { padding: 0 16px; }

  /* --- Sections --- */
  section { padding: 52px 0; }

  /* --- Hero --- */
  .hero { padding: calc(var(--nav-h) + 48px) 0 52px; }
  .hero-subtitle { font-size: 1rem; }

  .search-bar {
    padding: 6px 6px 6px 16px;
    border-radius: var(--radius-full);
    gap: 8px;
  }
  .search-input { font-size: 0.9rem; }

  .search-suggestions { gap: 6px; }
  .suggestion-chip { padding: 6px 12px; font-size: 0.75rem; }

  /* --- Agency ticker --- */
  .ticker-track { gap: 32px; }
  .ticker-track img { height: 40px; }

  /* --- Section header row --- */
  .section-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .section-header-row .btn { width: 100%; justify-content: center; }

  /* --- Features grid --- */
  .features-grid { grid-template-columns: 1fr; gap: 12px; }
  .feature-card { padding: 20px; }

  /* --- Listings grid --- */
  .listings-grid { grid-template-columns: 1fr; gap: 16px; }
  .listing-price { font-size: 1.1rem; }
  .listing-specs { gap: 10px; font-size: 0.75rem; flex-wrap: wrap; }
  .listing-badge { font-size: 0.65rem; padding: 3px 8px; }

  /* --- Areas grid --- */
  .areas-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(5, 150px);
  }
  .area-overlay h3 { font-size: 1rem; }
  .area-overlay span { font-size: 0.75rem; }

  /* --- Results page --- */
  .results-list-panel { padding: 16px 16px 40px; }
  .results-meta { flex-direction: column; align-items: flex-start; gap: 8px; }
  .result-card { grid-template-columns: 140px 1fr; }
  .result-price { font-size: 1.1rem; }
  .result-ai-insights { display: none; }

  /* --- Property detail --- */
  .gallery {
    grid-template-columns: 1fr;
    height: 260px;
    border-radius: var(--radius-md);
  }
  .gallery-main { border-radius: var(--radius-md); }
  .gallery-thumbs { display: none; }

  .detail-price { font-size: 1.75rem; }
  .detail-title { font-size: 1.25rem; }
  .detail-specs-bar { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .insights-grid { grid-template-columns: 1fr; }
  .travel-times { grid-template-columns: 1fr; }
  .features-list { grid-template-columns: repeat(2, 1fr); }
  .amenities-grid { grid-template-columns: 1fr; }

  /* --- Footer --- */
  .footer-links { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
  .footer-bottom-links { flex-wrap: wrap; justify-content: center; gap: 16px; }
  .footer-brand p { max-width: 100%; }
}


/* ============================================================
   AI RESULTS PAGE LAYOUT
   ============================================================ */

/* Prevent body scroll — panels manage their own scrolling */
.results-body {
  overflow: hidden;
  height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 272px;
  background: var(--bg);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
}

.sidebar-logo {
  padding: 22px 18px 12px;
  flex-shrink: 0;
}


/* Scrollable nav area */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar-section {
  padding: 10px 0 4px;
}

.sidebar-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-light);
  padding: 0 8px;
  margin-bottom: 3px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.8375rem;
  color: var(--text);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.sidebar-item:hover {
  background: var(--bg-soft);
  color: var(--text);
}

.sidebar-item--active {
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 600;
}

.sidebar-item--active .sidebar-item-icon { opacity: 1; }

.sidebar-item-icon { flex-shrink: 0; opacity: 0.4; }

.sidebar-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Chip style for trending items */
.sidebar-item--chip {
  font-size: 0.8rem;
  color: var(--text);
  padding: 5px 8px;
}

.sidebar-item--chip::before {
  content: '↗';
  font-size: 0.7rem;
  opacity: 0.4;
  margin-right: 2px;
}

/* Tool items (icon + label + optional badge) */
.sidebar-item--tool {
  gap: 10px;
}

.sidebar-tool-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  opacity: 0.5;
}

.sidebar-item--tool:hover .sidebar-tool-icon { opacity: 1; }

.sidebar-count {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--bg-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-full);
  padding: 2px 8px;
}

.sidebar-count--new {
  background: var(--brand-light);
  color: var(--brand);
}

.sidebar-sep {
  height: 1px;
  background: var(--border-light);
  margin: 10px 4px;
}

/* Footer auth */
.sidebar-footer {
  flex-shrink: 0;
  padding: 10px 10px 16px;
  border-top: 1px solid var(--border-light);
}

.sidebar-auth-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: background 0.15s var(--ease);
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}

.sidebar-auth-row:hover { background: var(--bg-subtle); }

.sidebar-auth-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
}

.sidebar-auth-text { flex: 1; min-width: 0; }

.sidebar-auth-name {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}

.sidebar-auth-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--text-light);
}

.sidebar-auth-sub a {
  color: var(--brand);
  font-weight: 500;
}

/* ---- Main Panel ---- */
.main-panel {
  margin-left: 272px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Sticky search top bar */
.ai-topbar {
  flex-shrink: 0;
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg);
}

.ai-search-wrap {
  margin: 0 auto;
}

.ai-search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 8px 8px 8px 20px;
  transition: all 0.2s var(--ease);
  margin-bottom: 10px;
}

.ai-search-bar:focus-within {
  background: #fff;
  border-color: var(--brand);
  box-shadow: var(--shadow-brand);
}

.ai-search-brain {
  flex-shrink: 0;
  color: var(--brand);
}

.ai-search-bar input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.9375rem;
  color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.ai-search-bar input::placeholder { color: var(--text-light); }

/* Meta row below search */
.ai-topbar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-meta-count {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
}

.ai-meta-sep { color: var(--border); }

.ai-meta-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ai-meta-map-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: all 0.15s var(--ease);
}

.ai-meta-map-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* ---- Scrollable results area ---- */
.results-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 28px 24px 56px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* ---- AI Response block ---- */
.ai-response-block {
  display: flex;
  gap: 14px;
  margin: 0 auto 28px;
  padding: 18px 20px;
  background: var(--brand-light);
  border: 1px solid rgba(95, 92, 232, 0.14);
  border-radius: var(--radius-lg);
}

.ai-response-avatar {
  width: 30px;
  height: 30px;
  min-width: 30px;
  background: var(--brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-top: 2px;
}

.ai-response-content p {
  font-size: 0.9125rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 12px;
}

.ai-response-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-chip {
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(95, 92, 232, 0.1);
  color: var(--brand);
  border-radius: var(--radius-full);
  padding: 3px 10px;
}

/* ---- Results List ---- */
.ai-results-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 1400px) {
  .ai-results-list { grid-template-columns: repeat(3, 1fr); }
}

/* ---- Result Card ---- */
.ai-card {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: all 0.22s var(--ease);
}

.ai-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border);
}

.ai-card-img {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-soft);
}

.ai-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}

.ai-card:hover .ai-card-img img { transform: scale(1.04); }

/* AI Match badge */
.ai-match-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  padding: 4px 9px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.ai-match--green  { background: rgba(16,185,129,0.15);  color: #059669; }
.ai-match--purple { background: rgba(95,92,232,0.15);   color: #4F4DE8; }
.ai-match--amber  { background: rgba(234,179,8,0.2);    color: #B45309; }

.ai-card-insight--green  { color: #059669; }
.ai-card-insight--purple { color: #4F4DE8; }

.ai-card-img .listing-save {
  position: absolute;
  top: 10px;
  right: 10px;
}

.ai-card-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-card-insight {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 4px;
}

.ai-card-insight--amber { color: var(--amber); }

.ai-card-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.ai-card-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.ai-card-address {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 10px;
}

.ai-card-specs {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
  margin-top: 4px;
}

.ai-card-psm {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ---- Load more ---- */
.results-more {
  margin: 28px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.results-more-label {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ---- Mobile top bar ---- */
.mobile-topbar {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border-light);
  z-index: 150;
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
}

.mobile-sidebar-toggle {
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  display: grid;
  grid-template-columns: repeat(3, 5px);
  grid-template-rows: repeat(3, 5px);
  gap: 3px;
  justify-content: center;
  align-content: center;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.mobile-sidebar-toggle span {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform 0.22s var(--ease), opacity 0.22s var(--ease),
              background 0.18s var(--ease);
}

.mobile-sidebar-toggle:hover {
  border-color: var(--brand);
  background: var(--brand-light);
}

.mobile-sidebar-toggle:hover span { background: var(--brand); }

.mobile-sidebar-toggle.open span:nth-child(1) { transform: translate(-2px,-2px) scale(0.7); opacity: 0.4; }
.mobile-sidebar-toggle.open span:nth-child(2) { transform: translateY(-2px) scale(0.7);      opacity: 0.4; }
.mobile-sidebar-toggle.open span:nth-child(3) { transform: translate(2px,-2px) scale(0.7);   opacity: 0.4; }
.mobile-sidebar-toggle.open span:nth-child(4) { transform: translateX(-2px) scale(0.7);      opacity: 0.4; }
.mobile-sidebar-toggle.open span:nth-child(5) { transform: scale(1.3); background: var(--brand); opacity: 1; }
.mobile-sidebar-toggle.open span:nth-child(6) { transform: translateX(2px) scale(0.7);       opacity: 0.4; }
.mobile-sidebar-toggle.open span:nth-child(7) { transform: translate(-2px,2px) scale(0.7);   opacity: 0.4; }
.mobile-sidebar-toggle.open span:nth-child(8) { transform: translateY(2px) scale(0.7);       opacity: 0.4; }
.mobile-sidebar-toggle.open span:nth-child(9) { transform: translate(2px,2px) scale(0.7);    opacity: 0.4; }

/* Guarantee logo is pixel-perfectly centred on every page */
.mobile-topbar .nav-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}


/* ---- Sidebar overlay (mobile) ---- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(2px);
  z-index: 99;
}

.sidebar-overlay.open { display: block; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.32s cubic-bezier(0.4,0,0.2,1);
    z-index: 200;
    box-shadow: none;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }

  .mobile-topbar { display: flex; }

  .main-panel {
    margin-left: 0;
    height: 100vh;
    padding-top: var(--nav-h);
  }
}

@media (max-width: 768px) {
  .ai-results-list { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

/* AI response read-more */
.ai-response-more-text { display: none; }
.ai-response-read-more {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: inherit;
  color: var(--brand);
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 640px) {
  .ai-topbar { padding: 12px 16px 10px; }

  .results-scroll { padding: 16px 16px 40px; }

  .ai-response-block { flex-direction: column; gap: 10px; }

  .ai-results-list { grid-template-columns: 1fr; gap: 12px; }

  .ai-card-price { font-size: 1rem; }
}
