/* --- Estilos del Header (Buscador, etc.) --- */
.search-form { display: flex; border: 1px solid #ddd; border-radius: 50px; overflow: hidden; background-color: #fff; transition: box-shadow 0.2s; }
.search-form:focus-within { box-shadow: 0 0 0 2px var(--primary-color); border-color: var(--primary-color); }
.search-form input[type="search"] { border: none; outline: none; box-shadow: none; background-color: transparent; flex-grow: 1; padding-left: 20px; }
.search-form .btn { border-radius: 0 50px 50px 0; border: none; box-shadow: none; }
.header-icons { min-width: 50px; }
#toggle-sidebar-btn { background-color: transparent; border: none; padding: 0.5rem; }
#toggle-sidebar-btn:hover { color: var(--primary-color); }
header .col-8 h1 { white-space: nowrap; }

/* --- SECCIÓN DEL MENÚ PARA MÓVIL (casi sin cambios) --- */
.d-lg-none #category-sidebar-col {
    position: fixed; top: 0; left: 0; width: 280px; height: 100%;
    background-color: #fff; z-index: 1056; transform: translateX(-100%);
    transition: transform 0.3s ease-in-out; border-right: 1px solid #eee;
    overflow-y: auto; box-shadow: 4px 0 15px -5px rgba(0,0,0,0.1);
}
.d-lg-none .category-sidebar-content { background-color: #fff; padding: 0 !important; }
#menu-backdrop {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5); z-index: 1055;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s;
}
body.mobile-menu-open .d-lg-none #category-sidebar-col { transform: translateX(0); }
body.mobile-menu-open #menu-backdrop { opacity: 1; visibility: visible; }
.hamburger-icon { width: 28px; height: 22px; position: relative; cursor: pointer; display: inline-block; }
.hamburger-icon span { display: block; position: absolute; height: 3px; width: 100%; background: var(--text-color); border-radius: 3px; opacity: 1; left: 0; transition: transform 0.25s ease-in-out, opacity 0.25s ease-in-out; }
.hamburger-icon span:nth-child(1) { top: 0px; }
.hamburger-icon span:nth-child(2) { top: 9px; }
.hamburger-icon span:nth-child(3) { top: 18px; }
body.mobile-menu-open .hamburger-icon span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
body.mobile-menu-open .hamburger-icon span:nth-child(2) { opacity: 0; }
body.mobile-menu-open .hamburger-icon span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* Estilos de la lista del menú móvil */
.d-lg-none .category-sidebar-content h4 { padding: 1.5rem; margin-bottom: 0; font-size: 1.5rem; font-weight: 700; color: var(--text-color); border-bottom: 1px solid #eee; }
.d-lg-none .category-filters { padding: 1rem; }
.d-lg-none .category-filters a { display: flex; align-items: center; padding: 14px 16px; border-radius: 8px; margin-bottom: 5px; font-weight: 500; color: #555; transition: all 0.2s ease-in-out; text-decoration: none; }
.d-lg-none .category-filters a:hover { background-color: #f8f9fa; color: var(--primary-color); transform: translateX(5px); }
.d-lg-none .category-filters > li > a.active { background-color: var(--primary-color-light, #fff5e6); color: var(--primary-color); font-weight: 700; }
.d-lg-none .sub-category-list { position: relative; padding-left: 25px; margin: 10px 0 10px 10px; }
.d-lg-none .sub-category-list::before { content: ''; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background-color: #f0f0f0; }
.d-lg-none .sub-category-list a { font-size: 0.9em; font-weight: 400; color: #666; }
.d-lg-none .sub-category-list a.active { color: var(--primary-color); background-color: transparent; font-weight: 700; }

/* Ocultar botón hamburguesa en desktop */
@media (min-width: 992px) {
    #toggle-sidebar-btn { display: none; }
}


/* --- ✅ NUEVOS ESTILOS PARA EL MENÚ DE ESCRITORIO --- */
.desktop-menu-container {
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
}
.desktop-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center; /* Centra los items del menú */
}
.desktop-nav-list > li {
    position: relative; /* Contexto para el menú desplegable */
}
.desktop-nav-list > li > a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s, background-color 0.2s;
    border-bottom: 3px solid transparent; /* Borde inferior para efecto hover/active */
}
.desktop-nav-list > li:hover > a,
.desktop-nav-list > li > a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}
/* Menú Desplegable */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    min-width: 220px;
    z-index: 1000;
    border-radius: 0 0 8px 8px;
    border-top: 3px solid var(--primary-color);
}
.has-dropdown:hover > .dropdown-menu {
    display: block; /* Muestra el desplegable al hacer hover */
}
.dropdown-menu li a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}
.dropdown-menu li a:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

/* --- Estilos para fijar el Header completo (CORREGIDO) --- */
.site-header-container {
    position: fixed;   /* ✅ CAMBIO: De 'sticky' a 'fixed' */
    top: 0;
    left: 0;           /* Añadido para asegurar la posición */
    z-index: 1030;
    width: 100%;
}

.main-container {
    margin-top: 110px;
}