/* --- SHOP.CSS --- */

.shop-container {
    width: 100%; /* Augmenté pour éviter que le header cache le haut */}

.product-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    width: 100%;
    border-top: 1px solid #ddd;
    gap: 0;
}

.product-card {
    position: relative;
    text-decoration: none;
    color: black !important;
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    background: #fff;
    width: 100%;
    height: 450px; /* Légèrement augmenté pour le confort visuel */
    box-sizing: border-box;
    overflow: hidden;
}

/* On force le conteneur à prendre TOUT le rectangle de la carte */
.image-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Image par défaut : on garde 'contain' pour ne pas zoomer ton vêtement détouré */
.img-default {
    max-width: 90%;
    max-height: 70%;
    object-fit: contain;
    transition: opacity 0.3s ease-in-out;
    z-index: 2;
}

/* Image hover : on force 'cover' et 100% pour remplir tout le rectangle */
.img-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Remplit tout le cadre */
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    z-index: 3;
}

/* Actions au survol */
.product-card:hover .img-hover {
    opacity: 1;
}

.product-card:hover .img-default {
    opacity: 0;
}

/* Zone d'infos : doit être au-dessus de l'image de survol (z-index 4+) */
.product-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    box-sizing: border-box;
    z-index: 10;
}

.product-name, .product-price {
    font-size: 0.9rem;
    font-weight: 500;
    color: #000;
}

/* Responsive */
@media (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (max-width: 768px) {
    .product-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .product-card { height: 350px; }
}