/* ========================================
   GALERIA DE ENCARTES MULTIPÁGINAS
   Slider touch-friendly para visualizar
   todas as páginas do encarte no mobile
   ======================================== */

.oferta-encarte-gallery {
    width: 100%;
    margin: 16px 0 !important;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.encarte-slider-container {
    position: relative;
    width: 100%;
    /* Altura adapta ao conteúdo ativo */
    min-height: 200px;
    transition: height 0.3s ease;
}

.encarte-slider {
    position: relative;
    width: 100%;
    /* Removemos scroll/flex para evitar conflitos com a lógica de display:none do JS */
}

/* Remover barra de rolagem (caso sobre) */
.encarte-slider::-webkit-scrollbar {
    display: none;
}

.encarte-slide {
    width: 100%;
    position: relative;
    display: none;
    /* Oculto por padrão, controlado pelo JS */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.encarte-slide.active {
    display: block;
    /* Apenas o ativo é renderizado -> Altura do container se ajusta (block formatting context) */
    opacity: 1;
    animation: fadeInSlide 0.4s ease forwards;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.encarte-slide img {
    width: 100%;
    height: auto;
    /* Altura natural */
    display: block;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    /* Sombra sutil na imagem */
}

.encarte-page-label {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    z-index: 5;
}

/* Botões de Navegação */
.encarte-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
    user-select: none;
}

.encarte-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.encarte-prev {
    left: 10px;
}

.encarte-next {
    right: 10px;
}

/* Indicadores (Dots) */
.encarte-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.encarte-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s;
}

.encarte-dots .dot.active {
    background: #128c7e;
    width: 18px;
    border-radius: 4px;
}

/* Mobile otimizado */
@media (max-width: 768px) {
    .encarte-nav {
        display: none;
        /* Ocultar botões no mobile, usar swipe */
    }

    /* Como removemos o scroll snap nativo, o swipe deve ser garantido pelo JS */
}