/**
 * CORRECTION FINALE IMAGES PRODUITS - SOLUTION ROBUSTE
 * Fonctionne AVEC ou SANS l'API
 */

/* CONTENEURS : Empêcher débordement */
/* UNIQUEMENT SECTIONS : all-products-section, products-for-you-section, recommended-products-section */
/* NE PAS TOUCHER AUX CARTES DE DEAL */
.all-products-section .product-card > div:first-child,
.products-for-you-section .product-card > div:first-child,
.recommended-products-section .product-card > div:first-child {
    overflow: hidden !important;
    display: block !important;
    background: #ffffff !important;
    position: relative !important;
    width: var(--card-image-width, 100%) !important;
    max-width: var(--card-image-max-width, 100%) !important;
    min-width: var(--card-image-min-width, 100%) !important;
    height: var(--card-section-image-height, 180px) !important;
    min-height: var(--card-section-image-min-height, 180px) !important;
    max-height: var(--card-section-image-max-height, 180px) !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    line-height: 0 !important;
}

/* IMAGES : Forcer remplissage maximum */
/* UNIQUEMENT SECTIONS : all-products-section, products-for-you-section, recommended-products-section */
/* NE PAS TOUCHER AUX CARTES DE DEAL */
.all-products-section .product-card > div:first-child img,
.products-for-you-section .product-card > div:first-child img,
.recommended-products-section .product-card > div:first-child img {
    /* Remplir complètement */
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    min-width: 100% !important;
    min-height: 100% !important;
    
    /* CONTAIN pour afficher image complète sans perte */
    object-fit: contain !important;
    object-position: center center !important;
    
    /* Pas de padding */
    padding: 0 !important;
    margin: 0 !important;
    
    /* Animation */
    transition: transform 0.4s ease !important;
    
    /* Box sizing */
    box-sizing: border-box !important;
    display: block !important;
}

/* EFFET HOVER : Léger zoom */
/* UNIQUEMENT SECTIONS */
.all-products-section .product-card:hover > div:first-child img,
.products-for-you-section .product-card:hover > div:first-child img,
.recommended-products-section .product-card:hover > div:first-child img {
    transform: scale(1.02) !important;
}

/* WATERMARK : Géré par l'API (pas de double watermark) */
/* Le watermark est appliqué directement sur l'image par l'API */

/* RESPONSIVE : Mobile */
/* UNIQUEMENT SECTIONS */
@media (max-width: 768px) {
    .all-products-section .product-card > div:first-child img,
    .products-for-you-section .product-card > div:first-child img,
    .recommended-products-section .product-card > div:first-child img {
        padding: 0 !important;
    }
}
