/* ===================================================================
   BASALT — Inmobiliaria SLP
   Mobile-First · Variables CSS · Flexbox + Grid
   Paleta: basalto (negros, grises cemento/roca)
=================================================================== */

:root {
  /* Colores — paleta elegante: blanco, azul y gris */
  --bg:        #f5f7fa;   /* fondo (gris muy claro azulado) */
  --bg-2:      #ffffff;   /* superficie / tarjetas */
  --bg-3:      #eef2f7;   /* superficie elevada / inputs */
  --stone:     #cfd8e3;   /* bordes fuertes / gris azulado */
  --cement:    #54657a;   /* gris azul (acento sobrio) */
  --text:      #15212e;   /* texto principal (azul marino casi negro) */
  --text-dim:  #5e6c7c;   /* texto secundario (gris) */
  --accent:    #1f5286;   /* azul elegante */
  --wa:        #1f5286;   /* botones de acción en azul */
  --wa-text:   #ffffff;   /* texto sobre botones de acción */
  --danger:    #c0392b;
  --line:      rgba(21,33,46,.10);

  /* Tipografía */
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;

  /* Métricas */
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(0,0,0,.10);
  --gap: 1rem;
  --header-h: 124px;
  --maxw: 1200px;
  --t: .25s cubic-bezier(.4,0,.2,1);
}

/* ----------------- Reset ----------------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; }

/* ----------------- Marca ----------------- */
.brand { display: flex; align-items: baseline; gap: .5rem; }
.brand-mark {
  width: 14px; height: 14px; align-self: center;
  background: var(--accent);
  clip-path: polygon(50% 0,100% 38%,82% 100%,18% 100%,0 38%);
}
.brand-name { font-weight: 800; letter-spacing: .22em; font-size: 1.15rem; }
.brand-sub  { font-size: .68rem; color: var(--text-dim); letter-spacing: .18em; text-transform: uppercase; }

/* ===================================================================
   HEADER + FILTRO
=================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-top {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: .85rem 1rem; gap: 1rem;
}
.main-nav { display: none; gap: 1.4rem; align-items: center; }
.main-nav a { color: var(--text-dim); font-size: .92rem; transition: color var(--t); }
.main-nav a:hover { color: var(--text); }
.main-nav .nav-wa {
  color: var(--wa-text); background: var(--wa); font-weight: 700;
  padding: .45rem .9rem; border-radius: 999px;
}
.main-nav .nav-wa:hover { color: var(--wa-text); filter: brightness(1.1); }

/* Toggle móvil */
.nav-toggle {
  display: flex; flex-direction: column; gap: 5px;
  background: none; border: 0; padding: 6px;
}
.nav-toggle span {
  width: 26px; height: 2px; background: var(--text);
  transition: transform var(--t), opacity var(--t);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Nav móvil desplegable */
.main-nav.show {
  display: flex; flex-direction: column; align-items: flex-start;
  position: absolute; top: 100%; right: 1rem;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.4rem; gap: 1rem;
  box-shadow: var(--shadow);
}

/* Filtro */
.filter-bar {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: .6rem;
  padding: .35rem 1rem .9rem;
}
.filter-field { display: flex; flex-direction: column; gap: .25rem; }
.filter-field label {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-dim);
}
.filter-field select {
  appearance: none; -webkit-appearance: none;
  background: var(--bg-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235e6c7c' d='M6 8 0 0h12z'/%3E%3C/svg%3E") no-repeat right .8rem center;
  color: var(--text); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: .6rem 2rem .6rem .8rem;
  font-size: .9rem; transition: border-color var(--t);
}
.filter-field input {
  background: var(--bg-3); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .6rem .8rem; font-size: .9rem; font-family: inherit; width: 100%;
  transition: border-color var(--t);
}
.filter-field input::placeholder { color: var(--cement); }
.filter-field select:focus, .filter-field input:focus { outline: none; border-color: var(--cement); }
.price-range { display: flex; align-items: center; gap: .4rem; }
.price-range input { width: 100%; }
.price-range span { color: var(--text-dim); }
/* Quitar flechitas de los number en todos los navegadores */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

/* ---------- Dropdown personalizado (Tipo / Recámaras) ---------- */
.cselect { position: relative; }
.cselect-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  background: var(--bg-3); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .6rem .8rem; font-size: .9rem; text-align: left;
  transition: border-color var(--t);
}
.cselect-btn:hover { border-color: var(--stone); }
.cselect.open .cselect-btn { border-color: var(--cement); }
.cselect-arrow { color: var(--text-dim); font-size: .8rem; transition: transform var(--t); }
.cselect.open .cselect-arrow { transform: rotate(180deg); }
.cselect-list {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50;
  list-style: none; margin: 0; padding: .35rem;
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
  max-height: 260px; overflow-y: auto;
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity var(--t), transform var(--t);
}
.cselect.open .cselect-list { opacity: 1; transform: none; pointer-events: auto; }
.cselect-list li {
  padding: .55rem .7rem; border-radius: 8px; font-size: .9rem; cursor: pointer;
  transition: background var(--t);
}
.cselect-list li:hover { background: var(--bg-2); }
.cselect-list li.sel { background: var(--stone); color: var(--text); font-weight: 600; }

