/* ===========================================================
   MIFROSE PROPERTY — Design System
   Forest Green / Terracotta · Plus Jakarta Sans + Inter + JetBrains Mono
   =========================================================== */

:root {
  --forest: #1D9E75;
  --teal-deep: #085041;
  --mint: #5DCAA5;
  --terracotta: #D85A30;
  --blush: #F5C4B3;
  --ivory: #F7F5F0;
  --charcoal: #1A1A1A;
  --slate: #5F5E5A;
  --stone: #D3D1C7;
  --white: #FFFFFF;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 8px rgba(8, 80, 65, 0.06);
  --shadow-md: 0 8px 24px rgba(8, 80, 65, 0.10);
  --shadow-lg: 0 16px 48px rgba(8, 80, 65, 0.16);
}

* { box-sizing: border-box; }

body { max-width: 100%;  overflow-x: hidden; }

body {
  font-family: 'Inter', 'DM Sans', sans-serif;
  color: var(--charcoal);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

h1, h2, h3, h4, h5, h6, .display {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  color: var(--charcoal);
  letter-spacing: -0.01em;
}

.mono, .price-tag {
  font-family: 'JetBrains Mono', monospace;
}

a { color: var(--forest); text-decoration: none; }
a:hover { color: var(--teal-deep); }

::selection { background: var(--mint); color: var(--teal-deep); }

:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.container-narrow { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons ---------- */
.btn {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.4rem;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-forest {
  background: var(--forest);
  color: var(--white);
}
.btn-forest:hover { background: var(--teal-deep); color: var(--white); }

.btn-terracotta {
  background: var(--terracotta);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(216, 90, 48, 0.30);
}
.btn-terracotta:hover {
  background: #c14e27;
  color: var(--white);
  box-shadow: 0 6px 18px rgba(216, 90, 48, 0.40);
}

.btn-outline-forest {
  background: transparent;
  border: 1.5px solid var(--forest);
  color: var(--teal-deep);
}
.btn-outline-forest:hover { background: var(--forest); color: var(--white); }

.btn-ghost {
  background: transparent;
  color: var(--charcoal);
  border: 1.5px solid var(--stone);
}
.btn-ghost:hover { border-color: var(--forest); color: var(--teal-deep); background: rgba(29,158,117,0.06); }

/* ============================================================
   NAVBAR — structure: brand | nav-links (ul) | nav-actions
   ============================================================ */
.mf-navbar {
  background: var(--white);
  border-bottom: 1px solid var(--stone);
  padding: 0.7rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  overflow: visible;   /* ADD THIS */
}
.mf-navbar .container-narrow {
  gap: 0.75rem;
  flex-wrap: nowrap;
}
.mf-navbar .brand {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--teal-deep);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  min-width: 0;
}
.mf-navbar .brand .dot { color: var(--terracotta); }

/* nav-links list (desktop) */
.mf-navbar .nav-links {
  flex-wrap: nowrap;
  gap: 0.1rem;
  min-width: 0;
  overflow: visible;   /* was overflow-x: auto — this was clipping the dropdowns */
  scrollbar-width: none;
}
.mf-navbar .nav-links::-webkit-scrollbar { display: none; }
.mf-navbar .nav-links > li {
  position: relative;
  display: flex;
  flex-shrink: 0;
}
.mf-navbar .nav-link {
  font-weight: 500;
  color: var(--charcoal);
  font-size: 0.93rem;
  padding: 0.5rem 0.75rem !important;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}
.mf-navbar .nav-link:hover, .mf-navbar .nav-link.active { color: var(--forest); }
.mf-navbar .nav-link.dropdown-toggle::after { display: none; }

/* Desktop dropdown menus */
.mf-navbar .dropdown-menu {
  border: 1.5px solid var(--stone);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(8,80,65,.12);
  padding: 6px;
  min-width: 220px;
  margin-top: 6px;
}
.mf-navbar .dropdown-item {
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  color: var(--charcoal);
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  transition: background .12s;
  white-space: normal;
}
.mf-navbar .dropdown-item:hover { background: rgba(29,158,117,.08); color: var(--teal-deep); }
.mf-navbar .dropdown-divider { border-color: var(--stone); margin: 4px 6px; }
.mf-navbar .dropdown-item.all-link { font-weight: 700; color: var(--teal-deep); }
.mf-navbar .dropdown-item.all-link:hover { background: rgba(29,158,117,.14); }

/* nav-actions (sign in / sign up / post property / hamburger) */
.mf-navbar .nav-actions { flex-shrink: 0; }
.mf-navbar .nav-actions .btn { white-space: nowrap; }
.mf-navbar .nav-actions .btn i { margin-right: 4px; }

/* Logo sizing: capped height, scales DOWN on small screens, never forces overflow */
.brand img {
  max-height: 50px;
  width: auto;
  object-fit: contain;
  display: block;
}
@media (max-width: 575.98px) {
  .mf-navbar .brand img { max-height: 40px; max-width: auto; }
}

/* ---------- Mobile nav offcanvas ---------- */
.mf-mobile-nav { width: 300px; max-width: 86vw; }
.mf-mobile-nav .offcanvas-header { border-bottom: 1px solid var(--stone); }
.mf-mobile-nav .offcanvas-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mf-mobile-nav .nav-link {
  padding: 0.7rem 0.5rem !important;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  display: block;
}
.mf-mobile-nav .nav-link:hover, .mf-mobile-nav .nav-link.active {
  background: rgba(29,158,117,0.08);
  color: var(--teal-deep);
}
.mf-mobile-nav hr { border-color: var(--stone); margin: 1rem 0; }

/* Mobile offcanvas nav accordion */
.mf-mobile-nav .acc-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; background: none; border: none;
  font-family: 'Inter', sans-serif; font-size: 1rem; font-weight: 500;
  color: var(--charcoal); padding: 0.7rem 0.5rem;
  border-radius: var(--radius-sm); cursor: pointer;
  transition: background .13s, color .13s;
}
.mf-mobile-nav .acc-btn:hover, .mf-mobile-nav .acc-btn.open {
  background: rgba(29,158,117,.08); color: var(--teal-deep);
}
.mf-mobile-nav .acc-btn .arr { font-size: 0.75rem; transition: transform .2s; }
.mf-mobile-nav .acc-btn.open .arr { transform: rotate(180deg); }
.mf-mobile-nav .acc-panel {
  overflow: hidden; max-height: 0;
  transition: max-height .28s ease;
  background: rgba(29,158,117,.04);
  border-radius: var(--radius-sm);
  margin: 0 4px 4px;
}
.mf-mobile-nav .acc-panel.open { max-height: 400px; }
.mf-mobile-nav .acc-panel a {
  display: block; font-size: 0.88rem;
  color: var(--charcoal); padding: 9px 1.25rem;
  transition: color .12s;
}
.mf-mobile-nav .acc-panel a:hover { color: var(--forest); }
.mf-mobile-nav .acc-panel a.sub-all { font-weight: 700; color: var(--teal-deep); border-top: 1px solid var(--stone); margin-top: 2px; }

/* ============================================================
   RESPONSIVE — collapse desktop nav, show hamburger
   ============================================================ */
@media (max-width: 991.98px) {
  .mf-navbar .container-narrow { padding: 0 16px; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--teal-deep) 0%, var(--forest) 65%, var(--mint) 130%);
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 7rem;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 85% 15%, rgba(255,255,255,0.08) 0, transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(216,90,48,0.18) 0, transparent 40%);
}
.hero .eyebrow {
  color: var(--blush);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero h1 {
  color: var(--white);
  font-size: clamp(1.65rem, 6vw, 3.4rem);
  line-height: 1.18;
  max-width: 720px;
  word-wrap: break-word;
}
.hero p.lead {
  color: rgba(255,255,255,0.85);
  font-size: clamp(0.95rem, 2.6vw, 1.1rem);
  max-width: 560px;
}

/* Search card overlapping hero bottom */
.search-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1.75rem;
  margin-top: -3.75rem;
  position: relative;
  z-index: 10;
}
.purpose-tabs {
  display: inline-flex;
  background: var(--ivory);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 1.25rem;
  border: 1px solid var(--stone);
  max-width: 100%;
  overflow-x: auto;
}
.purpose-tabs .tab {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  color: var(--slate);
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  background: transparent;
  white-space: nowrap;
}
.purpose-tabs .tab.active {
  background: var(--forest);
  color: var(--white);
}
.search-card label.field-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate);
  margin-bottom: 0.35rem;
  display: block;
}
.search-card .form-select,
.search-card .form-control {
  border: 1.5px solid var(--stone);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  font-size: 0.92rem;
}
.search-card .form-select:focus,
.search-card .form-control:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(29,158,117,0.14);
}

