/* ==========================================================================
   THE PROP — LUXURY REAL ESTATE AGENCY TEMPLATE
   Custom CSS3 Stylesheet (No dependencies required)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design System & CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  /* Brand Palette */
  --primary: #1B4332;            /* Deep Heritage Green */
  --primary-hover: #133225;
  --primary-light: #2D6A4F;
  --primary-subtle: #EEF7F2;
  --accent: #D8F3DC;
  --accent-gold: #C29B38;
  --accent-gold-light: #F9F4E8;

  /* Neutrals & Surfaces */
  --bg-page: #FBFBFA;
  --bg-surface: #FFFFFF;
  --bg-surface-secondary: #F4F6F5;
  --bg-dark: #121A16;

  /* Typography Colors */
  --text-main: #18201C;
  --text-body: #3F4B45;
  --text-muted: #6C7972;
  --text-light: #9AA6A0;
  --text-inverse: #FFFFFF;

  /* Borders & Dividers */
  --border-light: #E7ECE9;
  --border-medium: #D1DAD5;
  --border-focus: #1B4332;

  /* Feedback States */
  --color-danger: #C92A2A;
  --color-danger-bg: #FFF5F5;
  --color-success: #2B8A3E;
  --color-success-bg: #EBFBEE;

  /* Fonts */
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Spacing */
  --container-max: 1220px;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(24, 32, 28, 0.05);
  --shadow-sm: 0 2px 6px rgba(24, 32, 28, 0.06);
  --shadow-md: 0 6px 18px rgba(24, 32, 28, 0.08);
  --shadow-lg: 0 14px 34px rgba(24, 32, 28, 0.12);
  --shadow-card-hover: 0 18px 40px rgba(24, 32, 28, 0.13);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* Typography Presets */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--text-main);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.85rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.35rem, 2.5vw, 1.85rem); }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
}
p:last-child {
  margin-bottom: 0;
}

code {
  font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.85em;
  background: rgba(0, 0, 0, 0.06);
  padding: 0.15em 0.35em;
  border-radius: var(--radius-xs);
}

/* --------------------------------------------------------------------------
   3. Layout Utilities
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (max-width: 640px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.site-main {
  flex: 1 0 auto;
  min-height: 60vh;
}

.section-spacing {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

@media (max-width: 768px) {
  .section-spacing {
    padding-top: 3.25rem;
    padding-bottom: 3.25rem;
  }
}

.section-header {
  margin-bottom: 2.75rem;
}
.section-header.text-center {
  text-align: center;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}
.section-kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  margin-bottom: 0.6rem;
}
.section-title {
  margin-bottom: 0.85rem;
}
.section-lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   4. Buttons & Badges
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-normal);
  white-space: nowrap;
  user-select: none;
  text-align: center;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 0.95rem 2rem;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-inverse);
  box-shadow: 0 4px 12px rgba(27, 67, 50, 0.2);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 6px 18px rgba(27, 67, 50, 0.28);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  border: 1.5px solid var(--primary);
  color: var(--primary);
  background-color: transparent;
}
.btn-outline:hover {
  background-color: var(--primary);
  color: var(--text-inverse);
}

.btn-secondary {
  background-color: var(--bg-surface-secondary);
  color: var(--text-main);
  border: 1px solid var(--border-medium);
}
.btn-secondary:hover {
  background-color: #E6EAE8;
  color: var(--text-main);
}

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

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-xs);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-sample {
  background: rgba(24, 32, 28, 0.82);
  color: #FFFFFF;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.badge-primary {
  background-color: var(--primary);
  color: var(--text-inverse);
}

.badge-accent {
  background-color: var(--accent);
  color: var(--primary);
  font-weight: 700;
}

.badge-type {
  background-color: rgba(255, 255, 255, 0.95);
  color: var(--text-main);
  backdrop-filter: blur(4px);
  box-shadow: var(--shadow-xs);
}

.badge-status {
  background-color: var(--accent-gold-light);
  color: var(--accent-gold);
  border: 1px solid rgba(194, 155, 56, 0.3);
}

/* --------------------------------------------------------------------------
   5. Top Announcement Banner
   -------------------------------------------------------------------------- */
