/*=============================================
nuevo-productosV01.css
===============================================
CSS PARA NUEVO-PRODUCTOS
26-08-2026
=============================================*/

/* ========================================
   VARIABLES Y RESET
   ======================================== */
:root {
    --rema-blue: #1e3a8a;
    /* --rema-blue: #1A86BF; */
    --rema-blue-light: #2563eb;
    --rema-red: #dc2626;
    --rema-red-hover: #b91c1c;
    --rema-dark: #1f2937;
    --rema-gray-50: #f9fafb;
    --rema-gray-100: #f3f4f6;
    --rema-gray-200: #e5e7eb;
    --rema-gray-300: #d1d5db;
    --rema-gray-500: #6b7280;
    --rema-gray-700: #374151;
    --rema-gray-900: #111827;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

.buscador {
    text-align: center;
    margin: 0 auto;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--rema-gray-900);
    background: var(--rema-gray-50);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Clave para evitar el desbordamiento */
}

/* ========================================
   NAVBAR
   ======================================== */
.logo {
    width: 42px;
    height: auto;
    margin-right: 12px;
}

.brand-text {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
}

.navbar {
    background: linear-gradient(135deg, var(--rema-blue) 0%, var(--rema-dark) 100%);
    /* background-color: #1A86BF; */
    padding: 0.5rem 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    /* height: 72px; */
}

.navbar.scrolled {
    background: rgba(30, 58, 138, 0.98) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: white !important;
    display: flex;
    align-items: center;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
    position: relative;
    text-align: center;
}

.nav-link:hover,
.nav-link.active-link {
    color: white !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--rema-red);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active-link::after {
    width: 60%;
}

.btn-rema {
    background: var(--rema-red);
    color: white !important;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.btn-rema:hover {
    background: var(--rema-red-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

/* ========================================
   GRID PRINCIPAL - SOLUCIÓN AL OVERFLOW
   ======================================== */
main.grid-container {
    flex: 1;
    display: grid;
    grid-template-columns: 300px 1fr;
    height: calc(100vh - 72px);
    /* Altura total menos navbar */
    overflow: hidden;
    margin-top: 0;
}

/* ========================================
   SIDEBAR (FILTROS)
   ======================================== */
.filter {
    background: white;
    border-right: 1px solid var(--rema-gray-200);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.03);
    margin-top: 4.3rem;
}

/* Scrollbar personalizado */
.filter::-webkit-scrollbar,
.catalogo::-webkit-scrollbar {
    width: 12px;
}

.filter::-webkit-scrollbar-track,
.catalogo::-webkit-scrollbar-track {
    background: var(--rema-gray-100);
}

.filter::-webkit-scrollbar-thumb,
.catalogo::-webkit-scrollbar-thumb {
    background: var(--rema-gray-300);
    border-radius: 3px;
}

.filter::-webkit-scrollbar-thumb:hover,
.catalogo::-webkit-scrollbar-thumb:hover {
    background: var(--rema-gray-500);
}

.filter-header {
    background: linear-gradient(135deg, var(--rema-blue) 0%, var(--rema-blue-light) 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-header i {
    font-size: 1.25rem;
}

.filter-header h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.filter-subtitle {
    padding: 1rem 1.5rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--rema-gray-500);
}

.filter-list {
    list-style: none;
    padding: 0.5rem 0 2rem;
    flex: 1;
}

.filter-item {
    margin: 2px 0;
}

.filter-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    color: var(--rema-gray-700);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.filter-item a i {
    width: 18px;
    text-align: center;
    color: var(--rema-gray-500);
    transition: var(--transition);
}

.filter-item a span {
    flex: 1;
}

.filter-item a .filter-count {
    font-size: 0.75rem;
    background: var(--rema-gray-100);
    color: var(--rema-gray-500);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition);
    text-align: right;
}

.filter-item a:hover {
    background: var(--rema-gray-50);
    color: var(--rema-blue);
    border-left-color: var(--rema-blue-light);
}

.filter-item a:hover i {
    color: var(--rema-blue-light);
}

.filter-item a:hover .filter-count {
    background: var(--rema-blue);
    color: white;
}

.filter-item.active-filter a {
    background: linear-gradient(90deg, rgba(30, 58, 138, 0.08) 0%, transparent 100%);
    color: var(--rema-blue);
    border-left-color: var(--rema-red);
    font-weight: 600;
}

.filter-item.active-filter a i {
    color: var(--rema-red);
}

.filter-item.active-filter a .filter-count {
    background: var(--rema-red);
    color: white;
}

/* ========================================
   CATÁLOGO
   ======================================== */
.catalogo {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2rem 2.5rem;
    background: var(--rema-gray-50);
    height: 100%;
}

.catalogo-header {
    margin-bottom: 1rem;
    /* padding-bottom: 1.5rem; */
    padding: 0.5rem 0;
    border-bottom: 1px solid red;
    border-bottom: 1px solid var(--rema-gray-200);
}

.catalogo-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--rema-gray-900);
    margin-bottom: 0.25rem;
}

