/* =============================================
   SINGLE PROPIEDADES
   Paleta: Azul + Blanco
   Layout desktop: imagen izq, panel info der (grid en .propiedad-single)
   ============================================= */

/* ── Contenedor principal: grid de 2 cols en desktop ── */
.propiedad-single {
  max-width: 1100px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1a1a1a;
  display: grid;
  grid-template-columns: 1fr 420px;
  grid-template-areas:
    "galeria  header"
    "galeria  precio"
    "galeria  datos"
    "desc     desc";
  gap: 0 2rem;
  align-items: start;
}

/* ─────────────────────────────────────────────
   GALERÍA (columna izquierda, ocupa varias filas)
───────────────────────────────────────────── */
.propiedad-galeria {
  grid-area: galeria;
}

.propiedad-galeria figure,
.propiedad-galeria .wp-post-image {
  display: block;
  margin: 0;
  padding: 0;
  width: 100%;
}

.propiedad-galeria img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  border: 0.5px solid #dce9f7;
}

/* ─────────────────────────────────────────────
   HEADER: título + ubicación (columna derecha, fila 1)
───────────────────────────────────────────── */
.propiedad-header {
  grid-area: header;
  background: #ffffff;
  border-radius: 12px 12px 0 0;
  border: 0.5px solid #dce9f7;
  border-bottom: none;
  padding: 1.75rem 1.75rem 1.25rem;
}

.propiedad-header h1 {
  font-size: 21px;
  font-weight: 500;
  color: #111111;
  line-height: 1.3;
  margin: 0 0 8px;
}

.propiedad-ubicacion {
  font-size: 14px;
  color: #5a7ea0;
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
}

.propiedad-ubicacion::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23185FA5' stroke-width='2'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

/* ── Precio (columna derecha, fila 2) ── */
.propiedad-precio {
  grid-area: precio;
  background: #ffffff;
  border-left: 0.5px solid #dce9f7;
  border-right: 0.5px solid #dce9f7;
  border-top: 0.5px solid #dce9f7;
  padding: 1rem 1.75rem;
  font-size: 28px;
  font-weight: 500;
  color: #185FA5;
  margin: 0;
}

/* ─────────────────────────────────────────────
   DATOS / CARACTERÍSTICAS (columna derecha, fila 3)
───────────────────────────────────────────── */
.propiedad-datos {
  grid-area: datos;
  background: #ffffff;
  border-radius: 0 0 12px 12px;
  border: 0.5px solid #dce9f7;
  border-top: none;
  padding: 1.25rem 1.75rem 1.75rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.dato {
  background: #f4f8fd;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: background 0.15s;
}

.dato:hover {
  background: #e8f2fb;
}

.dato .label {
  font-size: 11px;
  color: #7a9bbf;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.dato .valor {
  font-size: 15px;
  font-weight: 500;
  color: #1a1a1a;
}

/* ─────────────────────────────────────────────
   DESCRIPCIÓN (fila inferior, ancho completo)
───────────────────────────────────────────── */
.propiedad-descripcion {
  grid-area: desc;
  background: #ffffff;
  border-radius: 12px;
  border: 0.5px solid #dce9f7;
  padding: 1.75rem;
  margin-top: 1.5rem;
}

.propiedad-descripcion p,
.propiedad-descripcion .entry-content,
.propiedad-descripcion > * {
  font-size: 15px;
  line-height: 1.75;
  color: #333333;
}

/* ─────────────────────────────────────────────
   RESPONSIVE — tablet y móvil
───────────────────────────────────────────── */
@media (max-width: 860px) {
  .propiedad-single {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0 1rem;
    margin: 1.25rem auto;
  }

  /* orden: título → precio → imagen → datos → descripción */
  .propiedad-header {
    order: 1;
    border-radius: 12px 12px 0 0;
    border: 0.5px solid #dce9f7;
    border-bottom: none;
    padding: 1.25rem 1.25rem 1rem;
  }

  .propiedad-header h1 {
    font-size: 18px;
  }

  .propiedad-precio {
    order: 2;
    padding: 0.85rem 1.25rem;
    font-size: 22px;
    border: 0.5px solid #dce9f7;
    border-top: none;
    border-bottom: 0.5px solid #dce9f7;
    border-radius: 0 0 12px 12px;
  }

  .propiedad-galeria {
    order: 3;
    margin-top: 1rem;
  }

  .propiedad-galeria figure,
  .propiedad-galeria .wp-post-image,
  .propiedad-galeria > * {
    width: 100%;
    margin: 0;
  }

  .propiedad-galeria img {
    height: 240px;
    border-radius: 12px;
  }

  .propiedad-datos {
    order: 4;
    border: 0.5px solid #dce9f7;
    border-top: none;
    border-radius: 0 0 12px 12px;
    margin-top: 1rem;
    padding: 1rem 1.25rem 1.25rem;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .propiedad-descripcion {
    order: 5;
    margin-top: 1rem;
    border-radius: 12px;
    padding: 1.25rem;
  }
}


/* ─────────────────────────────────────────────
   GALERÍA CON CARRUSEL DE THUMBNAILS
───────────────────────────────────────────── */

/* Wrapper que contiene imagen principal + thumbs */
.galeria-wrapper {
  width: 100%;
}

/* Imagen principal grande */
.galeria-principal {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 0.5px solid #dce9f7;
  background: #f4f8fd;
}

.galeria-principal img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s ease;
}

/* Fila de thumbnails */
.galeria-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.galeria-thumb {
  width: 80px !important; 
  height: 60px !important;
  object-fit: cover;
  border-radius: 7px;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.galeria-thumb:hover {
  opacity: 1;
}

/* Thumbnail activa (la que se muestra en grande) */
.galeria-thumb.thumb-activa {
  border-color: #185FA5;
  opacity: 1;
}

/* ── Responsive ── */
@media (max-width: 860px) {
  .galeria-principal img {
    height: 240px;
  }

  .galeria-thumb {
    width: 64px !important;
    height: 48px !important;
  }
}