/* ============================================================
   SF Office Space Marketplace — Stylesheet
   Design: Warm & Approachable (Notion/Linear inspired)
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Warm palette */
  --color-bg: #FDFAF6;
  --color-bg-alt: #FFF8F0;
  --color-surface: #FFFFFF;
  --color-surface-hover: #FFF5EB;
  --color-border: #F0E6D8;
  --color-border-strong: #E0D0BF;

  /* Text */
  --color-text: #2C1810;
  --color-text-secondary: #7A6B5D;
  --color-text-muted: #A89888;

  /* Accent — warm coral/orange */
  --color-primary: #E8734A;
  --color-primary-hover: #D4623B;
  --color-primary-light: #FFF0EB;
  --color-primary-subtle: #FDEEE8;

  /* Secondary — warm sage */
  --color-secondary: #6B9080;
  --color-secondary-light: #EDF5F0;

  /* Status */
  --color-success: #5BA378;
  --color-success-light: #EDF7F1;
  --color-warning: #E8A838;
  --color-warning-light: #FFF8EB;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(44, 24, 16, 0.04);
  --shadow-md: 0 4px 12px rgba(44, 24, 16, 0.06);
  --shadow-lg: 0 8px 30px rgba(44, 24, 16, 0.08);
  --shadow-xl: 0 12px 50px rgba(44, 24, 16, 0.1);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'DM Serif Display', Georgia, serif;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  font-size: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* --- Utility Classes --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.animate-in {
  animation: fadeIn var(--duration-slow) var(--ease-out) both;
}

.animate-in-up {
  animation: fadeInUp 500ms var(--ease-out) both;
}

/* Stagger children */
.stagger > * {
  animation: fadeInUp 500ms var(--ease-out) both;
}
.stagger > *:nth-child(1) { animation-delay: 0ms; }
.stagger > *:nth-child(2) { animation-delay: 60ms; }
.stagger > *:nth-child(3) { animation-delay: 120ms; }
.stagger > *:nth-child(4) { animation-delay: 180ms; }
.stagger > *:nth-child(5) { animation-delay: 240ms; }
.stagger > *:nth-child(6) { animation-delay: 300ms; }
.stagger > *:nth-child(7) { animation-delay: 360ms; }
.stagger > *:nth-child(8) { animation-delay: 420ms; }
.stagger > *:nth-child(9) { animation-delay: 480ms; }
.stagger > *:nth-child(10) { animation-delay: 540ms; }
.stagger > *:nth-child(11) { animation-delay: 600ms; }
.stagger > *:nth-child(12) { animation-delay: 660ms; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 250, 246, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--duration-normal) ease;
}

.nav.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--color-text);
  cursor: pointer;
  transition: opacity var(--duration-fast) ease;
}

.nav-logo:hover {
  opacity: 0.8;
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav-link {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: all var(--duration-fast) ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--color-text);
  background: var(--color-surface-hover);
}

.nav-link.active {
  color: var(--color-primary);
}

.nav-cta {
  margin-left: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: var(--color-primary);
  color: white !important;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 14px;
  transition: all var(--duration-fast) ease;
}

.nav-cta:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(232, 115, 74, 0.3);
}

.nav-mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--color-text);
}

.nav-mobile-toggle:hover {
  background: var(--color-surface-hover);
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-md);
    box-shadow: var(--shadow-lg);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: var(--space-md);
  }

  .nav-cta {
    margin-left: 0;
    margin-top: var(--space-sm);
    text-align: center;
  }

  .nav-mobile-toggle {
    display: flex;
  }
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  padding: var(--space-3xl) 0 var(--space-2xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 140%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(232, 115, 74, 0.06) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(107, 144, 128, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px 16px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: var(--space-lg);
  animation: fadeIn 500ms var(--ease-out) both;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  background: var(--color-primary);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.5vw, 64px);
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
  animation: fadeInUp 600ms var(--ease-out) 100ms both;
}

