/* ========================================
   SLIDER DES PRODUITS WOOCOMMERCE
   ======================================== */

/* Variables CSS pour les produits */
:root {
    --products-primary-color: #1a1a1a;
    --products-secondary-color: #1a1a1a;
    --products-text-color: #1a1a1a;
    --products-price-color: #666;
    --products-bg-light: #f5f5f5;
    --products-transition: 500ms;
    --products-border-radius: 0;
}

@keyframes productsProgressiveScaleOpacity {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Section principale du slider produits */
.products-slider-section {
    width: 100%;
    overflow: hidden;
}

/* Container principal */
.products-container {
    max-width: 100%;
    margin: 0 auto;
    position: relative;
}

/* Titre de la section */
.products-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding: 0 0.5rem;
}

.products-section-title {
    font-family: 'Avenir', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.products-section-title::after {
    content: '🇲🇦';
    font-size: 1.25rem;
}

.products-view-all {
    font-family: 'Avenir', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.products-view-all:hover {
    color: #1a1a1a;
}

/* Container avec flèches */
.products-slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

/* Flèches de navigation */
.products-nav-btn {
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid #d1d1d1;
    background-color: #fff !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    flex-shrink: 0;
    padding: 0;
}

.products-nav-btn:hover {
    background-color: #fff !important;
    border-color: #1a1a1a;
    color: #1a1a1a;
}

.products-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #d1d1d1;
}

.products-nav-btn:disabled:hover {
    background-color: #fff !important;
    color: #666;
    transform: scale(1);
    border-color: #d1d1d1;
}

/* Flèche gauche */
.products-prev {
    order: 1;
}

/* Flèche droite */
.products-next {
    order: 3;
}

/* Wrapper du slider */
.products-slider-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    order: 2;
    flex: 1;
}

/* Track du slider */
.products-slider-track {
    display: flex;
    transition: transform var(--products-transition) ease-in-out;
    gap: 0;
}

/* Carte de produit */
.product-card {
    flex: 0 0 auto;
    width: 100%;
    position: relative;
    border-radius: var(--products-border-radius);
    overflow: visible;
    transition: transform 0.3s ease;
}

/* Image du produit */
.product-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-bottom: 1rem;
    background-color: #fff;
    line-height: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    aspect-ratio: 0.85 / 1;
    padding: 0;
}

.product-image-wrapper a {
    display: block;
    line-height: 0;
}

/* Badges de catégorie sur les cartes */
.product-badges-categories {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 10;
}

.product-badge-category {
    background-color: rgba(255, 255, 255, 0.95);
    color: #1a1a1a;
    padding: 0.375rem 0.875rem;
    border-radius: 0.25rem;
    font-family: 'Avenir', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Contenu du produit */
.product-content {
    padding: 0 0.5rem;
    text-align: center;
    cursor: pointer;
}

.product-content a {
    text-decoration: none;
    color: inherit;
}

/* Message "Aucun produit" */
.no-products-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-products-message h3 {
    font-family: 'Avenir', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.no-products-message p {
    font-family: 'Avenir', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.8;
}

/* Padding des cartes */
.product-card {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* Titre du produit */
.product-title {
    font-family: 'Avenir', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin: 0;
    line-height: 26px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Prix du produit */
.product-price {
    font-family: 'Avenir', sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: #858585;
    margin: 0;
}

/* Prix barré (soldes) */
.product-price del {
    opacity: 0.5;
    font-size: 0.875em;
    margin-right: 0.5rem;
    font-weight: 400;
    color: #999;
}

.product-price ins {
    text-decoration: none;
    color: #d84315;
    font-weight: 600;
}

/* Description du produit */
.product-excerpt {
    font-family: 'Avenir', sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    color: #999;
    line-height: 1.5;
    margin: 0.75rem 0 0 0;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Tailles des flèches - SVG ou icon */
.products-nav-btn svg {
    width: 48px;
    height: 48px;
}


/* Si images utilisées pour flèches */
.products-nav-btn img {
    object-fit: contain;
    width: 48px;
    height: 48px;
}

/* Curseur au repos */
.products-slider-track {
    cursor: normal;
}

/* Curseur pendant le clic */
.products-slider-track:active {
    cursor: normal;
}

/* Protection pendant le drag */
.products-slider-track.is-dragging {
    cursor: grabbing;
    user-select: none;
}

/* Bloque TOUS les clics sur les enfants */
.products-slider-track.is-dragging * {
    pointer-events: none;
}

/* Protection spéciale pour les liens */
.products-slider-track.is-dragging a {
    pointer-events: none;
}

/* Styles pour le drag */
.products-slider-wrapper.dragging {
    cursor: grabbing;
}

.products-slider-wrapper.dragging .products-slider-track {
    transition: none;
}

.products-slider-wrapper.dragging .product-card {
    pointer-events: none;
}

/* Animation d'entrée */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }

/* Scroll smooth pour les ancres */
html {
    scroll-behavior: smooth;
}

/* Badge "En stock" / "Rupture" */
.product-stock-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.375rem 0.875rem;
    font-family: 'Avenir', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 0.25rem;
    z-index: 5;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-stock-badge.in-stock {
    background-color: #4caf50;
    color: #fff;
}

.product-stock-badge.out-of-stock {
    background-color: #f44336;
    color: #fff;
}

/* Badge "Promo" */
.product-sale-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background-color: #d84315;
    color: #fff;
    padding: 0.375rem 0.875rem;
    font-family: 'Avenir', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 0.25rem;
    z-index: 5;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(216, 67, 21, 0.3);
}

/* Style pour les étoiles de notation */
.product-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin: 0.5rem 0;
}

.product-rating .star-rating {
    font-size: 0.875rem;
    color: #fbbf24;
}

.product-rating .star-rating::before {
    color: #fbbf24;
}

@keyframes productsProgressiveScaleOpacity {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Section principale du slider produits */
.products-slider-section {
    width: 100%;
    background-color: transparent;
    overflow: hidden;
    margin-bottom: 0;
    scroll-margin-top: 100px;
}

/* Container principal */
.products-container {
    max-width: 1500px;
    margin: 0 auto;
    position: relative;
}

/* Container avec flèches */
.products-slider-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
}

/* Flèches de navigation */
.products-nav-btn {
    width: auto;
    height: auto;
    border: 0;
    background-color: transparent !important;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--products-primary-color);
    flex-shrink: 0;
    padding: 0;
}

.products-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.products-nav-btn:hover {
    background-color: transparent !important;
}

.products-nav-btn:disabled:hover {
    background-color: transparent !important;
    color: var(--products-primary-color);
    transform: scale(1);
}

/* Flèche gauche */
.products-prev {
    order: 1;
}

/* Flèche droite */
.products-next {
    order: 3;
}

/* Wrapper du slider */
.products-slider-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    order: 2;
    flex: 1;
}

