.site-nav.navbar.navbar-expand-lg {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1100 !important;
    background: #f8f9fa !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    border-bottom: 1px solid #e5e7eb !important;
    transition: all 0.3s ease !important;
}

body {
    padding-top: 80px !important;
    background-color: #f5f5f5 !important; /* Fondo gris como ML */
}

/* ===== CONTENEDOR PRINCIPAL CON LAYOUT INTEGRADO ===== */
.main {
    position: relative;
    margin-top: 0;
    background-color: #f5f5f5;
    min-height: calc(100vh - 80px);
}

.catalog {
    position: relative;
    background-color: #f5f5f5;
    min-height: calc(100vh - 80px);
}

/* ===== PANEL LATERAL INTEGRADO ===== */
.catalog__side-filter {
    position: fixed;
    top: 80px !important;
    left: -320px;
    width: 320px;
    height: calc(100vh - 80px) !important;
    background: #f5f5f5 !important; /* Mismo fondo que el body */
    border: none !important; /* Sin bordes separadores */
    box-shadow: none !important; /* Sin sombra separadora */
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

    .catalog__side-filter.active {
        left: 0;
    }

/* ===== CONTENIDO DEL SIDEBAR SIN SEPARACIÓN VISUAL ===== */
.side-filter {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: transparent;
    overflow-y: auto;
    max-height: 100%;
    margin-top: 28px; /* Ajusta este valor según necesites */
    border-radius: 0;
}

/* Header del sidebar integrado */
.side-filter__header {
    padding: 1rem;
    border: none !important; /* Sin separación visual */
    background: transparent !important; /* Fondo transparente */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* No sticky para que sea parte del scroll general */
    margin-bottom: 0.5rem;
}

.side-filter__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.side-filter__close {
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #6b7280;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

    .side-filter__close:hover {
        background: #f3f4f6;
        border-color: #9ca3af;
    }

/* Secciones del filtro integradas */
.side-filter__section {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: #fff; /* Fondo blanco para las secciones */
    border-radius: 8px; /* Bordes redondeados como ML */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* Sombra sutil */
    animation: fadeInUp 0.3s ease;
    width: 280px;
}

    .side-filter__section:last-child {
        margin-bottom: 1rem;
    }

.side-filter__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
    display: block;
}

.side-filter__selects {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .side-filter__selects .form-select {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
        border: 1px solid #d1d5db;
        border-radius: 0.375rem;
        background: #fff;
        transition: border-color 0.2s;
    }

        .side-filter__selects .form-select:focus {
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
            outline: none;
        }

/* ===== CONTENEDOR PRINCIPAL AJUSTADO ===== */
.catalog__container {
    transition: margin-left 0.3s ease, max-width 0.3s ease;
    width: 100%;
    padding-top: 1rem;
    background-color: #f5f5f5;
    min-height: calc(100vh - 80px);
}

    .catalog__container.sidebar-active {
        margin-left: 340px; /* Espacio para el sidebar + padding */
        max-width: calc(100vw - 340px);
    }

        .catalog__container.sidebar-active .catalog__products-row,
        .catalog__container.sidebar-active .jsListRow,
        .catalog__container.sidebar-active .tab-content {
            width: 100%;
            max-width: 100%;
        }

            .catalog__container.sidebar-active .catalog__products-row .col,
            .catalog__container.sidebar-active .catalog__products-row [class*="col-"] {
                flex: 1 1 0%;
                width: auto;
                min-width: 0;
            }

            .catalog__container.sidebar-active .jsListRow .row {
                margin: 0;
                width: 100%;
            }

        .catalog__container.sidebar-active .catalog__list-col {
            padding: 0.5rem 0.25rem;
            font-size: 0.875rem;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

.filters-toggle-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding-left: 1%;
}

.btn-toggle-filters {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    background-color: #f8f8f8;
    color: #6a6a6a;
    border: 1px solid #6a6a6a;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

    .btn-toggle-filters:hover {
        background: #f8f9fa;
        border-color: #999;
        color: #111827;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }

    .btn-toggle-filters:active {
        background: #f3f4f6;
        transform: translateY(1px);
    }

    .btn-toggle-filters i {
        font-size: 1rem;
        transition: transform 0.2s ease;
        margin-right: 0.5rem;
    }

    .btn-toggle-filters.active i {
        transform: rotate(90deg);
    }

.catalog__container.sidebar-active .btn-toggle-filters {
    display: none;
}

.catalog__container.sidebar-active #mainFiltersWrapper,
.catalog__container.sidebar-active #mainSortControls {
    display: none !important;
}

/* ===== NAVBAR CON SCROLL ===== */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15) !important;
}

/* ===== Z-INDEX HIERARCHY ===== */
.site-nav__container {
    transition: all 0.3s ease;
}

.site-nav__search-bar {
    position: relative;
    z-index: 1;
}

#searchTypeDropdown {
    z-index: 1200;
}

