/* === InmueblesCO — Airbnb-inspired Design System === */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

:root {
  /* Colors — Airbnb palette */
  --pc-primary: #ff385c;
  --pc-primary-active: #e00b41;
  --pc-primary-disabled: #ffd1da;
  --pc-ink: #222222;
  --pc-body: #3f3f3f;
  --pc-muted: #6a6a6a;
  --pc-muted-soft: #929292;
  --pc-hairline: #dddddd;
  --pc-hairline-soft: #ebebeb;
  --pc-border: #c1c1c1;
  --pc-canvas: #ffffff;
  --pc-surface-soft: #f7f7f7;
  --pc-surface-card: #ffffff;
  --pc-surface-strong: #f2f2f2;
  --pc-on-primary: #ffffff;
  --pc-legal: #428bff;
  --pc-scrim: #000000;

  /* Shadows — Airbnb three-layer */
  --shadow-card: rgba(0,0,0,0.02) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 6px, rgba(0,0,0,0.1) 0px 4px 8px;
  --shadow-hover: rgba(0,0,0,0.08) 0px 4px 12px;
  --shadow-search: rgba(0,0,0,0.02) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 6px, rgba(0,0,0,0.1) 0px 4px 8px;

  /* Mortgage calculator gradient (light) — overridden in html.dark */
  --pc-brand-light: #fef2f2;
  --pc-brand-grad: linear-gradient(135deg, #fef2f2, #fce7f3);

  /* Radii */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 32px;
  --r-full: 9999px;

  /* Spacing */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 12px;
  --sp-base: 16px;
  --sp-lg: 24px;
  --sp-xl: 32px;
  --sp-xxl: 48px;
  --sp-section: 64px;

  /* Typography */
  --ff: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* === DARK MODE ===
   All colors are tokenized; dark mode just overrides the tokens.
   Toggled via html.dark (JS in app.js: localStorage + prefers-color-scheme). */
html.dark {
  /* Colors */
  --pc-primary: #ff5a7d;
  --pc-primary-active: #ff385c;
  --pc-primary-disabled: #5c2430;
  --pc-ink: #f2f2f2;
  --pc-body: #d6d6d6;
  --pc-muted: #9a9a9a;
  --pc-muted-soft: #737373;
  --pc-hairline: #3a3a3a;
  --pc-hairline-soft: #2a2a2a;
  --pc-border: #4a4a4a;
  --pc-canvas: #121212;
  --pc-surface-soft: #1e1e1e;
  --pc-surface-card: #181818;
  --pc-surface-strong: #262626;
  --pc-on-primary: #ffffff;
  --pc-legal: #6ea8fe;
  --pc-scrim: #000000;

  /* Shadows — deeper for dark bg */
  --shadow-card: rgba(0,0,0,0.4) 0px 0px 0px 1px, rgba(0,0,0,0.5) 0px 2px 6px, rgba(0,0,0,0.6) 0px 4px 8px;
  --shadow-hover: rgba(0,0,0,0.6) 0px 4px 12px;
  --shadow-search: rgba(0,0,0,0.4) 0px 0px 0px 1px, rgba(0,0,0,0.5) 0px 2px 6px, rgba(0,0,0,0.6) 0px 4px 8px;

  /* Mortgage calculator gradient (light pink → dark) */
  --pc-brand-light: #2a1218;
  --pc-brand-grad: linear-gradient(135deg, #2a1218, #331520);

  color-scheme: dark;
}
/* Navbar stays dark in both modes, but on dark mode blends with canvas */
html.dark .navbar { background: var(--pc-surface-card) !important; }
html.dark .navbar-collapse { background: var(--pc-surface-card); }
/* Footer blends with canvas in dark */
html.dark footer { background: var(--pc-surface-card) !important; }
/* Map container looks better with a dark border */
html.dark #detail-map { border-color: var(--pc-hairline) !important; }
/* Filter-count badge (was bg-primary) — use brand color in both modes */
.badge-count {
  background: var(--pc-primary);
  color: var(--pc-on-primary);
}
/* Bootstrap form-controls (selects/inputs in filters) — follow the theme */
html.dark .form-select,
html.dark .form-control {
  background-color: var(--pc-surface-card);
  color: var(--pc-ink);
  border-color: var(--pc-hairline);
}
html.dark .form-select:focus,
html.dark .form-control:focus {
  background-color: var(--pc-surface-card);
  color: var(--pc-ink);
  border-color: var(--pc-primary);
  box-shadow: 0 0 0 0.2rem rgba(255, 90, 125, 0.25);
}
html.dark .modal-content { background-color: var(--pc-canvas); color: var(--pc-ink); }
html.dark .modal-header, html.dark .modal-footer { border-color: var(--pc-hairline); }
html.dark .btn-close { filter: invert(1); }
html.dark .page-link {
  background-color: var(--pc-surface-card);
  color: var(--pc-ink);
  border-color: var(--pc-hairline);
}
html.dark .page-item.disabled .page-link {
  background-color: var(--pc-surface-soft);
  color: var(--pc-muted);
  border-color: var(--pc-hairline);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { overflow-x: clip; }
body {
  max-width: 100vw;
  overflow-x: clip;
  font-family: var(--ff);
  color: var(--pc-ink);
  background: var(--pc-canvas);
  -webkit-font-smoothing: antialiased;
}

.main-content { padding-top: 80px; min-height: 80vh; }
.container { overflow-x: clip; }

/* === NAV === */
.navbar {
  background: var(--pc-canvas) !important;
  border-bottom: 1px solid var(--pc-hairline-soft) !important;
  box-shadow: none !important;
  height: 80px;
}
.navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--pc-primary) !important;
  letter-spacing: -0.3px;
}
.navbar-brand span { color: var(--pc-ink); }
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--pc-ink) !important;
  padding: 8px 12px !important;
}
.nav-link:hover { color: var(--pc-muted) !important; }
.navbar-toggler {
  border: none;
  padding: 8px;
  margin-right: -4px;
  color: var(--pc-ink); /* icono hereda el color del tema */
}
.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler .bi-list { font-size: 28px; line-height: 1; display: block; }
.navbar-collapse { padding: 12px 0; }

