/* ============================================================
   SHARDA PROPERTIES — Design System & Styles
   FIND | COMPARE | TRUST
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Brand Colors */
  --primary: #1a1a2e;
  --primary-light: #16213e;
  --primary-dark: #0f0f1e;
  --accent: #e2b04a;
  --accent-light: #f0c96e;
  --accent-dark: #c9952e;
  --surface: #1e2a3a;
  --surface-light: #253347;
  --surface-hover: #2a3a4e;

  /* Text */
  --text-primary: #f0f0f0;
  --text-secondary: #8892a4;
  --text-muted: #5a6478;
  --text-accent: #e2b04a;

  /* Status */
  --status-available: #22c55e;
  --status-sold: #ef4444;
  --status-negotiation: #f59e0b;
  --status-available-bg: rgba(34, 197, 94, 0.12);
  --status-sold-bg: rgba(239, 68, 68, 0.12);
  --status-negotiation-bg: rgba(245, 158, 11, 0.12);

  /* Glassmorphism */
  --glass-bg: rgba(30, 42, 58, 0.75);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-blur: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 16px 50px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 4px 20px rgba(226, 176, 74, 0.15);

  /* Borders */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --border-subtle: 1px solid rgba(255, 255, 255, 0.06);

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

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --transition-slow: 450ms cubic-bezier(0.2, 0.8, 0.2, 1);

  /* Layout */
  --header-height: 72px;
  --filter-width: 300px;
  --container-max: 1400px;
}

/* ---------- Light Theme Overrides ---------- */
[data-theme="light"] {
  --primary: #f8fafc;
  --primary-light: #f1f5f9;
  --primary-dark: #e2e8f0;
  --accent: #b4831f;
  --accent-light: #d4a036;
  --accent-dark: #8c6414;
  --surface: #ffffff;
  --surface-light: #f1f5f9;
  --surface-hover: #e2e8f0;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-accent: #b4831f;

  --status-available: #16a34a;
  --status-sold: #dc2626;
  --status-negotiation: #d97706;
  --status-available-bg: rgba(22, 163, 74, 0.12);
  --status-sold-bg: rgba(220, 38, 38, 0.12);
  --status-negotiation-bg: rgba(217, 119, 6, 0.12);

  --glass-bg: rgba(255, 255, 255, 0.92);
  --glass-border: rgba(0, 0, 0, 0.08);
  --border-subtle: 1px solid rgba(0, 0, 0, 0.08);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 16px 50px rgba(0, 0, 0, 0.12);
  --shadow-gold: 0 4px 20px rgba(180, 131, 31, 0.18);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-light);
}

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

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
  color: inherit;
}

input,
select,
textarea {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--surface);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.9rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(226, 176, 74, 0.15);
}

::selection {
  background: var(--accent);
  color: var(--primary);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--surface-light);
  border-radius: 3px;
}

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

/* ---------- Header / Navbar ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 var(--space-lg);
}

.header-inner {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.brand-text .tagline {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.brand-text .sub-tagline {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-base);
}

.header-cta.cta-whatsapp {
  background: #25D366;
  color: #fff;
}

.header-cta.cta-whatsapp:hover {
  background: #1fb855;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.header-cta.cta-call {
  background: var(--surface);
  color: var(--text-primary);
  border: var(--border-subtle);
}

.header-cta.cta-call:hover {
  background: var(--surface-light);
  border-color: var(--accent);
  color: var(--accent);
}

.header-cta.cta-theme {
  background: var(--surface);
  color: var(--text-primary);
  border: var(--border-subtle);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.header-cta.cta-theme:hover {
  background: var(--surface-light);
  border-color: var(--accent);
  transform: scale(1.05);
}

.header-cta.cta-admin {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 12px;
  font-size: 0.8rem;
}

.header-cta.cta-admin:hover {
  color: var(--accent);
}



/* ---------- Search Bar ---------- */
.search-section {
  animation: fadeInUp 0.6s ease 0.3s both;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 6px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
  max-width: 700px;
  margin: 0 auto;
}

