/* --- A CORREÇÃO CRÍTICA ESTÁ AQUI --- */
.imob-gallery-carousel {
    position: relative; /* Necessário para conter os botões */
    width: 100%;       /* Ocupa o espaço que o Elementor designar */
    overflow: hidden;  /* Impede o Swiper de "vazar" e criar o scroll gigante */
}

/* --- Estilos do Carrossel (Inalterados, mas agora "enjaulados") --- */
.imob-gallery-carousel .swiper {
    width: 100%;
}

.imob-gallery-carousel .swiper-slide {
    text-align: center;
    font-size: 18px;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.imob-gallery-carousel .swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.imob-gallery-carousel .swiper-button-next,
.imob-gallery-carousel .swiper-button-prev {
    color: #fff;
    background-color: rgba(0, 0, 0, 0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
.imob-gallery-carousel .swiper-button-next:after,
.imob-gallery-carousel .swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

/* --- Estilos do Lightbox Customizado (Inalterados) --- */
.imob-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    padding: 20px;
    box-sizing: border-box;
}
.imob-lightbox-overlay.visible { display: flex; }
.imob-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.imob-lightbox-content img {
    max-width: 100%;
    max-height: calc(90vh - 60px);
    object-fit: contain;
    display: block;
}
.imob-lightbox-caption { color: #fff; margin-top: 15px; font-size: 16px; text-align: center; }
.imob-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: background 0.2s;
}
.imob-lightbox-nav:hover { background: rgba(0, 0, 0, 0.8); }
.imob-lightbox-prev { left: -70px; }
.imob-lightbox-next { right: -70px; }

/* --- Estilos do Botão Fechar do Lightbox --- */

.imob-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.5);
    color: #F8F5F2;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    padding-left: 13px;
    padding-top: 0;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 100000; /* Garante que fique acima de tudo */
}

.imob-lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
}