/* ---------- Section headers ---------- */
.section-pad { padding: 4.5rem 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.section-head .tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--forest);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.section-head h2 { font-size: clamp(1.4rem, 4vw, 1.85rem); margin: 0.25rem 0 0; }
.section-head p { color: var(--slate); margin: 0.4rem 0 0; max-width: 480px; }

/* ---------- Listing cards ---------- */
.listing-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--stone);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}
.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.listing-card .img-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--stone);
}
.listing-card .img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.listing-card:hover .img-wrap img { transform: scale(1.06); }
.badge-featured {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--terracotta);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}
.badge-purpose {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(8,80,65,0.85);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.save-btn {
  position: absolute;
  bottom: 12px; right: 12px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  display: flex; align-items: center; justify-content: center;
  border: none;
  color: var(--terracotta);
  cursor: pointer;
  transition: background 0.15s ease;
}
.save-btn:hover { background: var(--white); }
.listing-card .body { padding: 1rem 1.1rem 1.15rem; }
.listing-card .price-tag {
  color: var(--teal-deep);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  word-break: break-word;
}
.listing-card .price-tag small {
  font-family: 'Inter', sans-serif;
  color: var(--slate);
  font-weight: 500;
  font-size: 0.75rem;
}
.listing-card .title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.96rem;
  margin: 0.3rem 0 0.15rem;
  color: var(--charcoal);
  display: block;
}
.listing-card .location {
  color: var(--slate);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.listing-card .specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 0.9rem;
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px dashed var(--stone);
  color: var(--slate);
  font-size: 0.78rem;
}
.listing-card .specs span { display: flex; align-items: center; gap: 0.3rem; }
.listing-card .specs i { color: var(--forest); font-size: 0.85rem; }

