/* ! --- Style de la carte mainpage --- */
.bd-placeholder-img {
    font-size: 1.125rem;
    text-anchor: middle;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    width: 100%; /* Ajuste la largeur */
    max-height: 500px; /* Définit une hauteur maximale */
    object-fit: cover; /* Coupe l'image pour éviter l'écrasement */
}

/* --- Conteneur des cartes --- */
.featured-products {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

/* --- Style de la carte --- */
.card-mainpage {
    background-color: #f8f6f5;
    border-radius: 15px;
    box-shadow: 0px 1px 15px rgba(0, 0, 0, 0.2); /* Ombre plus marquée */
    width: 350px;
    overflow: hidden;
    text-align: center;
    justify-content: center;
    border: 3px solid #bdaaa5;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

/* --- Effet au survol --- */
.card-mainpage:hover {
    transform: translateY(-5px);
    box-shadow: 0px 10px 25px rgba(0, 0, 0, 0.3); /* Ombre plus intense */
}

/* --- Image de l'article --- */
.card-mainpage .card-mainpage-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom: 3px solid #bdaaa5;
    border-radius: 5px;
}

/* --- Corps de la carte --- */
.card-mainpage-body {
    padding: 20px;
}

.card-mainpage-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #6e4d46;
}

.card-mainpage-text {
    font-size: 1rem;
    color: #7a5e56;
    margin-bottom: 15px;
}

/* --- Prix --- */
.card-mainpage-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #bdaaa5;
    margin-bottom: 15px;
}


/* --- RESPONSIVE DESIGN --- */
@media (max-width: 1024px) {
    .card-mainpage {
        width: 300px;
    }

    .card-mainpage-img {
        height: 220px;
    }
}

@media (max-width: 768px) {
    .featured-products {
        flex-direction: column;
        align-items: center; /* Centre les cartes */
    }

    .card-mainpage {
        width: 90%;
        max-width: 350px; /* Garde une taille équilibrée */
        margin: auto; /* Centre la carte horizontalement */
    }

    .card-mainpage-img {
        height: 200px;
    }

    .card-mainpage-body {
        padding: 15px;
    }

    .card-mainpage-title {
        font-size: 1.3rem;
    }

    .card-mainpage-text {
        font-size: 0.9rem;
    }

    .card-mainpage-btn {
        padding: 8px 15px;
    }
}

@media (max-width: 480px) {
    .card-mainpage {
        width: 95%;
        max-width: 350px; /* Évite que la carte soit trop large */
        margin: auto; /* Centre la carte */
        margin-left: 7%; /* Décale légèrement vers la droite */
    }

    .card-mainpage-img {
        height: 180px;
    }

    .card-mainpage-body {
        padding: 10px;
    }

    .card-mainpage-title {
        font-size: 1.2rem;
    }

    .card-mainpage-text {
        font-size: 0.85rem;
    }

    .card-mainpage-btn {
        font-size: 0.9rem;
        padding: 7px 12px;
    }
}