.search-bar .search-input-wrapper {
  flex: 1;
  position: relative;
}

.search-bar .search-input-wrapper svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.search-bar input[type="text"] {
  width: 100%;
  padding: 12px 12px 12px 42px;
  background: transparent;
  border: none;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.search-bar input[type="text"]:focus {
  box-shadow: none;
}

.search-bar input[type="text"]::placeholder {
  color: var(--text-muted);
}

.search-bar select {
  padding: 12px 14px;
  background: var(--surface-light);
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  min-width: 130px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  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='%238892a4' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

.search-bar .search-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--primary);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.search-bar .search-btn:hover {
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

/* ---------- Main Content Layout ---------- */
.main-content {
  display: flex;
  min-height: calc(100vh - var(--header-height));
  padding-top: var(--header-height);
}

/* ---------- Filter Sidebar ---------- */
.filter-sidebar {
  width: var(--filter-width);
  min-width: var(--filter-width);
  flex-shrink: 0;
  margin-left: calc(-1 * var(--filter-width));
  background: var(--primary-dark);
  padding: var(--space-lg);
  border-right: 1px solid var(--glass-border);
  overflow-y: auto;
  height: calc(100vh - var(--header-height));
  position: sticky;
  top: var(--header-height);
  transition: margin-left var(--transition-slow);
  z-index: 100;
  will-change: margin-left;
  opacity: 0;
  visibility: hidden;
}

.filter-sidebar.open {
  margin-left: 0;
  opacity: 1;
  visibility: visible;
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--glass-border);
}

.filter-header h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.filter-header h3 svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.clear-filters-btn {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 500;
  transition: color var(--transition-fast);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.clear-filters-btn:hover {
  color: var(--accent-light);
  background: rgba(226, 176, 74, 0.1);
}

.filter-group {
  margin-bottom: var(--space-lg);
}

.filter-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-sm);
}

/* Purpose Toggle (Buy / Sell) */
.toggle-group {
  display: flex;
  gap: 2px;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 3px;
}

.toggle-btn {
  flex: 1;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
}

.toggle-btn.active {
  background: var(--accent);
  color: var(--primary);
}

.toggle-btn:hover:not(.active) {
  color: var(--text-primary);
  background: var(--surface-hover);
}

/* Chips (multi-select) */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
  user-select: none;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.chip.active {
  background: rgba(226, 176, 74, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

/* Filter Select */
.filter-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  cursor: pointer;
  appearance: none;
  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='%238892a4' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 30px;
}

/* Range Sliders */
.range-display {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 6px;
}

.range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--surface-light);
  outline: none;
  margin: 6px 0;
  border: none;
  padding: 0;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(226, 176, 74, 0.3);
  transition: transform var(--transition-fast);
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.range-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}

/* Quick Select Pills (Bedrooms) */
.pill-group {
  display: flex;
  gap: 6px;
}

.pill {
  width: 40px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--surface);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.pill:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
}

.pill.active {
  background: var(--accent);
  color: var(--primary);
}

/* Toggle Switch */
.toggle-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toggle-switch {
  position: relative;
  width: 42px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface-light);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.toggle-switch input:checked+.toggle-slider {
  background: var(--accent);
}

.toggle-switch input:checked+.toggle-slider::before {
  transform: translateX(18px);
  background: var(--primary);
}

/* Sort Dropdown */
.sort-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  justify-content: space-between;
}

/* Filter Toggle Button */
.filter-toggle-btn {
  display: flex;
  position: fixed;
  bottom: var(--space-lg);
  left: var(--space-lg);
  z-index: 200;
  padding: 12px 24px;
  background: var(--accent);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  gap: var(--space-sm);
  align-items: center;
  cursor: pointer;
  border: none;
}

.filter-toggle-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-gold), 0 4px 20px rgba(226,176,74,0.3);
}

.filter-close-btn {
  display: flex;
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-secondary);
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  border: none;
}

/* Filter Backdrop — not needed for push layout, hide it */
.filter-backdrop {
  display: none !important;
}