/* Nav link icons (desktop: small inline; mobile: colored block) */
.nav-link i { font-size: 15px; }
/* Theme toggle (dark mode) — desktop: circular button next to search;
   mobile: full row inside the panel with label. */
.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--pc-hairline);
  border-radius: var(--r-full);
  background: var(--pc-canvas);
  color: var(--pc-ink);
  font-size: 17px;
  cursor: pointer;
  margin-left: 8px;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
}
.theme-toggle:hover { border-color: var(--pc-ink); }
.theme-toggle .theme-toggle-label { display: none; }
/* Show moon by default (light mode); show sun in dark mode */
.theme-toggle .bi-sun { display: none; }
html.dark .theme-toggle .bi-moon-stars { display: none; }
html.dark .theme-toggle .bi-sun { display: inline; }
/* Mobile: theme toggle becomes a menu row (icon + label, like nav links) */
@media (max-width: 767.98px) {
  .theme-toggle-item { border-bottom: none; }
  .theme-toggle {
    width: auto; /* rellena el ancho del li como los nav-link (sin desbordar por los márgenes) */
    height: auto;
    justify-content: flex-start;
    gap: 14px;
    margin: 8px 12px 4px;
    padding: 13px 16px;
    border: none;
    border-radius: var(--r-sm);
    background: var(--pc-surface-soft);
    font-size: 16px;
    font-weight: 600;
    color: var(--pc-primary) !important;
  }
  .theme-toggle .bi-moon-stars,
  .theme-toggle .bi-sun {
    font-size: 20px;
    width: 24px;
    text-align: center;
    color: var(--pc-primary);
    flex-shrink: 0;
  }
  .theme-toggle .theme-toggle-label { display: inline; }
  .theme-toggle:hover { background: var(--pc-surface-strong); }
}
/* Desktop: toggle item behaves like the search icon (no list-item styling) */
@media (min-width: 768px) {
  .theme-toggle-item { border: none; padding: 0; }
  .theme-toggle-item .theme-toggle { margin-left: 8px; }
}
.nav-search-icon {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--pc-hairline);
  border-radius: var(--r-full);
  padding: 0 !important;
  transition: border-color 0.15s;
}
.nav-search-icon:hover { border-color: var(--pc-ink); }

