/* ═══════════════════════════════════════════════════
   EstateIQ — Design System
   Theme: Luxury Editorial Dark
   Fonts: Playfair Display + DM Sans
═══════════════════════════════════════════════════ */

:root {
  /* Colors */
  --ink:        #0a0a0f;
  --ink-2:      #12121a;
  --ink-3:      #1c1c28;
  --surface:    #1e1e2e;
  --border:     rgba(255,255,255,0.08);
  --border-2:   rgba(255,255,255,0.14);
  --gold:       #c9a84c;
  --gold-light: #e8c97a;
  --gold-dim:   rgba(201,168,76,0.15);
  --teal:       #4ecdc4;
  --teal-dim:   rgba(78,205,196,0.12);
  --white:      #f5f4f0;
  --white-60:   rgba(245,244,240,0.6);
  --white-30:   rgba(245,244,240,0.3);
  --white-10:   rgba(245,244,240,0.1);
  --red:        #e05a5a;
  --green:      #5acea0;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* Spacing */
  --header-h:    72px;
  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   22px;
  --radius-xl:   32px;

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0,0,0,0.4), 0 1px 4px rgba(0,0,0,0.3);
  --shadow-hover: 0 12px 40px rgba(0,0,0,0.6), 0 2px 8px rgba(0,0,0,0.4);
  --shadow-gold:  0 0 24px rgba(201,168,76,0.2);
  --transition:   0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--ink-2); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }

/* ══════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h);
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), box-shadow var(--transition);
}
.site-header.scrolled {
  background: rgba(10,10,15,0.97);
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}
.header-inner {
  max-width: 1400px; margin: 0 auto;
  height: 100%; padding: 0 32px;
  display: flex; align-items: center; gap: 40px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.logo-icon {
  font-size: 22px; color: var(--gold);
  filter: drop-shadow(0 0 8px rgba(201,168,76,0.6));
}
.logo-text {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700;
  color: var(--white);
  letter-spacing: 0.03em;
}
.main-nav {
  display: flex; align-items: center; gap: 4px;
  margin-left: 16px; flex: 1;
}
.nav-link {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  color: var(--white-60);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--white);
  background: var(--white-10);
}
.nav-link.active { color: var(--gold); }
.header-actions {
  display: flex; align-items: center; gap: 12px; margin-left: auto;
}
.btn-outline-sm {
  padding: 8px 20px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  color: var(--white-60);
  transition: all var(--transition);
}
.btn-outline-sm:hover {
  border-color: var(--gold); color: var(--gold);
}
.btn-primary-sm {
  padding: 8px 20px;
  background: var(--gold);
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  color: var(--ink);
  transition: all var(--transition);
}
.btn-primary-sm:hover {
  background: var(--gold-light);
  box-shadow: var(--shadow-gold);
}
.hamburger {
  display: none; flex-direction: column;
  justify-content: center; gap: 5px;
  width: 36px; height: 36px; padding: 6px;
}
.hamburger span {
  display: block; height: 2px;
  background: var(--white); border-radius: 2px;
  transition: all var(--transition);
}

/* ══════════════════════════════════════════════
   HERO — HOME PAGE
══════════════════════════════════════════════ */
.hero {
  min-height: 92vh;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  text-align: center;
  padding: calc(var(--header-h) + 60px) 32px 80px;
  position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(201,168,76,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(78,205,196,0.05) 0%, transparent 50%),
    var(--ink);
}
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.015'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; max-width: 760px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 16px;
  background: var(--gold-dim);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 100px;
  font-size: 12px; font-weight: 600;
  color: var(--gold); letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 28px;
}
.hero-eyebrow::before {
  content: ''; display: block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 82px);
  font-weight: 700; line-height: 1.08;
  color: var(--white);
  margin-bottom: 22px;
}
.hero-title em {
  font-style: italic; color: var(--gold);
  text-shadow: 0 0 40px rgba(201,168,76,0.3);
}
.hero-sub {
  font-size: 18px; color: var(--white-60);
  margin-bottom: 50px; line-height: 1.65;
  font-weight: 300;
}

