/* ===== RESET Y VARIABLES ===== */
    
     :root {
        --primary: red;
        --secondary: #979393;
        --light: #f5f5f5;
        --dark: #3b3b3b;
        --text: #ffffff;
        --accent: #ff0000;
        --border: #ddd;
        --hover: #e8f5e8;
        --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        --transition: all 0.3s ease;
    }
    
    body {
        font-family: 'Montserrat', sans-serif;
    }
    /* ===== HEADER ===== */
    
    .header-container {
        max-width: 1200px;
        margin: 0 auto;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 2rem;
    }
    
    nav ul {
        display: flex;
        list-style: none;
        gap: 1.5rem;
    }
    
    nav a {
        text-decoration: none;
        color: red;
        font-weight: 600;
        padding: 0.5rem 0.75rem;
        border-radius: 4px;
        transition: var(--transition);
    }
    
    nav a:hover,
    .nav-menu a.active {
        color: red;
        text-decoration: underline;
    }
    
    .nav-menu a:hover,
    .nav-menu a.active {
        color: red;
    }
    /* ===== HERO / TÍTULO ===== */
    
    .page-title {
        text-align: center;
        padding: 2rem 1rem;
        background: linear-gradient(to right, #77797500, #50524d00);
        margin-bottom: 2rem;
    }
    
    .page-title h1 {
        font-size: 2.5rem;
        color: var(--dark);
        letter-spacing: 1px;
        margin-bottom: 0.5rem;
    }
    
    .breadcrumb {
        font-size: 0.9rem;
        color: var(--secondary);
    }
    
    .breadcrumb a {
        color: var(--primary);
        text-decoration: none;
    }
    
    .breadcrumb span {
        margin: 0 0.5rem;
    }
    /* ===== MAIN CONTAINER ===== */
    
    .container {
        max-width: 1200px;
        margin: 0 auto;
        display: flex;
        gap: 2rem;
        padding: 0 2rem;
        box-sizing: border-box;
    }
    /* ===== SIDEBAR FILTROS BARRA IZQUIERDA===== */
    
    .sidebar {
        width: 280px;
        background: rgb(0, 0, 0);
        padding: 1.5rem;
        border-radius: 8px;
        color: var(--text);
        box-shadow: var(--shadow);
    position: static;
    max-height: none;
    overflow: visible;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
    }
    
    .sidebar-fixed-top {
        flex: 0 0 auto;
        border-bottom: 1px solid #111;
        padding-bottom: 0.75rem;
        margin-bottom: 0.75rem;
        background: rgb(0, 0, 0);
        z-index: 1;
    }
    
    .sidebar-scroll {
    flex: 1 1 auto;
    overflow: visible;
    padding-right: 0;
    }
    
    .sidebar-scroll::-webkit-scrollbar {
        width: 8px;
    }
    .sidebar-scroll::-webkit-scrollbar-track {
        background: #0a0a0a;
    }
    .sidebar-scroll::-webkit-scrollbar-thumb {
        background: #333;
        border-radius: 4px;
    }
    
    .search-box {
        width: 100%;
        display: flex;
        margin-bottom: 1.5rem;
        color: var(--text);
    }
    
    .search-box input {
        flex: 1;
        min-width: 0; /* clave para evitar desbordes en flex */
        padding: 0.6rem; /* tamaño más compacto */
        border: 1px solid var(--border);
        border-radius: 4px 0 0 4px;
        font-size: 0.9rem;
        color: var(--text);
    }
    
    .search-box button {
        background: var(--primary);
        color: white;
        border: none;
        padding: 0.6rem 0.9rem; /* tamaño más compacto */
        border-radius: 0 4px 4px 0;
        cursor: pointer;
        transition: var(--transition);
        flex: 0 0 auto; /* evita que se expanda y empuje el input */
        white-space: nowrap; /* mantiene el texto en una línea */
    }
    
    .search-box button:hover {
        background: var(--secondary);
    }
    
    .filter-section {
        margin-bottom: 1.5rem;
    }
    
    .filter-section h3 {
        margin-bottom: 1rem;
        font-size: 1.1rem;
        color: var(--dark);
        border-bottom: 2px solid var(--primary);
        padding-bottom: 0.5rem;
    }
    
    .filter-group {
        margin-bottom: 1rem;
    }
    
    .filter-group label {
        display: block;
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .filter-group input[type="checkbox"] {
        accent-color: var(--primary);
    }
    
    .filter-group .count {
        font-size: 0.8rem;
        color: var(--secondary);
        margin-left: 0.5rem;
    }
    
    .price-filter {
        margin: 1.5rem 0;
    }
    
    .price-filter label {
        display: block;
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }
    
    .price-slider {
        width: 100%;
        height: 6px;
        background: var(--border);
        border-radius: 3px;
        position: relative;
        margin: 0.5rem 0;
    }
    
    .price-slider::before {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        background: var(--primary);
        border-radius: 3px;
        z-index: 1;
    }
    
    .price-slider input[type="range"] {
        -webkit-appearance: none;
        width: 100%;
        height: 6px;
        background: transparent;
        position: absolute;
        top: 0;
        z-index: 2;
    }
    
    .price-slider input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: var(--primary);
        cursor: pointer;
        border: 2px solid white;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    
    .price-range-display {
        display: flex;
        justify-content: space-between;
        font-size: 0.85rem;
        color: var(--secondary);
        margin-top: 0.5rem;
    }
    
    .filter-btn {
        width: 100%;
        padding: 0.75rem;
        background: var(--primary);
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-weight: 600;
        transition: var(--transition);
    }
    
    .filter-btn:hover {
        background: var(--secondary);
    }
    /* ===== PRODUCTOS GRID ===== */
    
    .products-grid {
        flex: 1;
    max-height: none;
    overflow: visible;
    padding-right: 0;
    }
    .products-grid::-webkit-scrollbar {
        width: 8px;
    }
    .products-grid::-webkit-scrollbar-track {
        background: #0a0a0a;
    }
    .products-grid::-webkit-scrollbar-thumb {
        background: #333;
        border-radius: 4px;
    }
    
    .products-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1.5rem;
    }
    
    .products-count {
        font-size: 0.9rem;
        color: var(--secondary);
    }
    
    .products-grid-container {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .product-card {
        background: rgb(0, 0, 0);
        border-radius: 8px;
        overflow: hidden;
        color: var(--text);
        box-shadow: var(--shadow);
        transition: var(--transition);
        display: flex;
        flex-direction: column;
    }
    
    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    }
    
    .product-image {
        height: 200px;
        background: var(--light);
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }
    
    .product-image img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        transition: transform 0.5s ease;
    }
    
    .product-card:hover .product-image img {
        transform: scale(1.05);
    }
    
    .product-info {
        padding: 1rem;
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    
    .product-name {
        font-size: 1rem;
        font-weight: 600;
        color: var(--dark);
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }
    
    .product-price {
        font-size: 1.2rem;
        font-weight: 700;
        color: var(--primary);
        margin-bottom: 1rem;
    }
    
    .product-actions {
        display: flex;
        gap: 0.5rem;
        margin-top: auto;
    }
    
    .btn {
        padding: 0.5rem 0.75rem;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 0.85rem;
        font-weight: 600;
        transition: var(--transition);
    }
    
    .btn-add {
        background: var(--primary);
        color: white;
    }
    
    .btn-add:hover {
        background: var(--secondary);
    }
    
    .btn-info {
        background: #eee;
        color: var(--dark);
    }
    
    .btn-info:hover {
        background: #ddd;
    }
    /* ===== PAGINACIÓN ===== */
    
    .pagination {
        display: flex;
        justify-content: center;
        margin-top: 2rem;
    gap: 0.5rem;
    flex-wrap: wrap;
    }
    
    .pagination a, .pagination button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 2.25rem;
        padding: 0.5rem 0.75rem;
        border: 1px solid #111;
        border-radius: 6px;
        text-decoration: none;
        font-weight: 600;
        color: #111;
        background: #fff;
        transition: var(--transition);
    }
    
    .pagination a:hover, .pagination a.active,
    .pagination button:hover, .pagination button.active {
        background: var(--primary);
        color: #fff;
        border-color: var(--primary);
    }
    
    .pagination a.disabled, .pagination button:disabled {
        pointer-events: none;
        opacity: 0.5;
    }
    /* ===== RESPONSIVE ===== */
    
    @media (max-width: 768px) {
        .header-container {
            flex-direction: column;
            padding: 1rem;
        }
        .container {
            flex-direction: column;
            padding: 0 1rem;
            padding-left: 0;
        }
        .sidebar {
            width: 100%;
        position: static;
            height: auto;
            margin-bottom: 1.5rem;
        }
        .products-grid-container {
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        }
        .product-image {
            height: 150px;
        }
        .product-name {
            font-size: 0.9rem;
        }
    }
    
    @media (max-width: 480px) {
        .page-title h1 {
            font-size: 2rem;
        }
        nav ul {
            flex-wrap: wrap;
            justify-content: center;
        }
        .search-box {
            flex-direction: column;
        }
        .search-box input,
        .search-box button {
            width: 100%;
            border-radius: 4px;
        }
        .product-image {
            height: 120px;
        }
        .product-price {
            font-size: 1rem;
        }
    .pagination a, .pagination button {
        min-width: 2rem;
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
    }
    }

/* ===== LAYOUT DESKTOP: FILTRO A LA DERECHA ===== */
@media (min-width: 992px) {
    .container {
        flex-direction: row;
        align-items: flex-start;
    }
    .sidebar { order: 0; }
    .products-grid { order: 1; }
}
    /* ===== ANIMACIONES ===== */
    
    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .products-grid-container .product-card {
        animation: fadeIn 0.5s ease-out;
    }
    /* ===== TOAST NOTIFICATION ===== */