/* ---------- Botón flotante Ver mapa ---------- */
.fab-map {
  position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%) translateY(20px);
  z-index: 900; background: var(--text); color: var(--bg);
  border: 0; border-radius: 999px; padding: .8rem 1.5rem; font-weight: 700; font-size: .95rem;
  box-shadow: var(--shadow); opacity: 0; transition: opacity var(--t), transform var(--t);
}
.fab-map.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.fab-map:hover { filter: brightness(.92); }
.filter-actions {
  grid-column: 1 / -1; display: flex; gap: .6rem;
}
.filter-actions .btn { flex: 1; }

/* ===================================================================
   BOTONES
=================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 1px solid transparent; border-radius: 999px;
  padding: .65rem 1.3rem; font-size: .9rem; font-weight: 600;
  transition: transform var(--t), background var(--t), border-color var(--t), filter var(--t);
}
.btn:active { transform: scale(.97); }
.btn-lg { padding: .85rem 1.7rem; font-size: 1rem; }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { filter: brightness(.9); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--cement); }
.btn-wa { background: var(--wa); color: var(--wa-text); }
.btn-wa:hover { filter: brightness(1.1); }

/* ===================================================================
   HERO + MAPA
=================================================================== */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr; gap: 1.4rem;
  padding: 2rem 1rem 1rem;
  min-height: calc(100vh - var(--header-h) - 1rem);
  align-content: center;
}
.hero-brand {
  font-size: clamp(3rem, 13vw, 6rem); font-weight: 800; line-height: .95;
  letter-spacing: .06em; margin-bottom: .2rem; color: var(--text);
}
.hero-tag { font-size: clamp(1.2rem, 3.5vw, 1.7rem); font-weight: 600; color: var(--text); }
.hero-desc { color: var(--text-dim); margin: .8rem 0 1.3rem; max-width: 46ch; }
.hero-stats {
  display: flex; gap: 1.6rem; margin-bottom: 1.5rem; flex-wrap: wrap;
}
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.5rem; }
.hero-stats span { font-size: .75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; }