/* ---------- Content Area ---------- */
.content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* View Controls */
.content-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: var(--primary);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: var(--header-height);
  z-index: 50;
}

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

.results-count span {
  color: var(--accent);
  font-weight: 700;
}

/* Quick Filters */
.quick-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 var(--space-md);
  margin: 0 var(--space-sm);
  flex: 1;
}

.quick-filters::-webkit-scrollbar {
  display: none;
}

.quick-chip {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.quick-chip:hover {
  border-color: var(--accent);
  color: var(--text);
}

.quick-chip.active {
  background: var(--accent);
  color: var(--primary);
  border-color: var(--accent);
}

.quick-chip-divider {
  width: 1px;
  height: 20px;
  background: var(--glass-border);
  margin: 0 4px;
  flex-shrink: 0;
}

.view-controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.view-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.view-btn.active {
  background: var(--accent);
  color: var(--primary);
}

.view-btn:hover:not(.active) {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.view-btn svg {
  width: 16px;
  height: 16px;
}

.map-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  margin-left: var(--space-sm);
}

.map-toggle-btn.active {
  background: rgba(226, 176, 74, 0.15);
  color: var(--accent);
  border: 1px solid rgba(226, 176, 74, 0.3);
}

.map-toggle-btn:hover:not(.active) {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.map-toggle-btn svg {
  width: 16px;
  height: 16px;
}

/* ---------- Split View ---------- */
.split-view {
  display: flex;
  flex: 1;
}

/* Property Grid */
.property-grid-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-lg);
  min-width: 0;
  transition: flex var(--transition-slow);
  will-change: flex;
}

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

.property-grid.list-view {
  grid-template-columns: 1fr;
}

/* Map Panel */
.map-panel {
  width: 45%;
  min-width: 400px;
  position: sticky;
  top: calc(var(--header-height) + 65px); /* offset for header + controls bar */
  height: calc(100vh - var(--header-height) - 65px);
  border-left: 1px solid var(--glass-border);
  transition: width var(--transition-slow);
  will-change: width;
}

.map-panel.hidden {
  width: 0;
  min-width: 0;
  overflow: hidden;
  border-left: none;
}

#map {
  width: 100%;
  height: 100%;
}

/* ---------- Property Card ---------- */
.property-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
}

.property-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(226, 176, 74, 0.2);
}

.property-card.highlighted {
  border-color: var(--accent);
  box-shadow: var(--shadow-gold), 0 0 0 1px var(--accent);
}

.card-image {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: var(--surface-light);
}

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

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

.card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--surface-light), var(--surface));
  color: var(--text-muted);
}

.card-image-placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.4;
}

/* Card Badges */
.card-badges {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  right: var(--space-sm);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.card-type-badge {
  padding: 4px 8px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  color: #fff;
}

.card-purpose-badge {
  padding: 4px 8px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
}

.card-purpose-badge.buy {
  background: rgba(59, 130, 246, 0.85);
  color: #fff;
}

.card-purpose-badge.sell {
  background: rgba(226, 176, 74, 0.9);
  color: #1a1a2e;
}

.card-purpose-badge.rent {
  background: rgba(16, 185, 129, 0.9);
  color: #fff;
}

.card-price-badge {
  position: absolute;
  bottom: var(--space-sm);
  left: var(--space-sm);
  padding: 4px 12px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

.card-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-overlay-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  pointer-events: none;
}

.video-overlay-icon svg {
  width: 24px;
  height: 24px;
  margin-left: 4px;
}

.card-price-badge .price-unit {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-left: 2px;
}

/* Card Body */
.card-body {
  padding: 12px;
  overflow: hidden;
  min-width: 0;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-location svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
  flex-shrink: 0;
}

.card-stats {
  display: flex;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--glass-border);
}

.card-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

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

.card-stat .stat-value {
  font-weight: 600;
  color: var(--text-primary);
}

/* Card Footer */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 12px 12px;
}

.card-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-status.available {
  background: var(--status-available-bg);
  color: var(--status-available);
}

