/* Estilos para la tienda con REST API */

/* Contenedor principal */
.cs-shop-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Sidebar de filtros */
.cs-shop-sidebar {
    flex: 0 0 280px;
    max-width: 280px;
}

/* Contenedor de productos */
.cs-shop-products {
    flex: 1;
    min-width: 0;
}

/* Grid de productos */
.cs-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Tarjeta de producto */
.cs-product-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cs-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.cs-product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.cs-product-info {
    padding: 1rem;
}

.cs-product-title {
    font-size: 1rem;
    margin: 0 0 0.5rem;
    font-weight: 600;
}

.cs-product-price {
    font-size: 1.1rem;
    color: #2c3338;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cs-product-button {
    display: block;
    width: 100%;
    padding: 0.5rem;
    background-color: #0073aa;
    color: white;
    text-align: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.cs-product-button:hover {
    background-color: #005177;
}

/* Filtros */
.cs-filter-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.cs-filter-title {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.cs-filter-option {
    margin-bottom: 0.5rem;
}

/* Paginación */
.cs-pagination {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    gap: 0.5rem;
}

.cs-pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.cs-pagination button:hover {
    background: #f0f0f0;
}

.cs-pagination button.active {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

/* Loader */
.cs-loading {
    text-align: center;
    padding: 2rem;
    font-size: 1.1rem;
    color: #666;
}

/* Mensajes */
.cs-message {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.cs-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cs-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 992px) {
    .cs-shop-container {
        flex-direction: column;
    }
    
    .cs-shop-sidebar {
        max-width: 100%;
        margin-bottom: 2rem;
    }
    
    .cs-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 576px) {
    .cs-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .cs-product-image {
        height: 150px;
    }
}
