/* Eollys Widget - Grille de Produits */

.eollys-product-grid {
    display: grid;
    gap: 30px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Configuration des colonnes */
.eollys-product-grid.columns-1 {
    grid-template-columns: 1fr;
}

.eollys-product-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.eollys-product-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.eollys-product-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Responsive */
@media (max-width: 1024px) {
    .eollys-product-grid.columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .eollys-product-grid.columns-3,
    .eollys-product-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .eollys-product-grid {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .eollys-product-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
}

/* Carte produit */
.eollys-product-card {
    background: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.eollys-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Image du produit */
.eollys-product-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.eollys-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.eollys-product-card:hover .eollys-product-image img {
    transform: scale(1.05);
}

.eollys-product-image a {
    display: block;
    height: 100%;
}

/* Badge de niveau */
.eollys-product-level {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, rgba(193, 155, 123, 0.9) 0%, rgba(193, 155, 123, 0.7) 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
}

/* Contenu de la carte */
.eollys-product-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Notation */
.eollys-product-rating {
    margin-bottom: 15px;
}

.eollys-rating {
    display: flex;
    gap: 2px;
}

.eollys-rating .star {
    color: #ffc107;
    font-size: 14px;
}

.eollys-rating .star.filled {
    color: #ffc107;
}

/* Titre */
.eollys-product-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.eollys-product-title a {
    color: #333333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.eollys-product-title a:hover {
    color: #C19B7B;
}

/* Extrait */
.eollys-product-excerpt {
    color: #666666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Informations de l'auteur */
.eollys-product-meta {
    margin-bottom: 20px;
}

.eollys-author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.eollys-author-info img {
    border-radius: 50%;
    width: 32px;
    height: 32px;
}

.eollys-author-info .author-name {
    color: #666666;
    font-size: 14px;
    font-weight: 500;
}

/* Pied de carte */
.eollys-product-footer {
    margin-top: auto;
}

.eollys-product-button {
    display: block;
    width: 100%;
    background: #C19B7B;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.eollys-product-button:hover {
    background: #a68660;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Animations d'entrée */
.eollys-product-card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Délais d'animation pour un effet en cascade */
.eollys-product-card:nth-child(1) { animation-delay: 0.1s; }
.eollys-product-card:nth-child(2) { animation-delay: 0.2s; }
.eollys-product-card:nth-child(3) { animation-delay: 0.3s; }
.eollys-product-card:nth-child(4) { animation-delay: 0.4s; }
.eollys-product-card:nth-child(5) { animation-delay: 0.5s; }
.eollys-product-card:nth-child(6) { animation-delay: 0.6s; }

/* States alternatifs pour WooCommerce */
.eollys-product-card .price {
    color: #C19B7B;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 15px;
}

.eollys-product-card .price del {
    color: #999;
    margin-right: 10px;
}

/* Loading state */
.eollys-product-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.eollys-product-grid.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #C19B7B;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
