/* assets/style.css */

/* Container principal */
.woo-products-grid-widget {
    background-color: #f5f0e8;
    padding: 40px 30px;
    border-radius: 8px;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Tabs de catégories */
.category-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 40px;
    background: transparent;
}

.category-tab {
    background: transparent;
    border: 2px solid #333;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
    border-right: none;
}

.category-tab:first-child {
    border-radius: 4px 0 0 4px;
}

.category-tab:last-child {
    border-radius: 0 4px 4px 0;
    border-right: 2px solid #333;
}

.category-tab:hover {
    background: rgba(0, 0, 0, 0.05);
}

.category-tab.active {
    background: #333;
    color: #fff;
}

/* Grille de produits */
.products-grid-container {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* Carte produit */
.product-card {
    text-align: center;
}

.product-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-image-box {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    overflow: hidden;
}

.product-image-box img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

.product-name {
    font-size: 16px;
    font-weight: 400;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.4;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.product-price {
    font-size: 15px;
    color: #333;
    margin: 0;
    font-weight: 500;
}

.product-price .woocommerce-Price-amount {
    display: inline-block;
}

.product-price .woocommerce-Price-currencySymbol {
    font-size: 13px;
}

/* Pagination */
.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.page-nav {
    width: 32px;
    height: 32px;
    border: 1px solid #333;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
}

.page-nav:hover:not(:disabled) {
    background: #333;
    color: #fff;
}

.page-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-info {
    font-size: 14px;
    color: #333;
    font-weight: 400;
}

.current-page {
    font-weight: 500;
}

/* Loading overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 8px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

@media (max-width: 768px) {
    .woo-products-grid-widget {
        padding: 25px 20px;
    }
    
    .category-tabs {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .category-tab {
        border: 2px solid #333;
        border-radius: 4px;
        font-size: 13px;
        padding: 8px 20px;
    }
    
    .category-tab:last-child {
        border-right: 2px solid #333;
    }
    
    .products-grid-container {
        padding: 20px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .product-image-box {
        height: 160px;
    }
    
    .product-name {
        font-size: 14px;
    }
    
    .product-price {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .product-image-box {
        height: 200px;
    }
}

/* Animations */
.product-card {
    animation: fadeIn 0.4s ease-out;
}

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