/* Mobile: panel-style dropdown menu */
@media (max-width: 767.98px) {
  .navbar-collapse {
    background: var(--pc-canvas);
    border-top: 1px solid var(--pc-hairline-soft);
    border-bottom: 1px solid var(--pc-hairline-soft);
    padding: 8px 0 12px;
    margin-top: 8px;
    box-shadow: var(--shadow-search);
  }
  .navbar-nav { padding: 0; gap: 0; }
  .nav-item { border-bottom: 1px solid var(--pc-hairline-soft); }
  .nav-item:last-child { border-bottom: none; }
  .nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px !important;
    font-size: 16px;
    font-weight: 500;
  }
  .nav-link i {
    font-size: 20px;
    width: 24px;
    text-align: center;
    color: var(--pc-primary);
    flex-shrink: 0;
  }
  .nav-link:hover { background: var(--pc-surface-soft); color: var(--pc-ink) !important; }
  .nav-item-search .nav-link {
    font-weight: 600;
    color: var(--pc-primary) !important;
    background: var(--pc-surface-soft);
    border-radius: var(--r-sm);
    margin: 8px 12px 4px;
    padding: 13px 16px !important;
  }
  .nav-item-search .nav-link i { color: var(--pc-primary); }
  .nav-item-search { border-bottom: none; }
}

/* === CATEGORY PILLS === */
.category-strip {
  display: flex;
  gap: 32px;
  padding: 12px 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-bottom: 1px solid var(--pc-hairline-soft);
}
.category-strip::-webkit-scrollbar { display: none; }
.cat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--pc-muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  padding-bottom: 12px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  min-width: fit-content;
}
.cat-pill:hover { color: var(--pc-ink); }
.cat-pill.active { color: var(--pc-ink); border-bottom-color: var(--pc-ink); }
.cat-pill i { font-size: 24px; }

/* === PROPERTY CARDS === */
.property-card {
  background: var(--pc-canvas);
  border: none;
  border-radius: var(--r-lg);
  box-shadow: none;
  transition: transform 0.15s;
  overflow: hidden;
  text-decoration: none;
  color: var(--pc-ink);
  display: block;
}
.property-card:hover { transform: translateY(-2px); }
.property-card .card-img-wrap {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--pc-surface-soft);
}
.property-card .card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}
.property-card:hover .card-img-wrap img { transform: scale(1.03); }
.property-card .img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pc-muted-soft);
  font-size: 2rem;
}
.property-card .card-body { padding: 12px 2px 4px; }
.property-card .card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.property-card .card-location {
  font-size: 14px;
  color: var(--pc-muted);
  line-height: 1.43;
  margin-bottom: 2px;
}
.property-card .card-meta {
  font-size: 14px;
  color: var(--pc-muted);
  line-height: 1.43;
}
.property-card .card-price {
  font-size: 15px;
  font-weight: 600;
  margin-top: 4px;
}
.property-card .card-price span { font-weight: 400; }

/* Heart / wishlist */
.wishlist-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--pc-canvas);
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  cursor: pointer;
  z-index: 2;
}

/* Source badge */
.badge-source {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--pc-canvas);
  color: var(--pc-ink);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r-full);
  z-index: 2;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Operation badge */
.badge-op {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r-full);
}
.badge-op-arriendo { background: var(--pc-primary); color: var(--pc-on-primary); }
.badge-op-venta { background: var(--pc-ink); color: var(--pc-on-primary); }
/* Dark: --pc-ink becomes light, so invert the badge (light bg + dark text) */
html.dark .badge-op-venta { background: var(--pc-ink); color: var(--pc-canvas); }

/* Dark: filter chips (sidebar + mobile modal) — same inversion.
   .sf-chip.active uses bg=--pc-ink (light in dark mode) + text=--pc-on-primary
   (white) → invisible. Light bg + dark text fixes both sidebar and modal. */
html.dark .sf-chip.active,
html.dark #filterModal .sf-chip.active,
html.dark .filter-pill.active {
  background: var(--pc-ink);
  color: var(--pc-canvas);
  border-color: var(--pc-ink);
}

