/* ============================================================
   PRIMEKEY REALTY — Global Styles
   Aesthetic: Luxury Editorial — dark slate + warm gold accents
   Fonts: Cormorant Garamond (display) + DM Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --ink:       #0d1117;
  --ink-80:    rgba(13,17,23,0.8);
  --surface:   #f5f3ef;
  --card:      #ffffff;
  --border:    #e4dfd6;
  --gold:      #b08d57;
  --gold-light:#d4aa72;
  --gold-pale: #f5eddf;
  --slate:     #2c3340;
  --muted:     #7a7871;
  --success:   #2d6a4f;
  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
  --shadow:    0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.14);
  --nav-h:     68px;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --transition:   0.22s cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: var(--font-body); }

/* ── NAV ────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 900;
  height: var(--nav-h);
  background: rgba(245,243,239,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 clamp(16px, 4vw, 48px);
  gap: 32px;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.nav-brand span { color: var(--gold); }

.nav-links {
  display: flex; gap: 24px; align-items: center;
  list-style: none; margin-left: auto;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--transition);
}

.nav-links a:hover, .nav-links a.active { color: var(--gold); }

.nav-cta {
  margin-left: 8px;
  padding: 8px 20px;
  background: var(--ink);
  color: #fff !important;
  border-radius: var(--radius-sm);
  transition: background var(--transition) !important;
}

.nav-cta:hover { background: var(--slate) !important; color: var(--gold-light) !important; }

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 520px;
  display: flex; align-items: center;
  overflow: hidden;
  background: var(--ink);
}

.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #0d1117 0%, #1e2a3a 60%, #2c3340 100%);
}

.hero-pattern {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    45deg, transparent, transparent 60px,
    rgba(176,141,87,0.04) 60px, rgba(176,141,87,0.04) 61px
  );
}

.hero-content {
  position: relative; z-index: 1;
  padding: 80px clamp(16px,5vw,80px);
  max-width: 700px;
}

.hero-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 20px;
}

.hero h1 em { font-style: italic; color: var(--gold-light); }

.hero-sub {
  color: rgba(255,255,255,0.6);
  font-size: 1rem;
  max-width: 480px;
  margin-bottom: 36px;
}

/* ── SEARCH BAR ─────────────────────────────────────────── */
.search-bar {
  display: flex;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-width: 640px;
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  padding: 16px 20px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: transparent;
}

.search-bar input::placeholder { color: var(--muted); }

.search-bar button {
  padding: 14px 28px;
  background: var(--gold);
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background var(--transition);
}

.search-bar button:hover { background: var(--gold-light); }

/* ── FILTERS ────────────────────────────────────────────── */
.filters-bar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 16px clamp(16px,4vw,48px);
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
}

.filter-select {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}

.filter-select:focus { border-color: var(--gold); }

.filter-btn {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  transition: all var(--transition);
}

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

.view-toggle {
  margin-left: auto;
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.view-toggle button {
  padding: 8px 12px;
  background: var(--card);
  border: none;
  border-right: 1px solid var(--border);
  color: var(--muted);
  display: flex; align-items: center; gap: 6px;
  font-size: 13px;
  transition: all var(--transition);
}

.view-toggle button:last-child { border-right: none; }
.view-toggle button.active, .view-toggle button:hover {
  background: var(--ink); color: #fff;
}

/* ── GRID ────────────────────────────────────────────────── */
.listings-wrap {
  padding: 32px clamp(16px,4vw,48px);
}

.results-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}

.results-meta strong { color: var(--ink); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* ── CARD ────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}

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

.card-img {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--border);
}

.card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.card-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--gold);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
}

.card-photos {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(13,17,23,0.7);
  color: #fff;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 20px;
  display: flex; align-items: center; gap: 4px;
}

.card-listing-type {
  position: absolute; top: 12px; right: 12px;
  color: #fff;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 3px;
}

.card-body { padding: 18px 20px 20px; }

.card-price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.card-address {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-stats {
  display: flex; gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  font-size: 12px;
  color: var(--muted);
}

.card-stat { display: flex; align-items: center; gap: 5px; }
.card-stat strong { color: var(--ink); font-weight: 600; }

/* ── SKELETON LOADER ─────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #ece9e2 25%, #f5f3ef 50%, #ece9e2 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── PAGINATION ──────────────────────────────────────────── */
.pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 8px; padding: 40px 0;
}

