/* ================================================
   STYLES DES CARTES PRODUITS (VERSION RELIEF)
   ================================================ */

/* 1. La carte elle-même */
.product-card {
    border: none;
    border-radius: 15px;
    background: var(--bg-primary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* On change overflow en visible pour que l'image puisse sortir par le haut */
    overflow: visible; 
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Effet au survol de la carte */
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12) !important;
    z-index: 10; /* La carte passe au-dessus des autres au survol */
}

/* 2. Le conteneur de l'image */
.img-container {
    position: relative;
    width: 100%;
    height: 250px;
    background-color: var(--neutral-light);
    border-radius: 15px 15px 0 0;
    /* On permet aussi le débordement ici */
    overflow: visible; 
}

/* L'image avec effet de relief */
.img-container img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 'contain' permet à l'objet de garder sa forme quand il sort */
    padding: 10px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
    position: relative;
    z-index: 2;
}

/* EFFET HOVER : L'image sort du card + Shadow de relief */
.product-card:hover .img-container img {
    /* L'image s'agrandit et monte */
    transform: scale(1.15) translateY(-25px);
    /* Ajout de l'ombre portée (drop-shadow) pour le relief */
    filter: drop-shadow(0 15px 15px rgba(0, 0, 0, 0.2));
}

/* Masque dégradé pour la transition douce avec le texte */
.img-container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%; 
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
    pointer-events: none;
    z-index: 3;
}

/* 3. Bloc Texte et Alignement */
.product-card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    z-index: 4; /* Reste au-dessus du dégradé */
}

.product-title-limit {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.8rem;
    line-height: 1.4rem;
    font-size: 1rem;
}

.product-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--action-color);
    margin-top: auto; /* Pousse le prix vers le bas */
}