/* Widget Produits Éditoriaux */
.editorial-products-widget {
    margin: 2rem 0;
    padding: 1.5rem;
    border-radius: 8px;
}

.editorial-products-widget h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--color-primary, #333);
    font-size: 1.5rem;
    font-weight: 600;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

/* Maximum 2 produits par ligne */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

.product-card {
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.product-card img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.product-card h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary, #333);
    line-height: 1.4;
    flex-grow: 1;
}

/* Container des offres (comparateur en tableau) */
.product-card .offers-container {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color, #e0e0e0);
}

/* Tableau des offres */
.product-card .offers-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.product-card .offers-table tr {
    border-bottom: 1px solid var(--border-color, #f0f0f0);
}

.product-card .offers-table tr:last-child {
    border-bottom: none;
}

.product-card .offers-table td {
    padding: 0.75rem 0.5rem;
    vertical-align: middle;
}

/* Cellule prix */
.product-card .offer-price-cell {
    white-space: nowrap;
}

.product-card .offer-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary, #333);
}

.product-card .offer-currency {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary, #333);
    margin-left: 0.25rem;
}

/* Cellule CTA */
.product-card .offer-cta-cell {
    text-align: right;
}

/* CTA avec nom du vendeur */
.product-card .offer-cta {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--color-primary, #007bff);
    color: var(--color-on-primary, #ffffff);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease, opacity 0.3s ease;
    white-space: nowrap;
}

.product-card .offer-cta:hover {
    background-color: var(--color-primary-hover, #0056b3);
    opacity: 0.9;
}

/* Mise en évidence de la meilleure offre (première ligne) */
.product-card .best-offer-row {
    border-radius: 4px;
}

.product-card .best-offer-row td {
    padding: 0.875rem 0.5rem;
}

.product-card .best-offer-row .offer-price {
    font-size: 1.5rem;
    color: var(--color-primary, #007bff);
}

/* Responsive */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .editorial-products-widget {
        padding: 1rem;
        margin: 1.5rem 0;
    }
    
    .editorial-products-widget h3 {
        font-size: 1.25rem;
    }
    
    .product-card {
        padding: 0.75rem;
    }
    
    .product-card img {
        max-height: 150px;
    }
    
    .product-card .offers-table {
        font-size: 0.875rem;
    }
    
    .product-card .offers-table td {
        padding: 0.5rem 0.25rem;
    }
    
    .product-card .offer-price {
        font-size: 1.125rem;
    }
    
    .product-card .best-offer-row .offer-price {
        font-size: 1.25rem;
    }
    
    .product-card .offer-cta {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
}