/* ---------- Listing rows (List view) ---------- */
.listing-row {
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  display: flex;
  gap: 1.1rem;
  padding: 0.9rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.listing-row:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--stone);
}
.listing-row .lr-img {
  position: relative;
  flex: 0 0 220px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--stone);
}
.listing-row .lr-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.listing-row:hover .lr-img img { transform: scale(1.05); }
.listing-row .lr-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.2rem 0;
}
.listing-row .lr-top { min-width: 0; }
.badge-purpose-inline {
  display: inline-block;
  background: rgba(8,80,65,0.08);
  color: var(--teal-deep);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.45rem;
}
.listing-row .title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--charcoal);
  display: block;
  margin-bottom: 0.25rem;
}
.listing-row .location {
  color: var(--slate);
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.listing-row .specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  color: var(--slate);
  font-size: 0.8rem;
  margin-top: 0.6rem;
}
.listing-row .specs span { display: flex; align-items: center; gap: 0.3rem; }
.listing-row .specs i { color: var(--forest); font-size: 0.85rem; }
.listing-row .lr-price {
  flex: 0 0 160px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  justify-content: center;
  padding-left: 0.5rem;
  border-left: 1px dashed var(--stone);
}
.listing-row .lr-price .price-tag {
  color: var(--teal-deep);
  font-weight: 700;
  font-size: 1.15rem;
}
.listing-row .lr-price small {
  color: var(--slate);
  font-size: 0.78rem;
  font-family: 'Inter', sans-serif;
}
.listing-row .lr-price .btn { white-space: nowrap; }