/* === SECTION === */
.section-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.44px;
  line-height: 1.18;
  margin-bottom: 24px;
}

/* === HERO === */
.hero {
  background: var(--pc-canvas);
  padding: 32px 0 0;
}
.hero h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.43;
  margin-bottom: 24px;
}

/* === FILTER BAR === */
.filter-bar {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid var(--pc-hairline);
  border-radius: var(--r-full);
  background: var(--pc-canvas);
  font-size: 14px;
  font-weight: 500;
  color: var(--pc-ink);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s;
}
.filter-pill:hover { border-color: var(--pc-ink); }
.filter-pill.active { background: var(--pc-ink); color: var(--pc-on-primary); border-color: var(--pc-ink); }
.filter-row-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.filter-row-scroll::-webkit-scrollbar { display: none; }
.filter-row-form { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.filter-row-form .form-select, .filter-row-form .form-control { flex-shrink: 0; height: 36px; }
@media (max-width: 768px) {
  .filter-row-form { padding-bottom: 4px; gap: 6px; }
  .filter-row-form .form-select { max-width: 100px; font-size: 12px !important; padding: 4px 24px 4px 8px; }
  .filter-row-form .form-control { max-width: 70px; font-size: 12px !important; padding: 4px 8px; }
  .filter-row-form .btn-primary-airbnb { padding: 6px 12px !important; font-size: 12px !important; }
}
@media (max-width: 768px) {
  .filter-bar { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 8px; }
  .filter-pill { flex-shrink: 0; font-size: 13px; padding: 8px 12px; }
}


/* === SHARED SEARCH FORM (hero + topbar) === */
/* Mobile-first: fields stack vertically, submit full-width. */
.search-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--pc-canvas);
  border: 1px solid var(--pc-hairline);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-search);
  padding: 12px;
}
.search-form .sf-field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.search-form .sf-field label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.32px; color: var(--pc-muted);
}
.search-form .sf-field input,
.search-form .sf-field select {
  border: 1px solid var(--pc-hairline); border-radius: var(--r-sm);
  padding: 10px 12px; font-size: 15px; font-family: var(--ff);
  color: var(--pc-ink); background: var(--pc-canvas); outline: none;
  width: 100%; min-width: 0;
}
.search-form .sf-field input:focus,
.search-form .sf-field select:focus { border-color: var(--pc-ink); }
.search-form .sf-divider { display: none; }
.search-form .sf-submit {
  background: var(--pc-primary); color: var(--pc-on-primary); border: none;
  border-radius: var(--r-sm); height: 46px; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: background 0.15s;
}
.search-form .sf-submit:hover { background: var(--pc-primary-active); }

/* Hero variant: slightly larger, centered */
.search-form-hero { max-width: 720px; margin: 0 auto; }

/* Topbar variant: compact */
.search-form-topbar { max-width: 900px; margin: 0 auto; }

/* Desktop (≥768px): inline pill — fields side by side, dividers, round button */
@media (min-width: 768px) {
  .search-form {
    flex-direction: row;
    align-items: center;
    gap: 0;
    border-radius: var(--r-full);
    padding: 0 8px 0 24px;
    height: 64px;
  }
  .search-form .sf-field { flex: 1; }
  .search-form .sf-field-type { flex: 1.2; }
  .search-form .sf-field input,
  .search-form .sf-field select {
    border: none; padding: 8px 0; font-size: 14px; background: transparent;
  }
  .search-form .sf-field input:focus,
  .search-form .sf-field select:focus { border-color: transparent; }
  .search-form .sf-divider {
    display: block; width: 1px; align-self: stretch;
    background: var(--pc-hairline); margin: 12px 16px; flex-shrink: 0;
  }
  .search-form .sf-submit {
    width: 48px; height: 48px; border-radius: var(--r-full); margin: 4px;
  }
}

/* === SEARCH PAGE === */
.search-top-bar {
  background: var(--pc-canvas);
  border-bottom: 1px solid var(--pc-hairline-soft);
  padding: 12px 0;
  position: sticky; top: 80px; z-index: 10;
}
/* Layout: sidebar + results */
.search-layout { display: flex; gap: 32px; }
.search-sidebar { width: 280px; flex-shrink: 0; }
.search-results { flex: 1; min-width: 0; }

