/* ===================================================================
   PREMIUM BRANDED CARDS - FLAT & CLEAN
   =================================================================== */

/* Grid Layout - Géré par catalogue-grid.css */

/* Card Container */
.product-card {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid rgba(184, 70, 31, 0.08);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.03),
        0 4px 6px rgba(184, 70, 31, 0.02);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s ease;
    overflow: hidden;
    /* Ensure image stays inside rounded corners */
    cursor: pointer;
    box-sizing: border-box;
    width: 100%;
}

/* Hover State - Simple Lift */
.product-card:hover {
    transform: translateY(-8px);
    /* Simple lift, no rotation */
    border-color: rgba(184, 70, 31, 0.4);
    box-shadow:
        0 15px 40px rgba(184, 70, 31, 0.12),
        0 0 0 1px rgba(184, 70, 31, 0.1);
}

/* Image Container - Full Width */
.product-image-container {
    position: relative;
    width: 100%;
    /* Full width */
    margin: 0;
    /* No margin */
    padding-top: 0;
    /* Height controlled by catalogue-grid.css */
    height: 130px;
    overflow: hidden;
    background: transparent;
    /* No border-radius needed here as parent has overflow:hidden */
    transition: transform 0.5s ease;
    box-sizing: border-box;
}

/* Force le GPU à préparer le rendu - appliqué sur toutes les cartes */
.product-card,
.product-card-grid,
.product-card-catalogue,
.top-sale-card,
.trending-card {
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Images */
.product-image-container img {
    position: relative;
    z-index: 2;
}

/* Zoom on Hover */
.product-card:hover .product-image-container {
    /* No 3D translate, just zoom */
}

/* Images */
.product-image-primary,
.product-image-secondary {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease, transform 0.6s ease;
}

.product-image-secondary {
    opacity: 0;
    z-index: 2;
}

.product-card:hover .product-image-secondary {
    opacity: 1;
    transform: scale(1.08);
    /* Subtle zoom */
}

.product-card:hover .product-image-primary {
    transform: scale(1.08);
}

/* Actions Overlay - Bouton œil sans bande blanche */
.product-actions {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform: translate(-50%, 50%);
    display: flex;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 30;
    pointer-events: none;
    /* PAS de background blanc */
    background: transparent !important;
}

.product-card:hover .product-actions {
    opacity: 1;
    pointer-events: auto;
}

.add-to-cart-btn,
.quick-view-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(184, 70, 31, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #B8461F;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
}

.add-to-cart-btn:hover,
.quick-view-btn:hover {
    background: linear-gradient(135deg, #B8461F 0%, #8B2F0F 100%);
    color: #ffffff;
    border-color: transparent;
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(184, 70, 31, 0.4);
}

/* Product Info */
.product-info {
    padding: 8px 10px 10px;
    /* Compact padding - controlled by catalogue-grid.css */
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
    background: #ffffff;
    box-sizing: border-box;
}

/* Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.stars {
    color: #FFD700;
    font-size: 12px;
    letter-spacing: 1px;
}

.rating-count {
    color: #9CA3AF;
    font-size: 10px;
    font-weight: 600;
    background: #f8f5f2;
    padding: 2px 6px;
    border-radius: 6px;
}

/* Title - Uniquement pour la grille All Products, pas pour trending-carousel */
.products-grid .product-name {
    font-family: 'Inter', sans-serif;
    /* font-size géré par products-premium.css et catalogue-grid.css */
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

/* Title pour trending-carousel - même taille que Top Sales */
.trending-carousel .product-name,
.trending-carousel .product-card .product-name,
.trending-carousel .product-info .product-name {
    font-family: 'Inter', sans-serif;
    font-size: 11px !important;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.product-card:hover .product-name {
    color: #B8461F;
}

/* Price */
.product-price {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 8px;
}

.price-current {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 700;
    background: linear-gradient(135deg, #B8461F 0%, #8B2F0F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.price-original {
    font-size: 13px;
    color: #9CA3AF;
    text-decoration: line-through;
    font-weight: 500;
}

/* Responsive Adjustments */

/* Tablet Landscape & Small Laptops (900px - 1200px) */
/* Styles gérés par catalogue-grid.css */

/* Tablet Portrait (600px - 900px) */
/* Styles gérés par catalogue-grid.css */

/* Mobile (Under 600px) */
@media (max-width: 600px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 15px 10px;
    }

    .product-card {
        border-radius: 16px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    }

    .product-card:hover {
        transform: none !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    }

    /* On mobile, image is still full width */
    .product-image-container {
        width: 100%;
        margin: 0;
    }

    .product-info {
        padding: 10px 10px 14px;
        gap: 4px;
    }

    .product-rating {
        margin-bottom: 2px;
    }

    .stars {
        font-size: 10px;
    }

    .rating-count {
        font-size: 9px;
        padding: 1px 4px;
    }

    .product-name {
        font-size: 13px;
        line-height: 1.3;
        height: 34px;
    }

    .product-price {
        padding-top: 4px;
        gap: 6px;
        flex-wrap: wrap;
    }

    .price-current {
        font-size: 16px;
    }

    .price-original {
        font-size: 11px;
    }

    .product-actions {
        display: none !important;
    }

    .product-image-secondary {
        display: none;
    }
}

/* Very Small Screens */
@media (max-width: 360px) {
    .products-grid {
        gap: 8px;
        padding: 10px 5px;
    }

    .product-name {
        font-size: 12px;
    }
}