/* ============================================================================
   MOBILE MEGAMENU - SISTEMA VERTICAL CON NIVELES
   ============================================================================ */

/* ============================================================================
   MOBILE MEGAMENU - SISTEMA VERTICAL CON NIVELES
   ============================================================================ */

/* Wrapper principal - Ocupa toda la pantalla */
.mobile-nav__wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999; /* MUY ALTO - Por encima de todo */
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: hidden;
    pointer-events: none;
}

.mobile-nav__wrapper.expanded {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

/* Overlay oscuro de fondo */
.mobile-nav__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.mobile-nav__wrapper.expanded .mobile-nav__overlay {
    opacity: 1;
}

/* Contenedor del menú (panel lateral) */
.mobile-nav__content {
    position: absolute;
    top: 0;
    left: 0;
    width: 320px;
    max-width: 85vw;
    height: 100%;
    background-color: var(--bg-dark-green);
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav__wrapper.expanded .mobile-nav__content {
    transform: translateX(0);
}

/* Header del menú */
.mobile-nav__header {
    position: relative;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.mobile-nav__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    z-index: 10;
}

.mobile-nav__close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FF5956;
}

.mobile-nav__logo {
    text-align: center;
    padding-top: 10px;
}

.mobile-nav__logo img {
    max-width: 160px;
    height: auto;
}

/* Body del menú con scroll */
.mobile-nav__body {
    flex: 1;
    overflow: hidden;
    position: relative;
    background-color: var(--bg-hover-green);
}

.mobile-nav__scroll-container {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0px 0;
}

/* Scrollbar personalizado */
.mobile-nav__scroll-container::-webkit-scrollbar {
    width: 6px;
}

.mobile-nav__scroll-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.mobile-nav__scroll-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.mobile-nav__scroll-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Sistema de Niveles */
.mobile-nav__level {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100%;
    background: var(--bg-dark-green);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: hidden;
    opacity: 0;
    padding: 0px 0;
}

.mobile-nav__level.active {
    position: relative;
    transform: translateX(0);
    visibility: visible;
    opacity: 1;
}

/* Animaciones de transición entre niveles */
.mobile-nav__level.slide-out-left {
    animation: slideOutLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav__level.slide-out-right {
    animation: slideOutRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav__level.slide-in-left {
    animation: slideInLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav__level.slide-in-right {
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideOutLeft {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-100%); opacity: 0; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Botón de Atrás */
.mobile-nav__back-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 0px;
    background: rgb(0 16 10);
    border: none;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-nav__back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FF5956;
}

.mobile-nav__back-icon {
    font-size: 16px;
}

/* Título del nivel */
.mobile-nav__level-title {
    color: var(--bg-dark-green);
    font-size: 18px;
    font-weight: 400;
    /* margin: 0 0 20px 0; */
    padding: 10px 20px 10px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: var(--bg-lighter-green);}

/* Información del usuario */
.mobile-nav__user {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.mobile-nav__user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 24px;
}

.mobile-nav__user-info {
    flex: 1;
}

.mobile-nav__user-name {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 3px;
}

.mobile-nav__user-email {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

/* Lista de navegación */
.mobile-nav__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mobile-nav__item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-nav__item:last-child {
    border-bottom: none;
}

.mobile-nav__item--highlighted {
    background: rgba(255, 89, 86, 0.1);
    border-left: 3px solid #FF5956;
}

.mobile-nav__item--active {
    background: rgba(255, 255, 255, 0.05);
}

/* Enlaces del menú */
.mobile-nav__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mobile-nav__link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #FF5956;
}

.mobile-nav__link-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.mobile-nav__icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
}

.mobile-nav__text {
    font-size: 15px;
    font-weight: 500;
}

.mobile-nav__arrow {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    transition: transform 0.3s ease;
}

.mobile-nav__link:hover .mobile-nav__arrow {
    transform: translateX(3px);
    color: #FF5956;
}

/* Badge (contador) */
.mobile-nav__badge {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #FF5956;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
}

.mobile-nav__wishlist-badge {
    background: #FF1744;
}

/* Contador de items en categorías */
.mobile-nav__count {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

/* Checkmark para item activo */
.mobile-nav__check {
    color: #4CAF50;
    font-size: 16px;
}

/* Banderas de idiomas */
.mobile-nav__flag {
    width: 24px;
    height: 24px;
    display: inline-block;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
}

/* Separador */
.mobile-nav__separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 10px 0;
}

/* Footer del menú */
.mobile-nav__footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.mobile-nav__footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.mobile-nav__footer-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.mobile-nav__footer-link:hover {
    color: #FF5956;
}

.mobile-nav__footer-separator {
    color: rgba(255, 255, 255, 0.3);
}

.mobile-nav__footer-copyright {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

/* Prevenir scroll del body cuando el menú está abierto */
body.mobile-nav-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Ocultar en desktop */
@media (min-width: 992px) {
    .mobile-nav__wrapper {
        display: block;
    }
}

/* Ajustes para pantallas muy pequeñas */
@media (max-width: 360px) {
    .mobile-nav__content {
        width: 280px;
    }
    
    .mobile-nav__logo img {
        max-width: 120px;
    }
}
/* ============================================================================
   BOTÓN HAMBURGUESA CON ANIMACIÓN
   ============================================================================ */

.btn-show-menu-mobile {
    display: none;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 10001;
    transition: transform 0.3s ease;
}
.btn-show-menu-mobile:hover {
    transform: scale(1.1);
}

.menubar-box {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.menubar-inner {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.menubar-inner::before,
.menubar-inner::after {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background-color: #ffffff;
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
}

.menubar-inner::before {
    top: -8px;
}

.menubar-inner::after {
    bottom: -8px;
}

/* Estado activo (menú abierto) - Transformación en X */
.btn-show-menu-mobile.active .menubar-inner {
    background-color: transparent;
}

.btn-show-menu-mobile.active .menubar-inner::before {
    top: 0;
    transform: rotate(45deg);
    background-color: #FF5956;
}

.btn-show-menu-mobile.active .menubar-inner::after {
    bottom: 0;
    transform: rotate(-45deg);
    background-color: #FF5956;
}
@media only screen and (min-width: 1025px) and (max-width: 1280px) {
    .btn-show-menu-mobile {
        display: block;
    }
}
/* Mostrar solo en móvil */
@media (max-width: 991px) {
    .btn-show-menu-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Ajuste en header para color blanco si es necesario */
.nav-header-fixed .menubar-inner,
.nav-header-fixed .menubar-inner::before,
.nav-header-fixed .menubar-inner::after {
    background-color: #ffffff;
}

.nav-header-fixed .btn-show-menu-mobile.active .menubar-inner::before,
.nav-header-fixed .btn-show-menu-mobile.active .menubar-inner::after {
    background-color: #ffffff;
}