.map-wrap { position: relative; }
#map {
  height: 360px; width: 100%;
  border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: var(--shadow); background: var(--bg-2); z-index: 1;
}
.map-hint {
  position: absolute; bottom: .8rem; left: .8rem; z-index: 2;
  background: rgba(255,255,255,.9); backdrop-filter: blur(6px);
  color: var(--text-dim); font-size: .78rem;
  padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

/* Pin personalizado Leaflet */
.basalt-pin {
  background: none; border: none;
}
.basalt-pin .pin-price {
  background: var(--text); color: var(--bg);
  font-weight: 700; font-size: .72rem; white-space: nowrap;
  padding: .25rem .55rem; border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0,0,0,.5);
  transform: translate(-50%, -130%);
  position: absolute; left: 50%;
  transition: transform var(--t), background var(--t);
}
.basalt-pin .pin-dot {
  font-size: 1.6rem; transform: translate(-50%, -50%);
  position: absolute; left: 50%; top: 50%;
}
.basalt-pin:hover .pin-price { background: var(--accent); color: #fff; transform: translate(-50%, -150%); }

/* Popup Leaflet override */
.leaflet-popup-content-wrapper {
  background: var(--bg-3); color: var(--text);
  border-radius: var(--radius-sm); border: 1px solid var(--line);
}
.leaflet-popup-tip { background: var(--bg-3); }
.leaflet-popup-content { margin: .8rem; }
.popup-card img { border-radius: var(--radius-sm); height: 110px; width: 100%; object-fit: cover; margin-bottom: .5rem; }
.popup-card h4 { font-size: .95rem; margin-bottom: .15rem; }
.popup-card .pp { color: var(--cement); font-weight: 700; font-size: .9rem; }
.popup-card button {
  margin-top: .55rem; width: 100%;
  background: var(--text); color: var(--bg); border: 0;
  padding: .5rem; border-radius: var(--radius-sm); font-weight: 600; font-size: .85rem;
}

/* ===================================================================
   LISTADO / CARDS
=================================================================== */
.listing { max-width: var(--maxw); margin: 0 auto; padding: 2.5rem 1rem; }
.listing-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.4rem; }
.listing-head h2 { font-size: clamp(1.4rem, 4vw, 2rem); }
.result-count { color: var(--text-dim); font-size: .9rem; }

.grid {
  display: grid; gap: 1.2rem;
  grid-template-columns: 1fr;
}

.card {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
  opacity: 0; transform: translateY(14px);
  animation: rise .5s forwards;
}
@keyframes rise { to { opacity: 1; transform: none; } }
.card:hover { transform: translateY(-5px); border-color: var(--stone); box-shadow: var(--shadow); }

/* Carrusel dentro de card */
.carousel { position: relative; aspect-ratio: 16/10; background: var(--bg-3); overflow: hidden; }
.carousel-track { display: flex; height: 100%; transition: transform .4s ease; }
.carousel-track img { min-width: 100%; height: 100%; object-fit: cover; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(20,22,26,.7); color: #fff; border: 1px solid var(--line);
  width: 34px; height: 34px; border-radius: 50%; font-size: 1.1rem;
  display: grid; place-items: center; opacity: 0; transition: opacity var(--t);
}
.carousel:hover .carousel-btn { opacity: 1; }
.carousel-btn.prev { left: .5rem; }
.carousel-btn.next { right: .5rem; }
.carousel-dots {
  position: absolute; bottom: .6rem; left: 50%; transform: translateX(-50%);
  display: flex; gap: .35rem;
}
.carousel-dots span {
  width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.45);
  transition: background var(--t), width var(--t);
}
.carousel-dots span.active { background: #fff; width: 18px; border-radius: 999px; }
.card-tag {
  position: absolute; top: .7rem; left: .7rem; z-index: 2;
  background: rgba(28,25,23,.78); color: #fff; backdrop-filter: blur(4px);
  font-size: .68rem; text-transform: uppercase; letter-spacing: .06em;
  padding: .25rem .6rem; border-radius: 999px; border: 1px solid transparent;
}

.card-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.card-price { font-size: 1.3rem; font-weight: 800; }
.card-title { font-size: 1rem; font-weight: 600; }
.card-loc { color: var(--text-dim); font-size: .85rem; display: flex; align-items: center; gap: .35rem; }
.card-specs {
  display: flex; gap: 1rem; flex-wrap: wrap;
  color: var(--text-dim); font-size: .82rem;
  padding-top: .55rem; margin-top: auto; border-top: 1px solid var(--line);
}
.card-specs span { display: flex; align-items: center; gap: .3rem; }
.card-actions { display: flex; gap: .5rem; margin-top: .8rem; }
.card-actions .btn { flex: 1; padding: .6rem; font-size: .85rem; }

.empty-state { text-align: center; color: var(--text-dim); padding: 3rem 1rem; }

/* ===================================================================
   CONTACTO
=================================================================== */
.contact { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.contact-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr; gap: 2rem;
  padding: 3rem 1rem;
}
.contact-copy h2 { font-size: clamp(1.4rem, 4vw, 2rem); margin-bottom: .7rem; }
.contact-copy p { color: var(--text-dim); margin-bottom: 1.3rem; max-width: 42ch; }

.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label { font-size: .82rem; color: var(--text-dim); }
.field input, .field textarea {
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: .7rem .9rem;
  color: var(--text); font-size: .95rem; font-family: inherit;
  transition: border-color var(--t), box-shadow var(--t);
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31,82,134,.15);
}
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }
.field.valid input, .field.valid textarea { border-color: var(--wa); }
.error { color: var(--danger); font-size: .76rem; min-height: 1em; }
.form-success { color: var(--wa); font-weight: 600; }

