/**
 * Product Slider - K-VenteBoutique
 * Slider horizontal pour les produits en version mobile
 */

/* Container principal du slider de produits */
.product-slider-container,
.faq-slider-container,
.features-slider-container,
.services-slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 10px 0;
}

/* Track contenant les produits */
.product-slider-track,
.faq-slider-track,
.features-slider-track,
.services-slider-track {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 15px;
    margin: 0 -15px;
}

.product-slider-track::-webkit-scrollbar,
.faq-slider-track::-webkit-scrollbar,
.features-slider-track::-webkit-scrollbar,
.services-slider-track::-webkit-scrollbar {
    display: none;
}

/* Chaque produit dans le slider */
.product-slider-item,
.faq-slider-item,
.features-slider-item,
.services-slider-item {
    flex: 0 0 auto;
    width: 160px;
    scroll-snap-align: start;
    transition: transform 0.3s ease;
}

/* FAQ items have different width */
.faq-slider-item {
    width: 280px;
}

/* Features items have different width */
.features-slider-item {
    width: 280px;
}

/* Services items have different width */
.services-slider-item {
    width: 280px;
}

/* Masquer le slider sur desktop - afficher en grille normale */
@media (min-width: 992px) {
    .product-slider-container,
    .faq-slider-container,
    .features-slider-container,
    .services-slider-container {
        display: none;
    }
}

/* Afficher le slider uniquement sur mobile et tablette */
@media (max-width: 991px) {
    .product-slider-container,
    .faq-slider-container,
    .features-slider-container,
    .services-slider-container {
        display: block;
    }

    /* Adapter la taille des produits selon l'écran */
    @media (min-width: 480px) {
        .product-slider-item {
            width: 180px;
        }
        .faq-slider-item {
            width: 300px;
        }
        .features-slider-item {
            width: 300px;
        }
        .services-slider-item {
            width: 300px;
        }
    }

    @media (min-width: 600px) {
        .product-slider-item {
            width: 200px;
        }
        .faq-slider-item {
            width: 320px;
        }
        .features-slider-item {
            width: 320px;
        }
        .services-slider-item {
            width: 320px;
        }
    }
}

/* Navigation buttons pour le slider */
.product-slider-nav,
.faq-slider-nav,
.features-slider-nav,
.services-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #333;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-slider-nav:hover,
.faq-slider-nav:hover,
.features-slider-nav:hover,
.services-slider-nav:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) scale(1.1);
}

.product-slider-nav.prev,
.faq-slider-nav.prev,
.features-slider-nav.prev,
.services-slider-nav.prev {
    left: 5px;
}

.product-slider-nav.next,
.faq-slider-nav.next,
.features-slider-nav.next,
.services-slider-nav.next {
    right: 5px;
}

/* Dots de navigation */
.product-slider-dots,
.faq-slider-dots,
.features-slider-dots,
.services-slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    padding: 0 15px;
}

.product-slider-dot,
.faq-slider-dot,
.features-slider-dot,
.services-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-slider-dot:hover,
.faq-slider-dot:hover,
.features-slider-dot:hover,
.services-slider-dot:hover {
    background: #bbb;
}

.product-slider-dot.active,
.faq-slider-dot.active,
.features-slider-dot.active,
.services-slider-dot.active {
    background: #667eea;
    transform: scale(1.2);
}

/* Indicateur de défilement sur mobile */
.product-slider-container::after,
.faq-slider-container::after,
.features-slider-container::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 60px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.8));
    pointer-events: none;
    z-index: 5;
}

/* Animation de glissement */
.product-slider-track,
.faq-slider-track,
.features-slider-track {
    scroll-behavior: smooth;
}

/* Amélioration de l'accessibilité */
.product-slider-item:focus,
.faq-slider-item:focus,
.features-slider-item:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Touch feedback */
.product-slider-item:active,
.faq-slider-item:active,
.features-slider-item:active {
    transform: scale(0.98);
}

/* Masquer le nom du produit sur mobile dans le slider */
.product-slider-item .product-title {
    display: none;
}

/* Garder le prix et les étoiles visibles */
.product-slider-item .align-items {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.product-slider-item .align-items .pull-left,
.product-slider-item .align-items .pull-right {
    float: none;
    width: 100%;
}

.product-slider-item .price {
    font-size: 14px;
    font-weight: 600;
}

.product-slider-item .reviews-icon {
    font-size: 12px;
}

/* FAQ Slider specific styles */
.faq-slider-item .faq-item {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 0;
}

.faq-slider-item .faq-question {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.faq-slider-item .faq-answer {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
}

/* Features Slider specific styles */
.features-slider-item .features-item {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 0;
    text-align: center;
}

.features-slider-item .features-icon {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 10px;
}

.features-slider-item .features-content h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.features-slider-item .features-content p {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

/* Services Slider specific styles */
.services-slider-item .services-box {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 0;
    text-align: center;
}

.services-slider-item .services-icon {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 10px;
}

.services-slider-item .services-content h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.services-slider-item .services-content h4 a {
    color: #333;
    text-decoration: none;
}

.services-slider-item .services-content h4 a:hover {
    color: #667eea;
}

.services-slider-item .services-content p {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

/* Recommended Slider specific styles */
.recommended-slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 10px 0;
}

.recommended-slider-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 15px;
    margin: 0 -15px;
}

.recommended-slider-track::-webkit-scrollbar {
    display: none;
}

.recommended-slider-item {
    flex: 0 0 auto;
    width: 140px;
    scroll-snap-align: start;
    transition: transform 0.3s ease;
}

.recommended-product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recommended-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.recommended-product-image {
    position: relative;
    width: 100%;
    height: 140px;
    overflow: hidden;
}

.recommended-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recommended-product-card:hover .recommended-product-image img {
    transform: scale(1.05);
}

.recommended-quick-view {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.recommended-quick-view:hover {
    background: #667eea;
    color: #fff;
    transform: scale(1.1);
}

.recommended-product-info {
    padding: 10px;
}

.recommended-product-name {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    line-height: 1.3;
    height: 32px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.recommended-reviews-icon {
    font-size: 10px;
    margin-bottom: 6px;
    color: #f39c12;
}

.recommended-reviews-icon .i-color {
    color: #f39c12;
}

.recommended-reviews-icon .fa-star-o {
    color: #ddd;
}

.recommended-price {
    font-size: 13px;
    font-weight: 700;
    color: #667eea;
}

.recommended-old-price {
    font-size: 11px;
    font-weight: 400;
    color: #999;
    text-decoration: line-through;
    margin-left: 6px;
}

/* Swipe indicator */
.recommended-swipe-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px;
    font-size: 12px;
    color: #999;
    animation: swipeHint 2s ease-in-out infinite;
}

@keyframes swipeHint {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(10px);
    }
}

.recommended-swipe-indicator i {
    font-size: 14px;
}

/* Hide recommended slider on desktop */
@media (min-width: 992px) {
    .recommended-slider-container {
        display: none;
    }
}

/* Show recommended slider on mobile and tablet */
@media (max-width: 991px) {
    .recommended-slider-container {
        display: block;
    }

    @media (min-width: 480px) {
        .recommended-slider-item {
            width: 160px;
        }

        .recommended-product-image {
            height: 160px;
        }
    }

    @media (min-width: 600px) {
        .recommended-slider-item {
            width: 180px;
        }

        .recommended-product-image {
            height: 180px;
        }
    }
}