.card-status.sold {
  background: var(--status-sold-bg);
  color: var(--status-sold);
}

.card-status.negotiation {
  background: var(--status-negotiation-bg);
  color: var(--status-negotiation);
}

.card-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.card-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--status-available);
}

.card-verified svg {
  width: 14px;
  height: 14px;
}

.card-actions {
  display: flex;
  gap: 4px;
}

.card-action-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.card-action-btn:hover {
  background: var(--surface-hover);
  color: var(--accent);
}

.card-action-btn svg {
  width: 16px;
  height: 16px;
}

/* List View Card */
.property-grid.list-view .property-card {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

.property-grid.list-view .card-image {
  width: 220px;
  min-width: 220px;
  height: auto;
  min-height: 180px;
}

.property-grid.list-view .card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.property-grid.list-view .card-footer {
  width: 100%;
  border-top: 1px solid var(--glass-border);
}

/* Card Feature Pills */
.card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  overflow: hidden;
  max-width: 100%;
}

.card-feature-pill {
  display: inline;
  padding: 3px 10px;
  border-radius: var(--radius-md);
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(226, 176, 74, 0.1);
  color: var(--accent);
  border: 1px solid rgba(226, 176, 74, 0.2);
  line-height: 2;
  word-break: break-word;
}

/* ---------- Empty State ---------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  min-height: 400px;
}

.empty-state-icon {
  width: 120px;
  height: 120px;
  margin-bottom: var(--space-xl);
  color: var(--text-muted);
  opacity: 0.4;
}

.empty-state h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.empty-state p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 360px;
}

/* ---------- Property Detail Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--primary);
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition-base);
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  font-size: 1.2rem;
  transition: background var(--transition-fast);
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* Modal Gallery */
.modal-gallery {
  position: relative;
  width: 100%;
  height: 360px;
  overflow: hidden;
  background: var(--surface);
}

.modal-gallery img,
.modal-gallery video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--surface-light), var(--surface));
  color: var(--text-muted);
}

.modal-gallery-placeholder svg {
  width: 80px;
  height: 80px;
  opacity: 0.3;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
  font-size: 1.1rem;
}

.gallery-nav:hover {
  background: rgba(0, 0, 0, 0.8);
}

.gallery-nav.prev {
  left: var(--space-md);
}

.gallery-nav.next {
  right: var(--space-md);
}

.gallery-counter {
  position: absolute;
  bottom: var(--space-md);
  right: var(--space-md);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 500;
}

/* Modal Content */
.modal-content {
  padding: var(--space-xl);
}

.modal-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
}

.modal-price {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  white-space: nowrap;
}

.modal-price-sub {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

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

.modal-location svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--surface);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
}

.modal-meta-item {
  flex: 1;
  min-width: 100px;
  text-align: center;
}

.modal-meta-item .meta-value {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-meta-item .meta-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Modal Tabs */
.modal-tabs {
  display: flex;
  gap: 2px;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 3px;
  margin-bottom: var(--space-lg);
}

.modal-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.modal-tab.active {
  background: var(--accent);
  color: var(--primary);
}

.modal-tab:hover:not(.active) {
  color: var(--text-primary);
}

.modal-tab-content {
  display: none;
}

.modal-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Description */
.modal-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

/* Amenities Grid */
.amenities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-md);
}

.amenity-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--surface);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.amenity-item svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

/* Modal Map */
.modal-map {
  width: 100%;
  height: 250px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-md);
  background: var(--surface);
}

.modal-address {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.modal-address svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 3px;
}

/* Modal Contact */
.modal-contact {
  display: flex;
  gap: var(--space-md);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--glass-border);
  margin-top: var(--space-lg);
}

.modal-contact-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  font-weight: 700;
  transition: all var(--transition-base);
}

.modal-contact-btn.btn-call {
  background: var(--accent);
  color: var(--primary);
}

.modal-contact-btn.btn-call:hover {
  background: var(--accent-light);
  box-shadow: var(--shadow-gold);
}