/* Sidebar form */
.sidebar-form { position: sticky; top: 180px; }
.sf-group { margin-bottom: 20px; }
.sf-label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 8px; color: var(--pc-ink); }
.sf-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.sf-chip {
  padding: 6px 14px; border: 1px solid var(--pc-hairline); border-radius: var(--r-full);
  font-size: 13px; font-weight: 500; color: var(--pc-ink); text-decoration: none;
  transition: all 0.15s;
}
.sf-chip:hover { border-color: var(--pc-ink); }
.sf-chip.active { background: var(--pc-ink); color: var(--pc-on-primary); border-color: var(--pc-ink); }
.sf-range { display: flex; align-items: center; gap: 8px; }
.sf-range input {
  flex: 1; border: 1px solid var(--pc-hairline); border-radius: var(--r-sm);
  padding: 8px 10px; font-size: 13px; font-family: var(--ff); outline: none;
  min-width: 0;
}
.sf-range input:focus { border-color: var(--pc-ink); }
.sf-range span { color: var(--pc-muted); flex-shrink: 0; }
.sidebar-form .form-select {
  width: 100%; border: 1px solid var(--pc-hairline); border-radius: var(--r-sm);
  padding: 8px 10px; font-size: 13px; font-family: var(--ff);
}

/* Results header */
.results-header { margin-bottom: 16px; }
.results-count { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.active-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.af-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; background: var(--pc-surface-soft); border-radius: var(--r-full);
  font-size: 12px; font-weight: 500;
}
.af-badge a { color: var(--pc-muted); text-decoration: none; font-weight: 700; }
.af-badge a:hover { color: var(--pc-ink); }

/* Mobile */
/* Mobile filter modal */
#filterModal .modal-dialog {
  justify-content: flex-end;
  align-items: flex-end;
  margin: 0;
  max-width: 100%;
  height: auto;
  max-height: 88vh;
}
#filterModal .modal-content {
  max-height: 88vh;
  height: auto;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
#filterModal .modal-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
#filterModal .sf-chip { cursor: pointer; border: 1px solid var(--pc-hairline); background: var(--pc-canvas); }
#filterModal .sf-chip.active { background: var(--pc-ink); color: var(--pc-on-primary); border-color: var(--pc-ink); }
@media (max-width: 991px) {
  .search-top-bar { position: static; }
  .search-layout { flex-direction: column; gap: 16px; }
  .search-sidebar { width: 100%; }
  .sidebar-form { position: static; }
  .sf-range { flex-wrap: wrap; }
}

/* Layout: sidebar + results */
.search-layout { display: flex; gap: 32px; }
.search-sidebar { width: 280px; flex-shrink: 0; }
.search-results { flex: 1; min-width: 0; }

/* Sidebar form */
.sidebar-form { position: sticky; top: 180px; }
.sf-group { margin-bottom: 20px; }
.sf-label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 8px; color: var(--pc-ink); }
.sf-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.sf-chip {
  padding: 6px 14px; border: 1px solid var(--pc-hairline); border-radius: var(--r-full);
  font-size: 13px; font-weight: 500; color: var(--pc-ink); text-decoration: none;
  transition: all 0.15s;
}
.sf-chip:hover { border-color: var(--pc-ink); }
.sf-chip.active { background: var(--pc-ink); color: var(--pc-on-primary); border-color: var(--pc-ink); }
.sf-range { display: flex; align-items: center; gap: 8px; }
.sf-range input {
  flex: 1; border: 1px solid var(--pc-hairline); border-radius: var(--r-sm);
  padding: 8px 10px; font-size: 13px; font-family: var(--ff); outline: none;
  min-width: 0;
}
.sf-range input:focus { border-color: var(--pc-ink); }
.sf-range span { color: var(--pc-muted); flex-shrink: 0; }
.sidebar-form .form-select {
  width: 100%; border: 1px solid var(--pc-hairline); border-radius: var(--r-sm);
  padding: 8px 10px; font-size: 13px; font-family: var(--ff);
}