.offcanvas {
    z-index: 1150;
}

.dropdown-menu {
    z-index: 1060;
}

.modal.show {
    z-index: 1200;
}

.modal-backdrop {
    z-index: 1150;
}

.toast {
    z-index: 1300;
}

.site-nav__search-container {
    position: relative;
    z-index: 1;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    body {
        padding-top: 75px !important;
    }

    .catalog__side-filter {
        width: 300px;
        top: 75px !important;
        height: calc(100vh - 75px) !important;
    }

    .catalog__container.sidebar-active {
        margin-left: 320px;
        max-width: calc(100vw - 320px);
    }
}

@media (max-width: 992px) {
    body {
        padding-top: 70px !important;
    }

    .catalog__side-filter {
        width: 280px;
        top: 70px !important;
        height: calc(100vh - 70px) !important;
    }

    .catalog__container.sidebar-active {
        margin-left: 300px;
        max-width: calc(100vw - 300px);
    }

        .catalog__container.sidebar-active .card--list .col,
        .catalog__container.sidebar-active .card--list [class*="col-"] {
            font-size: 0.75rem;
        }

        .catalog__container.sidebar-active .card--list__title {
            font-size: 0.8rem !important;
        }

        .catalog__container.sidebar-active .card--list {
            padding: 0.5rem !important;
        }
}

@media (max-width: 768px) {
    body {
        padding-top: 65px !important;
    }

    .catalog__side-filter {
        width: 100%;
        left: -100%;
        top: 65px !important;
        height: calc(100vh - 65px) !important;
    }

        .catalog__side-filter.active {
            left: 0;
        }

    .catalog__container.sidebar-active {
        margin-left: 0;
        max-width: 100%;
    }

    /* Overlay para móvil */
    .catalog__side-filter.active::before {
        content: "";
        position: fixed;
        top: 65px;
        left: 0;
        width: 100vw;
        height: calc(100vh - 65px);
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
}

/* ===== OPTIMIZACIONES PARA CONTENIDO ===== */
.catalog__container.sidebar-active img {
    max-width: 100%;
    height: auto;
}

.catalog__container.sidebar-active .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.catalog__container.sidebar-active table {
    min-width: 600px;
}

.catalog__container.sidebar-active .catalog__pagination {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.catalog__container.sidebar-active .catalog__products-row .col,
.catalog__container.sidebar-active .catalog__products-row [class*="col-"] {
    flex: 0 1 auto;
    width: auto;
    min-width: 0;
    overflow: hidden;
}

.catalog__container.sidebar-active .card--list .row {
    flex-wrap: nowrap;
}

.catalog__container.sidebar-active .card--list .col p,
.catalog__container.sidebar-active .card--list .col span,
.catalog__container.sidebar-active .card--list .col div {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.catalog__container.sidebar-active .card--list .columna-precio-compra-sin-iva,
.catalog__container.sidebar-active .card--list .columna-precio-compra,
.catalog__container.sidebar-active .card--list .columna-precio-venta {
    min-width: 50px;
    text-align: center;
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.catalog__container,
.catalog__products,
.tab-content,
.row {
    transition: all 0.3s ease;
}

/* ===== VARIABLES CSS ===== */
:root {
    --navbar-height: 80px;
    --navbar-height-tablet: 75px;
    --navbar-height-mobile: 65px;
    --sidebar-width: 320px;
    --sidebar-width-tablet: 300px;
    --sidebar-width-mobile: 280px;
    --background-gray: #f5f5f5;
    --card-background: #fff;
    --border-color: #e5e7eb;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* ===== SCROLLBAR PERSONALIZADO SOLO PARA RESOLUCIONES PEQUEÑAS ===== */

/* (menor a 992px) */
@media (max-width: 991px) {
    .catalog__side-filter::-webkit-scrollbar {
        width: 6px;
    }

    .catalog__side-filter::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    .catalog__side-filter::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 3px;
    }

        .catalog__side-filter::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8;
        }
}

/* === SOLO ESTILOS PARA EL COMPONENTE DE RANGO DE PRECIOS === */
.price-range-filter {
    position: relative;
}

.price-range-filter__values {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.price-range-filter__min,
.price-range-filter__max {
    background: #f0f0f0;
    padding: 5px 10px;
    border-radius: 4px;
    min-width: 60px;
    text-align: center;
}

.price-range-filter__separator {
    color: #999;
    margin: 0 10px;
}

/* Contenedor principal del slider */
.price-range-filter__slider {
    position: relative;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin: 20px 0;
}

/* Barra de progreso entre los handles */
.price-range-filter__track {
    position: absolute;
    height: 100%;
    background: #007bff;
    border-radius: 3px;
    left: 0%;
    right: 0%;
    transition: all 0.2s ease;
    z-index: 1;
}

/* Inputs de tipo range superpuestos */
.price-range-filter__slider-input {
    position: absolute;
    top: -8px;
    width: 100%;
    height: 22px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    pointer-events: none;
    margin: 0;
}

    /* Ocultar la apariencia por defecto de los inputs range */
    .price-range-filter__slider-input::-webkit-slider-track {
        background: transparent;
        border: none;
    }

    .price-range-filter__slider-input::-moz-range-track {
        background: transparent;
        border: none;
    }

    /* Estilos para el thumb de WebKit (Chrome, Safari) */
    .price-range-filter__slider-input::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 20px;
        height: 20px;
        background: #007bff;
        border: 2px solid white;
        border-radius: 50%;
        cursor: pointer;
        pointer-events: all;
        box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        transition: all 0.2s ease;
        position: relative;
        z-index: 2;
    }

        .price-range-filter__slider-input::-webkit-slider-thumb:hover {
            background: #0056b3;
            transform: scale(1.1);
        }

    /* Estilos para Firefox */
    .price-range-filter__slider-input::-moz-range-thumb {
        width: 20px;
        height: 20px;
        background: #007bff;
        border: 2px solid white;
        border-radius: 50%;
        cursor: pointer;
        pointer-events: all;
        box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        transition: all 0.2s ease;
        position: relative;
        z-index: 2;
    }

        .price-range-filter__slider-input::-moz-range-thumb:hover {
            background: #0056b3;
            transform: scale(1.1);
        }

    /* Estilos adicionales para mejor apariencia */
    .price-range-filter__slider-input:focus {
        outline: none;
    }

        .price-range-filter__slider-input:focus::-webkit-slider-thumb {
            box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
        }

        .price-range-filter__slider-input:focus::-moz-range-thumb {
            box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
        }

/* ===== ESTILOS PARA UNIFICAR FILTRO DE PATENTE EN SIDEBAR ===== */

/* Contenedor del filtro de patente en sidebar */
.side-filter__section .side-filter__label {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

/* Contenedor para input y botón - layout horizontal como el de referencia */
.side-filter__section .patent-filter-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Estilos para el input de patente en sidebar - usando misma fuente que form-select */
.side-filter__section #licensePlateSidebar {
    flex: 1;
    min-width: 120px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: #fff;
    color: #374151;
    font-family: inherit; /* Usa la misma fuente que form-select */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

    .side-filter__section #licensePlateSidebar:focus {
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        outline: none;
    }

    .side-filter__section #licensePlateSidebar:disabled {
        background-color: #f9fafb;
        color: #9ca3af;
        cursor: not-allowed;
    }

    /* Ocultar la "X" del navegador para limpiar campo */
    .side-filter__section #licensePlateSidebar::-webkit-search-cancel-button,
    .side-filter__section #licensePlateSidebar::-webkit-search-decoration,
    .side-filter__section #licensePlateSidebar::-ms-clear {
        display: none;
    }

    /* Estados de validación SIN iconos */
    .side-filter__section #licensePlateSidebar.is-valid {
        border-color: #22c55e;
    }

    .side-filter__section #licensePlateSidebar.is-invalid {
        border-color: #ef4444;
    }

