/* ======================================================
   DETALLE DE PROPIEDAD – SIMPLIFICAR INMOBILIARIA
   CSS LIMPIO / PREMIUM / ESCALABLE
====================================================== */

/* =====================
   GALERÍA HERO
===================== */

.property-hero {
    width: 100%;
    background: #f5f5f5;
    padding-top: 160px;
    /*padding: 80px 0 60px;*/
}

.property-gallery {
    max-width: 1400px;
    margin: auto;
    padding: 0 6%;
}

@media (max-width: 768px) {
    .gallery-main {
        height: 300px;
    }
}

/* Imagen principal */
/* =========================
   BOTÓN ZOOM IMAGEN
========================= */

.gallery-main {
    position: relative;
    height: 100vh;
    min-height: 520px;
    max-height: 760px;
    border-radius: 18px;
    overflow: hidden;
    background: #000;
}

.btn-zoom {
    position: absolute;
    bottom: 16px;
    right: 16px;

    background: rgba(0, 0, 0, 0.65);
    color: white;
    border: none;

    padding: 8px 10px;
    border-radius: 10px;

    cursor: pointer;
}

.btn-zoom:hover {
    background: rgba(0, 0, 0, 0.85);
    transform: scale(1.03);
}

.gallery-main {
    position: relative;
    width: 100%;
    height: 520px;      /* alto fijo */
    border-radius: 18px;
    overflow: hidden;
    background: #000;
}   

.gallery-main img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: 50% 60%;
    transition: object-fit 0.3s ease;
}

/* Imagen horizontal */
.gallery-main img.is-horizontal {
    object-fit: cover;
    object-position: center down;
}

/* Imagen vertical */
.gallery-main img.is-vertical {
    object-fit: contain;
    object-position: center;
    background: #000; /* elegante, no se ve feo */
}

/* =========================
   CARRUSEL MINIATURAS
========================= */

.gallery-thumbs-wrapper {
    position: relative;
    margin-top: 18px;
    overflow: hidden;
}

.gallery-thumbs-track {
    display: flex;
    gap: 14px;
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding: 4px 40px; /* espacio para flechas */
}

/* MINIATURAS */
.gallery-thumbs-track img {
    flex: 0 0 auto;
    width: 110px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    opacity: 0.75;
    transition: all 0.3s ease;
}

.gallery-thumbs-track img.active,
.gallery-thumbs-track img:hover {
    opacity: 1;
    transform: translateY(-4px);
    box-shadow: 0 10px 22px rgba(0,0,0,0.25);
}

/* BOTONES */
.thumb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;

    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;

    background: rgba(0,0,0,0.6);
    color: white;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
}

.thumb-nav.prev {
    left: 6px;
}

.thumb-nav.next {
    right: 6px;
}

.thumb-nav:hover {
    background: rgba(0,0,0,0.85);
}

/* =====================
   CONTENIDO PRINCIPAL
===================== */

.property-detail-wrapper {
    background: #ffffff;
    padding: 80px 0 120px;
}

.property-detail {
    max-width: 1200px;
    margin: auto;
    padding: 0 6%;
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 70px;
}

/* =====================
   INFO PRINCIPAL
===================== */

.detail-main h1 {
    font-size: 2.8rem;
    color: #111;
    margin-bottom: 10px;
}

.detail-location {
    color: #777;
    margin-bottom: 40px;
}

.detail-location i {
    margin-right: 6px;
}

/* =====================
   META GRID
===================== */

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.meta-card {
    background: #f7f7f7;
    padding: 20px;
    border-radius: 18px;
    text-align: center;
    transition: transform .3s ease, box-shadow .3s ease;
}

.meta-card i {
    font-size: 22px;
    color: #9f7b3f;
    margin-bottom: 8px;
    display: block;
}

.meta-card strong {
    font-size: .95rem;
    color: #222;
}

.meta-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0,0,0,.12);
}

/* =====================
   DESCRIPCIÓN
===================== */

.detail-description h3 {
    font-size: 1.4rem;
    margin-bottom: 14px;
}

.detail-description p {
    line-height: 1.8;
    color: #444;
}

/* =====================
   SIDEBAR PRECIO
===================== */

.detail-sidebar {
    position: sticky;
    top: 120px;
}

.price-box {
    background: #111;
    color: #fff;
    padding: 40px;
    border-radius: 22px;
    box-shadow: 0 25px 50px rgba(0,0,0,.35);
}

.price-label {
    font-size: .9rem;
    opacity: .7;
}

.price-value {
    font-size: 2.4rem;
    font-weight: 700;
    color: #d4af37;
    display: block;
    margin: 10px 0 30px;
}

/* CTA */
.detail-cta {
    display: block;
    text-align: center;
    background: #d4af37;
    color: #000;
    padding: 16px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all .3s ease;
}

.detail-cta i {
    margin-right: 6px;
}

.detail-cta:hover {
    background: #fff;
}

.cta-note {
    margin-top: 16px;
    font-size: .85rem;
    opacity: .7;
    text-align: center;
}

/* =====================
   RESPONSIVE
===================== */

@media (max-width: 900px) {

    .gallery-main {
        height: 45vh;
        min-height: 360px;
    }

    .gallery-thumbs img {
        width: 90px;
        height: 65px;
    }

    .property-detail {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        position: relative;
        top: auto;
        margin-top: 40px;
    }
}

/* ===============================
   GALERÍA MINIATURAS
================================ */

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

/* MINIATURA */
.gallery-thumbs .thumb {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    opacity: 0.75;
    transition: all 0.2s ease;
}

/* ACTIVA */
.gallery-thumbs .thumb.active,
.gallery-thumbs .thumb:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* =========================
   MODAL OVERLAY IMAGEN
========================= */

.image-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);

    display: none;            /* 🔴 oculto por defecto */
    align-items: center;
    justify-content: center;

    z-index: 9999;
}

/* CONTENEDOR DE LA IMAGEN */
.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;

    background: #000;
    border-radius: 14px;
    padding: 10px;

    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

/* IMAGEN */
.image-modal-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 10px;
    display: block;
}

/* BOTÓN CERRAR */
.close-modal {
    position: absolute;
    top: -12px;
    right: -12px;

    width: 36px;
    height: 36px;

    background: #ffffff;
    color: #000000;

    border-radius: 50%;
    border: none;

    font-size: 22px;
    font-weight: bold;

    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}