
/* Navbar principal */
.navbar {
display: flex;
flex-wrap: nowrap; /* Evita que los elementos se desplacen a otra línea */
align-items: center;
justify-content: space-between;
}

.nav-pills {
display: flex;
flex-wrap: nowrap; /* Mantiene los elementos en una sola fila */
gap: 16px; /* Espaciado uniforme entre los elementos */
}

.nav-item {
white-space: nowrap; /* Evita que el texto se divida en varias líneas */
}

.nav-link {
font-size: 1rem; /* Tamaño de fuente base */
padding: 0.5rem 1rem; /* Espaciado interno */
text-align: center;
}

/* Categorías */
.category-menu {
position: relative;
overflow: visible; /* Permite que los elementos hijos sobresalgan */
background: #fff; /* Fondo blanco para la ventana principal */
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15); /* Sombra para darle profundidad */
border-radius: 8px;
padding: 10px 0;
z-index: 1050;
}

.subcategory-menu {
display: none;
position: absolute;
left: 100%; /* Posiciona la subcategoría fuera de la ventana del nivel anterior */
top: 0;
min-width: 220px;
background: #fff;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
border-radius: 8px;
padding: 10px 0;
z-index: 1050; /* Asegura que esté encima de otros elementos */
}

.parent-category:hover > .subcategory-menu,
.child-category:hover > .subcategory-menu {
display: block;
}

.child-category {
position: relative; /* Asegura que las subcategorías se posicionen correctamente */
}
.parent-category:hover > .subcategory-menu {
display: block;
}

.parent-category {
position: relative; /* Asegura que las subcategorías se posicionen correctamente */
}



.child-category:hover > .subcategory-menu {
display: block;
}


/* Dropdown search results */
#searchResults {
display: none;
position: absolute;
top: 100%; /* Posiciona debajo del input */
left: 0;
z-index: 1000;
background-color: white;
border: 1px solid #ccc;
width: 100%;
max-height: 300px;
overflow-y: auto;
padding: 10px;
}

.dropdown-item {
display: flex;
align-items: start;
padding: 10px;
border-bottom: 1px solid #eee;
}

.dropdown-item img {
margin-right: 10px;
width: 40px;
height: 40px;
object-fit: contain;
}

.dropdown-item div {
display: flex;
flex-direction: column;
}

.dropdown-item span:first-child {
font-size: 14px;
font-weight: normal;
color: #333;
}

/* Dropdown search results */
.dropdown-item span:last-child {
font-size: 16px;
font-weight: normal; /* Cambiado de bold a normal */
color: #000;
}

@media (max-width: 768px) {
    .navbar-mobile { display: flex !important; }
    .custom-navbar > .navbar:not(.navbar-mobile) { display: none !important; }
    .mobile-side-menu {
        position: fixed;
        top: 0; left: 0;
        width: 80vw;
        height: 100vh;
        background: #fff;
        z-index: 9999;
        box-shadow: 2px 0 10px #2224;
        transition: transform 0.3s;
        padding: 20px;
        overflow-y: auto;
    }
    .mobile-side-menu-content ul li {
        margin: 18px 0;
    }
    .mobile-side-menu-content ul li a {
        color: #2976f6;
        font-size: 18px;
        text-decoration: none;
    }
    .category-menu {
        position: relative;
        overflow-y: auto;      /* Scroll si hay muchas categorías */
        background: #fff;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
        border-radius: 8px;
        padding: 10px 0;
        z-index: 1050;
        min-height: 100px;
        max-height: 400px;     /* Ajusta este valor según lo que se vea bien en tu diseño */
        width: 100%;
        display: block;
    }


}
@media (min-width: 769px) {
    .navbar-mobile, .mobile-side-menu { display: none !important; }
}