.top-banner {
  background-color: var(--primary);
  color: var(--accent);
  font-size: 0.82rem;
  padding: 0.45rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.banner-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 0.75rem;
  text-align: center;
}
.banner-tag {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-xs);
  letter-spacing: 0.05em;
}
.banner-text {
  color: #E2ECE6;
}
.banner-text code {
  background: rgba(0, 0, 0, 0.25);
  color: #FFF;
}
.banner-close-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #FFF;
  font-size: 1.25rem;
  opacity: 0.6;
  padding: 0 0.5rem;
  line-height: 1;
}
.banner-close-btn:hover {
  opacity: 1;
}

@media (max-width: 640px) {
  .banner-inner {
    padding-right: 1.5rem;
    font-size: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

/* --------------------------------------------------------------------------
   6. Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background-color: rgba(251, 251, 250, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: all var(--transition-normal);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--primary);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.14em;
}
.brand-icon {
  width: 28px;
  height: 28px;
  color: var(--primary);
  flex-shrink: 0;
}
.brand-text {
  line-height: 1;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-body);
  position: relative;
  padding: 0.5rem 0;
}
.nav-link:hover {
  color: var(--primary);
}
.nav-link.active {
  color: var(--primary);
  font-weight: 600;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Saved / Favorites Button in Header */
.btn-favorites {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-secondary);
  border: 1px solid var(--border-light);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  transition: all var(--transition-fast);
}
.btn-favorites:hover {
  border-color: var(--border-medium);
  background-color: #EAEFEB;
}
.btn-favorites.active {
  background-color: var(--primary-subtle);
  border-color: rgba(27, 67, 50, 0.3);
  color: var(--primary);
}
.heart-icon {
  width: 17px;
  height: 17px;
  color: var(--primary);
  transition: transform var(--transition-fast);
}
.btn-favorites:hover .heart-icon {
  transform: scale(1.1);
}
.fav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: var(--radius-full);
  background-color: var(--primary);
  color: #FFF;
  font-size: 0.72rem;
  font-weight: 700;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-light);
}
.mobile-toggle .bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-main);
  transition: all var(--transition-fast);
}

/* Mobile Drawer */
.mobile-menu {
  display: none;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}
.mobile-menu.open {
  display: block;
}
.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.mobile-link {
  font-size: 1.1rem;
  font-weight: 500;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-light);
}
.mobile-link.active {
  color: var(--primary);
  font-weight: 700;
}
.mobile-cta-wrap {
  margin-top: 0.75rem;
}

@media (max-width: 900px) {
  .nav-desktop {
    display: none;
  }
  .header-cta {
    display: none;
  }
  .mobile-toggle {
    display: flex;
  }
}

/* --------------------------------------------------------------------------
   7. Home Page: Hero, Stats, Why Us, Teaser
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  background: linear-gradient(180deg, #EDF2EF 0%, var(--bg-page) 100%);
  padding-top: 4.5rem;
  padding-bottom: 5.5rem;
  overflow: hidden;
}
.hero-badge-wrap {
  margin-bottom: 1.25rem;
}
.hero-content {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 3rem auto;
}
.hero-title {
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}
.hero-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--primary);
}
.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
}

/* Hero Search Box */
.hero-search-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  max-width: 1040px;
  margin: 0 auto;
}
.hero-search-grid {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr 1.2fr 1.2fr auto;
  gap: 1rem;
  align-items: flex-end;
}
.search-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
}
.search-field label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-input-icon {
  position: absolute;
  left: 0.85rem;
  width: 16px;
  height: 16px;
  color: var(--text-light);
  pointer-events: none;
}
.search-field input,
.search-field select {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  background-color: #FFF;
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast);
}
.search-field input.has-icon {
  padding-left: 2.35rem;
}
.search-field input:focus,
.search-field select:focus {
  border-color: var(--border-focus);
}

@media (max-width: 1024px) {
  .hero-search-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hero-search-btn-cell {
    grid-column: span 2;
  }
}
@media (max-width: 640px) {
  .hero-search-grid {
    grid-template-columns: 1fr;
  }
  .hero-search-btn-cell {
    grid-column: span 1;
  }
  .hero-section {
    padding-top: 2.5rem;
    padding-bottom: 3.5rem;
  }
}

/* Key Stats Bar */
.stats-bar {
  background-color: var(--primary);
  color: #FFFFFF;
  padding: 3rem 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}