/* Results header */
.results-header { margin-bottom: 16px; }
.results-count { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.active-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.af-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; background: var(--pc-surface-soft); border-radius: var(--r-full);
  font-size: 12px; font-weight: 500;
}
.af-badge a { color: var(--pc-muted); text-decoration: none; font-weight: 700; }
.af-badge a:hover { color: var(--pc-ink); }

/* Mobile */
/* Mobile filter modal */
#filterModal .modal-dialog {
  justify-content: flex-end;
  align-items: flex-end;
  margin: 0;
  max-width: 100%;
  height: auto;
  max-height: 88vh;
}
#filterModal .modal-content {
  max-height: 88vh;
  height: auto;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
#filterModal .modal-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
#filterModal .sf-chip { cursor: pointer; border: 1px solid var(--pc-hairline); background: var(--pc-canvas); }
#filterModal .sf-chip.active { background: var(--pc-ink); color: var(--pc-on-primary); border-color: var(--pc-ink); }
@media (max-width: 991px) {
  .search-top-bar { position: static; }
  .search-layout { flex-direction: column; gap: 16px; }
  .search-sidebar { width: 100%; }
  .sidebar-form { position: static; }
  .sf-range { flex-wrap: wrap; }
}

/* === DETAIL PAGE — 5-image gallery === */
/* Breadcrumb */
.breadcrumb-scroll { overflow-x: auto; white-space: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 4px 0; }
.breadcrumb-scroll::-webkit-scrollbar { display: none; }
.detail-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 230px 230px;
  gap: 8px;
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
}
.detail-gallery .gallery-main { grid-row: 1 / 3; grid-column: 1; }
.detail-gallery .gallery-side { grid-row: 1; grid-column: 2; }
.detail-gallery .gallery-side2 { grid-row: 2; grid-column: 2; }
.detail-gallery .gallery-side3 { grid-row: 1; grid-column: 3; }
.detail-gallery .gallery-side4 { grid-row: 2; grid-column: 3; }
.detail-gallery .gallery-img { cursor: pointer; max-height: 468px;
  width: 100%; height: 100%; object-fit: cover; cursor: pointer;
  transition: filter 0.15s;
}
.detail-gallery .gallery-img:hover { filter: brightness(0.92); }
.detail-gallery .gallery-placeholder {
  width: 100%; height: 100%; background: var(--pc-surface-soft);
  display: flex; align-items: center; justify-content: center; color: var(--pc-muted-soft);
}
.detail-gallery .gallery-btn-more {
  position: absolute; bottom: 16px; right: 16px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; background: var(--pc-canvas); border: 1px solid var(--pc-ink);
  border-radius: var(--r-sm); font-size: 14px; font-weight: 500; color: var(--pc-ink);
  cursor: pointer; text-decoration: none; z-index: 5;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1); transition: background 0.15s;
}
.detail-gallery .gallery-btn-more:hover { background: var(--pc-surface-soft); }
@media (max-width: 768px) {
  .detail-gallery .gallery-main { grid-row: 1; grid-column: 1; }
  .detail-gallery .gallery-side3, .detail-gallery .gallery-side4 { display: none; }
  .detail-gallery { grid-template-columns: 1fr; grid-template-rows: 1fr; aspect-ratio: 4/3; }
  .detail-gallery .gallery-side, .detail-gallery .gallery-side2 { display: none; }
}
.detail-price {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.18px;
}
.detail-section {
  padding: 24px 0;
  border-bottom: 1px solid var(--pc-hairline-soft);
}
.detail-section:last-child { border-bottom: none; }
.detail-amenity {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  font-size: 16px;
}