/* Search Box */
.search-box {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xl);
  padding: 8px 8px 8px 28px;
  display: flex; align-items: center; gap: 12px;
  max-width: 680px; width: 100%;
  margin: 0 auto;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-box:focus-within {
  border-color: rgba(201,168,76,0.4);
  box-shadow: 0 8px 40px rgba(0,0,0,0.4), 0 0 0 3px rgba(201,168,76,0.1);
}
.search-tabs {
  display: flex; gap: 2px; flex-shrink: 0;
}
.search-tab {
  padding: 8px 18px; border-radius: var(--radius-md);
  font-size: 13px; font-weight: 600;
  color: var(--white-60); cursor: pointer;
  transition: all var(--transition);
}
.search-tab.active {
  background: var(--gold); color: var(--ink);
}
.search-divider {
  width: 1px; height: 28px;
  background: var(--border-2); flex-shrink: 0;
}
.search-input-wrap { flex: 1; position: relative; }
.search-input-wrap input {
  width: 100%; background: none;
  border: none; outline: none;
  font-size: 15px; color: var(--white);
  padding: 8px 0;
}
.search-input-wrap input::placeholder { color: var(--white-30); }
.search-btn {
  padding: 12px 28px;
  background: var(--gold); border-radius: var(--radius-lg);
  font-size: 14px; font-weight: 700;
  color: var(--ink); flex-shrink: 0;
  transition: all var(--transition);
  display: flex; align-items: center; gap: 8px;
}
.search-btn:hover {
  background: var(--gold-light);
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}
.hero-stats {
  display: flex; justify-content: center; gap: 48px;
  margin-top: 60px; position: relative; z-index: 1;
}
.hero-stat-num {
  font-family: var(--font-display);
  font-size: 36px; font-weight: 700;
  color: var(--white);
}
.hero-stat-label {
  font-size: 12px; color: var(--white-30);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-top: 4px;
}

