/**
Theme Name: IdealcasaMadrid
Author: Cygnusweb
Author URI: https://www.cygnusweb.com
Description: Este es un theme generado por Cygnusweb para Ideal Casa Madrid.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: idealcasamadrid
Template: astra
*/

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

body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: #fff;
}

.container {
  width: 100%;
  max-width: 992px;
  margin: 50px auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 20px;
  padding: 0 15px;
}

.container .box {
  width: calc((100% / 2) - 20px);
  background-color: white;
  position: relative;
  overflow: hidden; /* Cambiado para asegurar que nada se desborde */
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.container .box:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

@media (max-width: 992px) {
  .container .box {
    width: calc((100% / 2) - 20px);
  }
}

@media (max-width: 768px) {
  .container .box {
    width: 100%;
    margin-bottom: 20px;
  }
  .container {
    flex-direction: column;
    align-items: center;
  }
  .container .box:last-child {
    margin-bottom: 0;
  }
}

/* --- ESTILOS DE MARCADORES --- */
.container .box.reserved:before {
  content: "Reservada";
  background-color: #ea723d;
  color: white;
  font-size: 13px;
  padding: 4px 10px;
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(0%);
  z-index: 3;
}

.container .box.reserved:after {
  content: "";
  border-width: 12px;
  border-style: solid;
  border-color: transparent transparent transparent #ea723d;
  position: absolute;
  left: 72px;
  top: 0;
  transform: translateY(-50%);
  z-index: 3;
}

.container .box.sold .bottom:before {
  content: "Vendida";
  background-color: #dd0000;
  color: white;
  font-size: 11px;
  padding: 4px 7px;
  position: absolute;
  left: 10px;
  top: -15px;
  z-index: 3;
}

/* --- ESTILO DEL ENLACE PRINCIPAL --- */
.container .box > a {
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
}


/* --- ESTILOS DEL CONTENEDOR DE LA IMAGEN --- */
.container .box .top {
  position: relative;
  flex-shrink: 0;
  /* --- MODIFICACIÓN --- */
  height: 250px; /* 1. Altura fija para todas las tarjetas. ¡Puedes ajustar este valor! */
  overflow: hidden; /* 2. Oculta cualquier parte de la imagen que se desborde. */
  background-color: #f0f0f0; /* 3. Color de fondo para mientras carga la imagen o para placeholders. */
}

.container .box .top:before {
  content: "";
  width: 100%;
  height: 100%;
  background-color: rgba(43, 187, 175, 0.829);
  position: absolute;
  left: 0;
  top: 0;
  transition: 0.3s;
  opacity: 0;
  z-index: 1;
}

.container .box > a:hover .top:before {
  opacity: 1;
}

.container .box .top:after {
  content: "Ver Propiedad";
  color: white;
  font-size: 14px;
  padding: 10px 15px;
  border: 1px solid white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: 0.3s;
  opacity: 0;
  z-index: 2;
  pointer-events: none;
}

.container .box > a:hover .top:after {
  opacity: 1;
}

/* --- ESTILOS DE LA IMAGEN --- */
.container .box .top img {
  display: block;
  /* --- MODIFICACIÓN --- */
  width: 100%;       /* 1. La imagen ocupa el 100% del ancho de su contenedor. */
  height: 100%;      /* 2. La imagen ocupa el 100% de la altura (250px) de su contenedor. */
  object-fit: cover; /* 3. LA MAGIA: La imagen se escala para cubrir el espacio, manteniendo su proporción y recortando el exceso. */
  object-position: center; /* 4. Asegura que el recorte se haga desde el centro, ideal para marcas de agua. */
}

.container .box .top span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  color: white;
  font-size: 18px;
  z-index: 2;
}

.container .box .top span i {
  margin-left: 8px;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

/* --- ESTILOS DE LA PARTE INFERIOR DE LA TARJETA --- */
.container .box .bottom {
  padding: 15px;
  position: relative;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.container .box .bottom h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.container .box .bottom > p {
  margin: 0 0 15px 0;
  font-size: 13px;
  line-height: 1.5;
  color: #555;
  flex-grow: 1;
}

.container .box .bottom .advants {
  display: flex;
  justify-content: space-around;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.container .box .bottom .advants > div {
  margin-right: 10px;
  margin-bottom: 5px;
  text-align: center;
}

.container .box .bottom .advants > div > span {
  font-weight: normal;
  font-size: 11px;
  display: block;
  margin-bottom: 5px;
  color: #777;
}

.container .box .bottom .advants > div > div {
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.container .box .bottom .advants > div > div i {
  color: #3eaba1;
  font-size: 16px;
  margin-right: 5px;
}

.container .box .bottom .advants > div > div > span {
  font-size: 14px;
  font-weight: bold;
  margin-left: 0;
  color: #333;
}

.container .box .bottom .advants > div > div > span > span {
  color: #555;
  font-weight: normal;
  margin-left: 3px;
  font-size: 11px;
}

.container .box .bottom .price {
  margin-top: 15px;
  border-top: 1px solid #eee;
  padding-top: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.container .box .bottom .price span:first-of-type {
  display: inline-block;
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 0;
  color: #555;
}

.container .box .bottom .price span:last-of-type {
  color: #3eaba1;
  font-size: 18px;
  font-weight: bold;
}

.inmueble-main-content {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}
.inmueble-gallery {
  flex: 1 1 50%;
}
.inmueble-details {
  flex: 1 1 40%;
}