/* ===================================================================
   FOOTER
=================================================================== */
.site-footer {
  max-width: var(--maxw); margin: 0 auto;
  padding: 2.5rem 1rem; display: flex; flex-direction: column; gap: 1.5rem;
}
.footer-top {
  display: flex; flex-direction: column; gap: 1.2rem;
  justify-content: space-between; align-items: flex-start;
  border-bottom: 1px solid var(--line); padding-bottom: 1.5rem;
}
.footer-brand p { color: var(--text-dim); font-size: .88rem; margin-top: .4rem; }
.footer-brand .muted { color: var(--stone); font-size: .8rem; }
.footer-mail { color: var(--accent); font-size: .88rem; text-decoration: none; }
.footer-mail:hover { text-decoration: underline; }

.socials { display: flex; gap: .7rem; }
.socials a {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  transition: background var(--t), border-color var(--t), transform var(--t);
}
.socials a:hover { background: var(--bg-3); border-color: var(--cement); transform: translateY(-3px); }
.socials svg { width: 20px; height: 20px; fill: var(--text-dim); transition: fill var(--t); }
.socials a:hover svg { fill: var(--text); }

.footer-terms h4 { font-size: .9rem; margin-bottom: .5rem; color: var(--text); }
.footer-terms p { color: var(--text-dim); font-size: .78rem; line-height: 1.6; max-width: 90ch; }
.footer-copy { text-align: center; color: var(--stone); font-size: .8rem; }