/* ══════════════════════════════════════════════
   SEARCH / LISTING PAGE LAYOUT
══════════════════════════════════════════════ */
.search-page {
  display: flex; flex-direction: column;
  height: 100vh; overflow: hidden;
  padding-top: var(--header-h);
}
.search-toolbar {
  flex-shrink: 0;
  background: var(--ink-2);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap;
}
.filter-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1; }
.filter-select, .filter-input {
  appearance: none;
  background: var(--ink-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font-size: 13px; color: var(--white);
  outline: none;
  transition: border-color var(--transition);
  cursor: pointer;
}
.filter-select { padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23ffffff60' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.filter-select:focus, .filter-input:focus { border-color: var(--gold); }
.filter-input { min-width: 200px; }
.search-apply-btn {
  padding: 9px 22px;
  background: var(--gold); border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700; color: var(--ink);
  transition: all var(--transition); flex-shrink: 0;
}
.search-apply-btn:hover { background: var(--gold-light); }
.result-count {
  font-size: 13px; color: var(--white-30);
  flex-shrink: 0; white-space: nowrap;
}
.result-count strong { color: var(--white); }

/* Split view */
.split-view {
  flex: 1; display: flex; overflow: hidden; min-height: 0;
}
.map-panel {
  flex: 1; min-width: 0; position: relative;
}
#map {
  width: 100%; height: 100%;
}
.listings-panel {
  width: 420px; flex-shrink: 0;
  display: flex; flex-direction: column;
  background: var(--ink-2);
  border-left: 1px solid var(--border);
  overflow: hidden;
}
.listings-scroll {
  flex: 1; overflow-y: auto;
  padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
}
.listings-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.listings-header h3 {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 700;
}
.sort-select {
  appearance: none;
  background: var(--ink-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 28px 5px 10px;
  font-size: 12px; color: var(--white-60);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23ffffff60' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
  cursor: pointer; outline: none;
}

/* ── Listing Card ── */
.listing-card {
  background: var(--ink-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  display: flex; flex-direction: column;
}
.listing-card:hover, .listing-card.active {
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
  transform: translateY(-2px);
}
.listing-card.active { border-color: var(--teal); box-shadow: 0 0 20px rgba(78,205,196,0.2); }
.card-img {
  position: relative; aspect-ratio: 16/10; overflow: hidden;
}
.card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}
.listing-card:hover .card-img img { transform: scale(1.06); }
.card-badges {
  position: absolute; top: 10px; left: 10px;
  display: flex; gap: 6px; flex-wrap: wrap;
}
.badge {
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.badge-status-active    { background: rgba(90,206,160,0.9); color: #0a1a12; }
.badge-status-pending   { background: rgba(255,180,0,0.9);  color: #1a1000; }
.badge-type             { background: rgba(0,0,0,0.6); color: var(--white); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.15); }
.card-fav {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px;
  transition: all var(--transition);
}
.card-fav:hover { background: rgba(224,90,90,0.8); border-color: transparent; }
.card-body { padding: 14px 16px; flex: 1; }
.card-price {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700;
  color: var(--gold); line-height: 1.1;
  margin-bottom: 6px;
}
.card-price span { font-size: 13px; color: var(--white-30); font-family: var(--font-body); font-weight: 400; }
.card-address {
  font-size: 13px; color: var(--white-60);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 12px;
}
.card-features {
  display: flex; gap: 16px; flex-wrap: wrap;
}
.card-feat {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--white-60);
}
.card-feat svg { color: var(--white-30); flex-shrink: 0; }

/* ══════════════════════════════════════════════
   MAP CUSTOMIZATION
══════════════════════════════════════════════ */
.leaflet-container {
  background: #0a0a12 !important;
  font-family: var(--font-body);
}
.map-marker-price {
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 700; font-size: 12px;
  padding: 5px 10px;
  border-radius: 100px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  transition: all 0.15s;
  border: 2px solid transparent;
}
.map-marker-price:hover, .map-marker-price.active {
  background: var(--ink);
  color: var(--gold);
  border-color: var(--gold);
  transform: scale(1.1);
  z-index: 900 !important;
}
.leaflet-popup-content-wrapper {
  background: var(--ink-2) !important;
  border: 1px solid var(--border-2) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-card) !important;
  color: var(--white) !important;
  padding: 0 !important;
  overflow: hidden;
  max-width: 280px;
}
.leaflet-popup-tip { background: var(--ink-2) !important; }
.leaflet-popup-close-button { color: var(--white-60) !important; top: 10px !important; right: 10px !important; font-size: 18px !important; }
.map-popup-img { width: 100%; height: 150px; object-fit: cover; }
.map-popup-body { padding: 14px; }
.map-popup-price {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700; color: var(--gold);
  margin-bottom: 4px;
}
.map-popup-addr { font-size: 12px; color: var(--white-60); margin-bottom: 10px; }
.map-popup-feats {
  display: flex; gap: 12px;
  font-size: 12px; color: var(--white-60);
}
.map-popup-link {
  display: block; margin-top: 12px;
  padding: 8px; text-align: center;
  background: var(--gold-dim);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600; color: var(--gold);
  transition: all var(--transition);
}
.map-popup-link:hover { background: var(--gold); color: var(--ink); }

/* Map attribution */
.leaflet-control-attribution { background: rgba(10,10,15,0.7) !important; color: #555 !important; }
.leaflet-control-zoom a {
  background: var(--ink-3) !important;
  color: var(--white) !important;
  border-color: var(--border) !important;
}
.leaflet-control-zoom a:hover { background: var(--surface) !important; }

/* ══════════════════════════════════════════════
   DETAIL PAGE
══════════════════════════════════════════════ */
.detail-page { padding-top: var(--header-h); min-height: 100vh; }

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 360px 180px;
  gap: 4px;
  max-height: 544px; overflow: hidden;
}
.gallery-main { grid-row: 1 / 3; position: relative; overflow: hidden; }
.gallery-sub { position: relative; overflow: hidden; }
.gallery-grid img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
}
.gallery-grid img:hover { transform: scale(1.04); }
.gallery-main:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.gallery-grid > *:nth-child(2) { border-radius: 0 var(--radius-md) 0 0; }
.gallery-grid > *:nth-child(3) { border-radius: 0 0 var(--radius-md) 0; }
.gallery-more-btn {
  position: absolute; bottom: 14px; right: 14px;
  padding: 8px 16px;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600; color: var(--white);
  cursor: pointer; transition: all var(--transition);
}
.gallery-more-btn:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }

/* Detail layout */
.detail-layout {
  max-width: 1280px; margin: 0 auto;
  padding: 40px 32px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 48px; align-items: start;
}
.detail-main {}
.detail-sidebar { position: sticky; top: calc(var(--header-h) + 24px); }