.hero h1 span {
  color: var(--color-primary);
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--color-text-secondary);
  max-width: 560px;
  margin: 0 auto var(--space-xl);
  line-height: 1.7;
  animation: fadeInUp 600ms var(--ease-out) 200ms both;
}

/* Hero Search */
.hero-search {
  max-width: 680px;
  margin: 0 auto;
  animation: fadeInUp 600ms var(--ease-out) 300ms both;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 6px 6px 6px var(--space-lg);
  box-shadow: var(--shadow-lg);
  transition: border-color var(--duration-normal) ease, box-shadow var(--duration-normal) ease;
}

.search-box:focus-within {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-lg), 0 0 0 4px var(--color-primary-subtle);
}

.search-box svg {
  color: var(--color-text-muted);
  flex-shrink: 0;
  margin-right: var(--space-md);
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  padding: var(--space-md) 0;
  font-size: 16px;
  background: transparent;
  color: var(--color-text);
}

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

.search-box .search-btn {
  padding: 12px 28px;
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
  transition: all var(--duration-fast) ease;
  white-space: nowrap;
}

.search-box .search-btn:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}

/* Hero stats */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-2xl);
  margin-top: var(--space-2xl);
  animation: fadeInUp 600ms var(--ease-out) 400ms both;
}

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

.hero-stat-number {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--color-text);
}

.hero-stat-label {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

@media (max-width: 640px) {
  .hero { padding: var(--space-2xl) 0; }
  .hero-stats { gap: var(--space-xl); }
  .search-box { flex-direction: column; padding: var(--space-md); gap: var(--space-sm); }
  .search-box svg { display: none; }
  .search-box input { width: 100%; text-align: center; }
  .search-box .search-btn { width: 100%; padding: 14px; }
}

/* ============================================================
   LISTING CARDS
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
}

.section-title {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--color-text);
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  transition: gap var(--duration-fast) ease;
}

.section-link:hover {
  gap: 10px;
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-lg);
}

.listing-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
}

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

.listing-card-image {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.listing-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

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

.listing-card-badge {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
}

.listing-card-favorite {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  color: var(--color-text-muted);
  transition: all var(--duration-fast) ease;
}

.listing-card-favorite:hover, .listing-card-favorite.active {
  color: #E85D5D;
  background: white;
}

.listing-card-favorite.active svg {
  fill: #E85D5D;
}

.listing-card-body {
  padding: var(--space-lg);
}

.listing-card-price {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--color-text);
}

.listing-card-price span {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--color-text-muted);
  font-weight: 400;
}

.listing-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  margin: var(--space-sm) 0;
  line-height: 1.4;
}

.listing-card-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

.listing-card-location svg {
  width: 14px;
  height: 14px;
  color: var(--color-text-muted);
}

.listing-card-meta {
  display: flex;
  gap: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.listing-card-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.listing-card-meta-item svg {
  width: 14px;
  height: 14px;
  color: var(--color-text-muted);
}

@media (max-width: 640px) {
  .listings-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   FEATURED NEIGHBORHOODS
   ============================================================ */
.neighborhoods-section {
  padding: var(--space-3xl) 0;
}

.neighborhoods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-md);
}

.neighborhood-card {
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}

.neighborhood-card:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.neighborhood-card-icon {
  font-size: 28px;
  margin-bottom: var(--space-sm);
}

.neighborhood-card-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text);
  margin-bottom: 4px;
}

.neighborhood-card-count {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* ============================================================
   LISTINGS PAGE — FILTERS
   ============================================================ */
.listings-page {
  padding: var(--space-xl) 0 var(--space-3xl);
}

.listings-page-header {
  margin-bottom: var(--space-xl);
}

.listings-page-header h1 {
  font-family: var(--font-display);
  font-size: 32px;
  margin-bottom: var(--space-sm);
}

.listings-page-header p {
  color: var(--color-text-secondary);
}

.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
}

.filter-group {
  position: relative;
}