/* ===================================================================
   MODAL
=================================================================== */
.modal { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 1rem; }
.modal[hidden] { display: none; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.75); backdrop-filter: blur(4px); animation: fade .3s; }
@keyframes fade { from { opacity: 0; } }
.modal-card {
  position: relative; z-index: 1; width: min(880px, 100%);
  max-height: 90vh; overflow-y: auto;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  animation: pop .3s;
}
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(.98); } }
.modal-close {
  position: absolute; top: .7rem; right: .7rem; z-index: 5;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.92); color: var(--text); border: 1px solid var(--line);
  font-size: 1.4rem; line-height: 1; display: grid; place-items: center;
  box-shadow: var(--shadow);
}
.modal-close:hover { background: var(--danger); color: #fff; }

.modal-media { aspect-ratio: 16/9; background: #000; }
.modal-media iframe, .modal-media img { width: 100%; height: 100%; object-fit: cover; border: 0; }
.modal-content { padding: 1.4rem 1.5rem 1.8rem; }
.modal-content h3 { font-size: 1.5rem; margin-bottom: .3rem; }
.modal-price { font-size: 1.7rem; font-weight: 800; color: var(--accent); margin: .4rem 0; }
.modal-loc { color: var(--text-dim); display: flex; align-items: center; gap: .4rem; margin-bottom: 1rem; }
.modal-specs {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem;
  margin: 1rem 0 1.4rem;
}
.modal-specs .spec {
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: .8rem;
  display: flex; flex-direction: column; gap: .15rem;
}
.modal-specs .spec strong { font-size: 1.15rem; }
.modal-specs .spec span { font-size: .74rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; }
.modal-desc { color: var(--text-dim); margin-bottom: 1.4rem; }
.modal-tabs { display: flex; gap: .5rem; margin-bottom: 1rem; }
.modal-tabs button {
  flex: 1; background: var(--bg-3); border: 1px solid var(--line);
  color: var(--text-dim); padding: .55rem; border-radius: var(--radius-sm); font-weight: 600;
}
.modal-tabs button.active { background: var(--text); color: var(--bg); }
.modal-actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.modal-actions .btn { flex: 1; min-width: 200px; }

/* ===================================================================
   CATÁLOGO EN LISTA (estilo Inmuebles24)
=================================================================== */
.list-view { display: flex; flex-direction: column; gap: 1rem; }

.prop-row {
  display: flex; flex-direction: column;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
  opacity: 0; transform: translateY(12px); animation: rise .5s forwards;
}
.prop-row:hover { border-color: var(--stone); box-shadow: var(--shadow); }

.prop-media { width: 100%; aspect-ratio: 16/10; cursor: pointer; flex-shrink: 0; }
.prop-info { padding: 1rem 1.2rem 1.1rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.prop-clickable { cursor: pointer; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.prop-price { font-size: 1.5rem; font-weight: 800; }
.prop-specs { display: flex; flex-wrap: wrap; gap: .9rem; color: var(--text-dim); font-size: .85rem; }
.prop-title { font-size: 1.05rem; font-weight: 700; }
.prop-loc { color: var(--cement); font-size: .9rem; }
.prop-desc {
  color: var(--text-dim); font-size: .88rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.prop-actions { display: flex; gap: .6rem; margin-top: .6rem; }
.prop-actions .btn { flex: 1; padding: .6rem; font-size: .9rem; }

/* ===================================================================
   DETALLE (galería tipo San Miguel)
=================================================================== */
.detail { display: grid; grid-template-columns: 1fr; }
.detail-gallery { background: var(--bg-3); padding: 1rem; }
.dg-main { aspect-ratio: 16/10; border-radius: var(--radius-sm); overflow: hidden; background: #000; }
.dg-main img, .dg-main iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.dg-media-btns { display: flex; gap: .5rem; margin: .7rem 0; }
.dg-media-btns button {
  flex: 1; background: var(--bg-2); border: 1px solid var(--line); color: var(--text-dim);
  padding: .5rem; border-radius: var(--radius-sm); font-weight: 600; font-size: .85rem;
}
.dg-media-btns button.active { background: var(--text); color: var(--bg); }
.dg-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.dg-thumb { padding: 0; border: 2px solid transparent; border-radius: var(--radius-sm); overflow: hidden; background: none; cursor: pointer; aspect-ratio: 4/3; }
.dg-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dg-thumb.active { border-color: var(--cement); }

.detail-info { padding: 1.5rem; }
.detail-tag {
  display: inline-block; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-dim); border: 1px solid var(--line); padding: .25rem .6rem; border-radius: 999px; margin-bottom: .6rem;
}
.detail-info h3 { font-size: 1.6rem; }
.detail-loc { color: var(--text-dim); margin: .3rem 0 .6rem; }
.detail-price { font-size: 1.9rem; font-weight: 800; color: var(--accent); margin-bottom: 1rem; }
.detail-specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; margin-bottom: 1.2rem; }
.detail-specs .spec {
  background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .7rem; display: flex; flex-direction: column; gap: .1rem;
}
.detail-specs .spec strong { font-size: 1.1rem; }
.detail-specs .spec span { font-size: .72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; }
.detail-desc { color: var(--text-dim); margin-bottom: 1.4rem; }
.detail-actions { display: flex; flex-direction: column; gap: .7rem; }
.detail-actions .btn { width: 100%; }

/* ===================================================================
   ACCESO ASESORES / PANEL
=================================================================== */
.nav-asesor { border: 1px solid var(--line); padding: .4rem .9rem; border-radius: 999px; }
.nav-asesor:hover { border-color: var(--cement); }
.nav-asesor.logged { border-color: var(--wa); color: var(--wa); }

.modal-card--sm { width: min(420px, 100%); }
.auth-box { padding: 2rem 1.8rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.auth-box .brand-mark { width: 26px; height: 26px; margin-bottom: .5rem; }
.auth-box h3 { font-size: 1.4rem; }
.auth-sub { color: var(--text-dim); font-size: .88rem; margin-bottom: .8rem; }
.auth-box form { width: 100%; display: flex; flex-direction: column; gap: .9rem; text-align: left; }
.auth-hint { font-size: .78rem; color: var(--text-dim); margin-top: .9rem; }
.link-btn { background: none; border: 0; color: var(--cement); text-decoration: underline; font-size: inherit; padding: 0; }
.link-btn:hover { color: var(--text); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.field .sel {
  background: var(--bg-3); border: 1px solid var(--line); color: var(--text);
  border-radius: var(--radius-sm); padding: .7rem .9rem; font-size: .95rem; font-family: inherit;
}
.field input[type="file"] { color: var(--text-dim); font-size: .85rem; padding: .5rem 0; }
.thumbs { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.thumbs img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }

.agent-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; gap: 1rem; }
.agent-list { margin-top: 1.8rem; border-top: 1px solid var(--line); padding-top: 1.2rem; }
.agent-list h4 { margin-bottom: .8rem; }
.agent-props { display: flex; flex-direction: column; gap: .6rem; }
.agent-prop {
  display: flex; align-items: center; gap: .8rem;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .5rem .7rem;
}
.agent-prop img { width: 54px; height: 42px; object-fit: cover; border-radius: 6px; }
.agent-prop .ap-info { flex: 1; min-width: 0; }
.agent-prop .ap-info b { display: block; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent-prop .ap-info span { font-size: .78rem; color: var(--text-dim); }
.agent-prop .ap-btns { display: flex; gap: .4rem; flex-shrink: 0; }
.agent-prop .ap-edit, .agent-prop .ap-del { background: none; border: 1px solid var(--line); border-radius: 6px; padding: .3rem .55rem; font-size: .8rem; }
.agent-prop .ap-edit { color: var(--text); }
.agent-prop .ap-edit:hover { border-color: var(--cement); background: var(--bg-2); }
.agent-prop .ap-del { color: var(--danger); }
.agent-prop .ap-del:hover { background: var(--danger); color: #fff; }
.agent-empty { color: var(--text-dim); font-size: .85rem; }
.form-row-btns { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }

.card-tag.tag-asesor { background: var(--accent); color: #fff; border-color: transparent; }

/* Checkboxes de amenidades (panel asesor) */
.amen-group { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem 1rem; }
.amen-group legend { font-size: .82rem; color: var(--text-dim); padding: 0 .4rem; }
.amen-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem .9rem; }
.amen { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--text); cursor: pointer; }
.amen input { width: 16px; height: 16px; accent-color: var(--wa); }

/* Chips de amenidades en el detalle */
.detail-amen { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.4rem; }
.detail-amen span {
  background: var(--bg-3); border: 1px solid var(--line); color: var(--text);
  font-size: .82rem; padding: .35rem .7rem; border-radius: 999px;
}

/* ===================================================================
   RESPONSIVE  (Tablet / Desktop)
=================================================================== */
@media (min-width: 720px) {
  :root { --header-h: 96px; }
  .filter-bar { grid-template-columns: repeat(4, 1fr) auto; align-items: end; }
  .filter-field--wide { grid-column: auto; }
  .filter-actions { grid-column: auto; }
  #map { height: 440px; }

  /* Fila de catálogo: imagen a la izquierda */
  .prop-row { flex-direction: row; align-items: stretch; }
  /* La imagen llena la altura de la tarjeta (definida por el texto), sin estirarla */
  .prop-media { width: 320px; aspect-ratio: auto; align-self: stretch; position: relative; }
  .prop-media .carousel-track { position: absolute; inset: 0; }
  .prop-actions { max-width: 360px; }

  /* Footer en fila */
  .footer-top { flex-direction: row; align-items: center; }
}

@media (min-width: 860px) {
  /* Detalle en dos columnas (galería + info) */
  .detail { grid-template-columns: 1.15fr 1fr; }
  .detail-actions { flex-direction: row; }
}

@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .main-nav { display: flex; }
  .hero { grid-template-columns: 1fr 1.2fr; align-items: center; padding-top: 3rem; }
  #map { height: 500px; }
  .contact-inner { grid-template-columns: 1fr 1fr; align-items: start; }
}

/* Accesibilidad: respeta reduce-motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
}