/* Desktop grid: icon + value on top, label below (Airbnb style) */
.amenity-grid { display: flex; flex-wrap: wrap; gap: 0; }
.amenity-grid .detail-amenity {
  flex: 0 0 20%;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.amenity-grid .detail-amenity i { font-size: 24px; color: var(--pc-ink); min-width: 24px; }
.amenity-grid .detail-amenity .amenity-value { font-size: 15px; font-weight: 600; }
.amenity-grid .amenity-label { font-size: 13px; color: var(--pc-muted); }

/* Mobile: specs as a vertical list (ficha técnica) — icon + label left,
   value right. Scales with 10+ items, no truncation of "$ 580.000". */
@media (max-width: 768px) {
  .amenity-grid {
    display: block;
    background: transparent;
    border-radius: 0;
    overflow: visible;
  }
  .amenity-grid .detail-amenity {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 8px 0;
    background: transparent;
    border-bottom: 1px solid var(--pc-hairline-soft);
    font-size: 13px;
    min-width: 0;
  }
  .amenity-grid .detail-amenity:last-child { border-bottom: none; }
  .amenity-grid .detail-amenity i {
    font-size: 16px;
    color: var(--pc-primary);
    min-width: 18px;
    flex-shrink: 0;
  }
  .amenity-grid .detail-amenity .amenity-label {
    font-size: 12px;
    color: var(--pc-muted);
    white-space: nowrap;
    flex-shrink: 0;
  }
  .amenity-grid .detail-amenity .amenity-value {
    font-size: 14px;
    font-weight: 600;
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 55%;
  }
}
/* Desktop: grid adapts — if many items, use more columns instead of squeezing */
@media (min-width: 769px) and (max-width: 1199px) {
  .amenity-grid .detail-amenity { flex-basis: 25%; }
}

/* Amenity chips */
.amenity-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.amenity-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; background: var(--pc-surface-soft);
  border: 1px solid var(--pc-hairline-soft); border-radius: var(--r-full);
  font-size: 13px; font-weight: 500; color: var(--pc-ink);
}
.amenity-chip i { font-size: 14px; color: var(--pc-primary); }
.amenity-chip-more { color: var(--pc-muted); font-weight: 600; }

.detail-amenity i { font-size: 24px; color: var(--pc-ink); min-width: 24px; }
.detail-info dt {
  font-size: 14px;
  font-weight: 500;
  color: var(--pc-muted);
  margin-bottom: 2px;
}
.detail-info dd {
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 16px;
}