.filter-select {
  appearance: none;
  padding: 10px 36px 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 14px;
  cursor: pointer;
  transition: border-color var(--duration-fast) ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237A6B5D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.filter-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-subtle);
}

.filter-search {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 14px;
}

.filter-search:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-subtle);
}

.filter-clear {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast) ease;
}

.filter-clear:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}

.results-info {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
}

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

/* Sort */
.listings-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.view-toggles {
  display: flex;
  gap: 4px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.view-toggle {
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--color-text-muted);
  transition: all var(--duration-fast) ease;
}

.view-toggle.active {
  background: var(--color-primary);
  color: white;
}

.view-toggle:hover:not(.active) {
  color: var(--color-text);
}

/* List view */
.listings-list .listing-card {
  display: grid;
  grid-template-columns: 300px 1fr;
}

.listings-list .listing-card-image {
  height: 100%;
  min-height: 200px;
}

@media (max-width: 768px) {
  .listings-list .listing-card {
    grid-template-columns: 1fr;
  }
  .filters-bar {
    flex-direction: column;
  }
}

/* ============================================================
   LISTING DETAIL PAGE
   ============================================================ */
.detail-page {
  padding: var(--space-xl) 0 var(--space-3xl);
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
  transition: color var(--duration-fast) ease;
}

.detail-back:hover {
  color: var(--color-text);
}

/* Gallery */
.detail-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-sm);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: var(--space-2xl);
  height: 420px;
}

.detail-gallery-main {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.detail-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

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

.detail-gallery-side {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: var(--space-sm);
}

.detail-gallery-side > div {
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.detail-gallery-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.detail-gallery-side > div:hover img {
  transform: scale(1.05);
}

.detail-gallery-more {
  position: relative;
}

.detail-gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(44, 24, 16, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--duration-normal) var(--ease-out);
  cursor: pointer;
}

.detail-gallery-overlay span {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.detail-gallery-more:hover .detail-gallery-overlay {
  background: rgba(44, 24, 16, 0.4);
}

@media (max-width: 768px) {
  .detail-gallery {
    grid-template-columns: 1fr;
    height: auto;
  }
  .detail-gallery-main { height: 260px; }
  .detail-gallery-side { grid-template-columns: 1fr 1fr; height: 140px; }
}

/* Detail layout */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-2xl);
  align-items: start;
}

@media (max-width: 960px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }
}

.detail-main h1 {
  font-family: var(--font-display);
  font-size: 32px;
  margin-bottom: var(--space-sm);
}

.detail-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
}

.detail-quick-info {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xl);
}

.detail-info-item {
  flex: 1;
  min-width: 120px;
}

.detail-info-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.detail-info-value {
  font-weight: 600;
  font-size: 15px;
  color: var(--color-text);
}

.detail-section {
  margin-bottom: var(--space-xl);
}

.detail-section h2 {
  font-family: var(--font-display);
  font-size: 22px;
  margin-bottom: var(--space-md);
}

.detail-description {
  color: var(--color-text-secondary);
  line-height: 1.8;
}

.amenities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-sm);
}

.amenity-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 14px;
  background: var(--color-secondary-light);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--color-text);
}

.amenity-item svg {
  color: var(--color-secondary);
  flex-shrink: 0;
}

/* Map */
.detail-map {
  height: 300px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

/* Sidebar / Contact Card */
.detail-sidebar {
  position: sticky;
  top: 92px;
}

.contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-lg);
}

.contact-card-price {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--color-text);
  margin-bottom: 4px;
}

.contact-card-price span {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--color-text-muted);
  font-weight: 400;
}

.contact-card-availability {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--color-success-light);
  color: var(--color-success);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: var(--space-lg);
}

.contact-card-availability::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--color-success);
  border-radius: 50%;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-subtle);
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
  transition: all var(--duration-fast) ease;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(232, 115, 74, 0.3);
}

.btn-secondary {
  width: 100%;
  padding: 14px;
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
  transition: all var(--duration-fast) ease;
}

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