/* ---------- Category tiles ---------- */
.category-row { row-gap: 1rem; }
.category-tile {
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  padding: 1.4rem 1rem;
  text-align: center;
  display: block;
  transition: all 0.2s ease;
  height: 100%;
}
.category-tile:hover {
  border-color: var(--forest);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transform: translateY(-3px);
}
.category-tile .icon-wrap {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(29,158,117,0.10);
  color: var(--forest);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 0.75rem;
  font-size: 1.3rem;
  transition: background 0.2s ease;
}
.category-tile:hover .icon-wrap { background: var(--forest); color: var(--white); }
.category-tile .name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  color: var(--charcoal);
  font-size: 0.92rem;
}
.category-tile .count {
  color: var(--slate);
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
}
@media (min-width: 992px) {
  .category-row .col-lg { flex: 1 0 0%; }
}

/* ---------- State chips ---------- */
.state-chip {
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--charcoal);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}
.state-chip:hover {
  background: var(--teal-deep);
  border-color: var(--teal-deep);
  color: var(--white);
}
.state-chip .n {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--forest);
}
.state-chip:hover .n { color: var(--mint); }

/* ---------- How it works ---------- */
.how-strip {
  background: var(--teal-deep);
  color: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem 1.75rem;
  position: relative;
  overflow: hidden;
}
.how-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.how-step .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--mint);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(93,202,165,0.4);
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.how-step h5 {
  color: var(--white);
  font-size: 1.02rem;
  margin-bottom: 0.3rem;
}
.how-step p {
  color: rgba(255,255,255,0.72);
  font-size: 0.86rem;
  margin: 0;
}
.how-arrow {
  color: var(--mint);
  font-size: 1.4rem;
  align-self: center;
  opacity: 0.5;
}

/* ---------- Trust strip ---------- */
.trust-strip {
  border-top: 1px solid var(--stone);
  border-bottom: 1px solid var(--stone);
  padding: 2.25rem 0;
  background: var(--white);
}
.trust-stat .figure {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  font-weight: 700;
  color: var(--teal-deep);
  line-height: 1;
}
.trust-stat .label {
  color: var(--slate);
  font-size: 0.82rem;
  margin-top: 0.3rem;
}

/* ---------- Footer ---------- */
.mf-footer {
  background: var(--teal-deep);
  color: rgba(255,255,255,0.78);
  padding: 3rem 0 1.5rem;
}
.mf-footer h6 {
  color: var(--white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  margin-bottom: 1rem;
}
.mf-footer a { color: rgba(255,255,255,0.78); }
.mf-footer a:hover { color: var(--mint); }
.mf-footer .brand {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--white);
}
.mf-footer .brand .dot { color: var(--terracotta); }
.mf-footer .brand img {max-height: 50px; max-width:auto; }
.mf-footer .social-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  transition: background 0.15s ease;
}
.mf-footer .social-icon:hover { background: var(--forest); color: var(--white); }
.mf-footer .bottom-bar {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
}
@media (max-width: 575.98px) {
  .mf-footer .bottom-bar { flex-direction: column; gap: 0.4rem; text-align: center; }
}

/* ---------- Listings page: filters sidebar ---------- */
.filters-panel {
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  padding: 1.4rem;
}
.filters-panel .filter-group {
  border-bottom: 1px solid var(--stone);
  padding-bottom: 1.1rem;
  margin-bottom: 1.1rem;
}
.filters-panel .filter-group:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.filters-panel .filter-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--charcoal);
}
.filters-panel .form-select,
.filters-panel .form-control {
  border: 1.5px solid var(--stone);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}
.filters-panel .form-select:focus,
.filters-panel .form-control:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(29,158,117,0.12);
}
.price-range-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--teal-deep);
  background: var(--ivory);
  border: 1px solid var(--stone);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.7rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.form-range::-webkit-slider-thumb { background: var(--forest); }
