/* =====================================================
   SAMASHOP - Page d'accueil Ultra-Moderne 2026
   Design Hypnotisant - Niveau Alibaba/Jumia
   ===================================================== */

/* ============ ANIMATIONS GLOBALES ============ */
:root {
    --samashop-primary-05: color-mix(in srgb, var(--color-primary) 5%, transparent);
    --samashop-primary-10: color-mix(in srgb, var(--color-primary) 10%, transparent);
    --samashop-primary-20: color-mix(in srgb, var(--color-primary) 20%, transparent);
    --samashop-primary-30: color-mix(in srgb, var(--color-primary) 30%, transparent);
    --samashop-primary-40: color-mix(in srgb, var(--color-primary) 40%, transparent);
    --samashop-primary-60: color-mix(in srgb, var(--color-primary) 60%, transparent);
    --samashop-primary-dark: color-mix(in srgb, var(--color-primary) 80%, #000);
}

/* ============ REVEAL (SOFT PRO) ============ */
.reveal{
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    transition: opacity .65s cubic-bezier(0.4, 0, 0.2, 1), transform .65s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.reveal.is-visible{
    opacity: 1;
    transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce){
    .reveal{
        opacity: 1;
        transform: none;
        transition: none;
    }
    *{
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px var(--samashop-primary-40); }
    50% { box-shadow: 0 0 40px var(--samashop-primary-60); }
}

@keyframes slideInScale {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============ RESET DES ANCIENS STYLES ============ */
.hero-modern {
    display: flex !important;
    flex-wrap: nowrap !important;
    height: auto !important;
    padding: 0 !important;
}

/*
    HOME (DESKTOP): la première section doit être full-width.
    Le site utilise une règle globale `.main{ max-width: 1920px; margin:0 auto; padding:0 10px; }`
    qui centre et limite la largeur. Ici on force le hero à être "full-bleed".
*/
.main.hero-modern{
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
}

.slider-modern {
    display: flex !important;
    flex: 1 !important;
    padding: 0 !important;
    height: auto !important;
}

/* Desktop: supprimer les gouttières pour un rendu bord-à-bord (comme la capture de référence) */
@media (min-width: 993px) {
    .slider-modern{
        padding: 0;
        gap: 0;
    }

    .sliderContainer-modern{
        border-radius: 0;
    }

    .sidel-modern,
    .promo-card{
        border-radius: 0;
    }
}

/* ============ HERO SECTION MODERNE ============ */
.hero-modern {
    /* Le <main> global gère déjà l'offset sous la navbar sticky */
    margin-top: 0;
    min-height: 650px;
    display: flex;
    gap: 0;
    background: linear-gradient(135deg, color-mix(in srgb, var(--bg-body) 92%, #fff) 0%, color-mix(in srgb, var(--samashop-primary-10) 50%, var(--bg-body)) 100%);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hero-modern::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--samashop-primary-05) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

.sidenav-modern {
    flex: 0 0 250px;
    background: white;
    box-shadow: 4px 0 20px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

/* Home: le menu est aussi un `.collapse` (pour le bouton burger). Sur desktop il doit rester visible. */
@media (min-width: 993px) {
    .sidenav-modern.collapse{
        display: block !important;
        height: auto !important;
        visibility: visible !important;
    }

    .sidenav-modern.collapse:not(.show){
        display: block !important;
    }

    .sidenav-modern.collapsing{
        height: auto !important;
    }
}

.slider-modern {
    flex: 1;
    display: flex;
    gap: 20px;
    padding: 20px;
    /* Laisser le flexbox gérer la largeur; évite les calculs de largeur instables */
    max-width: none;
    min-width: 0;
}

/*
  Chrome mobile “Version ordinateur” garde souvent une grande largeur CSS.
  Sur écran tactile, on applique le layout mobile du hero même si la largeur dépasse 992px.
*/
@media (hover: none) and (pointer: coarse) {
    .hero-modern{
        min-height: auto;
    }

    .sidenav-modern{
        position: absolute;
        left: -250px;
        z-index: 100;
        height: 100%;
    }

    .slider-modern{
        flex-direction: column;
        max-width: 100%;
        padding: 12px;
        gap: 12px;
    }

    .sliderContainer-modern{
        max-height: none;
        border-radius: 18px;
    }

    .carousel-item-modern{
        height: clamp(300px, 60vw, 520px);
    }

    .sidel-container-modern,
    .promo-cards{
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }
}

.sliderContainer-modern {
    flex: 1;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    position: relative;
    background: #000;
    max-height: 650px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sliderContainer-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 80px rgba(0,0,0,0.25);
}

/* Carousel Moderne */
.carousel-fade .carousel-item {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-fade .carousel-item.active {
    opacity: 1;
}

.carousel-item-modern {
    height: 610px;
    position: relative;
}

.carousel-img-modern {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%);
    z-index: 1;
}

.carousel-caption-modern {
    position: absolute;
    top: 50%;
    left: 60px;
    transform: translateY(-50%);
    z-index: 2;
    text-align: left;
    max-width: 550px;
    width: auto;
    right: auto;
    bottom: auto;
}

.caption-content-modern {
    animation: slideInLeft 1s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.caption-badge {
    display: inline-block;
    background: var(--color-primary);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.caption-title-modern {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.caption-text-modern {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.95);
    margin-bottom: 30px;
    line-height: 1.6;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.3);
}

.caption-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-modern {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 35px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary-modern {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--samashop-primary-dark) 100%);
    color: white !important;
    box-shadow: 0 5px 20px var(--samashop-primary-40);
    position: relative;
    overflow: hidden;
}

.btn-primary-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary-modern:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px var(--samashop-primary-60);
    color: white !important;
    text-decoration: none;
}

.btn-secondary-modern {
    background: rgba(255,255,255,0.2);
    color: white !important;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.5);
    position: relative;
    overflow: hidden;
}

.btn-secondary-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.btn-secondary-modern:hover::before {
    left: 100%;
}

.btn-secondary-modern:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-3px) scale(1.05);
    color: white !important;
    text-decoration: none;
    border-color: rgba(255,255,255,0.8);
}

/* Contrôles Carousel Modernes */
.carousel-control-modern {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    opacity: 1;
    transition: all 0.3s ease;
    top: 50%;
    transform: translateY(-50%);
}

.carousel-control-modern:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.carousel-control-modern:focus {
    opacity: 1;
}

.carousel-control-icon-modern {
    font-size: 20px;
    color: white;
}

.carousel-control-icon-modern i {
    display: block;
}

.carousel-indicators-modern {
    bottom: 30px;
    margin: 0;
    display: flex;
    gap: 10px;
    justify-content: center;
    z-index: 2;
}

.carousel-indicators-modern button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    background: transparent;
    opacity: 0.7;
    transition: all 0.3s ease;
    margin: 0;
    padding: 0;
}

.carousel-indicators-modern button.active {
    width: 40px;
    border-radius: 10px;
    background: white;
    opacity: 1;
}

/* Sidebar Container Moderne */
.sidel-container-modern {
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Card Connexion Moderne */
.sidel-modern {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s ease;
    min-height: 310px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sidel-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.sidel-icon {
    font-size: 3.5rem;
    color: var(--color-primary);
    margin-bottom: 15px;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.sidel-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.sidel-text {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.sidel-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-sidel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-sidel-primary {
    background: var(--color-primary);
    color: white !important;
}

.btn-sidel-primary:hover {
    background: var(--samashop-primary-dark);
    transform: scale(1.05);
    color: white !important;
    text-decoration: none;
}

.btn-sidel-secondary {
    background: #f8f9fa;
    color: #333 !important;
    border: 2px solid #e0e0e0;
}

.btn-sidel-secondary:hover {
    background: #e9ecef;
    border-color: var(--color-primary);
    color: var(--color-primary) !important;
    text-decoration: none;
}

/* Promo Cards Modernes */
.promo-cards {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.promo-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 150px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.promo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--samashop-primary-20) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.promo-card:hover::before {
    opacity: 1;
}

.promo-card a {
    display: block;
    height: 100%;
    text-decoration: none;
}

.promo-card:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 20px 50px var(--samashop-primary-30);
}

.promo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.promo-card:hover img {
    transform: scale(1.15) rotate(2deg);
}

.promo-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 100%);
    z-index: 1;
}

.promo-card-content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 2;
    color: white;
}

.promo-badge {
    display: inline-block;
    background: var(--color-secondary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.promo-card-content h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

/* ============ SECTION PRODUITS MODERNES - ULTRA COMPACT ============ */
:root{
    /* Par défaut: aucune "gouttière" verticale entre sections */
    --home-section-pad-y: 0px;
    /* Exception: la section promo est "parfaite" => on conserve son padding */
    --home-promo-pad-y: 16px;
}

.section-modern {
    padding: var(--home-section-pad-y) 0;
    background: white;
    margin: 0;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

/* Sur la page d'accueil moderne, les sections portent aussi la classe "main".
   Le CSS global applique parfois `height: 100%` à `.main`, ce qui crée un grand vide.
   Ici on force les sections à se dimensionner selon leur contenu. */
.section-modern.main {
    height: auto !important;
    min-height: 0 !important;
}

/* ============ CL_category (moderne) ============ */
.category-modern-page .section-header-modern{
    gap: 16px;
}

.category-modern-filters{
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.category-modern-select{
    min-width: 220px;
    border-radius: 12px;
    border: 2px solid color-mix(in srgb, var(--color-primary) 15%, var(--border-color));
    background: #fff;
    font-weight: 600;
}

.category-modern-select:focus{
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--samashop-primary-10);
}

.category-modern-pagination{
    padding: 18px 0 10px;
}

/* ============ CL_Produit: notes ============ */
.product-rating-summary{
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.product-rating-stars{
    color: #f5b301;
    white-space: nowrap;
}

.product-rating-meta{
    color: color-mix(in srgb, var(--t-color) 70%, transparent);
    font-weight: 600;
    font-size: 12px;
}

.product-rating-box{
    border: 1px solid var(--border-color);
    background: color-mix(in srgb, var(--bg-body) 65%, #fff);
    border-radius: 16px;
    padding: 16px;
    max-width: 520px;
}

.product-rating-box__head{
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.product-rating-box__score{
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}

.product-rating-box__avg{
    font-size: 28px;
    font-weight: 900;
    color: var(--t-color);
}

.product-rating-box__over,
.product-rating-box__text{
    font-weight: 700;
    color: color-mix(in srgb, var(--t-color) 70%, transparent);
}

.product-rating-picker{
    display: flex;
    gap: 8px;
    margin: 8px 0 12px;
}

.rate-star{
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 12px;
    padding: 10px 12px;
    line-height: 1;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.rate-star i{
    font-size: 18px;
    color: #f5b301;
}

.rate-star:hover{
    transform: translateY(-1px);
    border-color: var(--color-primary);
    box-shadow: 0 10px 25px var(--samashop-primary-10);
}

.section-modern:last-of-type {
    margin-bottom: 0;
}

.promo-section {
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--bg-body) 90%, #fff) 0%,
        color-mix(in srgb, var(--samashop-primary-10) 65%, var(--bg-body)) 55%,
        color-mix(in srgb, var(--samashop-primary-20) 45%, var(--bg-body)) 100%
    );
    padding-top: var(--home-promo-pad-y);
    padding-bottom: var(--home-promo-pad-y);
}

/* Séparateur soft entre sections */
.home-wide.section-modern{
    border-top: 1px solid color-mix(in srgb, var(--border-color) 70%, transparent);
}

.home-wide.section-modern:first-of-type{
    border-top: none;
}

/* Home: un peu d'espace entre sections */
.home-wide.section-modern:not(.promo-section){
    padding-top: 18px;
    padding-bottom: 18px;
}

.home-wide.promo-section{
    padding-top: 22px;
    padding-bottom: 22px;
}

.section-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-title-group {
    display: flex;
    align-items: center;
    gap: 20px;
}

.section-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--samashop-primary-dark) 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    animation: pulse 2s infinite;
}

.section-icon{
    box-shadow: 0 18px 50px var(--samashop-primary-20);
    transition: transform .25s ease, box-shadow .25s ease;
}

@media (hover: hover) and (pointer: fine){
    .section-header-modern:hover .section-icon{
        transform: translateY(-2px) rotate(-2deg);
        box-shadow: 0 24px 70px var(--samashop-primary-30);
    }
}

.section-title-modern {
    font-size: 2.5rem;
    font-weight: 800;
    color: #333;
    margin: 0;
}

/* Accent sous le titre pour un look plus 'dope' */
.section-title-modern{
    position: relative;
    display: inline-block;
}

.section-title-modern::after{
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 56px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--color-primary), var(--samashop-primary-dark));
    box-shadow: 0 10px 25px var(--samashop-primary-20);
}

.section-subtitle{
    margin-top: 14px;
    color: color-mix(in srgb, var(--t-color) 65%, transparent);
}

.section-subtitle {
    color: #666;
    font-size: 1rem;
    margin: 5px 0 0 0;
}

.section-filter-modern {
    display: flex;
    align-items: center;
}

.filter-select-modern {
    padding: 12px 25px;
    border: 2px solid color-mix(in srgb, var(--color-primary) 15%, var(--border-color));
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.filter-select-modern{
    min-width: 240px;
}

.filter-select-modern:hover,
.filter-select-modern:focus {
    border-color: var(--color-primary);
    box-shadow: 0 5px 15px var(--samashop-primary-20);
}

/* Grid Produits Moderne */
.products-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: clamp(16px, 1.6vw, 26px);
    margin-bottom: 0;
}

@media (min-width: 1400px) {
    .home-wide .products-grid-modern {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

@media (min-width: 1600px) {
    .home-wide .products-grid-modern {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) and (max-width: 1599px) {
    .home-wide .products-grid-modern {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Card Produit Moderne - Ultra Hypnotisant */
.product-card-modern {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid color-mix(in srgb, var(--border-color) 70%, transparent);
    box-shadow: 0 10px 30px color-mix(in srgb, #000 10%, transparent);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.product-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--samashop-primary-05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.product-card-modern:hover {
    transform: translateY(-10px) scale(1.015);
    border-color: color-mix(in srgb, var(--color-primary) 20%, var(--border-color));
    box-shadow: 0 26px 70px var(--samashop-primary-20),
                0 0 0 1px var(--samashop-primary-10);
}

.product-card-modern:hover::before {
    opacity: 1;
}

.product-card-modern:hover .product-image-modern img {
    transform: scale(1.15) rotate(2deg);
}

.product-card-modern:hover .product-overlay-modern {
    opacity: 1;
    visibility: visible;
}

.product-card-modern:hover .badge-wishlist {
    transform: scale(1.1) rotate(10deg);
}

.product-card-modern:hover .btn-add-cart-modern {
    background: linear-gradient(135deg, var(--samashop-primary-dark) 0%, var(--color-primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--samashop-primary-40);
}

.product-badge-group {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    z-index: 10;
}

.product-badge {
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.badge-discount {
    background: var(--color-secondary);
    color: white;
    animation: pulse 2s infinite;
}

.badge-wishlist {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #333;
}

.badge-wishlist:hover {
    background: var(--color-secondary);
    color: white;
    transform: scale(1.1);
}

.product-link-modern {
    display: block;
    text-decoration: none;
    color: inherit;
}

.product-link-modern:hover {
    text-decoration: none;
    color: inherit;
}

.product-image-modern {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--bg-body) 85%, #fff) 0%,
        color-mix(in srgb, var(--samashop-primary-10) 25%, var(--bg-body)) 100%
    );
    flex-shrink: 0;
}

.product-image-modern::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: rotate(45deg);
    transition: all 0.6s ease;
}

.product-card-modern:hover .product-image-modern::after {
    animation: shimmer 1.5s ease-in-out;
}

.product-image-modern img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card-modern:hover .product-image-modern img {
    transform: scale(1.1);
}

.product-overlay-modern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, color-mix(in srgb, var(--color-primary) 90%, transparent) 0%, color-mix(in srgb, var(--samashop-primary-dark) 90%, transparent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card-modern:hover .product-overlay-modern {
    opacity: 1;
}

.btn-quick-view {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    background: white;
    color: #333;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.btn-quick-view::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--color-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.btn-quick-view:hover::before {
    width: 300px;
    height: 300px;
}

.btn-quick-view:hover {
    color: white;
    transform: scale(1.1) rotate(-2deg);
    box-shadow: 0 8px 30px var(--samashop-primary-40);
}

.btn-quick-view i,
.btn-quick-view span {
    position: relative;
    z-index: 1;
}

.product-info-modern {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 20px;
}

.product-rating-modern {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 10px;
    color: #ffc107;
}

.product-rating-modern i {
    font-size: 14px;
}

.rating-count {
    color: #999;
    font-size: 13px;
    margin-left: 5px;
}

.product-title-modern {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.4;
    min-height: 52px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price-modern {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.price-new {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
}

.price-old {
    font-size: 1.1rem;
    color: #999;
    text-decoration: line-through;
}

.btn-add-cart-modern {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--samashop-primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: auto;
    box-shadow: 0 4px 15px var(--samashop-primary-30);
    position: relative;
    overflow: hidden;
}

.btn-add-cart-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.btn-add-cart-modern:hover::before {
    left: 100%;
}

.btn-add-cart-modern:hover {
    background: linear-gradient(135deg, var(--samashop-primary-dark) 0%, color-mix(in srgb, var(--color-primary) 65%, #000) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--samashop-primary-60);
}

.btn-add-cart-modern:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-add-cart-modern:focus-visible {
    outline: 3px solid var(--samashop-primary-30);
    outline-offset: 2px;
}

/* Footer Section */
.section-footer-modern {
    text-align: left;
    margin: 0;
    padding: 18px 0 6px;
}

.btn-view-all-modern {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 14px 26px;
    background: linear-gradient(135deg,
        color-mix(in srgb, #fff 85%, var(--samashop-primary-10)) 0%,
        #fff 100%
    );
    color: var(--color-primary);
    border: 2px solid color-mix(in srgb, var(--color-primary) 35%, var(--border-color));
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-view-all-modern:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 18px 50px var(--samashop-primary-20);
    text-decoration: none;
}

.btn-view-all-modern i{
    transition: transform .25s ease;
}

.btn-view-all-modern:hover i{
    transform: translateX(4px);
}

/* ============ SECTION CATÉGORIES MODERNE ============ */
.categories-section {
    background: white;
}

.category-modern-container {
    padding: 0;
}

.category-modern-header {
    display: flex;
    gap: 40px;
    margin-bottom: 10px;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
}

.category-modern-info {
    flex: 1;
}

.category-modern-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #333;
    margin-bottom: 15px;
}

.category-modern-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.category-modern-image {
    flex: 0 0 350px;
    height: 300px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.category-modern-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-modern-container:hover .category-modern-image img {
    transform: scale(1.1);
}

.category-products {
    grid-template-columns: repeat(4, 1fr) !important;
}

/* Container pour les sections */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-modern .container {
    padding-bottom: 0;
}

/* Sur la home, on garde une largeur max, mais on ancre le contenu à gauche
   (au lieu de le centrer avec margin:auto). */
.section-modern .container{
    margin-left: auto;
    margin-right: auto;
}

/* Home: sections pleine largeur (supprime le grand vide à droite) */
.home-wide{
    width: 100%;
}

/* Le layout global limite `.main` (max-width + margin auto).
   Sur la home, on veut des sections full-bleed, sans casser le reste du site. */
.home-wide.main{
    width: 100%;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.home-wide > .container{
    max-width: none;
    width: 100%;
    padding-left: clamp(14px, 2.2vw, 36px);
    padding-right: clamp(14px, 2.2vw, 36px);
}

/* Petit glow de fond pour donner un look plus premium/hype */
.home-wide.section-modern{
    position: relative;
    overflow: hidden;
}

.home-wide.section-modern::before{
    content: '';
    position: absolute;
    inset: -40% -30% auto -30%;
    height: 320px;
    background: radial-gradient(circle at 20% 30%, var(--samashop-primary-10) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.home-wide.section-modern > .container{
    position: relative;
    z-index: 1;
}

/* Header des sections: titre à gauche, actions (filtre/bouton) à droite */
.section-header-modern{
    justify-content: flex-start;
}

.section-filter-modern{
    margin-left: auto;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1200px) {
    .caption-title-modern {
        font-size: 2.5rem;
    }
    
    .products-grid-modern {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .category-products {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .category-modern-header {
        gap: 30px;
        padding: 30px;
    }
    
    .category-modern-title {
        font-size: 2rem;
    }
    
    .category-modern-image {
        flex: 0 0 300px;
        height: 250px;
    }
}

@media (max-width: 992px) {
    .sidenav-modern {
        position: absolute;
        left: -250px;
        z-index: 100;
        height: 100%;
    }

    /* Quand Bootstrap ouvre le collapse, on amène le drawer dans le viewport */
    .sidenav-modern.collapse.show{
        position: fixed;
        top: 80px;
        left: 0;
        width: 250px;
        height: calc(100vh - 80px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 1000;
        background: #fff;
    }
    
    .slider-modern {
        flex-direction: column;
        max-width: 100%;
    }

    .sliderContainer-modern{
        max-height: none;
    }

    .carousel-item-modern{
        height: clamp(320px, 56vw, 520px);
    }
    
    .sidel-container-modern {
        flex: 1;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .promo-cards {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .caption-title-modern {
        font-size: 2.2rem;
    }
    
    .category-modern-header {
        flex-direction: column;
        text-align: center;
    }
    
    .category-modern-info {
        text-align: center;
    }
    
    .category-modern-image {
        flex: 0 0 100%;
        width: 100%;
    }
    
    .category-products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .hero-modern {
        min-height: auto;
        flex-direction: column;
    }

    .slider-modern{
        padding: 12px;
        gap: 12px;
    }

    .sliderContainer-modern{
        border-radius: 18px;
        max-height: none;
    }

    .carousel-item-modern{
        height: clamp(280px, 62vw, 460px);
    }
    
    .caption-title-modern {
        font-size: 2rem;
    }
    
    .caption-text-modern {
        font-size: 0.95rem;
    }
    
    .carousel-caption-modern {
        left: 30px;
        right: 30px;
        max-width: calc(100% - 60px);
    }
    
    .products-grid-modern {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .section-title-modern {
        font-size: 1.8rem;
    }
    
    .sidel-container-modern {
        flex-direction: column;
    }
    
    .promo-cards {
        flex-direction: column;
    }
    
    .category-modern-title {
        font-size: 1.8rem;
    }
    
    .category-products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/*
  Téléphone en "version ordinateur": viewport CSS souvent ~980px => tombe dans (max-width: 992px)
  mais on veut garder un rendu desktop (sidebar à droite) et mettre les 2 promo cards sur 1 ligne.
*/
@media (hover: none) and (pointer: coarse) and (min-width: 900px) {
    /* Drawer qui "pousse" le contenu (pas d'overlay) */
    .hero-modern{
        position: relative;
    }

    .sidenav-modern{
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        transform: translateX(-100%);
        transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1);
        will-change: transform;
        z-index: 20;
    }

    /* Bootstrap: quand le collapse est ouvert */
    .sidenav-modern.collapse.show{
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 250px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(0);
    }

    .slider-modern{
        flex-direction: row;
        max-width: 100%;
        margin-left: 0;
        transition: margin-left 280ms cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Quand le menu est ouvert, on laisse la place sans chevaucher le carousel */
    .sidenav-modern.collapse.show + .slider-modern{
        margin-left: 250px;
    }

    .sliderContainer-modern{
        flex: 1;
        min-width: 0;
    }

    .sidel-container-modern{
        flex: 0 0 320px;
        width: 320px;
        flex-direction: column;
    }

    .promo-cards{
        flex-direction: row;
        gap: 12px;
    }

    .promo-card{
        flex: 1 1 0;
        height: 150px;
    }
}

@media (max-width: 576px) {
    .section-title-modern {
        font-size: 1.8rem;
    }

    .section-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }

    .carousel-item-modern{
        height: clamp(260px, 76vw, 380px);
    }

    .products-grid-modern {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }

    .product-image-modern {
        height: clamp(160px, 44vw, 220px);
    }

    .btn-view-all-modern {
        padding: 14px 26px;
        font-size: 16px;
    }
    
    .caption-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-modern {
        width: 100%;
        justify-content: center;
    }
    
    .caption-title-modern {
        font-size: 1.5rem;
    }
    
    .carousel-caption-modern {
        left: 20px;
        right: 20px;
        max-width: calc(100% - 40px);
    }
    
    .section-header-modern {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .category-products {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 420px) {
    .products-grid-modern {
        grid-template-columns: 1fr;
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