/* Estilos para el botón de búsqueda - forma más redondeada como btn-md */
.side-filter__section #btnBuscarPatenteSidebar {
    padding: 1rem 1.5rem; /* Mismo padding que btn-md */
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 1.25rem; /* Border-radius más grande para forma "pill" */
    transition: all 0.2s ease;
    min-width: auto;
    width: auto;
}

    .side-filter__section #btnBuscarPatenteSidebar:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

/* Responsive: En pantallas muy pequeñas, mantener layout vertical */
@media (max-width: 480px) {
    .side-filter__section .patent-filter-content {
        flex-direction: column;
        align-items: stretch;
    }

    .side-filter__section #licensePlateSidebar {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .side-filter__section #btnBuscarPatenteSidebar {
        width: 100%;
    }
}

/* Opcional: Si quieres que el input tenga el mismo estilo visual que license-plate */
.side-filter__section .license-plate-sidebar {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
    transition: border-color 0.2s ease;
    flex: 1;
}

    .side-filter__section .license-plate-sidebar:focus-within {
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

    .side-filter__section .license-plate-sidebar input {
        border: none;
        outline: none;
        background: transparent;
        font-family: inherit; /* Usa la misma fuente que form-select */
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: #1f2937;
        width: 100%;
        padding: 0.25rem 0;
    }

        .side-filter__section .license-plate-sidebar input::placeholder {
            color: #9ca3af;
            font-weight: normal;
        }

.patent-search-form {
    display: block !important;
}

.patent-search-content {
    display: flex !important;
    gap: 10px;
}