.form-range::-moz-range-thumb { background: var(--forest); }
.form-range::-webkit-slider-runnable-track { background: var(--stone); }

.bed-toggle {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.bed-toggle .btn-bed {
  flex: 1 1 18%;
  min-width: 44px;
  border: 1.5px solid var(--stone);
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate);
  cursor: pointer;
  transition: all 0.15s ease;
}
.bed-toggle .btn-bed.active,
.bed-toggle .btn-bed:hover {
  border-color: var(--forest);
  color: var(--teal-deep);
  background: rgba(29,158,117,0.08);
}
.amenity-check {
  font-size: 0.88rem;
  color: var(--charcoal);
}
.amenity-check .form-check-input:checked {
  background-color: var(--forest);
  border-color: var(--forest);
}

/* ---------- Listings toolbar ---------- */
.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.results-count {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
}
.results-count .mono { color: var(--forest); }
.view-toggle {
  display: inline-flex;
  background: var(--white);
  border: 1.5px solid var(--stone);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.view-toggle button {
  border: none;
  background: transparent;
  padding: 0.5rem 0.8rem;
  color: var(--slate);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}
.view-toggle button.active { background: var(--forest); color: var(--white); }
.sort-select {
  border: 1.5px solid var(--stone);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.8rem;
  font-size: 0.82rem;
  background: var(--white);
  max-width: 100%;
}

/* ---------- Map ---------- */
#map-view {
  height: 600px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--stone);
}
.leaflet-popup-content-wrapper { border-radius: var(--radius-sm); }
.map-popup img { width: 100%; height: 90px; object-fit: cover; border-radius: 6px 6px 0 0; }
.map-popup .price-tag { font-size: 0.95rem; }

/* ---------- Pagination ---------- */
.mf-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 2.5rem;
}
.mf-pagination a, .mf-pagination span {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--stone);
  color: var(--charcoal);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}
.mf-pagination a:hover { border-color: var(--forest); color: var(--forest); }
.mf-pagination .active { background: var(--forest); color: var(--white); border-color: var(--forest); }
.mf-pagination .disabled { color: var(--stone); border-color: var(--stone); pointer-events: none; }

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center;
  padding: 3rem 1.25rem;
  background: var(--white);
  border: 1.5px dashed var(--stone);
  border-radius: var(--radius);
}
.empty-state .icon-wrap {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--ivory);
  color: var(--forest);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 1.1rem;
}
.empty-state h4 { margin-bottom: 0.5rem; font-size: 1.2rem; }
.empty-state p { color: var(--slate); max-width: 380px; margin: 0 auto 1.5rem; font-size: 0.9rem; }

/* Active filter pills */
.active-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
  align-items: center;
}
.filter-pill {
  background: rgba(29,158,117,0.08);
  border: 1px solid rgba(29,158,117,0.3);
  color: var(--teal-deep);
  border-radius: 999px;
  padding: 0.3rem 0.7rem 0.3rem 0.9rem;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  white-space: nowrap;
}
.filter-pill button {
  background: none;
  border: none;
  color: var(--teal-deep);
  opacity: 0.6;
  display: flex;
  padding: 0;
}
.filter-pill button:hover { opacity: 1; }
.clear-all-link {
  font-size: 0.8rem;
  color: var(--terracotta);
  font-weight: 600;
  align-self: center;
}

/* =========== RESPONSIVE BREAKPOINTS =========== */

/* Tablet and below */
@media (max-width: 991.98px) {
  .search-card { margin-top: -2.5rem; padding: 1.25rem; }
  .hero { padding: 3.5rem 0 6rem; }
  #map-view { height: 420px; }
  .listing-row { flex-wrap: wrap; }
  .listing-row .lr-img { flex: 0 0 100%; aspect-ratio: 16 / 9; }
  .listing-row .lr-price {
    flex: 1 1 100%;
    align-items: flex-start;
    text-align: left;
    border-left: none;
    border-top: 1px dashed var(--stone);
    padding-left: 0;
    padding-top: 0.7rem;
    margin-top: 0.5rem;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
  }
}

