/* ===================================================================
   SHIYAO - PRODUCTS PREMIUM ALIEXPRESS STYLE
   DESKTOP ONLY (>768px)
   =================================================================== */

/* TOUTES LES RÈGLES SONT UNIQUEMENT POUR DESKTOP */
@media (min-width: 769px) {
    /* Layout principal */
    .products-premium-layout {
        padding: 0;
        background: #FFFFFF;
        position: relative;
        margin-top: 0;
    }

    .products-premium-container {
        max-width: 1200px !important;
        margin: 0 auto !important;
        padding: 15px 20px !important;
        display: grid !important;
        grid-template-columns: 68% 32% !important;
        gap: 16px !important;
        align-items: stretch !important;
    }

    /* Colonnes */
    .trending-column,
    .top-sales-column {
        display: flex;
        flex-direction: column;
        height: 100% !important;
    }

    /* Wrappers avec fond blanc propre */
    .trending-wrapper,
    .top-sales-wrapper {
        background: #FFFFFF;
        border-radius: 16px;
        border: 1px solid rgba(0, 0, 0, 0.08);
        padding: 18px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        transition: all 0.3s ease;
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        flex: 1 !important;
    }
    
    /* Forcer la même hauteur pour les deux sections */
    .trending-wrapper {
        min-height: 445px;
    }
    
    .top-sales-wrapper {
        min-height: 445px;
        max-height: 445px;
        overflow: hidden;
    }
    
    /* Liste top ventes - afficher les 3 cartes sans scroll */
    .top-sales-list {
        flex: 1;
        overflow-y: visible;
        overflow-x: hidden;
        padding-right: 8px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    /* Scrollbar personnalisée pour top ventes */
    .top-sales-list::-webkit-scrollbar {
        width: 6px;
    }
    
    .top-sales-list::-webkit-scrollbar-track {
        background: rgba(184, 70, 31, 0.05);
        border-radius: 3px;
    }
    
    .top-sales-list::-webkit-scrollbar-thumb {
        background: rgba(184, 70, 31, 0.3);
        border-radius: 3px;
    }
    
    .top-sales-list::-webkit-scrollbar-thumb:hover {
        background: rgba(184, 70, 31, 0.5);
    }

    .trending-wrapper:hover,
    .top-sales-wrapper:hover {
        border-color: rgba(0, 0, 0, 0.12);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
        transform: translateY(-2px);
    }

    /* Headers premium */
    .section-header-premium,
    .top-sales-header-premium {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 14px;
        padding-bottom: 12px;
        border-bottom: 2px solid rgba(184, 70, 31, 0.15);
    }

    .section-title-premium,
    .top-sales-title-premium {
        font-size: 28px;
        font-weight: 700;
        background: linear-gradient(90deg, #C62828 0%, #D84315 50%, #E65100 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 12px;
        letter-spacing: -0.01em;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    }



    .section-subtitle,
    .top-sales-subtitle {
        font-size: 14px;
        color: #666;
        font-style: italic;
    }

    .view-all-link-premium {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 10px 20px;
        background: linear-gradient(135deg, #B8461F 0%, #8B2F0F 100%);
        color: #FFFFFF;
        font-size: 13px;
        font-weight: 700;
        text-decoration: none;
        border-radius: 50px;
        box-shadow: 0 4px 16px rgba(184, 70, 31, 0.35);
        transition: all 0.3s ease;
    }

    .view-all-link-premium:hover {
        transform: translateX(4px) scale(1.05);
        box-shadow: 0 6px 20px rgba(184, 70, 31, 0.45);
    }

    .top-sales-view-all {
        display: none !important;
    }

    /* Carousel */
    .carousel-container-premium {
        position: relative;
        padding: 0;
        display: flex;
        flex-direction: column;
    }

    /* Boutons de navigation ronds rouges */
    .carousel-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: linear-gradient(135deg, #B8461F 0%, #8B2F0F 100%);
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
        box-shadow: 0 4px 12px rgba(184, 70, 31, 0.4);
        transition: all 0.3s ease;
    }

    .carousel-nav:hover {
        transform: translateY(-50%) scale(1.1);
        box-shadow: 0 6px 16px rgba(184, 70, 31, 0.6);
    }

    .carousel-nav:active {
        transform: translateY(-50%) scale(0.95);
    }

    .carousel-nav svg {
        stroke: #FFFFFF;
    }

    .carousel-nav-left {
        left: 5px;
    }

    .carousel-nav-right {
        right: 5px;
    }
    
    /* Cacher la flèche gauche sur desktop */
    @media (min-width: 769px) {
        .carousel-nav-left {
            display: none !important;
        }
    }

    .trending-carousel {
        display: flex;
        gap: 14px;
        overflow-x: auto;
        padding: 8px 4px 8px;
        scroll-behavior: smooth;
        max-width: 100%;
    }

    .trending-carousel::-webkit-scrollbar {
        height: 6px;
    }

    .trending-carousel::-webkit-scrollbar-thumb {
        background: linear-gradient(90deg, #B8461F, #8B2F0F);
        border-radius: 10px;
    }

    /* Product cards */
    .trending-carousel .product-card,
    .product-card {
        flex: 0 0 210px !important;
        background: #FFFFFF;
        border-radius: 12px;
        border: 1px solid rgba(0, 0, 0, 0.08);
        overflow: hidden;
        transition: all 0.3s ease;
        display: flex;
        flex-direction: column;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        cursor: pointer;
        min-width: 210px !important;
        max-width: 210px !important;
    }

    .product-card:hover {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
        transform: translateY(-4px);
    }

    .trending-carousel .product-image-container,
    .product-image-container {
        position: relative;
        width: 100%;
        height: 210px !important;
        background: transparent;
        padding: 0 !important;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .product-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.4s ease;
        border-radius: 4px;
    }

    .product-card:hover .product-image {
        transform: scale(1.05);
    }

    .trending-carousel .product-info,
    .product-info {
        padding: 12px !important;
        display: flex;
        flex-direction: column;
        gap: 4px !important;
        flex: 1;
    }

    .product-rating {
        display: flex;
        align-items: center;
        gap: 4px;
        margin-bottom: 3px;
    }

    .stars {
        color: #fbbf24;
        font-size: 11px;
        letter-spacing: 0.5px;
    }

    .rating-count {
        color: #999;
        font-size: 10px;
    }

    .product-name {
        font-size: 12px;
        font-weight: 600;
        color: #1a1a1a;
        line-height: 1.4;
        margin-bottom: 4px;
        min-height: auto;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .product-price {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .price-current {
        font-size: 14px;
        font-weight: 700;
        background: linear-gradient(135deg, #B8461F 0%, #8B2F0F 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .price-original {
        font-size: 11px;
        color: #999;
        text-decoration: line-through;
    }

    .add-to-cart-btn {
        display: none !important;
    }

    /* TOP VENTES */
    .top-sales-list {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        overflow-y: visible !important;
        justify-content: flex-start !important;
        padding-bottom: 20px !important;
    }

    .top-sale-card {
        display: flex !important;
        gap: 10px !important;
        background: #FFFFFF !important;
        border-radius: 10px !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
        padding: 10px !important;
        transition: all 0.3s ease !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
        position: relative !important;
        cursor: pointer !important;
        min-height: 105px !important;
        max-height: 105px !important;
        align-items: center !important;
    }

    .top-sale-card:hover {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
        transform: translateX(4px);
    }

    .top-sale-badge {
        position: absolute;
        top: 5px;
        left: 5px;
        width: 22px;
        height: 22px;
        background: linear-gradient(135deg, #B8461F 0%, #8B2F0F 100%);
        border-radius: 5px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 11px;
        font-weight: 900;
        color: #FFFFFF;
        box-shadow: 0 4px 12px rgba(184, 70, 31, 0.45);
        z-index: 10;
    }

    .top-sale-badge.rank-1 {
        animation: goldPulse 2s ease-in-out infinite;
        background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #B8461F 100%);
        box-shadow: 0 8px 24px rgba(255, 215, 0, 0.6);
    }

    @keyframes goldPulse {
        0%, 100% { transform: scale(1); }
        50% { transform: scale(1.15) rotate(5deg); }
    }

    .top-sale-image-container {
        width: 70px !important;
        height: 70px !important;
        border-radius: 8px !important;
        flex-shrink: 0 !important;
        overflow: hidden !important;
        background: transparent !important;
    }

    .top-sale-info {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 5px !important;
        justify-content: center !important;
        min-width: 0 !important;
    }

    .top-sale-name {
        font-size: 12px !important;
        font-weight: 600 !important;
        color: #1D1D1F !important;
        line-height: 1.3 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        margin-bottom: 3px !important;
    }
    
    /* Afficher version desktop (3 mots) */
    .top-sale-name-desktop {
        display: inline !important;
    }
    
    /* Masquer version mobile (2 mots) */
    .top-sale-name-mobile {
        display: none !important;
    }

    .top-sale-rating {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        margin-bottom: 3px !important;
    }

    .top-sale-stars {
        color: #FFAC33 !important;
        font-size: 10px !important;
    }

    .top-sale-count {
        color: #86868B !important;
        font-size: 10px !important;
    }

    .top-sale-price {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        flex-wrap: wrap !important;
    }

    .top-sale-price-current {
        font-size: 14px !important;
        font-weight: 700 !important;
        background: linear-gradient(135deg, #B8461F 0%, #8B2F0F 100%) !important;
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
        background-clip: text !important;
    }

    .top-sale-price-old {
        font-size: 11px !important;
        color: #86868B !important;
        text-decoration: line-through !important;
    }

    .best-seller-badge {
        position: static !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 3px !important;
        padding: 4px 8px !important;
        background: linear-gradient(135deg, #B8461F 0%, #8B2F0F 100%) !important;
        color: #FFFFFF !important;
        font-size: 7px !important;
        font-weight: 800 !important;
        border-radius: 4px !important;
        text-transform: uppercase !important;
        box-shadow: 0 2px 8px rgba(184, 70, 31, 0.35) !important;
        letter-spacing: 0.5px !important;
        margin-top: 5px !important;
        width: fit-content !important;
    }
    
    .best-seller-badge svg {
        width: 8px !important;
        height: 8px !important;
    }

    @keyframes badgeShine {
        0%, 100% { box-shadow: 0 4px 12px rgba(184, 70, 31, 0.45); }
        50% { box-shadow: 0 6px 20px rgba(184, 70, 31, 0.65); }
    }
}

/* ===================================================================
   MOBILE STYLES - Fond rouge clair pour les sections
   =================================================================== */

@media (max-width: 768px) {
    /* Wrappers avec fond blanc propre sur mobile */
    .trending-wrapper,
    .top-sales-wrapper {
        background: #FFFFFF;
        border-radius: 16px;
        border: 1px solid rgba(0, 0, 0, 0.08);
        padding: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        margin-bottom: 20px;
    }

    /* Headers premium sur mobile */
    .section-header-premium,
    .top-sales-header-premium {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 14px;
        padding-bottom: 12px;
        border-bottom: 2px solid rgba(184, 70, 31, 0.15);
    }

    .section-title-premium,
    .top-sales-title-premium {
        font-size: 20px;
        font-weight: 800;
        background: linear-gradient(135deg, #B8461F 0%, #8B2F0F 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    /* Garder les cartes de produits BLANCHES sur mobile */
    .trending-carousel .product-card,
    .product-card,
    .top-sale-card {
        background: #FFFFFF !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    }
}


