/* ============== RESET / BASE ============== */
* { box-sizing: border-box; }
html, body { margin:0; padding:0; }
body { font-family: Arial, Helvetica, sans-serif; color:#1f2937; background:#f5f7f2; }

header.cabecera-mapa { margin:0; padding:0; }

.intro-mapa {
  max-width: 880px;
  margin: 0 auto 4px;
  padding: 0 16px;
}
.intro-mapa h1 { font-size: 22px; margin: 14px 0 4px; color: #1f2937; }
.intro-mapa .kicker {
  color: #f97316; font-weight: 700; font-size: 14px;
  text-transform: uppercase; letter-spacing: .5px; margin: 0 0 8px;
}
.intro-mapa p { color: #475569; font-size: 14px; line-height: 1.4; max-width: 720px; margin: 6px 0 0; text-align: left; }

/* ============== BOTONERA ============== */
.caja-botonera-mapa {
  background: #c8d7ab;
  padding: 10px 12px;
  margin: 12px auto 0;
  border: 2px solid #0758A1;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  max-width: 1140px;
}

.fila-superior, .fila-inferior {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
}
.fila-superior { margin-bottom: 6px; }

.cat-btn, .filtro-btn {
  border: 0;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  color: #333;
  white-space: nowrap;
  font-family: inherit;
  transition: background .15s, color .15s, transform .1s;
}
.cat-btn:active, .filtro-btn:active { transform: translateY(1px); }

.cat-btn[data-cat="todas"].activo   { background:#0758A1; color:#fff; }
.cat-btn[data-cat="casas"].activo   { background:#0758A1; color:#fff; }
.cat-btn[data-cat="cabanas"].activo { background:#28a745; color:#fff; }
.cat-btn[data-cat="deptos"].activo  { background:#fd7e14; color:#fff; }
.cat-btn[data-cat="barrios"].activo { background:#6b6b6b; color:#fff; }

.filtro-btn.activo { background:#28a745; color:#fff; }

@media (max-width: 768px) {
  .caja-botonera-mapa { padding: 8px 8px; }
  .cat-btn, .filtro-btn { padding: 6px 9px; font-size: 12px; }
  .fila-superior, .fila-inferior { gap: 4px; }
}

/* ============== MAPA ============== */
.mapa-zona {
  height: 560px;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  border: 2px solid #0758A1;
  border-top: none;
  border-radius: 0 0 8px 8px;
}

/* ============== LISTADO ============== */
.indice-zona-wrap {
  max-width: 880px;
  margin: 24px auto 8px;
  padding: 0 16px;
}
.indice-zona-wrap h2 {
  color: #0f6a37; font-size: 18px; text-align: center;
  margin: 12px 0 4px;
}
.indice-zona-wrap > p {
  text-align: center; color: #475569; font-size: 14px; margin: 0 0 12px;
}

#indice-zonas h3 {
  margin: 14px 0 4px;
  padding-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-size: 13px;
  border-bottom: 2px solid;
}
#indice-zonas h3.cabecera-vcp   { color:#022e59; border-bottom-color:#022e59; }
#indice-zonas h3.cabecera-otras { color:#7c3aed; border-bottom-color:#7c3aed; }

#indice-zonas .zona-link {
  background: none; border: 0; padding: 4px 8px;
  cursor: pointer; font: inherit; font-weight: 600;
  color: #0758A1; border-radius: 4px;
}
#indice-zonas .zona-link:hover { background:#f1f5f9; }
#indice-zonas .zona-link.selected {
  background:#eaf6ee !important; color:#0f6a37 !important;
}

#indice-zonas .detalle {
  display: inline;
  color: #475569; font-size: 13px; margin-left: 4px;
}
#indice-zonas > div { margin: 4px 0; }

.pie-mapa {
  text-align: center; color: #94a3b8; font-size: 12px;
  padding: 16px; margin-top: 8px;
}

/* ============== LEAFLET OVERRIDES ============== */
.leaflet-tooltip.barrio-etiqueta {
  background: transparent; border: 0; box-shadow: none;
  color: #1f2937; font-weight: 700; font-size: 12px;
  text-shadow: 0 0 2px #fff, 0 0 5px #fff;
}
.leaflet-tooltip.barrio-etiqueta::before { display:none; }

.leaflet-tooltip.barrio-seleccionado {
  background:#0f6a37; color:#fff; border:1px solid #0a4d28;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
  padding: 4px 10px; font-weight: 700; font-size: 12px;
  border-radius: 6px; white-space: nowrap;
}
.leaflet-tooltip.barrio-seleccionado::before { display:none; }

.leaflet-popup-content {
  width: 300px !important; max-width: 300px !important; margin: 0 !important;
}

/* ============== POPUP PROPIEDAD ============== */
.prop-card .titulo {
  background:#0f6a37; color:#fff;
  padding: 9px 12px; font-size: 14px; font-weight: 700;
  border-radius: 10px 10px 0 0;
  margin: 0 0 8px;
}
.prop-card .foto { width:100%; height:160px; object-fit:cover; display:block; }
.prop-card p { font-size: 13px; line-height:1.4; margin:8px 12px 4px; }
.prop-cta { display:flex; gap:8px; padding:4px 12px 12px; }
.prop-cta a {
  flex:1; text-align:center; padding:8px 10px;
  border-radius:6px; color:#fff; font-weight:600;
  text-decoration:none; background:#1a8a4a; font-size:13px;
}
.prop-cta a.alt { background:#0f766e; }