.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.stat-number {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}
.stat-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #D1DFD8;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
  }
  .stat-number {
    font-size: 2rem;
  }
}
@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Why Choose Us Section */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.feature-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.feature-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-subtle);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.35rem;
}
.feature-icon-wrap svg {
  width: 26px;
  height: 26px;
}
.feature-title {
  margin-bottom: 0.65rem;
  font-size: 1.25rem;
}
.feature-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

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

/* Valuation / Contact Teaser Banner */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #0F2A1F 100%);
  color: #FFF;
  border-radius: var(--radius-lg);
  padding: 3.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 243, 220, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.cta-banner-content {
  max-width: 600px;
}
.cta-banner-title {
  color: #FFF;
  margin-bottom: 0.75rem;
}
.cta-banner-desc {
  color: #D2DFD8;
  font-size: 1.05rem;
}
.cta-banner-actions {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .cta-banner {
    flex-direction: column;
    text-align: center;
    padding: 2.5rem 1.5rem;
  }
  .cta-banner-actions {
    flex-direction: column;
    width: 100%;
  }
  .cta-banner-actions .btn {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   8. Property Listing Cards (Grid)
   -------------------------------------------------------------------------- */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 1080px) {
  .listings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 680px) {
  .listings-grid {
    grid-template-columns: 1fr;
  }
}

.property-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
}
.property-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background-color: #E2E8E5;
  overflow: hidden;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.property-card:hover .card-media img {
  transform: scale(1.04);
}

/* Overlay Badges */
.card-badges-top {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  z-index: 2;
}

/* Favorite Heart Button */
.btn-fav-card {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}
.btn-fav-card:hover {
  background-color: #FFFFFF;
  color: var(--color-danger);
  transform: scale(1.1);
}
.btn-fav-card.is-active {
  color: var(--color-danger);
  background-color: #FFFFFF;
}
.btn-fav-card.is-active svg {
  fill: var(--color-danger);
  stroke: var(--color-danger);
}
.btn-fav-card svg {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-fast);
}

.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
}

.card-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.card-price {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--primary);
}
.card-type-tag {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.card-title {
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
  color: var(--text-main);
  transition: color var(--transition-fast);
}
.card-title a:hover {
  color: var(--primary);
}

.card-location {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.15rem;
}
.card-location svg {
  width: 15px;
  height: 15px;
  color: var(--text-light);
  flex-shrink: 0;
}

/* Card Specs (Beds, Baths, Sqft) */
.card-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1.25rem;
}
.spec-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-body);
}
.spec-item svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
  flex-shrink: 0;
}
.spec-val {
  font-weight: 600;
}

.card-footer {
  margin-top: auto;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.card-footer .btn {
  flex: 1;
}

/* --------------------------------------------------------------------------
   9. Listings Page: Filter Bar & Controls
   -------------------------------------------------------------------------- */
.listings-filter-wrapper {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2.25rem;
  box-shadow: var(--shadow-sm);
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.filter-field label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.filter-field input,
.filter-field select {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  background-color: #FFF;
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
}
.filter-field input:focus,
.filter-field select:focus {
  border-color: var(--border-focus);
}

.filter-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.filter-results-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.results-count-number {
  font-weight: 700;
  color: var(--text-main);
}

.active-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.active-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: var(--primary-subtle);
  color: var(--primary);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-xs);
  font-size: 0.78rem;
  font-weight: 600;
}
.active-tag-remove {
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sort-select-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.sort-select-wrap select {
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-medium);
  background-color: #FFF;
  font-size: 0.85rem;
  font-weight: 500;
}

@media (max-width: 960px) {
  .filter-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .filter-grid {
    grid-template-columns: 1fr;
  }
  .filter-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .filter-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4.5rem 1.5rem;
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-medium);
  max-width: 600px;
  margin: 2rem auto;
}
.empty-icon {
  width: 56px;
  height: 56px;
  color: var(--text-light);
  margin: 0 auto 1.25rem auto;
}
.empty-title {
  margin-bottom: 0.5rem;
}
.empty-desc {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* --------------------------------------------------------------------------
   10. Property Detail View
   -------------------------------------------------------------------------- */
.detail-view {
  padding-bottom: 5rem;
}

.detail-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
  gap: 1rem;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.breadcrumbs a:hover {
  color: var(--primary);
}
.breadcrumbs span {
  color: var(--text-light);
}
.detail-top-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Gallery Showcase */
.detail-gallery {
  margin-bottom: 2.5rem;
}
.gallery-main {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #212C26;
  margin-bottom: 0.85rem;
  box-shadow: var(--shadow-md);
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity var(--transition-fast);
}
.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}
.thumb-btn {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  opacity: 0.65;
  border: 2px solid transparent;
  transition: all var(--transition-fast);
  background-color: #E2E8E5;
}
.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb-btn:hover {
  opacity: 0.9;
}
.thumb-btn.active {
  opacity: 1;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(27, 67, 50, 0.2);
}

