.content-wrapper {
    overflow-y: hidden; 
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px 60px;
}

.articles-grid {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    margin: 0 auto;
    gap: 1.2rem; /* Réduire l'espace entre les cartes */
    margin-top: 33px;
}

.product-card {
    display: flex;
    flex-direction: column;
    width: calc(20% - 20px); /* Afficher 5 cartes par ligne par défaut */
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background-color: var(--background-color);
    margin-bottom: 0 !important; /* Forcer un margin-bottom de zéro */
    transition: box-shadow 0.3s;
    overflow: hidden;
    height: 430px; /* Hauteur fixe */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    height: 275px; /* Hauteur de l'image */
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Assurer que l'image couvre tout l'espace */
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease-in-out;
}

.product-image-placeholder {
    align-items: center;
    background: linear-gradient(145deg, #f7f9fc, #eef5f5);
    color: #718096;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
    padding: 0.75rem;
    text-align: center;
    text-decoration: none;
}

.product-image-placeholder i {
    color: #ff9900;
    font-size: 2.2rem;
}

.product-image-wrapper:has(.product-image-placeholder) { height: 82px; }
.product-card:has(.product-image-placeholder) { height: 300px; }

.product-image:hover {
    animation-delay: 0.1s;
    transform: scale(1.01);
overflow: hidden;
border-radius: 20px;
}

.desire-meter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    align-items: center;
}

.desire-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border-radius: 50%;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: var(--secondary-color);
    border: 1px solid rgba(91, 127, 173, 0.22);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
}

.score {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    padding: 2px 5px;
    font-size: 12px;
    font-weight: bold;
}

.product-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.product-title {
    font-size: 1em;
    color: #333333; /* Couleur du texte mise à jour */
    margin: 0 0 5px;
    font-weight: bold;
    text-align: left;
    margin-top: -15px;
}

.product-excerpt,
.product-info p {
    font-size: 1rem;
    color: #666;
    margin: 0;
    text-align: left;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3; /* Limiter à 3 lignes */
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%; /* Assure que le texte ne dépasse pas la largeur du conteneur */
}


.product-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: var(--background-color);
    border-top: 1px solid var(--border-color);
}

.price {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.2em;
    margin-right: 10px; /* Ajouter un espace à droite du prix */
    white-space: nowrap;
}

.price-live {
    color: #4f772d;
    font-size: 0.74rem;
    line-height: 1.2;
    max-width: 105px;
    text-decoration: none;
}

.btn-view {
    background: linear-gradient(35deg, var(--primary-color) 0%, var(--primary-color) 70%, var(--secondary-color) 100%);
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s, transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 8px rgba(40, 97, 124, 0.2);
}

.btn-view:hover {
    background-color: linear-gradient(90deg, rgba(239, 68, 176, 0.05) 0%, var(--secondary-color) 50%, rgba(239, 68, 176, 0.05) 100%);
    color: white; /* S'assurer que le texte reste visible au survol */
    transform: scale(1.05); /* Ajouter une animation de zoom */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Ajouter une ombre au survol */
}

/* CSS intégré pour le marqueur visuel des articles aléatoires */
.product-card[data-is-random="true"] {
    border: 3px solid rgba(239, 68, 176, 0.5) !important;
}

/* CSS pour le spinner (le rendre invisible mais présent dans le layout) */
#load-more-spinner {
    visibility: hidden;
    text-align: center;
}

/* Media Queries pour le responsive */

/* Tablettes en mode paysage et petits ordinateurs */
@media (max-width: 1200px) {
    .product-card {
        width: calc(33.33% - 20px); /* 3 produits par ligne */
    }
}

/* Tablettes en mode portrait */
@media (max-width: 992px) {
    .product-card {
        width: calc(50% - 20px); /* 2 produits par ligne */
    }
}

/* Grands smartphones */
@media (max-width: 768px) {
    .product-card {
        width: calc(50% - 20px); /* 2 produits par ligne */
    }
}

/* Petits smartphones */
@media (max-width: 576px) {
    .product-card {
        width: 100%; /* 1 produit par ligne */
    }
}