.detail-address {
  font-size: 13px; color: var(--gold);
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 8px;
}
.detail-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700; line-height: 1.15;
  margin-bottom: 12px;
}
.detail-price {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700; color: var(--gold);
  margin-bottom: 24px;
}
.detail-price small { font-size: 16px; color: var(--white-30); font-family: var(--font-body); }

.detail-stats {
  display: flex; gap: 0;
  background: var(--ink-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 36px; overflow: hidden;
}
.detail-stat {
  flex: 1; padding: 20px 16px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.detail-stat:last-child { border-right: none; }
.stat-val {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 700; color: var(--white);
  margin-bottom: 4px; display: block;
}
.stat-lbl { font-size: 11px; color: var(--white-30); text-transform: uppercase; letter-spacing: 0.08em; }

/* Sections */
.detail-section { margin-bottom: 40px; }
.section-title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700;
  margin-bottom: 20px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.section-title::before {
  content: '';
  display: block; width: 3px; height: 22px;
  background: var(--gold); border-radius: 2px;
}

.detail-description {
  font-size: 15px; color: var(--white-60);
  line-height: 1.8;
}
.detail-description.collapsed { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.read-more-btn {
  margin-top: 12px; font-size: 13px;
  color: var(--gold); font-weight: 600;
  cursor: pointer; background: none; border: none;
  transition: color var(--transition);
}
.read-more-btn:hover { color: var(--gold-light); }

/* Features grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.feature-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 14px;
  background: var(--ink-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px; color: var(--white-60);
  transition: border-color var(--transition);
}
.feature-chip:hover { border-color: var(--border-2); }
.feature-chip .fi { color: var(--gold); font-size: 16px; }

/* Rooms table */
.rooms-table {
  width: 100%; border-collapse: collapse;
}
.rooms-table th, .rooms-table td {
  padding: 12px 16px;
  text-align: left; font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.rooms-table th {
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--white-30);
  background: var(--ink-3);
}
.rooms-table tr:hover td { background: var(--ink-3); }

/* Detail map */
#detailMap { height: 300px; border-radius: var(--radius-md); overflow: hidden; }

/* Sidebar card */
.sidebar-card {
  background: var(--ink-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
}
.sidebar-card h3 {
  font-family: var(--font-display);
  font-size: 18px; margin-bottom: 20px;
}
.sidebar-price {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 700; color: var(--gold);
  margin-bottom: 6px;
}
.sidebar-price-note { font-size: 12px; color: var(--white-30); margin-bottom: 24px; }
.contact-form { display: flex; flex-direction: column; gap: 12px; }
.form-input {
  width: 100%; padding: 12px 16px;
  background: var(--ink-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px; color: var(--white); outline: none;
  transition: border-color var(--transition);
}
.form-input:focus { border-color: var(--gold); }
.form-input::placeholder { color: var(--white-30); }
textarea.form-input { resize: vertical; min-height: 100px; }
.form-submit {
  width: 100%; padding: 14px;
  background: var(--gold); border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700; color: var(--ink);
  transition: all var(--transition);
}
.form-submit:hover { background: var(--gold-light); box-shadow: var(--shadow-gold); }
.agent-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 0; border-top: 1px solid var(--border); margin-top: 20px;
}
.agent-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--gold-dim);
  border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.agent-name { font-weight: 600; font-size: 14px; }
.agent-id { font-size: 12px; color: var(--white-30); }

/* Tags */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  padding: 5px 12px;
  background: var(--teal-dim);
  border: 1px solid rgba(78,205,196,0.25);
  border-radius: 100px;
  font-size: 12px; color: var(--teal);
}

/* Status badges in detail */
.status-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
}
.status-badge.active { background: rgba(90,206,160,0.15); color: var(--green); border: 1px solid rgba(90,206,160,0.3); }
.status-badge.pending { background: rgba(255,180,0,0.12); color: #ffb400; border: 1px solid rgba(255,180,0,0.3); }
.status-badge::before { content:''; width:6px; height:6px; border-radius:50%; background: currentColor; }

/* ══════════════════════════════════════════════
   LOADING / EMPTY STATES
══════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, var(--ink-3) 25%, var(--surface) 50%, var(--ink-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.empty-state {
  text-align: center; padding: 60px 24px; color: var(--white-30);
}
.empty-state svg { margin: 0 auto 16px; opacity: 0.3; }
.empty-state h3 { font-family: var(--font-display); font-size: 20px; color: var(--white-60); margin-bottom: 8px; }

.loading-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════
   LIGHTBOX
══════════════════════════════════════════════ */
.lightbox-overlay {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.92); backdrop-filter: blur(12px);
  align-items: center; justify-content: center; flex-direction: column;
}
.lightbox-overlay.open { display: flex; }
.lightbox-img { max-width: 90vw; max-height: 80vh; object-fit: contain; border-radius: var(--radius-md); }
.lightbox-controls { display: flex; align-items: center; gap: 20px; margin-top: 20px; }
.lb-btn {
  width: 46px; height: 46px;
  background: var(--ink-3); border: 1px solid var(--border-2);
  border-radius: 50%; font-size: 20px; color: var(--white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition);
}
.lb-btn:hover { background: var(--gold); color: var(--ink); }
.lb-close {
  position: absolute; top: 20px; right: 20px;
  width: 46px; height: 46px;
  background: var(--ink-3); border: 1px solid var(--border-2);
  border-radius: 50%; font-size: 22px; color: var(--white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition);
}
.lb-close:hover { background: var(--red); border-color: var(--red); }
.lb-counter { font-size: 13px; color: var(--white-30); }

/* ══════════════════════════════════════════════
   UTILITY
══════════════════════════════════════════════ */
.container { max-width: 1400px; margin: 0 auto; padding: 0 32px; }
.page-top { padding-top: var(--header-h); }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }

