/**
 * Estilos do Componente de Carrossel Sweet Tooth
 * 
 * Estilos customizados para o carrossel reutilizável
 * Sobrescreve e complementa os estilos padrão do Swiper
 */

/* Container principal do carrossel */
.sweet-tooth-carousel-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
    padding: 20px 0;
}

/* Container do Swiper */
.sweet-tooth-carousel {
    width: 100%;
    height: auto;
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background: #f8f8f8;
}

/* Slides */
.sweet-tooth-carousel .swiper-slide {
    text-align: center;
    font-size: 18px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Imagens do carrossel */
.sweet-tooth-carousel .swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-height: 600px;
}

/* Loader para lazy loading */
.sweet-tooth-carousel .swiper-lazy-preloader {
    width: 42px;
    height: 42px;
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -21px;
    margin-top: -21px;
    z-index: 10;
    transform-origin: 50%;
    animation: swiper-preloader-spin 1s infinite linear;
    box-sizing: border-box;
    border: 4px solid var(--swiper-preloader-color, rgba(233, 104, 107, 0.2));
    border-radius: 50%;
    border-top-color: var(--swiper-preloader-color, #E9686B);
}

/* Legenda das imagens */
.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    color: white;
    padding: 20px;
    text-align: center;
    font-size: 16px;
    font-weight: 300;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.swiper-slide-active .carousel-caption {
    opacity: 1;
    transform: translateY(0);
}

/* Botões de navegação customizados */
.sweet-tooth-carousel .swiper-button-next,
.sweet-tooth-carousel .swiper-button-prev {
    color: #E9686B;
    background: rgba(255, 255, 255, 0.9);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.sweet-tooth-carousel .swiper-button-next:hover,
.sweet-tooth-carousel .swiper-button-prev:hover {
    background: #E9686B;
    color: white;
    transform: scale(1.1);
}

.sweet-tooth-carousel .swiper-button-next:after,
.sweet-tooth-carousel .swiper-button-prev:after {
    font-size: 20px;
    font-weight: bold;
}

/* Paginação customizada */
.sweet-tooth-carousel .swiper-pagination {
    bottom: 20px !important;
}

.sweet-tooth-carousel .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    margin: 0 6px !important;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.sweet-tooth-carousel .swiper-pagination-bullet-active {
    background: #E9686B;
    width: 30px;
    border-radius: 6px;
    border: 2px solid white;
}

/* Thumbnails */
.sweet-tooth-carousel-thumbs {
    margin-top: 20px;
    height: 100px;
    box-sizing: border-box;
    padding: 10px 0;
}

.sweet-tooth-carousel-thumbs .swiper-slide {
    width: 25%;
    height: 100%;
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.sweet-tooth-carousel-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    box-shadow: 0 0 0 3px #E9686B;
}

.sweet-tooth-carousel-thumbs .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Efeitos de transição */
/* Fade */
.swiper-fade .swiper-slide {
    opacity: 0 !important;
}

.swiper-fade .swiper-slide-active {
    opacity: 1 !important;
}

/* Cube */
.swiper-cube .swiper-slide {
    background: #fff;
}

/* Coverflow */
.swiper-coverflow .swiper-slide {
    background: #fff;
}

/* Responsividade */
@media (max-width: 768px) {
    .sweet-tooth-carousel {
        border-radius: 10px;
    }

    .sweet-tooth-carousel .swiper-slide img {
        max-height: 400px;
    }

    .sweet-tooth-carousel .swiper-button-next,
    .sweet-tooth-carousel .swiper-button-prev {
        width: 40px;
        height: 40px;
    }

    .sweet-tooth-carousel .swiper-button-next:after,
    .sweet-tooth-carousel .swiper-button-prev:after {
        font-size: 16px;
    }

    .carousel-caption {
        font-size: 14px;
        padding: 15px;
    }

    .sweet-tooth-carousel-thumbs {
        height: 70px;
    }
}

@media (max-width: 480px) {
    .sweet-tooth-carousel .swiper-slide img {
        max-height: 300px;
    }

    .sweet-tooth-carousel .swiper-button-next,
    .sweet-tooth-carousel .swiper-button-prev {
        width: 35px;
        height: 35px;
    }

    .sweet-tooth-carousel .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
    }

    .sweet-tooth-carousel .swiper-pagination-bullet-active {
        width: 20px;
    }
}

/* Animações */
@keyframes swiper-preloader-spin {
    100% {
        transform: rotate(360deg);
    }
}

/* Estilos para acessibilidade */
.swiper-notification {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Focus para navegação por teclado */
.sweet-tooth-carousel:focus,
.sweet-tooth-carousel .swiper-button-next:focus,
.sweet-tooth-carousel .swiper-button-prev:focus,
.sweet-tooth-carousel .swiper-pagination-bullet:focus {
    outline: 3px solid #E9686B;
    outline-offset: 2px;
}

/* Modo de alto contraste */
@media (prefers-contrast: high) {

    .sweet-tooth-carousel .swiper-button-next,
    .sweet-tooth-carousel .swiper-button-prev {
        background: white;
        color: black;
        border: 2px solid black;
    }

    .sweet-tooth-carousel .swiper-button-next:hover,
    .sweet-tooth-carousel .swiper-button-prev:hover {
        background: black;
        color: white;
    }

    .sweet-tooth-carousel .swiper-pagination-bullet {
        border: 2px solid black;
    }

    .sweet-tooth-carousel .swiper-pagination-bullet-active {
        background: black;
        border-color: black;
    }
}

/* Modo escuro */
@media (prefers-color-scheme: dark) {
    .sweet-tooth-carousel {
        background: #1a1a1a;
    }

    .sweet-tooth-carousel .swiper-slide {
        background: #2a2a2a;
    }

    .sweet-tooth-carousel .swiper-button-next,
    .sweet-tooth-carousel .swiper-button-prev {
        background: rgba(0, 0, 0, 0.8);
        color: #E9686B;
    }

    .sweet-tooth-carousel .swiper-button-next:hover,
    .sweet-tooth-carousel .swiper-button-prev:hover {
        background: #E9686B;
        color: white;
    }
}

/* Animação de entrada suave */
.sweet-tooth-carousel {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}