/* components/product-section/product-section.css (actualización) */
.product-section {
    padding: var(--spacing-xl) 0 var(--spacing-3xl) 0;
    background-color: #fafafa;
}

.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--spacing-2xl);
    transition: grid-template-columns 0.3s ease;
}

.products-layout.sidebar-hidden {
    grid-template-columns: 0 1fr;
}

.sidebar-wrapper {
    overflow: hidden;
    transition: all 0.3s ease;
}

.products-layout.sidebar-hidden .sidebar-wrapper {
    width: 0;
    opacity: 0;
    pointer-events: none;
}

/* Grid de Productos */
.products-container {
    min-height: 600px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--spacing-lg);
    transition: grid-template-columns 0.3s ease;
}

/* Cuando el sidebar está oculto, caben más productos por fila */
.products-layout.sidebar-hidden .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* Loading, cards, etc... (mantener el código anterior) */
.loading-products {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-3xl);
    color: #666;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1a1a1a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--spacing-md);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.product-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.product-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background-color: #f9f9f9;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: var(--spacing-md);
}

.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 2;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: white;
}

.badge-hot {
    background-color: #ef4444;
}

.badge-offer {
    background-color: #dc2626;
}

.badge-new {
    background-color: #10b981;
}

.badge-sold-out {
    background-color: #6b7280;
}

.product-favorite {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
}

.product-favorite:hover {
    background-color: #fef2f2;
    transform: scale(1.1);
}

.product-favorite svg {
    width: 20px;
    height: 20px;
    stroke: #ef4444;
}

.product-favorite.active svg {
    fill: #ef4444;
}

.product-info {
    padding: var(--spacing-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: var(--spacing-sm);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.product-pricing {
    margin-top: auto;
}

.product-price-container {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
}

.product-original-price {
    font-size: 0.95rem;
    color: #999;
    text-decoration: line-through;
}

.no-products,
.error-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--spacing-3xl);
    color: #666;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .products-layout {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .product-section {
        padding: var(--spacing-md) 0 var(--spacing-xl) 0;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .product-name {
        font-size: 0.85rem;
    }
    
    .product-price {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .products-grid {
        gap: var(--spacing-sm);
    }
}