/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
.site-footer {
  background: var(--ink-2);
  border-top: 1px solid var(--border);
  padding-top: 64px;
}
.footer-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 0 32px 48px;
  display: grid; grid-template-columns: 280px 1fr;
  gap: 80px;
}
.footer-tagline { font-size: 14px; color: var(--white-30); margin: 12px 0 20px; line-height: 1.6; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 36px; height: 36px;
  background: var(--ink-3); border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.footer-social a svg { width: 15px; height: 15px; color: var(--white-30); }
.footer-social a:hover { border-color: var(--gold); background: var(--gold-dim); }
.footer-social a:hover svg { color: var(--gold); }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.footer-col h4 {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--white-30); margin-bottom: 18px;
}
.footer-col a {
  display: block; font-size: 14px; color: var(--white-60);
  margin-bottom: 10px; transition: color var(--transition);
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 32px;
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-bottom p { font-size: 13px; color: var(--white-30); }
.footer-legal { display: flex; gap: 24px; }
.footer-legal a { font-size: 13px; color: var(--white-30); transition: color var(--transition); }
.footer-legal a:hover { color: var(--white); }

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .listings-panel { width: 360px; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .main-nav { display: none; }
  .hamburger { display: flex; }
  .main-nav.open {
    display: flex; flex-direction: column;
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: var(--ink-2); border-bottom: 1px solid var(--border);
    padding: 16px 24px; z-index: 999; gap: 4px;
  }
  .split-view { flex-direction: column-reverse; }
  .listings-panel { width: 100%; height: 50vh; }
  .map-panel { height: 50vh; }
  .gallery-grid { grid-template-columns: 1fr; grid-template-rows: 240px; }
  .gallery-grid > *:not(:first-child) { display: none; }
  .gallery-main { border-radius: var(--radius-md); }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .detail-stats { flex-wrap: wrap; }
  .detail-stat { min-width: 45%; }
  .header-inner { padding: 0 20px; gap: 16px; }
  .container { padding: 0 20px; }
  .btn-outline-sm { display: none; }
  .footer-links { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .search-toolbar { gap: 8px; }
  .filter-group { gap: 6px; }
}
@media (max-width: 480px) {
  .hero-title { font-size: 36px; }
  .search-box { flex-wrap: wrap; padding: 12px; border-radius: var(--radius-lg); gap: 8px; }
  .search-btn { width: 100%; justify-content: center; }
}

/* Page transitions */
.page-fade { animation: pageFade 0.3s ease; }
@keyframes pageFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
