
/* V13.1 - Galeria do imóvel fluida + lightbox premium */

/* container da galeria dentro do detalhe */
.property-gallery,
.detail-gallery,
.gallery-strip,
.image-gallery,
.property-images,
.gallery-thumbs,
.thumbs,
.property-detail-gallery{
    display:grid !important;
    grid-template-columns:repeat(auto-fill, minmax(92px, 1fr)) !important;
    gap:12px !important;
    width:100% !important;
    align-items:stretch !important;
}

/* miniaturas quadradas e responsivas */
.property-gallery img,
.detail-gallery img,
.gallery-strip img,
.image-gallery img,
.property-images img,
.gallery-thumbs img,
.thumbs img,
.property-detail-gallery img{
    width:100% !important;
    aspect-ratio:1 / 1 !important;
    height:auto !important;
    min-height:92px !important;
    max-height:none !important;
    object-fit:cover !important;
    border-radius:16px !important;
    cursor:pointer !important;
    transition:transform .22s ease, box-shadow .22s ease, opacity .22s ease, border-color .22s ease !important;
    border:1px solid rgba(255,255,255,.18) !important;
    box-shadow:0 12px 28px rgba(15,23,42,.12) !important;
}

.property-gallery img:hover,
.detail-gallery img:hover,
.gallery-strip img:hover,
.image-gallery img:hover,
.property-images img:hover,
.gallery-thumbs img:hover,
.thumbs img:hover,
.property-detail-gallery img:hover{
    transform:translateY(-3px) scale(1.02) !important;
    box-shadow:0 18px 40px rgba(15,23,42,.20) !important;
    opacity:.96 !important;
}

.property-gallery img.active,
.detail-gallery img.active,
.gallery-strip img.active,
.image-gallery img.active,
.property-images img.active,
.gallery-thumbs img.active,
.thumbs img.active,
.property-detail-gallery img.active{
    border-color:rgba(214,132,9,.95) !important;
    box-shadow:0 0 0 4px rgba(214,132,9,.16), 0 18px 40px rgba(15,23,42,.20) !important;
}

/* quando houver muitas fotos, continua fluido sem quebrar layout */
@media(min-width:900px){
    .property-gallery,
    .detail-gallery,
    .gallery-strip,
    .image-gallery,
    .property-images,
    .gallery-thumbs,
    .thumbs,
    .property-detail-gallery{
        grid-template-columns:repeat(auto-fill, minmax(104px, 1fr)) !important;
    }
}

@media(max-width:640px){
    .property-gallery,
    .detail-gallery,
    .gallery-strip,
    .image-gallery,
    .property-images,
    .gallery-thumbs,
    .thumbs,
    .property-detail-gallery{
        grid-template-columns:repeat(3, 1fr) !important;
        gap:8px !important;
    }

    .property-gallery img,
    .detail-gallery img,
    .gallery-strip img,
    .image-gallery img,
    .property-images img,
    .gallery-thumbs img,
    .thumbs img,
    .property-detail-gallery img{
        border-radius:12px !important;
        min-height:76px !important;
    }
}

/* Lightbox */
.property-lightbox-v131{
    position:fixed !important;
    inset:0 !important;
    z-index:999999 !important;
    display:none !important;
    align-items:center !important;
    justify-content:center !important;
    background:rgba(2,6,16,.82) !important;
    backdrop-filter:blur(16px) saturate(130%) !important;
    -webkit-backdrop-filter:blur(16px) saturate(130%) !important;
    padding:28px !important;
}

.property-lightbox-v131.open{
    display:flex !important;
}

.property-lightbox-v131 .lb-frame{
    position:relative !important;
    width:min(1180px, 94vw) !important;
    height:min(780px, 86vh) !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
}

.property-lightbox-v131 img{
    max-width:100% !important;
    max-height:100% !important;
    width:auto !important;
    height:auto !important;
    object-fit:contain !important;
    border-radius:22px !important;
    box-shadow:0 32px 110px rgba(0,0,0,.48) !important;
}

.property-lightbox-v131 button{
    position:absolute !important;
    border:1px solid rgba(255,255,255,.18) !important;
    background:rgba(255,255,255,.12) !important;
    color:#fff !important;
    backdrop-filter:blur(10px) !important;
    -webkit-backdrop-filter:blur(10px) !important;
    cursor:pointer !important;
    transition:transform .18s ease, background .18s ease !important;
}

.property-lightbox-v131 button:hover{
    transform:scale(1.05) !important;
    background:rgba(255,255,255,.18) !important;
}

.property-lightbox-v131 .lb-close{
    top:0 !important;
    right:0 !important;
    width:46px !important;
    height:46px !important;
    border-radius:16px !important;
    font-size:26px !important;
    line-height:1 !important;
}

.property-lightbox-v131 .lb-prev,
.property-lightbox-v131 .lb-next{
    top:50% !important;
    transform:translateY(-50%) !important;
    width:52px !important;
    height:52px !important;
    border-radius:18px !important;
    font-size:32px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
}

.property-lightbox-v131 .lb-prev{
    left:0 !important;
}

.property-lightbox-v131 .lb-next{
    right:0 !important;
}

.property-lightbox-v131 .lb-counter{
    position:absolute !important;
    left:50% !important;
    bottom:0 !important;
    transform:translateX(-50%) !important;
    padding:10px 14px !important;
    border-radius:999px !important;
    background:rgba(255,255,255,.12) !important;
    color:#fff !important;
    font-weight:800 !important;
    font-size:13px !important;
    border:1px solid rgba(255,255,255,.16) !important;
}

@media(max-width:640px){
    .property-lightbox-v131{
        padding:14px !important;
    }

    .property-lightbox-v131 .lb-prev,
    .property-lightbox-v131 .lb-next{
        width:44px !important;
        height:44px !important;
        font-size:26px !important;
    }
}
