/* =========================================================================
   ESTILOS RENOVADOS: FONDO CLARO CON ALTA LEGIBILIDAD
   ========================================================================= */
:root { 
    --dark: #ffffff;      /* Cambio a fondo blanco */
    --primary: #f0a500; 
    --light: #f8f9fa;     /* Fondos alternos gris muy claro */
    --success: #25D366; 
    --text-dark: #222222; /* Color de texto principal para contraste */
}

body { 
    font-family: 'Segoe UI', Arial, sans-serif; 
    margin: 0; 
    background: var(--dark); 
    color: var(--text-dark); 
    padding-bottom: 60px; 
}

/* El header original del catálogo se elimina visualmente al usar nav.php */
.catalog-banner { 
    background: var(--light); 
    padding: 25px 5%; 
    border-bottom: 1px solid #e0e0e0; 
    text-align: left; 
}

.catalog-banner h1 { 
    margin: 0 0 5px 0; 
    font-size: 1.8rem; 
    color: var(--text-dark); 
}

/* =========================================================================
   REJILLA DE MARCAS FLUIDA Y ALINEADA SIN ESPACIOS VACÍOS
   ========================================================================= */



.btn-brand:hover, .btn-brand.active { 
    background: #f0a500 !important; /* Tu amarillo/naranja corporativo */
    border-color: #f0a500 !important; 
    color: #111111 !important; 
}

/* Optimización para teléfonos celulares muy pequeños */
@media (max-width: 480px) {
    .brand-filters {
        /* En pantallas chicas divide la pantalla en 2 columnas fijas exactas */
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }
    .btn-brand {
        font-size: 0.7rem !important;
        padding: 8px !important;
    }
}


/* REJILLA DE TARJETAS DE PRODUCTOS MEJORADAS */
#product-grid { 
    display: flex; 
    flex-wrap: wrap; 
    justify-content: flex-start; 
    gap: 12px; 
    padding: 20px 5%; 
    width: 100%; 
    box-sizing: border-box; 
}

.card-producto { 
    background: #ffffff; 
    border-radius: 8px; 
    padding: 12px; 
    transition: all 0.3s ease; 
    border: 1px solid #e0e0e0; 
    display: flex; 
    flex-direction: column; 
    text-align: center; 
    box-sizing: border-box; 
    flex: 0 0 calc(20% - 10px); 
    min-width: 170px; 
}

.card-producto:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08) !important; 
    border-color: var(--primary) !important; 
}

.brand-container { 
    height: 100px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin-bottom: 10px; 
    background: #fdfdfd; 
    border-radius: 6px; 
    padding: 5px;
    border: 1px solid #f0f0f0;
}

.img-marca { 
    max-height: 100px; 
    max-width: 100%; 
    object-fit: contain; 
}

.ref-badge { 
    background: #f0f0f0; 
    color: #666; 
    font-size: 0.6rem; 
    padding: 2px 6px; 
    border-radius: 4px; 
    font-weight: bold; 
    display: inline-block; 
    border: 1px solid #dddddd; 
}

.brand-text { 
    color: #d98200; 
    display: block; 
    margin-top: 5px; 
    font-weight: 700; 
    font-size: 0.7rem; 
    text-transform: uppercase; 
}

.product-title { 
    margin: 5px 0; 
    font-size: 0.8rem; 
    color: var(--text-dark); 
    font-weight: 700; 
    min-height: 32px; 
    line-height: 1.2; 
    overflow: hidden; 
}

.product-desc { 
    color: #555; 
    font-size: 0.65rem; 
    line-height: 1.3; 
    flex-grow: 1; 
    margin-bottom: 10px; 
    text-align: left; 
    background: #f9f9f9; 
    padding: 6px; 
    border-radius: 4px; 
    border: 1px solid #f0f0f0;
}

.btn-pdf { 
    color: #dc3545; 
    text-decoration: none; 
    font-size: 0.65rem; 
    font-weight: bold; 
    border: 1px solid #dc3545; 
    padding: 4px 10px; 
    border-radius: 4px; 
    display: inline-block; 
    margin-bottom: 10px; 
    width: fit-content; 
}