.page-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  transition: all var(--transition);
  display: flex; align-items: center; justify-content: center;
}

.page-btn:hover, .page-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* ── FOOTER ──────────────────────────────────────────────── */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,0.5);
  padding: 48px clamp(16px,4vw,48px) 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 12px;
}

.footer-brand span { color: var(--gold); }
.footer-desc { font-size: 13px; line-height: 1.7; }

.footer-col h4 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: 13px; color: rgba(255,255,255,0.5); transition: color var(--transition); }
.footer-col a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  font-size: 12px;
  display: flex; justify-content: space-between;
}

/* ── MAP PAGE ────────────────────────────────────────────── */
.map-layout {
  display: flex;
  height: calc(100vh - var(--nav-h));
  overflow: hidden;
}

.map-sidebar {
  width: 420px;
  flex-shrink: 0;
  overflow-y: auto;
  background: var(--surface);
  border-right: 1px solid var(--border);
}

.map-sidebar-inner { padding: 20px; }

#map-container {
  flex: 1;
  position: relative;
}

/* ── LISTING DETAIL ──────────────────────────────────────── */
.listing-detail {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px clamp(16px,4vw,48px);
}

/* ── GALLERY — carousel styles live in listing.html ────────── */
/* Only set the bottom margin here; everything else is page-scoped */
.gallery { margin-bottom: 40px; }


.detail-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 48px;
  align-items: start;
}

.detail-price {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--ink);
}

.detail-address {
  font-size: 1rem;
  color: var(--muted);
  margin: 4px 0 20px;
}

.detail-stats {
  display: flex; flex-wrap: wrap; gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.detail-stat {
  display: flex; align-items: center; gap: 10px;
}

.stat-icon {
  width: 36px; height: 36px;
  background: var(--gold-pale);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  font-size: 15px;
}

.stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 16px; font-weight: 600; color: var(--ink); }

.section-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.description { font-size: 14px; line-height: 1.8; color: var(--slate); margin-bottom: 32px; }

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}

.feature-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
  color: var(--slate);
  padding: 10px 14px;
  background: var(--surface);
  border-radius: var(--radius-sm);
}

.feature-item::before {
  content: '✓';
  color: var(--gold);
  font-weight: 700;
  font-size: 12px;
}

/* ── CONTACT CARD ────────────────────────────────────────── */
.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.contact-price {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  margin-bottom: 10px;
  transition: border-color var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--gold); }

.contact-form textarea { resize: vertical; min-height: 80px; }

.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--gold);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background var(--transition);
}

.btn-primary:hover { background: var(--gold-light); }

.btn-secondary {
  width: 100%;
  padding: 12px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  margin-top: 8px;
  transition: all var(--transition);
}

.btn-secondary:hover {
  background: var(--surface);
  border-color: var(--ink);
}

/* ── CITY PAGE ───────────────────────────────────────────── */
.city-hero {
  position: relative;
  height: 380px;
  display: flex; align-items: flex-end;
  background: var(--ink);
  overflow: hidden;
}

.city-hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, #1a2332 0%, #0d1117 100%);
}

.city-hero-content {
  position: relative; z-index: 1;
  padding: 0 clamp(16px,4vw,48px) 48px;
}

.city-breadcrumb {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 12px;
}

.city-breadcrumb a { color: var(--gold-light); }

.city-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem,5vw,3.5rem);
  font-weight: 300;
  color: #fff;
}

.city-hero h1 em { font-style: italic; color: var(--gold-light); }

.city-stats-bar {
  display: flex; flex-wrap: wrap; gap: 32px;
  padding: 24px clamp(16px,4vw,48px);
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.city-stat {
  text-align: center;
}

.city-stat-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--gold);
}

.city-stat-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── TOAST ───────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--ink); color: #fff;
  padding: 12px 20px; border-radius: var(--radius);
  font-size: 14px; z-index: 9999;
  transform: translateY(80px); opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.toast.show { transform: translateY(0); opacity: 1; }

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
}

.empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { font-family: var(--font-display); font-size: 1.4rem; color: var(--ink); margin-bottom: 8px; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .detail-layout { grid-template-columns: 1fr; }
  .map-layout { flex-direction: column; height: auto; }
  .map-sidebar { width: 100%; height: 50vh; }
  #map-container { height: 50vh; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
}