.contact-card-broker {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding-top: var(--space-lg);
  margin-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.broker-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.broker-name {
  font-weight: 600;
  font-size: 14px;
}

.broker-label {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard-page {
  padding: var(--space-xl) 0 var(--space-3xl);
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
}

.dashboard-header h1 {
  font-family: var(--font-display);
  font-size: 28px;
}

.dashboard-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-xl);
}

.dashboard-tab {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: all var(--duration-fast) ease;
}

.dashboard-tab.active {
  background: var(--color-primary);
  color: white;
}

.dashboard-tab:hover:not(.active) {
  background: var(--color-surface-hover);
  color: var(--color-text);
}

/* Auth modal */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 24, 16, 0.4);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fadeIn var(--duration-normal) ease;
}

.auth-modal {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  width: 90%;
  max-width: 420px;
  box-shadow: var(--shadow-xl);
  animation: scaleIn var(--duration-normal) var(--ease-out);
}

.auth-modal h2 {
  font-family: var(--font-display);
  font-size: 24px;
  text-align: center;
  margin-bottom: var(--space-sm);
}

.auth-modal .subtitle {
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 14px;
  margin-bottom: var(--space-xl);
}

.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-xl);
}

.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: all var(--duration-fast) ease;
}

.auth-tab.active {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-md) 0;
  color: var(--color-text-muted);
  font-size: 12px;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.auth-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--color-text-muted);
  transition: all var(--duration-fast) ease;
}

.auth-close:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}

/* Saved listings on dashboard */
.saved-empty {
  text-align: center;
  padding: var(--space-3xl);
  color: var(--color-text-secondary);
}

.saved-empty-icon {
  font-size: 48px;
  margin-bottom: var(--space-md);
}

.saved-empty h3 {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

/* Inquiry list */
.inquiry-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.inquiry-item {
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) ease;
}

.inquiry-item:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
}

.inquiry-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-sm);
}

.inquiry-status {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.inquiry-status.pending {
  background: var(--color-warning-light);
  color: var(--color-warning);
}

.inquiry-status.responded {
  background: var(--color-success-light);
  color: var(--color-success);
}

/* ============================================================
   MAP
   ============================================================ */
.map-section {
  margin: var(--space-2xl) 0;
}

.map-container {
  height: 450px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

.map-container .leaflet-popup-content-wrapper {
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 0 !important;
}

.map-container .leaflet-popup-content {
  margin: 0 !important;
  min-width: 240px;
}

.map-popup {
  padding: var(--space-md);
}

.map-popup-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.map-popup-price {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.map-popup-meta {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.map-popup-link {
  display: inline-block;
  margin-top: var(--space-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-2xl) 0;
  margin-top: var(--space-3xl);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: 20px;
  margin-bottom: var(--space-md);
}

.footer-desc {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 300px;
}

.footer-col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-links a {
  font-size: 14px;
  color: var(--color-text-secondary);
  transition: color var(--duration-fast) ease;
}

.footer-links a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-xl);
  margin-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
  font-size: 13px;
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }
}

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

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn var(--duration-normal) ease;
}

.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox-close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  font-size: 20px;
  transition: background var(--duration-fast) ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  transition: background var(--duration-fast) ease;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-prev { left: var(--space-lg); }
.lightbox-next { right: var(--space-lg); }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  z-index: 250;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  animation: slideIn var(--duration-normal) var(--ease-out);
  font-size: 14px;
}

.toast-icon {
  flex-shrink: 0;
}

.toast.success .toast-icon { color: var(--color-success); }
.toast.warning .toast-icon { color: var(--color-warning); }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* ============================================================
   PAGE TRANSITION
   ============================================================ */
#app {
  min-height: calc(100vh - 68px);
}

.page-enter {
  animation: fadeIn var(--duration-normal) var(--ease-out);
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--color-border) 25%, var(--color-bg-alt) 50%, var(--color-border) 75%);
  background-size: 200% 100%;
  animation: pulse 1.5s ease infinite;
  border-radius: var(--radius-sm);
}