/* Track du slider */
.products-slider-track {
    display: flex;
    transition: transform var(--products-transition) ease-in-out;
    gap: 50px;
}

/* Carte de produit */
.product-card {
    flex: 0 0 auto;
    width: 100%;
    position: relative;
    border-radius: var(--products-border-radius);
    overflow: visible;
    transition: transform 0.3s ease;
}

/* Image du produit - NOUVEAU DESIGN */
.product-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-bottom: 1rem;
    border-radius: 0;
    line-height: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    aspect-ratio: 1 / 1;
}

.product-image-wrapper:hover .product-image {
    transform: scale(1.05);
}

.product-image-wrapper a {
    display: block;
    line-height: 0;
}

/* Badges de catégorie sur les cartes */
.product-badges-categories {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 10;
}

.product-badge-category {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.95), rgba(234, 88, 12, 0.95));
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-family: 'Avenir', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Contenu du produit */
.product-content {
    padding: 0;
    text-align: left;
    cursor: pointer;
}

.product-content a {
    text-decoration: none;
    color: inherit;
}

/* Message "Aucun produit" */
.no-products-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--products-text-light);
}

.no-products-message h3 {
    font-family: 'Avenir', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--products-primary-color);
}

.no-products-message p {
    font-family: 'Avenir', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.8;
}

/* Padding des cartes */
.product-card {
    padding-left: 0;
    padding-right: 0;
}

/* Prix barré (soldes) */
.product-price del {
    opacity: 0.5;
    font-size: 0.875em;
    margin-right: 0.5rem;
    font-weight: 400;
    color: #6b7280;
}

.product-price ins {
    text-decoration: none;
    color: #f97316;
    font-weight: 700;
}

/* Tailles des flèches */
.products-nav-btn img {
    object-fit: contain;
}

/* Curseur au repos */
.products-slider-track {
    cursor: normal;
}

/* Curseur pendant le clic */
.products-slider-track:active {
    cursor: normal;
}

/* Protection pendant le drag */
.products-slider-track.is-dragging {
    cursor: grabbing;
    user-select: none;
}

/* Bloque TOUS les clics sur les enfants */
.products-slider-track.is-dragging * {
    pointer-events: none;
}

/* Protection spéciale pour les liens */
.products-slider-track.is-dragging a {
    pointer-events: none;
}

/* Styles pour le drag */
.products-slider-wrapper.dragging {
    cursor: grabbing;
}

.products-slider-wrapper.dragging .products-slider-track {
    transition: none;
}

.products-slider-wrapper.dragging .product-card {
    pointer-events: none;
}

/* Animation d'entrée */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }

/* Scroll smooth pour les ancres */
html {
    scroll-behavior: smooth;
}

/* Badge "En stock" / "Rupture" */
.product-stock-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.375rem 0.875rem;
    font-family: 'Avenir', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 1.5rem;
    z-index: 5;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-stock-badge.in-stock {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}

.product-stock-badge.out-of-stock {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}

/* Badge "Promo" - NOUVEAU DESIGN */
.product-sale-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
    padding: 0.5rem 1rem;
    font-family: 'Avenir', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 2rem;
    z-index: 5;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 6px rgba(220, 38, 38, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Style pour les étoiles de notation */
.product-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin: 0.5rem 0;
}

.product-rating .star-rating {
    font-size: 1rem;
    color: #fbbf24;
}

.product-rating .star-rating::before {
    color: #fbbf24;
}

/* Bouton "Ajouter au panier" - OPTIONNEL */
.product-add-to-cart {
    margin-top: 1rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.product-card:hover .product-add-to-cart {
    opacity: 1;
    transform: translateY(0);
}

.product-add-to-cart .button {
    font-family: 'Avenir', sans-serif;
    font-weight: 600;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    border: none;
    padding: 0.625rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(249, 115, 22, 0.3);
}

.product-add-to-cart .button:hover {
    background: linear-gradient(135deg, #ea580c, #c2410c);
    box-shadow: 0 4px 8px rgba(249, 115, 22, 0.4);
    transform: translateY(-2px);
}