.btn-pdf:hover { 
    background: #dc3545; 
    color: #fff; 
}

.btn-add-modern { 
    width: 100%; 
    padding: 8px; 
    background: #222222; 
    color: #fff; 
    border: none; 
    border-radius: 4px; 
    font-weight: bold; 
    font-size: 0.7rem; 
    cursor: pointer; 
    transition: 0.3s; 
}

.btn-add-modern:hover { 
    background: var(--success); 
    color: #fff; 
}
/* Coloca esto al final de img-catalogo.css para proteger el menú en la vista clara */
/* Ajuste de navegación Sticky para el Catálogo */
.top-bar {
    position: relative;
    width: 100%;
    background: #000000 !important;
    z-index: 5001;
}

.navbar {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background: #111111 !important;
    border-bottom: 3px solid #f0a500 !important;
    z-index: 5000 !important;
}

.navbar .nav-links a {
    color: #ffffff !important;
}
/* =========================================================================
   FORZAR FLUJO DE CAPAS PARA EL NAV STICKY SOBRE EL FONDO BLANCO
   ========================================================================= */
.top-bar {
    position: relative !important;
    z-index: 100000 !important;
}

.navbar {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    background-color: #111111 !important; /* Opacidad total para que nada trasluzca */
    z-index: 999999 !important; /* Capa superior absoluta frente a los productos */
}

/* Forzar que la grilla de productos quede por debajo del menú fijo */
#product-grid, .card-producto {
    position: relative;
    z-index: 10; /* Jerarquía visual baja */
}
/* =========================================================================
   ESTILOS RESPONSIVOS PARA EL MENÚ HAMBURGUESA CORPORATIVO
   ========================================================================= */

/* Estructura base de los enlaces en Computadoras */
.nav-menu-links {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu-links li a {
    color: #ffffff !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    transition: color 0.2s ease-in-out;
}

.nav-menu-links li a:hover {
    color: #f0a500 !important; /* Resaltado amarillo corporativo */
}

/* El botón de tres barras permanece oculto en pantallas grandes */
.hamburger-toggle-btn {
    display: none;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 5px 10px;
    outline: none;
    transition: color 0.2s;
}

.hamburger-toggle-btn:hover {
    color: #f0a500;
}

/* =========================================================================
   REGLAS PARA DISPOSITIVOS MÓVILES (PANTALLAS MENORES A 768px)
   ========================================================================= */
@media (max-width: 768px) {
    /* Ocultar el texto "Cotizar" para ahorrar espacio en celulares */
    .cart-text-desktop {
        display: none;
    }
    
    /* Mostrar el botón hamburguesa */
    .hamburger-toggle-btn {
        display: block;
    }

    /* Transformar el menú horizontal en un panel vertical desplegable */
    .nav-menu-links {
        position: fixed;
        top: 105px; /* Se posiciona exactamente debajo del navbar */
        right: -100%; /* Escondido por defecto a la derecha */
        width: 75%;
        max-width: 300px;
        height: calc(100vh - 105px);
        background: #111111; /* Color de fondo sólido oscuro */
        flex-direction: column;
        gap: 0;
        padding-top: 15px;
        box-shadow: -5px 5px 15px rgba(0,0,0,0.5);
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 2px solid #f0a500;
    }

    /* Estilos para cada ítem del menú móvil */
    .nav-menu-links li {
        width: 100%;
        border-bottom: 1px solid #222;
    }

    .nav-menu-links li a {
        display: block;
        padding: 15px 25px;
        font-size: 14px;
        text-align: left;
        width: 100%;
        box-sizing: border-box;
    }

    .nav-menu-links li a:hover {
        background: #1a1a1a;
        padding-left: 30px; /* Microanimación de desplazamiento */
    }

    /* Clase que activa el JavaScript para mostrar el panel móvil */
    .nav-menu-links.menu-active {
        right: 0 !important;
    }
}