/* Contact card */
.contact-card {
  border: 1px solid var(--pc-hairline);
  border-radius: var(--r-lg);
  padding: 24px;
  position: sticky;
  top: 96px;
  z-index: 10;
  background: var(--pc-canvas);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.contact-card.mt-3 { position: relative; z-index: 1;
  background: var(--pc-canvas); }
.btn-primary-airbnb {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--pc-primary);
  color: var(--pc-on-primary);
  border: none;
  border-radius: var(--r-sm);
  font-size: 16px;
  font-weight: 500;
  font-family: var(--ff);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-primary-airbnb:hover { background: var(--pc-primary-active); }
.btn-outline-airbnb {
  display: block;
  width: 100%;
  padding: 13px;
  background: var(--pc-canvas);
  color: var(--pc-ink);
  border: 1px solid var(--pc-ink);
  border-radius: var(--r-sm);
  font-size: 16px;
  font-weight: 500;
  font-family: var(--ff);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-outline-airbnb:hover { background: var(--pc-surface-soft); }

/* === FOOTER === */
footer {
  background: var(--pc-surface-soft) !important;
  color: var(--pc-ink) !important;
  border-top: 1px solid var(--pc-hairline-soft);
}
footer h6 { font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.32px; }
footer a { color: var(--pc-muted); text-decoration: none; font-size: 14px; }
footer a:hover { color: var(--pc-ink); text-decoration: underline; }

/* === PAGINATION === */
.pagination .page-link {
  border: 1px solid var(--pc-hairline);
  border-radius: var(--r-sm) !important;
  margin: 0 2px;
  font-size: 14px;
  font-weight: 500;
  color: var(--pc-ink);
}
.pagination .page-item.active .page-link {
  background: var(--pc-ink);
  color: var(--pc-on-primary);
  border-color: var(--pc-ink);
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 64px 16px;
  color: var(--pc-muted);
}
.empty-state i { font-size: 48px; margin-bottom: 16px; display: block; }

/* === RESPONSIVE === */

@media (max-width: 768px) {
  .main-content { padding-top: 64px; }
.container { overflow-x: clip; }
  .navbar { height: 64px; }
  .hero h1 { font-size: 22px; }

  /* Detail page mobile */
  .detail-gallery .gallery-main { grid-row: 1; grid-column: 1; }

  .detail-section { padding: 16px 0; }
  .detail-section h3 { font-size: 17px !important; letter-spacing: -0.18px !important; margin-bottom: 4px !important; }
  .amenity-chips { gap: 6px; }
  .amenity-chip { padding: 5px 10px; font-size: 12px; }
  .contact-card { position: static; border-radius: var(--r-md); padding: 16px; margin-bottom: 24px; }
  .detail-price { font-size: 20px !important; }
  h1[style*="font-size: 26px"] { font-size: 20px !important; }
}
/* === LIGHTBOX === */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.lightbox-overlay.active { display: flex; }
.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--r-sm);
  cursor: default;
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  z-index: 1001;
}
.lightbox-close:hover { background: rgba(255,255,255,.3); }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  z-index: 1001;
}
.lightbox-nav:hover { background: rgba(255,255,255,.3); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.7);
  font-size: 14px;
  font-weight: 500;
}
@media (max-width: 768px) {
  .lightbox-nav { width: 40px; height: 40px; font-size: 18px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}
/* === MOBILE STICKY CONTACT BAR === */
.mobile-contact-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--pc-canvas);
  border-top: 1px solid var(--pc-hairline-soft);
  padding: 10px 16px;
  z-index: 999;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
}
.mobile-contact-inner {
  display: flex;
  gap: 8px;
  align-items: center;
}
.mcb-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  flex: 1;
  text-align: center;
  min-width: 0; /* permite que el texto se encoja/trunque */
  white-space: nowrap;
}
.mcb-btn i { flex-shrink: 0; }
.mcb-source { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 380px) {
  .mcb-btn { padding: 12px 8px; font-size: 13px; gap: 4px; }
}
.mcb-phone { background: var(--pc-primary); color: var(--pc-on-primary); }
.mcb-whatsapp { background: #25d366; color: #fff; }
.mcb-source { background: var(--pc-surface-soft); color: var(--pc-ink); border: 1px solid var(--pc-hairline); }
@media (min-width: 992px) {
  .mobile-contact-bar { display: none !important; }
}
@media (max-width: 991px) {
  .mobile-contact-bar { display: block; }
  .main-content { padding-bottom: 100px; }
}
/* Single image gallery: 4:3 aspect ratio */
.detail-gallery[style*="grid-template-columns:1fr"] .gallery-main {
    grid-row: 1;
    grid-column: 1;
}
.detail-gallery[style*="grid-template-columns:1fr"] .gallery-main .gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.detail-gallery[style*="grid-template-columns:1fr"] {
    grid-template-rows: 230px 230px;
}


/* ===== Banner Inmobiliaria Panorámica (Armenia/Quindío) ===== */
.banner-inmobiliaria {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: linear-gradient(135deg, var(--pc-brand-light, #fef2f2), var(--pc-canvas));
    border: 1px solid var(--pc-hairline);
    border-radius: var(--r-md);
    padding: 16px;
    margin: 14px 0;
}
.banner-inmobiliaria-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.banner-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #1f7a3d;
    background: rgba(37, 211, 102, 0.12);
    border: 1px solid rgba(37, 211, 102, 0.35);
    border-radius: var(--r-full);
    padding: 4px 10px;
}
.banner-brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--pc-ink);
}
.banner-inmobiliaria-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.banner-inmobiliaria-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--pc-ink);
    line-height: 1.3;
}
.banner-inmobiliaria-desc {
    font-size: 13px;
    color: var(--pc-muted);
    line-height: 1.5;
    margin-top: 4px;
}
.banner-inmobiliaria-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: var(--r-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: filter .15s, opacity .15s;
}
.banner-btn:hover { filter: brightness(0.96); }
.banner-btn-wa { background: #25d366; color: #fff; }
.banner-btn-phone { background: var(--pc-primary); color: var(--pc-on-primary); }
.banner-btn-web { background: var(--pc-surface-soft); color: var(--pc-ink); border: 1px solid var(--pc-hairline); }
@media (max-width: 576px) {
    .banner-inmobiliaria { padding: 14px; }
    .banner-inmobiliaria-cta { flex-direction: column; }
    .banner-btn { justify-content: center; }
}