/* Small phones */
@media (max-width: 575.98px) {
  .container-narrow { padding: 0 16px; }
  .section-pad { padding: 3rem 0; }
  .hero { padding: 2.75rem 0 5.5rem; }
  .search-card { margin-top: -3.25rem; padding: 1.1rem; border-radius: 12px; }
  .search-card .row.g-3 > div { margin-bottom: 0; }
  .btn { font-size: 0.9rem; padding: 0.6rem 1.1rem; }
  .section-head { margin-bottom: 1.5rem; }
  .how-strip { padding: 1.75rem 1.25rem; }
  .how-step { gap: 0.75rem; }
  .trust-strip .row.g-4 { row-gap: 1.25rem !important; }
  .listing-card .specs { font-size: 0.74rem; gap: 0.6rem 0.7rem; }
  .listing-row { padding: 0.7rem; gap: 0.8rem; }
  .listing-row .lr-price { flex-direction: column; align-items: flex-start; }
  .listing-row .lr-price .btn { width: 100%; text-align: center; }
  .view-toggle button { padding: 0.45rem 0.6rem; font-size: 0.76rem; }
}



/* ============================================================
   PROPERTY DETAIL PAGE — property.html
   ============================================================ */

/* ---------- Gallery ---------- */
/* No charcoal backdrop at all — the section background matches the
   page (ivory), so there is nothing dark left for any gap, border,
   or unfilled pixel to expose. */
.pd-gallery-section {
  background: var(--ivory);
  padding: 1rem 0 0;
}

/* Airbnb-style: main left, 2x2 grid right.
   Small 4px gap is fine now because the gap shows ivory, not black. */
.pd-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 200px 200px;
  gap: 4px;
  background: var(--ivory);
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}

.pd-gallery-main {
  grid-row: 1 / 3;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  height: 100%;
}

.pd-gallery-img,
.pd-gallery-main .pd-gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.pd-gallery-main:hover .pd-gallery-img { transform: scale(1.03); }

.pd-play-badge {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.35);
  color: var(--white); font-size: 2.5rem;
  pointer-events: none;
}

.pd-gallery-expand {
  position: absolute; bottom: 14px; right: 14px;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(0,0,0,0.55);
  border: 1.5px solid rgba(255,255,255,0.25);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; cursor: pointer;
  transition: background 0.15s;
  backdrop-filter: blur(4px);
}
.pd-gallery-expand:hover { background: rgba(0,0,0,0.8); }

.pd-gallery-count {
  position: absolute; bottom: 14px; left: 14px;
  background: rgba(0,0,0,0.55); color: var(--white);
  font-size: 0.78rem; font-family: 'JetBrains Mono', monospace;
  padding: 0.28rem 0.7rem; border-radius: 999px;
  backdrop-filter: blur(4px);
  display: flex; align-items: center; gap: 0.4rem;
}

/* Thumbnails strip — gap shows ivory (page bg), never black */
.pd-gallery-thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 200px 200px;
  gap: 4px;
  background: var(--ivory);
}

.pd-gallery-thumbs::-webkit-scrollbar { display: none; }

/* Active state uses an INSET shadow instead of a border, so the
   highlight sits flush inside the image edge and never pushes the
   image inward (which is what exposed the gap color before). */
.pd-thumb {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: none;
}
.pd-thumb.active {
  box-shadow: inset 0 0 0 3px var(--forest);
}

.pd-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.pd-thumb:hover img { transform: scale(1.06); }

.pd-thumb-play {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.3);
  color: var(--white);
  font-size: 1.1rem;
}
.pd-thumb-more { position: relative; }
/* "+N more" overlay on last thumb */
.pd-thumb-more img { filter: brightness(0.45); }
.pd-thumb-more-label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700; font-size: 1.3rem;
}

/* ---------- Lightbox ---------- */
.pd-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.94);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}
.pd-lightbox.active { display: flex; }
.pd-lb-close {
  position: absolute;
  top: 20px; right: 20px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.2);
  color: var(--white);
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
  z-index: 2;
}
.pd-lb-close:hover { background: rgba(255,255,255,0.2); }

