/**
 * Gallery Slider Widget - Estilos
 * @version 1.1.0
 */

/* Container principal */
.elementor-gallery-slider-wrapper {
    position: relative;
    width: 100%;
}

.gallery-slider-container {
    position: relative;
    width: 100%;
}

/* Item do slider */
.gallery-slider-item {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.gallery-slider-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* Link do lightbox (invisível mas clicável) */
.gallery-slider-item .lightbox-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    cursor: zoom-in;
}

/* Navegação do Owl Carousel */
.gallery-slider-container {
    position: relative;
}

.gallery-slider-container .owl-nav button {
    position: absolute;
    top: calc(45% - 25px) !important;
    transform: none !important;
    background: rgba(255, 255, 255, 0.98) !important;
    color: #333333 !important;
    width: 50px;
    height: 50px;
    border-radius: 0;
    font-size: 18px;
    line-height: 50px;
    text-align: center;
    transition: all 0.3s ease;
    pointer-events: all;
    border: none;
    outline: none;
    margin: 0 !important;
}

.gallery-slider-container .owl-nav button:hover {
    background: rgba(255, 255, 255, 1) !important;
    color: #000000 !important;
}

.gallery-slider-container .owl-nav .owl-prev {
    left: 0 !important;
}

.gallery-slider-container .owl-nav .owl-next {
    right: 0 !important;
}

.gallery-slider-container .owl-nav button.disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* Dots do Owl Carousel */
.gallery-slider-container .owl-dots {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 10px;
    padding: 10px 0;
}

.gallery-slider-container .owl-dots .owl-dot {
    display: inline-block;
    margin: 0 8px;
}

.gallery-slider-container .owl-dots .owl-dot span {
    display: block;
    width: 40px;
    height: 3px;
    border-radius: 0;
    background: #d1d1d1;
    transition: all 0.3s ease;
}

.gallery-slider-container .owl-dots .owl-dot:hover span {
    background: #999999;
}

.gallery-slider-container .owl-dots .owl-dot.active span {
    background: #333333;
    height: 3px;
}

/* ===================================
   ESTILOS PARA THUMBNAILS
   =================================== */

.gallery-thumbnails-wrap {
    margin-top: 0;
    padding: 0;
    width: 100%;
    display: flex;
    justify-content: center;
}

.gallery-thumbnails-container {
    position: relative;
    margin: 0 auto;
    max-width: 100%;
}

.gallery-thumbnails-container.owl-carousel {
    width: auto !important;
    display: inline-block !important;
}

.gallery-thumbnails-container .owl-stage-outer {
    padding: 0 !important;
}

.gallery-thumbnails-container .owl-item {
    padding: 0;
    max-width: 180px;
}

.gallery-thumbnail-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border: 3px solid #cccccc;
    transition: all 0.3s ease;
    width: 100%;
    height: 100px;
    margin: 0;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    object-position: center center !important;
    display: block;
    transition: all 0.3s ease;
}

/* Thumbnail hover */
.gallery-thumbnails-container .owl-item:hover .gallery-thumbnail-item {
    border-color: #999999;
}

.gallery-thumbnails-container .owl-item:hover .gallery-thumbnail-item img {
    opacity: 0.9;
}

/* Thumbnail ativa (current) */
.gallery-thumbnails-container .owl-item.current .gallery-thumbnail-item {
    border-color: #666666;
    box-shadow: 0 0 0 1px #666666;
}

.gallery-thumbnails-container .owl-item.current .gallery-thumbnail-item img {
    opacity: 1;
}

/* Overlay nas thumbnails */
.gallery-thumbnail-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.gallery-thumbnails-container .owl-item:not(.current) .gallery-thumbnail-item::before {
    background: rgba(0, 0, 0, 0.4);
}

.gallery-thumbnails-container .owl-item:hover .gallery-thumbnail-item::before {
    background: rgba(0, 0, 0, 0.2);
}

.gallery-thumbnails-container .owl-item.current .gallery-thumbnail-item::before {
    background: rgba(0, 0, 0, 0);
}

/* Responsivo */
@media (max-width: 768px) {
    .gallery-slider-container .owl-nav button {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 16px;
    }
    
    .gallery-slider-container .owl-nav .owl-prev {
        left: 0px !important;
    }
    
    .gallery-slider-container .owl-nav .owl-next {
        right: 0 !important;
    }

    /* Ajustar altura das imagens do slider em mobile */
    .gallery-slider-item img {
        height: 300px !important;
        max-height: 50vh;
        object-fit: cover !important;
    }

    /* Thumbnails um pouco menores em mobile */
    .gallery-thumbnail-item {
        height: 80px;
    }

    .gallery-thumbnails-wrap {
        padding: 0 5px;
    }
    
    .gallery-slider-container .owl-dots {
        margin-top: 15px;
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    /* Mobile pequeno - imagens ainda menores */
    .gallery-slider-item img {
        height: 250px !important;
        max-height: 45vh;
        object-fit: cover !important;
    }
    
    /* Thumbnails proporcionais em mobile pequeno */
    .gallery-thumbnail-item {
        height: 80px;
    }
}

/* Fix para Elementor Editor */
.elementor-editor-active .gallery-slider-container {
    min-height: 200px;
}

/* Garantir que as imagens sejam visíveis */
.gallery-slider-container .owl-stage-outer,
.gallery-slider-container .owl-stage,
.gallery-slider-container .owl-item,
.gallery-thumbnails-container .owl-stage-outer,
.gallery-thumbnails-container .owl-stage,
.gallery-thumbnails-container .owl-item {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Estilos para as miniaturas do lightGallery (quando ativado) */
.lg-outer .lg-thumb-outer {
    background-color: #0D0A0A;
}

.lg-outer .lg-thumb-item {
    border-radius: 0;
    cursor: pointer;
}

.lg-outer .lg-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
}

.lg-outer .lg-thumb-item.active {
    border-color: #a90707;
}