.csw-products-slider-container {
    position: relative;
    overflow: hidden;
}

/* Styles spécifiques pour Glide.js */
.glide {
    width: 100%;
    margin: 0;
}

.glide__track {
    overflow: visible;
}

.glide__slides {
    display: flex;
    align-items: stretch;
    list-style: none;
    margin: 0;
    padding: 0;
}

.glide__slide {
    flex-shrink: 0;
    height: auto;
    padding-left: 12px;
    padding-right: 12px;
    margin-right: 8px;
    box-sizing: border-box;
    /* Assurer que l'effet peek soit visible */
    width: auto;
}

/* Container sans offset initial */
.csw-products-slider-container {
    position: relative;
    overflow: hidden;
}

/* Assurer que le slider est bien positionné */
.glide {
    margin-left: 0;
}

/* Masquer le slide précédent jusqu'au premier swipe */
.glide__slide.hide-until-scroll {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.csw-products-slider-container.scrolled .glide__slide.hide-until-scroll {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Cibler spécifiquement le slide précédent */
.glide__slide:not(.glide__slide--active).hide-until-scroll {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.csw-products-slider-container.scrolled .glide__slide:not(.glide__slide--active).hide-until-scroll {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Responsive pour Glide */
@media (max-width: 1024px) {
    .glide__slide {
        padding-left: 10px;
        padding-right: 10px;
    }
}

@media (max-width: 768px) {
    .glide__slide {
        padding-left: 8px;
        padding-right: 8px;
    }
}

@media (max-width: 480px) {
    .glide__slide {
        padding-left: 4px;
        padding-right: 4px;
    }
}

@media (max-width: 320px) {
    .glide__slide {
        padding-left: 2px;
        padding-right: 2px;
    }
}

.csw-product-item {
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
    /* Assurer que l'effet peek soit visible */
    box-sizing: border-box;
}

.csw-product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    display: block;
    text-decoration: none;
    pointer-events: auto;
}

.csw-product-image {
    position: relative;
    overflow: hidden;
    height: 450px;
    background: #f9f9f9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.csw-product-image img {
    width: 100%!important;
    height: 100%!important;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

/* Labels personnalisés */
.csw-product-labels {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 15;
    display: flex;
    gap: 8px;
}

.csw-product-label {
    background: transparent;
    color: var(--e-global-color-primary);
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 400;
    text-transform: none;
    border-radius: 15px;
    line-height: 1.2;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0;
    box-shadow: none;
    border: 1px solid var(--e-global-color-primary);
}

/* Styles pour les emojis dans les labels */
.csw-product-label img.wp-smiley,
.csw-product-label img.emoji {
    display: inline !important;
    border: none !important;
    box-shadow: none !important;
    height: 1em !important;
    width: 1em !important;
    margin: 0 0.07em !important;
    vertical-align: -0.1em !important;
    background: none !important;
    padding: 0 !important;
}

.csw-product-label-nouveau {
    background: var(--e-global-color-primary) !important;
    color: #fff !important;
}

.csw-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.csw-product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
}

.csw-stars {
    display: flex;
}

.csw-star {
    color: var(--e-global-color-secondary);
    font-size: 14px;
    line-height: 1;
}

.csw-star.filled {
    color: var(--e-global-color-primary);
}

.csw-rating-count {
    font-size: 11px;
    color: var(--e-global-color-primary);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    line-height: 0;
}

.csw-product-title {
    font-family: "EB Garamond", Sans-serif;
    font-size: 23px;
    font-weight: 500;
    line-height: 23px;
    color: var(--e-global-color-primary);
    margin: 0;
}

.csw-product-price {
    margin: 5px 0;
    font-size: 16px;
    margin-bottom: 0;
    font-family: 'Inter', sans-serif;
    color: var(--e-global-color-secondary);
}

.csw-product-price .price {
    color: #007cba;
}

.csw-product-price del {
    color: #999;
    font-weight: normal;
    margin-right: 5px;
}

/* Bouton Ajouter au panier pour desktop (hover sur l'image) */
.csw-add-to-cart-desktop {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    z-index: 20;
    opacity: 0;
    visibility: hidden;
}

.csw-product-item:hover .csw-add-to-cart-desktop {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.csw-add-to-cart-desktop a {
    display: block;
    width: 100%;
    background: #fff;
    color: var(--e-global-color-primary);
    font-family: 'El Messiri', sans-serif;
    text-transform: uppercase;
    padding: 12px 20px;
    border-radius: 60px;
    border: 1px solid var(--e-global-color-primary);
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
}

.csw-add-to-cart-desktop a:hover {
    background: var(--e-global-color-primary);
    color: white!important;
    text-decoration: none;
}

/* Bouton Ajouter au panier pour mobile (après le prix) */
.csw-add-to-cart-mobile {
    margin-top: 15px;
    position: relative;
    z-index: 20;
}

.csw-add-to-cart-mobile a {
    display: block;
    width: 100%;
    background: #fff;
    color: var(--e-global-color-primary);
    border: 1px solid var(--e-global-color-primary);
    padding: 12px 20px;
    border-radius: 60px;
    font-family: 'El Messiri', sans-serif;
    text-transform: uppercase;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
}

.csw-add-to-cart-mobile a:hover {
    background: var(--e-global-color-primary);
    color: white;
    text-decoration: none;
}

/* Navigation Glide.js */
.glide__arrows {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    right: 0;
    pointer-events: none;
    z-index: 10;
}

.glide__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: var(--e-global-color-primary);
    border: none;
    border-radius: 0;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.glide__arrow svg {
    width: 32px !important;
    height: 32px !important;
    stroke: currentColor;
    fill: none;
}

.glide__arrow--left {
    left: 0;
}

.glide__arrow--right {
    right: 0;
}

.csw-products-slider-container:hover .glide__arrow {
    opacity: 1;
    visibility: visible;
}

.glide__arrow:hover {
    background: var(--e-global-color-primary);
}


/* Pagination Glide.js */
.glide__bullets {
    position: relative;
    margin: 60px auto 0;
    display: flex;
    max-width: 1200px;
    padding: 0 20px;
    list-style: none;
    text-align: center;
    line-height: 1;
}

.glide__bullet {
    background: #d1d5db !important;
    opacity: 1 !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    height: 2px !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    display: block !important;
    border: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: 1 !important;
}

.glide__bullet--active,
.glide__bullet.glide__bullet--active {
    background: var(--e-global-color-primary) !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .csw-products-slider-container {
        padding: 0 15px;
    }
    
    .csw-product-image {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .csw-products-slider-container {
        padding: 0 10px;
    }
    
    .glide__arrow {
        width: 36px;
        height: 36px;
    }
    
    /* Masquer le bouton desktop sur mobile */
    .csw-add-to-cart-desktop {
        display: none;
    }
    
    .csw-product-image {
        height: 350px;
    }
    
    .csw-product-rating {
        font-size: 11px;
    }
    
    .csw-stars {
        font-size: 12px;
    }
    
    .csw-product-labels {
        gap: 6px;
    }
    
    .csw-product-label {
        padding: 2px 6px;
        font-size: 9px;
    }
}

@media (min-width: 769px) {
    /* Masquer le bouton mobile sur desktop */
    .csw-add-to-cart-mobile {
        display: none;
    }
}

@media (max-width: 480px) {
    .csw-products-slider-container {
        padding: 0 5px;
    }
    
    .glide__arrow {
        display: none;
    }
    
    .csw-product-image {
        height: 250px;
    }
    
    .glide__bullets {
        margin-top: 25px;
    }
    
    .csw-product-labels {
        top: 8px;
        left: 8px;
        gap: 4px;
    }
    
    .csw-product-label {
        padding: 2px 5px;
        font-size: 8px;
        border-radius: 10px;
    }
    
    .csw-product-title {
        font-size: 20px;
    }
    
    .csw-product-rating {
        font-size: 10px;
    }
    
    .csw-stars {
        font-size: 11px;
    }
}

@media (max-width: 320px) {
    .csw-products-slider-container {
        padding: 0 2px;
    }
    
    .csw-product-image {
        height: 200px;
    }
    
    .csw-product-labels {
        gap: 3px;
    }
    
    .csw-product-label {
        padding: 1px 4px;
        font-size: 7px;
        border-radius: 8px;
    }
    
    .csw-product-rating {
        font-size: 9px;
    }
    
    .csw-stars {
        font-size: 10px;
    }
} 