.pd-lb-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.2);
  color: var(--white);
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
  z-index: 2;
}
.pd-lb-nav:hover { background: rgba(255,255,255,0.22); }
.pd-lb-prev { left: 20px; }
.pd-lb-next { right: 20px; }

.pd-lb-stage {
  max-width: 90vw;
  max-height: 85vh;
  display: flex; align-items: center; justify-content: center;
}
.pd-lb-stage img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}
.pd-lb-counter {
  position: absolute;
  bottom: 20px; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  background: rgba(0,0,0,0.4);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
}

/* ---------- Property head ---------- */
.pd-head {
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.pd-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}
.pd-purpose-badge { font-size: 0.72rem; }

.pd-head-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hpc-save {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--stone);
  background: var(--white);
  color: var(--terracotta);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-size: 1rem;
}
.hpc-save:hover { border-color: var(--terracotta); background: rgba(216,90,48,0.06); }
.hpc-save.saved i { font-weight: 900; }

.pd-share-menu {
  min-width: 190px;
  border: 1.5px solid var(--stone);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 6px;
}
.pd-share-menu .dropdown-item {
  font-size: 0.85rem;
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: 0.5rem;
}
.pd-share-menu .dropdown-item:hover { background: rgba(29,158,117,0.08); color: var(--teal-deep); }

.pd-title {
  font-size: clamp(1.3rem, 4vw, 1.85rem);
  margin: 0 0 0.35rem;
  line-height: 1.25;
}
.pd-location {
  color: var(--slate);
  font-size: 0.88rem;
  display: flex; align-items: center; gap: 0.35rem;
  margin-bottom: 1rem;
}
.pd-price-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
}
.hpc-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.35rem, 4vw, 1.8rem);
  font-weight: 700;
  color: var(--teal-deep);
  letter-spacing: -0.02em;
}
.hpc-neg {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--forest);
  background: rgba(29,158,117,0.10);
  border: 1px solid rgba(29,158,117,0.25);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
}

/* Specs row */
.pd-specs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  padding: 1rem 0;
  border-top: 1px dashed var(--stone);
  border-bottom: 1px dashed var(--stone);
  margin-bottom: 0.9rem;
}
.pd-spec {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 80px;
}
.pd-spec > i {
  color: var(--forest);
  font-size: 1.15rem;
  flex-shrink: 0;
}
.pd-spec > div {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.pd-spec > div span {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--charcoal);
  font-size: 0.95rem;
}
.pd-spec > div small {
  color: var(--slate);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Meta row */
.pd-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.25rem;
  font-size: 0.78rem;
  color: var(--slate);
}
.pd-meta-row span { display: flex; align-items: center; gap: 0.35rem; }
.pd-meta-row i { color: var(--mint); }

/* ---------- Sections ---------- */
.pd-section {
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.pd-section-title {
  font-size: 1.15rem;
  margin-bottom: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--stone);
}

/* Description */
.pd-description {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.pd-description.expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.pd-read-more {
  background: none;
  border: none;
  color: var(--forest);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.35rem 0 0;
  cursor: pointer;
  display: flex; align-items: center; gap: 0.3rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.pd-read-more:hover { color: var(--teal-deep); }

/* Amenities grid */
.pd-amenities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 0.6rem;
}
.pd-amenity {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--charcoal);
  background: rgba(29,158,117,0.06);
  border: 1px solid rgba(29,158,117,0.18);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.85rem;
  font-weight: 500;
}
.pd-amenity i { color: var(--forest); font-size: 0.95rem; flex-shrink: 0; }
.pd-amenity-off {
  background: var(--ivory);
  border-color: var(--stone);
  color: var(--stone);
  text-decoration: line-through;
}
.pd-amenity-off i { color: var(--stone); }

/* Location / map */
.pd-location-address {
  font-size: 0.9rem;
  color: var(--slate);
  display: flex; align-items: flex-start; gap: 0.45rem;
  margin-bottom: 1rem;
}
.pd-location-address i { color: var(--terracotta); margin-top: 2px; flex-shrink: 0; }

