/* ========================================
   NEW ARRIVALS PRO - STYLE MODERNE ELECSTORE
   ======================================== */

:root {
    --primary-red: #C3002F;
    --primary-red-hover: #a00026;
    --dark-grey: #1a1a1a;
    --light-grey: #f4f4f4;
    --border-color: rgba(0,0,0,0.06);
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========================================
   SECTION NOUVEAUTÉS
   ======================================== */
.new-arrivals-section {
    padding: 100px 5%;
    background: #ffffff;
}

/* ========================================
   EN-TÊTE DE SECTION
   ======================================== */
.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.section-badge {
    display: inline-block;
    background: rgba(195,0,47,0.1);
    color: var(--primary-red);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.section-header h2 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--dark-grey);
    margin-bottom: 20px;
    letter-spacing: -1.5px;
}

.section-header p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
}

/* ========================================
   ONGLETS DE CATÉGORIES
   ======================================== */
.category-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 50px 0;
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: 2px solid #e0e0e0;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--dark-grey);
    font-family: inherit;
}

.tab-btn:hover,
.tab-btn.active {
    background: var(--primary-red);
    border-color: var(--primary-red);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(195,0,47,0.3);
}

.tab-btn:active {
    transform: translateY(0);
}

/* ========================================
   GRILLE DE PRODUITS
   ======================================== */
.products-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* Animation de filtrage */
.product-card {
    opacity: 1;
    transform: scale(1);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

/* ========================================
   CARTE PRODUIT
   ======================================== */
.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 2px solid var(--light-grey);
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border-color: var(--primary-red);
}

/* Badge NOUVEAU */
.new-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #4CAF50;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   IMAGE PRODUIT
   ======================================== */
.product-image {
    height: 250px;
    background: var(--light-grey);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image img {
    max-width: 70%;
    max-height: 70%;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-placeholder {
    font-size: 4rem;
    color: #ccc;
}

/* ========================================
   ACTIONS RAPIDES
   ======================================== */
.quick-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 5;
}

.product-card:hover .quick-actions {
    opacity: 1;
    transform: translateX(0);
}

.quick-btn {
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 1.2rem;
}

.quick-btn:hover {
    background: var(--primary-red);
    color: white;
    transform: scale(1.1);
}

.quick-btn:active {
    transform: scale(1);
}

/* ========================================
   INFO PRODUIT
   ======================================== */
.product-info {
    padding: 25px;
}

.product-brand {
    font-size: 0.8rem;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-grey);
    margin-bottom: 15px;
    min-height: 50px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   NOTE PRODUIT
   ======================================== */
.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.stars {
    color: #FFB800;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.rating-count {
    font-size: 0.8rem;
    color: #999;
}

/* ========================================
   PRIX
   ======================================== */
.product-price {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-red);
    margin-bottom: 20px;
}

/* Support WooCommerce price HTML */
.product-price ins {
    text-decoration: none;
    color: var(--primary-red);
}

.product-price del {
    font-size: 1.1rem;
    color: #999;
    font-weight: 600;
    margin-right: 10px;
}

.product-price .woocommerce-Price-amount {
    font-size: 1.6rem;
    font-weight: 800;
}

/* ========================================
   BOUTON ACHETER
   ======================================== */
.product-buy-btn {
    width: 100%;
    background: var(--dark-grey);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.95rem;
}

.product-buy-btn:hover {
    background: var(--primary-red);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(195,0,47,0.3);
}

.product-buy-btn:active {
    transform: translateY(0);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablettes */
@media (max-width: 1024px) {
    .new-arrivals-section {
        padding: 80px 5%;
    }
    
    .section-header h2 {
        font-size: 2.5rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 25px;
    }
}

/* Tablettes Portrait */
@media (max-width: 768px) {
    .new-arrivals-section {
        padding: 60px 5%;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .section-badge {
        font-size: 0.75rem;
        padding: 6px 16px;
    }
    
    .section-header h2 {
        font-size: 2rem;
        letter-spacing: -1px;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    .category-tabs {
        margin: 40px 0;
        gap: 10px;
    }
    
    .tab-btn {
        padding: 10px 24px;
        font-size: 0.9rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
    
    .product-image {
        height: 220px;
    }
    
    .product-info {
        padding: 20px;
    }
    
    .product-name {
        font-size: 1rem;
        min-height: 45px;
    }
    
    .product-price {
        font-size: 1.4rem;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .new-arrivals-section {
        padding: 50px 4%;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .category-tabs {
        gap: 8px;
    }
    
    .tab-btn {
        padding: 8px 20px;
        font-size: 0.85rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    
    .new-badge {
        top: 10px;
        left: 10px;
        padding: 5px 12px;
        font-size: 0.7rem;
    }
    
    .product-image {
        height: 180px;
    }
    
    .quick-actions {
        top: 10px;
        right: 10px;
        gap: 8px;
    }
    
    .quick-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .product-brand {
        font-size: 0.7rem;
    }
    
    .product-name {
        font-size: 0.95rem;
        min-height: 40px;
        margin-bottom: 12px;
    }
    
    .product-rating {
        margin-bottom: 12px;
    }
    
    .stars {
        font-size: 0.8rem;
    }
    
    .rating-count {
        font-size: 0.75rem;
    }
    
    .product-price {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    .product-buy-btn {
        padding: 12px;
        font-size: 0.85rem;
        gap: 8px;
    }
}

/* Très petits écrans */
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .product-image {
        height: 150px;
    }
    
    .product-name {
        font-size: 0.9rem;
        min-height: 35px;
    }
}

/* ========================================
   ANIMATIONS D'APPARITION
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.5s ease-out backwards;
}

.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }
.product-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6) { animation-delay: 0.3s; }
.product-card:nth-child(7) { animation-delay: 0.35s; }
.product-card:nth-child(8) { animation-delay: 0.4s; }

/* ========================================
   ACCESSIBILITÉ
   ======================================== */
.tab-btn:focus,
.quick-btn:focus,
.product-buy-btn:focus {
    outline: 3px solid rgba(195, 0, 47, 0.4);
    outline-offset: 3px;
}

/* Réduction de mouvement */
@media (prefers-reduced-motion: reduce) {
    .product-card,
    .product-image img,
    .quick-actions,
    .tab-btn,
    .product-buy-btn {
        animation: none !important;
        transition: none !important;
    }
}

/* ========================================
   ÉTATS DE CHARGEMENT
   ======================================== */
.products-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.products-grid.loading .product-card {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}