.catalogo-header p {
    color: var(--rema-gray-500);
    font-size: 0.95rem;
    margin: 0;
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
    background: var(--rema-dark);
    color: white;
    padding: 1.25rem 2rem 0.75rem;
    flex-shrink: 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    width: 36px;
    height: auto;
    filter: brightness(0) invert(1);
}

.footer-brand h5 {
    font-weight: 700;
    font-size: 1rem;
    margin: 0;
}

.footer-brand p {
    font-size: 0.8rem;
    color: var(--rema-gray-300);
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--rema-gray-300);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-links a:hover {
    color: var(--rema-red);
}

.footer-bottom {
    text-align: center;
    padding-top: 0.75rem;
    font-size: 0.75rem;
    color: var(--rema-gray-500);
}

.footer-bottom p {
    margin: 0;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 992px) {
    main.grid-container {
        grid-template-columns: 260px 1fr;
    }

    .catalogo {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
    }


    main.grid-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        height: auto;
        min-height: calc(100vh - 72px);
    }

    .filter {
        border-right: none;
        border-bottom: 1px solid var(--rema-gray-200);
        max-height: 25vh;
        margin-top: 6.7rem;
        margin-bottom: 3rem;
    }

    .filter-header {
        padding: 0.6rem 1.5rem;
        gap: 6px;
    }

    .filter-header i {
        font-size: 1.25rem;
    }


    .catalogo {
        padding: 1.5rem 1rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ========================================
   CATÁLOGO - ESPACIADO INTERNO
   ======================================== */
.catalogo {
    padding: 2rem 2.5rem !important;
}

/* ========================================
   LOADER MEJORADO
   ======================================== */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 1.5rem;
}

.loader {
    width: 60px;
    height: 60px;
    border: 4px solid var(--rema-gray-200);
    border-top: 4px solid var(--rema-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loader-text {
    color: var(--rema-gray-500);
    font-size: 0.95rem;
    font-weight: 500;
}

/* ========================================
   ANIMACIÓN DE ENTRADA DE TARJETAS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tarjeta {
    animation: fadeInUp 0.5s ease-out backwards;
}

.tarjeta:nth-child(1) {
    animation-delay: 0.05s;
}

.tarjeta:nth-child(2) {
    animation-delay: 0.10s;
}

.tarjeta:nth-child(3) {
    animation-delay: 0.15s;
}

.tarjeta:nth-child(4) {
    animation-delay: 0.20s;
}

.tarjeta:nth-child(5) {
    animation-delay: 0.25s;
}

.tarjeta:nth-child(6) {
    animation-delay: 0.30s;
}

.tarjeta:nth-child(7) {
    animation-delay: 0.35s;
}

.tarjeta:nth-child(8) {
    animation-delay: 0.40s;
}

/* ========================================
   AJUSTES PARA MÓVIL - CATÁLOGO
   ======================================== */
@media (max-width: 768px) {
    .catalogo {
        padding: 1.5rem 1rem !important;
    }
}


/* ========================================
   BADGE DE CONTEO - ESTILOS ADICIONALES
   ======================================== */

/* Sistemas sin productos disponibles */
.filter-item.filter-disabled a {
    opacity: 0.55;
    cursor: not-allowed !important;
    pointer-events: none;
}

.filter-item.filter-disabled a:hover {
    background: transparent;
    border-left-color: transparent;
}

/* Contador cuando está vacío (0 productos) */
.filter-count.count-empty {
    background: var(--rema-gray-200);
    color: var(--rema-gray-500);
}

/* ========================================
   ITEM "TODOS" DESTACADO
   ======================================== */
.filter-list>.filter-item:first-child {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--rema-gray-200);
}

.filter-list>.filter-item:first-child a {
    font-weight: 600;
    color: var(--rema-gray-900);
}

.filter-list>.filter-item:first-child a i {
    color: var(--rema-red);
}

.filter-list>.filter-item:first-child a .filter-count {
    background: var(--rema-red);
    color: white;
    font-weight: 700;
}

.filter-list>.filter-item:first-child a:hover {
    color: var(--rema-red);
    border-left-color: var(--rema-red);
}

.filter-list>.filter-item:first-child a:hover .filter-count {
    background: var(--rema-red-hover);
    transform: scale(1.05);
}