/* ============================================================
   MAM Homes — Find Your Home Page Styles
   ============================================================ */

/* ─── Split layout ─────────────────────────────────────────── */
.homes-split {
  display: flex;
  height: calc(100vh - var(--nav-height));
  margin-top: var(--nav-height);
  background: var(--dark);
  overflow: hidden;
}

/* ── Left panel: filters + scrollable cards ── */
.homes-left {
  flex: 0 0 40%;
  width: 40%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid rgba(255,255,255,0.06);
}

/* ── Right panel: sticky map ── */
.homes-right {
  flex: 1;
  position: relative;
  background: var(--dark-3);
}
#homes-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ─── Filters bar ──────────────────────────────────────────── */
.homes-filters-wrap {
  flex-shrink: 0;
  background: var(--dark-2);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding: 16px 24px;
}
.homes-filters {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
.homes-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 100px;
  position: relative;
}
.homes-filter-search { flex: 1.4; }
.homes-filter-label {
  font-family: var(--font-cond);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
}

/* ─── Custom dropdowns ─────────────────────────────────────── */
.hf-dropdown { position: relative; }

.hf-dropdown-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-cond);
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 9px 12px;
  cursor: pointer;
  text-align: left;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  white-space: nowrap;
  overflow: hidden;
}
.hf-dropdown-trigger:hover {
  border-color: rgba(255,255,255,0.28);
  color: white;
  background: rgba(255,255,255,0.07);
}
.hf-dropdown.open .hf-dropdown-trigger {
  border-color: var(--crimson);
  color: white;
}
.hf-dropdown-trigger svg {
  flex-shrink: 0;
  opacity: 0.4;
  transition: transform 0.22s ease;
}
.hf-dropdown.open .hf-dropdown-trigger svg {
  transform: rotate(180deg);
  opacity: 0.8;
}

.hf-dropdown-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  min-width: 170px;
  background: var(--dark-2);
  border: 1px solid rgba(255,255,255,0.08);
  border-top: 2px solid var(--crimson);
  z-index: 300;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.hf-dropdown.open .hf-dropdown-panel {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}
.hf-dropdown-opt {
  display: block;
  width: 100%;
  padding: 11px 16px;
  font-family: var(--font-cond);
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  text-align: left;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, padding-left 0.15s ease;
}
.hf-dropdown-opt:last-child { border-bottom: none; }
.hf-dropdown-opt:hover { color: white; background: rgba(255,255,255,0.04); padding-left: 22px; }
.hf-dropdown-opt.selected { color: var(--crimson); background: rgba(13,113,186,0.07); }
.hf-dropdown-opt.selected::before { content: '✓  '; font-size: 0.7rem; }

/* Search input */
.homes-search-input {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: white;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 9px 12px;
  width: 100%;
  outline: none;
  transition: border-color var(--transition);
  border-radius: 0;
  appearance: none;
}
.homes-search-input::placeholder { color: rgba(255,255,255,0.28); }
.homes-search-input:focus { border-color: var(--crimson); }

/* ─── Scrollable results ───────────────────────────────────── */
.homes-results {
  flex: 1;
  overflow-y: auto;
  padding: 20px 20px 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.homes-results::-webkit-scrollbar { width: 3px; }
.homes-results::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }

.homes-count {
  font-family: var(--font-cond);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.2);
  margin-bottom: 16px;
}

/* ─── List-view card grid ──────────────────────────────────── */
.homes-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── List card overrides ── */
.property-card--list {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,0.06);
  transition: opacity 0.45s ease, transform 0.45s ease, box-shadow 0.35s ease, border-color 0.25s ease;
}
.property-card--list.visible { opacity: 1; transform: translateY(0); }
.property-card--list:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.55);
  border-color: rgba(255,255,255,0.12);
}

/* Image: tall and full-width */
.property-card--list .property-card-img {
  height: 210px;
  flex-shrink: 0;
}
.property-card--list:hover .property-card-img-bg { transform: scale(1.05); }

/* Body */
.property-card--list .property-card-body {
  padding: 20px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Overline: AVAILABLE · WEST MIDLANDS */
.property-card-overline {
  font-family: var(--font-cond);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--crimson);
}

/* Development name */
.property-card--list .property-card-name {
  font-size: 1.45rem;
  margin-bottom: 0;
  line-height: 1.05;
}

/* Location */
.property-card--list .property-card-loc { margin-bottom: 0; }

/* Description — 2-line clamp */
.property-card-desc {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.42);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

/* 3-stat row */
.property-card-stats {
  display: flex;
  gap: 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 12px 0;
  margin-top: 4px;
}
.property-card-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 16px 0 0;
}
.property-card-stat + .property-card-stat {
  padding-left: 16px;
  border-left: 1px solid rgba(255,255,255,0.07);
}
.property-card-stat-label {
  font-family: var(--font-cond);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
}
.property-card-stat-value {
  font-family: var(--font-cond);
  font-size: 1rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0.02em;
}

/* Footer: CTA + Map button */
.property-card--list .property-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0;
  border-top: none;
  gap: 12px;
}
.property-card--list .property-card-cta {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  transition: gap 0.2s ease;
}
.property-card--list:hover .property-card-cta { gap: 10px; }

/* Map button — prominent on list cards */
.property-card--list .property-card-map-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-cond);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 7px 14px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.property-card--list .property-card-map-btn:hover {
  color: white;
  border-color: var(--crimson);
  background: rgba(13,113,186,0.1);
}

/* Empty state */
.homes-empty {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255,255,255,0.3);
}
.homes-empty svg { margin: 0 auto 20px; opacity: 0.3; display: block; }
.homes-empty p { font-size: 0.9rem; margin-bottom: 24px; }

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 1100px) {
  .homes-left { flex: 0 0 45%; width: 45%; }
}
@media (max-width: 768px) {
  .homes-split { flex-direction: column-reverse; height: auto; overflow: visible; }
  .homes-left  { flex: none; width: 100%; overflow: visible; border-right: none; }
  .homes-results { overflow: visible; }
  .homes-right { flex: none; width: 100%; height: 360px; }
  #homes-map { position: absolute; inset: 0; }
  .homes-filters { flex-wrap: wrap; gap: 10px; }
  .homes-filter-group { flex: 1 1 calc(50% - 6px); min-width: unset; }
  .homes-filter-search { flex: 1 1 100%; }
  .property-card--list .property-card-img { height: 180px; }
}