@media (max-width: 640px) {
  .gallery-main {
    aspect-ratio: 4 / 3;
  }
}

/* Detail Main Grid */
.detail-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.75rem;
}

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

.detail-header-block {
  margin-bottom: 2rem;
}
.detail-meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.detail-title {
  margin-bottom: 0.5rem;
}
.detail-address {
  font-size: 1.05rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.detail-address svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}
.detail-price-tag {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 0.75rem;
}

/* Quick Facts Grid */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-xs);
}
.fact-box {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.fact-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.fact-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

@media (max-width: 640px) {
  .facts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

.detail-section {
  margin-bottom: 2.75rem;
}
.detail-section-title {
  font-size: 1.35rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}
.detail-description {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--text-body);
}

/* Features List */
.features-pills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}
.feature-pill-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  padding: 0.65rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-main);
}
.feature-pill-item svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
  flex-shrink: 0;
}

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

/* Sidebar: Agent Card & Enquiry Form */
.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.agent-card-sidebar {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.agent-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.agent-avatar {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--accent);
}
.agent-meta h4 {
  font-size: 1.15rem;
  margin-bottom: 0.15rem;
}
.agent-meta p {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.agent-meta .agent-license {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 0.15rem;
}

.agent-direct-links {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
}
.agent-link-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-body);
}
.agent-link-item:hover {
  color: var(--primary);
}
.agent-link-item svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.inquiry-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.inquiry-card-title {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}
.inquiry-card-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* --------------------------------------------------------------------------
   11. Forms & Inputs (Contact & Modals)
   -------------------------------------------------------------------------- */
.form-group {
  margin-bottom: 1.15rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-medium);
  background-color: #FFFFFF;
  color: var(--text-main);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}
.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.12);
}
.form-control.is-invalid {
  border-color: var(--color-danger);
  background-color: var(--color-danger-bg);
}

.form-error {
  display: none;
  font-size: 0.75rem;
  color: var(--color-danger);
  margin-top: 0.35rem;
  font-weight: 500;
}
.form-control.is-invalid + .form-error,
.form-group.has-error .form-error {
  display: block;
}

/* Success Box */
.form-success-box {
  background-color: var(--color-success-bg);
  border: 1px solid rgba(43, 138, 62, 0.25);
  border-radius: var(--radius-md);
  padding: 2.25rem 2rem;
  text-align: center;
}
.form-success-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background-color: #D3F9D8;
  color: var(--color-success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem auto;
}
.form-success-icon svg {
  width: 26px;
  height: 26px;
}
.form-success-title {
  color: var(--color-success);
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}
.form-success-msg {
  color: #245831;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

/* --------------------------------------------------------------------------
   12. Agents View
   -------------------------------------------------------------------------- */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 960px) {
  .agents-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .agents-grid {
    grid-template-columns: 1fr;
  }
}

.agent-roster-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  display: flex;
  flex-direction: column;
}
.agent-roster-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.agent-roster-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: #E2E8E5;
}
.agent-roster-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.agent-roster-card:hover .agent-roster-media img {
  transform: scale(1.05);
}

.agent-roster-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
}
.agent-roster-name {
  font-size: 1.3rem;
  margin-bottom: 0.2rem;
}
.agent-roster-role {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.25rem;
}
.agent-roster-lic {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}
.agent-roster-bio {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.agent-roster-contact {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
}
.agent-roster-contact a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-body);
}
.agent-roster-contact a:hover {
  color: var(--primary);
}
.agent-roster-contact svg {
  width: 15px;
  height: 15px;
  color: var(--primary);
}

.agent-roster-action {
  margin-top: 1rem;
}

