/* ESTILOS DE INMUEBLES.HTML */
body.inmuebles {
  background-color: #fff;
  padding-top: 100px;
  /* Para el header fixed */
}

/* Header solido para la pagina inmuebles */
body.inmuebles header {
  background: linear-gradient(to bottom, #111111 0%, #1a1a1a 100%) !important;
}

/* Contenedor principal de busqueda */
.inmuebles .search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  justify-content: center;
  background: #f7f7f7;
  padding: 20px 40px;
  max-width: 1400px;
  width: 90%;
  margin: 30px auto;
  border-radius: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.inmuebles .btn-view-toggle {
  background: #111;
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 0;
  font-family: var(--font-main);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.3s;
}

.inmuebles .btn-view-toggle:hover {
  background: #000;
  color: #fff;
}

.inmuebles .search-section {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.inmuebles .select-wrapper {
  position: relative;
  background: #fff;
  border-radius: 0;
  border: 1px solid #ccc;
}

.inmuebles .select-wrapper select {
  width: 100%;
  padding: 12px 40px 12px 15px;
  border: none;
  background: transparent;
  appearance: none;
  font-family: var(--font-main);
  color: var(--text-dark, #111);
  font-size: 14px;
  cursor: pointer;
}

.inmuebles .select-wrapper i {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
  pointer-events: none;
}

.inmuebles .search-section-locs {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 0;
  border: 1px solid #ccc;
  padding: 0 15px;
  flex: 2;
  min-width: 300px;
}

.inmuebles .search-section-locs input[type="text"] {
  border: none;
  background: transparent;
  padding: 12px 10px;
  flex: 1;
  outline: none;
  font-family: var(--font-main);
}

.inmuebles .search-section-locs button {
  background: transparent;
  border: none;
  color: #111;
  cursor: pointer;
  font-size: 18px;
}

/* Filtros Avanzados */
.inmuebles .filtros-avanzados {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin: 20px auto 40px;
  max-width: 1400px;
  width: 90%;
}

.inmuebles .filtro-btn {
  background: transparent;
  border: 1px solid #ccc;
  color: var(--text-dark, #111);
  padding: 8px 16px;
  border-radius: 0;
  font-family: var(--font-main);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.inmuebles .filtro-btn:hover {
  background: #111;
  color: #c5a059;
  border-color: #111;
}

.inmuebles .filtro-hover,
.inmuebles .filtro-dropdown {
  position: relative;
}

.inmuebles .filtro-menu,
.inmuebles .filtro-popup {
  display: none;
  position: absolute;
  top: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 10px;
  z-index: 100;
  min-width: 150px;
  flex-direction: column;
  gap: 5px;
}

.inmuebles .filtro-hover:hover .filtro-menu {
  display: flex;
}

.inmuebles .filtro-popup.show {
  display: flex !important;
}

.inmuebles .filtro-menu button {
  background: transparent;
  border: none;
  padding: 8px 15px;
  font-family: var(--font-main);
  text-align: left;
  cursor: pointer;
  border-radius: 0;
}

.inmuebles .filtro-menu button:hover {
  background: #f1f1f1;
}

.inmuebles .filtro-precio {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 250px;
}

.inmuebles .rango-precio {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inmuebles .rango-precio input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 0;
}

.inmuebles .btn-aplicar-precio {
  background: #111;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 0;
  cursor: pointer;
  font-weight: 600;
}

.inmuebles .resumen-filtros {
  max-width: 1200px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.inmuebles .leyenda {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--text-dark);
  font-style: italic;
  margin: 0;
}

.inmuebles .chip {
  background: #111;
  color: #c5a059;
  padding: 5px 15px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.inmuebles .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.inmuebles .cards-inmuebles-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.inmuebles .paginador {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 40px 0;
}

.inmuebles .paginador button {
  width: 40px;
  height: 40px;
  border-radius: 0;
  border: 1px solid #ddd;
  background: #fff;
  color: #111;
  cursor: pointer;
  transition: all 0.3s;
}

.inmuebles .paginador button:hover,
.inmuebles .paginador button.activo {
  background: #111;
  color: #c5a059;
  border-color: #111;
}

.inmuebles .mapa-wrapper {
  width: 90%;
  height: 450px;
  max-width: 1400px;
  margin: 0 auto 30px;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: block;
}

/* Solo se muestra si el js inyecta contenido al div#map o se requiere */
.inmuebles #map {
  width: 100%;
  height: 100%;
}

/* Favoritos Botón */
.card-fav-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: none !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ccc;
  font-size: 16px;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.card-fav-btn:hover {
  transform: scale(1.1);
  color: #ff4d4f;
}

.card-fav-btn.liked {
  color: #ff4d4f;
}

.inmuebles .property-card {
  border-radius: 0 !important;
  border: none;
  box-shadow: none !important;
}

.inmuebles .property-card .image-area {
  border-radius: 0 !important;
}

/* ============================ */
/* CHIPS (MARCADORES) DEL MAPA */
/* ============================ */
.custom-label {
  position: absolute;
  background: #fff;
  border: 1px solid #111;
  border-radius: 20px;
  /* Chips redondeadas porque son del mapa */
  padding: 5px 12px;
  font-family: var(--font-main, sans-serif);
  font-weight: 600;
  font-size: 13px;
  color: #111;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transform: translate(-50%, -50%);
  /* Centro absoluto en su coordenada */
  white-space: nowrap;
  pointer-events: auto;
  /* IMPORTANTE para click y hover */
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
  z-index: 10;
}

.custom-label:hover {
  background: #111;
  color: #c5a059;
  border-color: #c5a059;
  z-index: 100 !important;
  transform: translate(-50%, -50%) scale(1.1);
}

.custom-label.gold {
  background: #1a1a1a;
  color: #fff;
  border: 1px solid #1a1a1a;
}

.custom-label.gold:hover {
  background: #c5a059;
  color: #111;
}

/* ============================ */
/* INFO WINDOW (POPUP TARJETA)  */
/* ============================ */

/* Eliminar el margen y bordes redondeados forzosos de Google Maps */
.gm-style-iw.gm-style-iw-c {
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
  max-width: 300px !important;
  max-height: none !important;
  /* Quitar límite de Google */
}

.gm-style-iw-d {
  overflow: hidden !important;
  max-height: none !important;
  max-width: none !important;
}

/* Asegurar que la tarjeta llene el popup correctamente */
.map-card {
  width: 300px !important;
  max-width: 100% !important;
  border: none !important;
  background: #fff !important;
  color: #111 !important;
  display: flex !important;
  flex-direction: column;
}

.map-card * {
  border-radius: 0 !important;
}

.map-card .image-area {
  height: 180px !important;
  /* Menor altura para no saturar espacio */
  position: relative;
  overflow: hidden;
}

.map-card .info-area {
  padding: 12px 15px !important;
  background: #fff !important;
}

.map-card .prop-title {
  color: #111 !important;
  font-size: 15px !important;
  margin-bottom: 5px !important;
  text-transform: uppercase !important;
  white-space: normal !important;
}

.map-card .prop-price {
  color: #111 !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  margin-bottom: 5px !important;
}

.map-card .prop-address {
  color: #555 !important;
  font-size: 11px !important;
  margin-bottom: 10px !important;
  white-space: normal !important;
}

.map-card .prop-footer {
  border-top: 1px solid #eee !important;
  padding-top: 10px !important;
  color: #111 !important;
  justify-content: flex-start !important;
  gap: 15px !important;
}

.map-card .prop-footer span {
  font-size: 11px !important;
  color: #555 !important;
}

.map-card .view-btn {
  display: none !important;
  /* Esconder el boton "ver" si ya toda la card es clickeable */
}

/* Reubicar y reestilar el corazon */
.map-card .card-fav-btn {
  top: 10px !important;
  right: 50px !important;
  background: rgba(0, 0, 0, 0.6) !important;
  color: #fff !important;
  width: 35px !important;
  height: 35px !important;
}

.map-card .card-fav-btn.liked {
  color: #ff4d4f !important;
}

/* Modificar el botón de cerrar predeterminado de Google Maps para version oscura */
.gm-ui-hover-effect {
  top: 10px !important;
  right: 10px !important;
  background: rgba(0, 0, 0, 0.6) !important;
  width: 35px !important;
  height: 35px !important;
  border-radius: 50% !important;
  box-shadow: none !important;
}

.gm-ui-hover-effect span {
  width: 25px !important;
  height: 25px !important;
  margin: 5px !important;
  filter: invert(1) !important;
  /* Hacer la X blanca */
}