.modal-contact-btn.btn-whatsapp {
  background: #25D366;
  color: #fff;
}

.modal-contact-btn.btn-whatsapp:hover {
  background: #1fb855;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.modal-contact-btn.btn-share {
  background: var(--surface);
  color: var(--text-secondary);
  border: var(--border-subtle);
}

.modal-contact-btn.btn-share:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.modal-contact-btn svg {
  width: 18px;
  height: 18px;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--primary-dark);
  border-top: 1px solid var(--glass-border);
  padding: var(--space-3xl) var(--space-lg) var(--space-xl);
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
}

.footer-brand h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.footer-brand .tagline {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 2px;
  margin-bottom: var(--space-md);
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-col ul li a:hover {
  color: var(--accent);
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-contact-item svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.footer-social a:hover {
  background: var(--accent);
  color: var(--primary);
}

.footer-social a svg {
  width: 18px;
  height: 18px;
}

.footer-bottom {
  max-width: var(--container-max);
  margin: var(--space-xl) auto 0;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- Toast Notifications ---------- */
.toast-container {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  animation: slideInRight 0.3s ease;
  max-width: 360px;
}

.toast.success {
  border-left: 3px solid var(--status-available);
}

.toast.error {
  border-left: 3px solid var(--status-sold);
}

.toast.info {
  border-left: 3px solid var(--accent);
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease;
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s ease;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .map-panel {
    width: 40%;
    min-width: 320px;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
    --filter-width: 100%;
  }

  .header-cta.cta-call span,
  .header-cta.cta-admin span {
    display: none;
  }


  .search-bar {
    flex-direction: column;
    gap: 8px;
    padding: var(--space-md);
  }

  .search-bar select {
    width: 100%;
    min-width: unset;
  }

  .search-bar .search-btn {
    width: 100%;
    text-align: center;
  }

  .hero-trust {
    gap: var(--space-md);
  }

  .main-content {
    flex-direction: column;
  }

  .brand-text .sub-tagline {
    display: none;
  }

  .filter-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 85%;
    max-width: 320px;
    min-width: 280px;
    height: 100vh;
    z-index: 1500;
    padding-top: var(--space-2xl);
    transform: translateX(-100%);
    margin-left: 0;
    transition: transform var(--transition-slow);
    will-change: transform;
    opacity: 1;
    visibility: visible;
  }

  .filter-sidebar.open {
    transform: translateX(0);
    margin-left: 0;
  }

  .split-view {
    flex-direction: column;
  }

  .map-panel {
    width: 100%;
    min-width: unset;
    height: 300px;
    position: relative;
    top: auto;
    border-left: none;
    border-top: 1px solid var(--glass-border);
  }

  .map-panel.hidden {
    height: 0;
  }

  .property-grid {
    grid-template-columns: 1fr;
  }

  .property-grid.list-view .property-card {
    flex-direction: column;
  }

  .property-grid.list-view .card-image {
    width: 100%;
    min-width: unset;
    height: 200px;
  }

  .modal {
    width: 95%;
    max-height: 95vh;
    border-radius: var(--radius-lg);
  }

  .modal-gallery {
    height: 250px;
  }

  .modal-title-row {
    flex-direction: column;
  }

  .modal-contact {
    flex-direction: column;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }

  .content-controls {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }
}

@media (max-width: 480px) {
  .hero h2 {
    font-size: 1.4rem;
  }

  .hero p {
    font-size: 0.9rem;
  }

  .brand-text h1 {
    font-size: 1rem;
  }

  .header-cta.cta-whatsapp span {
    display: none;
  }

  .property-grid {
    gap: var(--space-md);
  }

  .modal-content {
    padding: var(--space-md);
  }

  .modal-meta {
    gap: var(--space-sm);
    padding: var(--space-md);
  }
}

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

.text-accent {
  color: var(--accent);
}

.text-muted {
  color: var(--text-secondary);
}

.fw-600 {
  font-weight: 600;
}

.fw-700 {
  font-weight: 700;
}