.pd-map {
  height: 320px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stone);
  overflow: hidden;
  margin-bottom: 0.75rem;
  background: var(--ivory);
}
.pd-location-note {
  font-size: 0.78rem;
  color: var(--slate);
  display: flex; align-items: flex-start; gap: 0.4rem;
  margin: 0;
}
.pd-location-note i { color: var(--forest); margin-top: 1px; flex-shrink: 0; }

/* ---------- Right column (sticky sidebar) ---------- */
.pd-sticky {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Agent card */
.pd-agent-card {
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  padding: 1.35rem;
}
.pd-agent-top {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--stone);
}
.pd-agent-photo {
  width: 60px; height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--mint);
  flex-shrink: 0;
}
.pd-agent-info { min-width: 0; }
.pd-agent-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 0.97rem;
  color: var(--charcoal);
  display: flex; align-items: center; gap: 0.35rem;
  flex-wrap: wrap;
}
.pd-verified { color: var(--forest); font-size: 0.85rem; }
.pd-agent-role {
  font-size: 0.78rem;
  color: var(--slate);
  margin-top: 0.15rem;
}
.pd-agent-stats {
  font-size: 0.78rem;
  color: var(--forest);
  margin-top: 0.3rem;
  display: flex; align-items: center; gap: 0.3rem;
}

/* Enquiry form */
.pd-enquiry-card {
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  padding: 1.35rem;
}
.pd-enquiry-title {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}
.pd-enquiry-sub {
  font-size: 0.82rem;
  color: var(--slate);
  margin-bottom: 1rem;
}
.pd-enquiry-card .field-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate);
  margin-bottom: 0.3rem;
  display: block;
}
.pd-enquiry-card .form-control {
  border: 1.5px solid var(--stone);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  padding: 0.55rem 0.75rem;
}
.pd-enquiry-card .form-control:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(29,158,117,0.13);
}
.pd-enquiry-success {
  background: rgba(29,158,117,0.08);
  border: 1px solid rgba(29,158,117,0.3);
  color: var(--teal-deep);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex; align-items: center; gap: 0.5rem;
  margin-top: 0.75rem;
}
.pd-enquiry-success i { color: var(--forest); }
.pd-enquiry-disclaimer {
  font-size: 0.72rem;
  color: var(--slate);
  margin: 0.6rem 0 0;
  line-height: 1.55;
}

/* ---------- Listing card: save button (detail page reuse) ---------- */
.listing-card-link { display: block; height: 100%; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .pd-sticky { position: static; }
  .pd-gallery,
  .pd-gallery-thumbs {
    grid-template-rows: 160px 160px;
  }
}

@media (max-width: 575.98px) {
  .pd-gallery-section { padding: 0; }
  .pd-gallery {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .pd-gallery-main {
    grid-row: 1;
    aspect-ratio: 4 / 3;
  }
  .pd-gallery-thumbs {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 72px;
  }
  .pd-head, .pd-section, .pd-agent-card, .pd-enquiry-card { padding: 1.1rem; }
  .pd-specs-row { gap: 0.5rem 0.7rem; }
  .pd-spec { min-width: 70px; }
  .pd-amenities-grid { grid-template-columns: repeat(2, 1fr); }
  .pd-lb-prev { left: 8px; }
  .pd-lb-next { right: 8px; }
  .pd-lb-nav { width: 40px; height: 40px; }
}

/* ---- Fix: desktop dropdowns clipped by overflow-x: auto ---- */
.mf-navbar .nav-links {
  overflow: visible;    /* override the overflow-x: auto that clips dropdowns */
  overflow-x: clip;    /* still prevents horizontal scroll but doesn't create stacking context */
}

.mf-navbar .nav-links > li.dropdown {
  position: static;    /* lift positioning to the navbar level */
}

.mf-navbar .dropdown-menu {
  position: absolute;
  top: 100%;
}

