/* --- Estilos Base --- */
body {
    background-color: #f8f9fa;
}

/* Botón Principal */
.btn-categoria-custom {
    background-color: white;
    border: 1px solid #dee2e6;
    color: #495057;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    position: relative;
    transition: all 0.2s;
}

.btn-categoria-custom:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

/* Tags Pills */
.tag-pill {
    background: white;
    border: 1px solid #dee2e6;
    color: #6c757d;
    border-radius: 8px;
    padding: 10px 20px;
    text-decoration: none;
    white-space: nowrap;
    font-size: 0.9rem;
}

.tag-pill:hover {
    border-color: #26BCA0;
    color: #26BCA0;
}

/* Buscador */
.search-container-custom {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 6px 15px;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-input-custom {
    border: none;
    outline: none;
    width: 100%;
    padding: 5px 10px;
}

/* =========================================
                   ESTILOS DEL MENÚ (DESKTOP FIRST)
                   ========================================= */

/* Contenedor Principal Dropdown */
.dropdown-menu-custom {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    width: 280px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 1050;
    padding: 8px 0;
}

/* Items */
.menu-item-container {
    position: relative;
}

.menu-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.menu-link:hover {
    background-color: #f1f3f5;
    color: #26BCA0;
}

.arrow-icon {
    font-size: 0.75rem;
    color: #adb5bd;
    transition: transform 0.2s;
}

.menu-link:hover .arrow-icon {
    color: #26BCA0;
}

/* NIVEL 2+ (Submenús Infinitos) Desktop */
@media (min-width: 992px) {
    .nested-menu {
        display: none;
        position: absolute;
        left: 100%;
        /* A la derecha */
        top: 0;
        width: 260px;
        background: white;
        border-radius: 12px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
        border: 1px solid rgba(0, 0, 0, 0.05);
        padding: 8px 0;
        z-index: 1051;
    }

    /* Hover para mostrar submenú */
    .has-children:hover>.nested-menu {
        display: block;
    }

    /* Puente invisible para UX */
    .nested-menu::before {
        content: '';
        position: absolute;
        left: -10px;
        top: 0;
        width: 15px;
        height: 100%;
    }
}

/* =========================================
                   ESTILOS MÓVIL (Responsive)
                   ========================================= */
@media (max-width: 991px) {

    /* Dropdown Principal ocupa ancho completo y empuja contenido */
    .dropdown-menu-custom {
        position: static;
        /* Ya no flota, empuja */
        width: 100%;
        box-shadow: none;
        border: 1px solid #eee;
        margin-top: 10px;
    }

    /* Submenús se apilan verticalmente (Acordeón) */
    .nested-menu {
        display: none;
        /* Se activa con JS click */
        position: static;
        background-color: #f8f9fa;
        /* Un poco más oscuro para diferenciar */
        box-shadow: none;
        padding-left: 15px;
        /* Indentación para jerarquía */
        border-left: 2px solid #e9ecef;
    }

    /* Rotar flecha al abrir */
    .menu-item-container.open>.menu-link .arrow-icon {
        transform: rotate(90deg);
    }

    /* Ajuste visual botón */
    .submenu-toggle {
        padding: 5px 10px;
        /* Aumentar área de click en móvil */
    }
}