/**
 * Styles pour le carrousel en frontend
 * wp-content/plugins/advanced-woo-manager/assets/css/awm-carousel.css
 */

/* Container principal */
.awm-carousel-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 500px;
    margin: 0 auto;
    overflow: visible;
    user-select: none;
}

.awm-carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.awm-carousel-track {
    display: flex;
    position: absolute;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}

.awm-carousel-slide {
    position: relative;
    flex-shrink: 0;
    width: 20%; /* Afficher 5 images par défaut sur PC */
    height: 100%;
}

.awm-carousel-slide-inner {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
    padding: 0 10px;
    box-sizing: border-box;
}

/* Décalage vertical des images */
.awm-carousel-slide:nth-child(odd) .awm-carousel-slide-inner {
    transform: translateY(-20px);
}

.awm-carousel-slide:nth-child(even) .awm-carousel-slide-inner {
    transform: translateY(20px);
}

/* Style pour les images */
@media (min-width:768px) {
    .awm-carousel-image {
        object-position: center;
        width: 100%;
        height: 400px !important;
        object-fit: cover;
        transition: all 0.5s ease;
    }

    span.awm-carousel-arrow {
        background-color: transparent;
        display: block;
        width: 50px;
        height: 50px;
        background-repeat: no-repeat;
        background-size: contain;
        background-position: center;
    }
}

/* Style pour les images */
@media (max-width:767px) {
    .awm-carousel-image {
        object-position: center;
        width: 100%;
        height: 150px !important;
        object-fit: cover;
        transition: all 0.5s ease;
    }

    span.awm-carousel-arrow {
        background-color: transparent;
        display: block;
        width: 30px;
        height: 30px;
        background-repeat: no-repeat;
        background-size: contain;
        background-position: center;
    }
}

/* Navigation */
.awm-carousel-navigation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.awm-carousel-prev, .awm-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: transparent !important;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 20;
}

.awm-carousel-prev:hover,
.awm-carousel-next:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.05);
}

.awm-carousel-prev:focus,
.awm-carousel-next:focus {
    outline: none;
}

.awm-carousel-prev {
    left: 20px;
}

.awm-carousel-next {
    right: 20px;
}

/* Styles pour les flèches */
.awm-carousel-arrow {
    display: block;
    line-height: 1;
    width: 100%;
    height: 100%;
}

/* Flèches personnalisées (images) */
.awm-carousel-arrow img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Flèches par défaut */
.awm-carousel-arrow-default {
    font-size: 30px;
    color: #333;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* Responsive */
@media screen and (max-width: 1200px) {
    .awm-carousel-container {
        height: 400px;
    }

    .awm-carousel-slide {
        width: 25%; /* 4 images visibles sur tablette */
    }

    .awm-carousel-prev,
    .awm-carousel-next {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .awm-carousel-arrow-default {
        font-size: 24px;
    }
}

@media screen and (max-width: 768px) {
    .awm-carousel-container {
        height: 350px;
    }

    .awm-carousel-slide {
        width: 25%; /* 3 images visibles sur mobile large */
    }

    .awm-carousel-slide:nth-child(odd) .awm-carousel-slide-inner {
        transform: translateY(-10px);
    }

    .awm-carousel-slide:nth-child(even) .awm-carousel-slide-inner {
        transform: translateY(10px);
    }

    .awm-carousel-prev,
    .awm-carousel-next {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }

    .awm-carousel-arrow-default {
        font-size: 20px;
    }
}

@media screen and (max-width: 480px) {
    .awm-carousel-container {
        height: 150px;
    }

    .awm-carousel-slide {
        width: 25% !important; /* 2 images visibles sur petit mobile */
    }

    .awm-carousel-slide:nth-child(odd) .awm-carousel-slide-inner,
    .awm-carousel-slide:nth-child(even) .awm-carousel-slide-inner {
        transform: translateY(0);
    }

    .awm-carousel-prev,
    .awm-carousel-next {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    .awm-carousel-arrow-default {
        font-size: 18px;
    }
}