/* --------------------------------------------------------------------------
   13. Contact View Layout
   -------------------------------------------------------------------------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 3.5rem;
}

@media (max-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.contact-info-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
}

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}
.channel-item {
  display: flex;
  gap: 1rem;
}
.channel-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-subtle);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.channel-icon svg {
  width: 20px;
  height: 20px;
}
.channel-details h5 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  color: var(--text-main);
}
.channel-details p,
.channel-details a {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.channel-details a:hover {
  color: var(--primary);
}

.office-hours-box {
  background-color: var(--bg-surface-secondary);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  font-size: 0.85rem;
}
.office-hours-box h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.contact-form-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

@media (max-width: 600px) {
  .contact-form-card {
    padding: 1.5rem;
  }
}

/* --------------------------------------------------------------------------
   14. Modal Dialogs (Tour Booking)
   -------------------------------------------------------------------------- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(18, 26, 22, 0.72);
  backdrop-filter: blur(5px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}
.modal-overlay.open {
  display: flex;
}

.modal-container {
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-width: 580px;
  width: 100%;
  position: relative;
  padding: 2.25rem;
  margin: auto;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 1.75rem;
  color: var(--text-light);
  line-height: 1;
  padding: 0.25rem;
}
.modal-close:hover {
  color: var(--text-main);
}

.modal-header {
  margin-bottom: 1.5rem;
}
.modal-title {
  margin-top: 0.5rem;
  margin-bottom: 0.35rem;
}
.modal-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.modal-success {
  text-align: center;
  padding: 2rem 0;
}
.modal-success .success-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-full);
  background-color: #D3F9D8;
  color: var(--color-success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem auto;
}
.modal-success .success-icon-wrap svg {
  width: 30px;
  height: 30px;
}
.modal-success .success-title {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}
.modal-success .success-msg {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* --------------------------------------------------------------------------
   15. Toast Notifications
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: none;
}

.toast {
  background-color: var(--bg-dark);
  color: #FFF;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  pointer-events: auto;
  animation: toastSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 380px;
  border-left: 4px solid var(--accent);
}
.toast svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent);
}
.toast.toast-remove {
  border-left-color: #FA5252;
}
.toast.toast-remove svg {
  color: #FA5252;
}

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

@media (max-width: 480px) {
  .toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }
  .toast {
    max-width: 100%;
  }
}

/* --------------------------------------------------------------------------
   16. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--bg-dark);
  color: #C8D1CC;
  padding-top: 5rem;
  padding-bottom: 2rem;
  margin-top: 5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.brand-col .footer-logo {
  color: #FFFFFF;
  margin-bottom: 1rem;
}
.brand-col .footer-logo .brand-icon {
  color: var(--accent);
}
.footer-tagline {
  font-size: 0.9rem;
  line-height: 1.65;
  color: #9AA7A0;
  margin-bottom: 1.5rem;
  max-width: 320px;
}
.footer-socials {
  display: flex;
  gap: 0.75rem;
}
.social-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.social-icon:hover {
  background-color: var(--primary);
  color: #FFFFFF;
  transform: translateY(-2px);
}
.social-icon svg {
  width: 17px;
  height: 17px;
}

.footer-heading {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #FFFFFF;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.footer-links a {
  color: #A3B0AA;
  font-size: 0.9rem;
}
.footer-links a:hover {
  color: var(--accent);
}

.footer-address {
  font-style: normal;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #A3B0AA;
}
.footer-address strong {
  color: #FFFFFF;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 2rem;
}
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: #798781;
}
.copyright {
  margin-bottom: 0;
}
.disclaimer {
  margin-bottom: 0;
}

@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}
@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .site-footer {
    padding-top: 3.5rem;
  }
}

/* --------------------------------------------------------------------------
   17. Loading Indicator
   -------------------------------------------------------------------------- */
.page-loading {
  text-align: center;
  padding: 6rem 1rem;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-medium);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem auto;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   18. Print Media Styles
   -------------------------------------------------------------------------- */
@media print {
  .site-header,
  .top-banner,
  .site-footer,
  .btn-fav-card,
  .detail-nav-bar,
  .modal-overlay,
  .toast-container {
    display: none !important;
  }
  body {
    background: #FFF;
    color: #000;
  }
  .property-card,
  .detail-gallery {
    box-shadow: none !important;
    border: 1px solid #CCC !important;
  }
}
