/* Reset de base */
#productContainer {
    display: grid;
    gap: 1.5rem;
    padding: 1rem;
    margin-top: 2rem;
    grid-template-columns: repeat(2, 1fr); /* Par défaut: 2 colonnes */
}

/* Tablette : 3 colonnes */
@media screen and (min-width: 768px) {
    #productContainer {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Ordinateur : 5 colonnes */
@media screen and (min-width: 1200px) {
    #productContainer {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Style pour chaque carte produit */
.product-card {
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.product-card img {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

/* Texte et détails */
.product-card h3 {
    font-size: 1rem;
    margin: 0.5rem 0;
    color: #333;
}

.product-card .description {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.product-card .bv,
.product-card .stock,
.product-card .promotions,
.product-card .rating,
.product-card .price {
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.product-card .price {
    font-weight: bold;
    color: #d32f2f;
}

.product-card .original-price {
    text-decoration: line-through;
    font-size: 0.8rem;
    color: #888;
    margin-left: 5px;
}

.promotion-text {
    background-color: #ffd700;
    padding: 3px 6px;
    font-size: 0.75rem;
    font-weight: bold;
    color: #000;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.rating .stars i {
    color: #fbc02d;
    font-size: 0.85rem;
}

/* Lien vers les détails */
.details-link {
    text-align: center;
    margin-top: auto;
    display: inline-block;
    background: #1976d2;
    color: #fff;
    padding: 6px 10px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.details-link:hover {
    background: #125a9c;
}
