* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f9f9f9;
    color: #333;
}

/* Variables específicas para sidecar */
:root {
    --sc-primary: #015e31;
    --sc-secondary: #0038a8;
    --sc-accent: #ffcc00;
    --sc-danger: #cb0000;
    --sc-success: #28a745;
    --sc-warning: #f45a10;
    --sc-text-light: #fdf6f3;
    --sc-text-dark: #333;
    --sc-gray-light: #f8f9fa;
    --sc-gray-medium: #6c757d;
    --sc-shadow: 0 4px 15px rgba(0,0,0,0.1);
    --sc-border-radius: 8px;
}

/* Barra de departamento */
.department-bar {
    color: rgb(0, 0, 0);
    padding: 10px;
    font-size: 15px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Imagen del departamento */
.department-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.department-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Contenedor de productos Vacio*/
.deptvacio{
    height: auto;
    width: auto;
    text-align: center;
    font-size: 2.2rem;
    font-weight: bold;
    margin: auto;
}

/* ENCABEZADO OFERTAS */
.all-products-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 30px;
}

.all-products-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.all-products-header .lead {
    font-size: 1.2rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.header-badges {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.badge-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.new-indicator-global {
    background: rgba(40, 167, 69, 0.9);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-top: 20px;
    display: inline-block;
}

/* SECCIÓN FILTROS */
.filters-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 20px auto;
    max-width: 1400px;
}

.filters-section .row {
    align-items: center;
}

.product-count {
    font-size: 1rem;
    color: #6c757d;
    font-weight: 500;
}

/* SELECT PERSONALIZADO */
.form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 8px 15px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.form-select:hover {
    border-color: #667eea;
}

/* Contenedor de productos */
.products-container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

.product-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.product-description {
    color: #6c757d;
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 8px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.product-date {
    font-size: 0.75rem;
    color: #28a745;
    margin-bottom: 8px;
}

.product-date i {
    margin-right: 4px;
}

/* NUEVOS ESTILOS PARA LOS CONTROLES */
.product-controls-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.product-status-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

/* PRECIOS */
.price-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 8px 0;
}

.product-price {
    color: #ff6b00;
    font-weight: 700;
    font-size: 1.3rem;
}

.original-price {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.sale-price {
    color: #dc3545;
    font-weight: 700;
    font-size: 1.2rem;
}

.discount-badge {
    background: linear-gradient(45deg, #dc3545, #e83e8c);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* STOCK */
.stock-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.stock-in {
    background: #d4edda;
    color: #155724;
}

.stock-out {
    background: #f8d7da;
    color: #721c24;
}

.stock-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    margin: 8px 0;
}

/* CONTROLES DE CANTIDAD Y BOTONES */
.controls-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--sc-gray-light);
    padding: 5px;
    border-radius: 6px;
    border: 1px solid #ddd;
    flex: 1;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--sc-text-dark);
}

.quantity-btn:hover:not(:disabled) {
    background: var(--sc-primary);
    color: white;
    border-color: var(--sc-primary);
}

.quantity-btn:disabled {
    background: var(--sc-gray-light);
    color: #ccc;
    cursor: not-allowed;
}

.quantity-input {
    width: 50px;
    height: 32px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--sc-text-dark);
}

.quantity-input:focus {
    outline: none;
    border-color: var(--sc-primary);
    box-shadow: 0 0 0 2px rgba(1, 94, 49, 0.25);
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #6c757d;
}

.action-btn:hover {
    transform: scale(1.1);
}

.cart-btn {
    background: linear-gradient(135deg, var(--sc-primary), var(--sc-secondary));
    color: white;
    border: none;
}

.cart-btn:hover {
    background: linear-gradient(135deg, var(--sc-secondary), var(--sc-primary));
}

.wishlist-btn {
    color: #ccc;
}

.wishlist-btn:hover,
.wishlist-btn.active {
    background: var(--sc-danger);
    border-color: var(--sc-danger);
    color: white;
}

.delete-btn {
    color: #dc3545;
}

.delete-btn:hover {
    background: #dc3545;
    color: white;
}

/* BOTONES ANTIGUOS (para compatibilidad) */
.card-footer {
    padding: 15px 20px 20px;
    background: transparent;
    border: none;
}

.add-to-cart-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 100%;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.add-to-cart-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.add-to-cart-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.add-to-cart-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* OFERTAS BADGES */
.badge-new {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.badge-sale {
    background: linear-gradient(45deg, #dc3545, #e83e8c);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* PAGINACIÓN */
.pagination {
    margin: 40px 0 20px;
}

.page-link {
    color: #667eea;
    border: 1px solid #dee2e6;
    padding: 8px 16px;
    margin: 0 4px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.page-item.active .page-link {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* LOADING STATES */
.add-to-cart-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.add-to-cart-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.add-to-cart-btn.success {
    background: #28a745;
}

.add-to-cart-btn.error {
    background: #dc3545;
}
/* ===== BREADCRUMB ESTILOS ===== */
.breadcrumb-custom {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    list-style: none;
    background: transparent;
    border-radius: 0;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #6c757d;
    padding: 0 10px;
    font-size: 1.2rem;
}

.breadcrumb-item a {
    color: var(--sc-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--sc-secondary);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6c757d;
    font-weight: 600;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* NOTIFICACIONES */
.cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* NO PRODUCTS */
.no-products {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.no-products i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-products h4 {
    margin-bottom: 15px;
    color: #495057;
}

/* Responsive */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    
    .all-products-header h1 {
        font-size: 2rem;
    }
    
    .all-products-header .lead {
        font-size: 1rem;
    }
    
    .header-badges {
        flex-direction: column;
        gap: 15px;
    }
    
    .filters-section {
        padding: 15px;
    }
    
    .filters-section .row {
        text-align: center;
    }
    
    .filters-section .col-md-6 {
        margin-bottom: 15px;
    }
    
    .form-select {
        width: 100% !important;
    }
    
    .controls-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .quantity-controls {
        width: 100%;
        justify-content: center;
    }
    
    .action-buttons {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .all-products-header {
        padding: 30px 15px;
    }
    
    .all-products-header h1 {
        font-size: 1.7rem;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .product-title {
        font-size: 0.9rem;
    }
    
    .product-status-price {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .quantity-controls {
        width: 100%;
    }
    
    .action-buttons {
        width: 100%;
        justify-content: space-around;
    }
}