
/* Nav */

.menu-bz {
    list-style: none;
    display: flex;
    gap: 40px;
}

.menu-item {
    position: relative;
}

.menu-item::after {
    content: "";
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    height: 12px;
    background: transparent;
}

.has-mega {
    padding-bottom: 12px;
}

.menu-item > a {
    color: black;
    text-decoration: none;
    /* font-weight: 600; */
}

/* Mega Menu */ 
.mega-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100vw;
    background: white;

    display: flex;
    justify-content: center; /* opcional */
    padding: 40px;
    gap: 60px;
    
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    
    transition-delay: 0s;
    transform: translateY(-12px);

    transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);

    z-index: 1000;
}

/* Mostrar Menu */
.has-mega:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.menu-item:hover > a,
.mega-menu:hover ~ a,
.card:hover, .mega-left a:hover,
.user-dropdown a:hover {
    color: #6c7ae0;
}

/* Columna Izquierda */
.mega-left {
    display: flex;

    flex-direction: column;
    gap: 15px;
}


.mega-left a {
    text-decoration: none;
    color: black;
    font-weight: 600;
}

/* Columna Derecha GRID de Imagenes */
.mega-right {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.card {
    text-align: center;
    border: none;
    cursor: pointer;
}

.card img {
    width: 180px; /* ajustar el tamaño para mejor UX */
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 5px;
    transition: transform 0.4s ease;
}

.card:hover img {
    transform: scale(1.1);
}

.card span {
    display: block;
    margin-top: 10px;
    font-weight: 600;
}


/* Menu Hamburguesa */
.tienda-bz {
    display: flex;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: #000;
    border: 1px solid #000;
    width: 150px;
    height: 50px;
    padding: 5px;
    transition: transform  0.4s ease;
    
}
.tienda-bz:hover {
    transform: scale(1.1);
}

/*
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 1;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}     
*/

/* ----------- MENU MOBILE ------------------ */

.drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 340px;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    transform: translateX(-100%);
    transition: .35s cubic-bezier(.25, .8, .25, 1);
    display: flex;
    flex-direction: column;
    overflow: auto;
    box-shadow: 10px 0 35px rgba(0, 0, 0, .18);
}
.drawer.open {
    transform: translateX(0);
}

/* Overlay */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    visibility: hidden;
    transition: .35s;
    z-index: 9998;
}
.drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Header */
.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 1px solid #ececec;
}
.drawer-header img {
    
    /* width: 140px; */
    width: 45px;
}

.drawer-close {
    border: none;
    background: none;
    font-size: 32px;
    cursor: pointer;
}

/* Buscador */
.drawer-search {
    padding: 20px;
}
.drawer-search input {
    width: 100%;
    padding: 14px 18px;
    border-radius: 30px;
    border: 1px solid #ddd;
    outline: none;
    font-size: 15px;
}
.drawer-search input:focus {
    border-color: #6c7ae0;
}

/* Categorias */
.drawer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}
.drawer-menu li {
    border-bottom: 1px solid #f1f1f1;
}
.drawer-menu a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 30px;
    text-decoration: none;
    color: #222;
    font-size: 17px;
    transition: .25s;
}
.drawer-menu a:hover {
    background: #fafafa;
    color: #6c7ae0;
}

/* Links Secundarios*/
.drawer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.drawer-links li {
    border-bottom: 1px solid #f3f3f3;
}
.drawer-links a {
    display: block;
    padding: 10px 30px;
    color: #444;
    text-decoration: none;
}
.drawer-links a:hover {
    color: #6c7ae0;
}

/* Cuenta */
.drawer-account {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 25px;
    text-decoration: none;
    color: #111;
    font-weight: 500;
}
.d-links {
    border: 1px solid #111;
    padding: 5px;
    width: 150px;
    text-align: center;
}
.d-links:hover{
    background: #000;
    color: #fff !important;
}

.d-links a{
    color: #000;
}
.d-links a:hover{
    color: #fff;
}

.drawer-account i {
    font-size: 34px;
}
.drawer-account:hover {
    color: #6c7ae0;
}

@media(min-width:1024px) {
    .drawer,
    .drawer-overlay {
        display: none;
    }

    .menu-mobile {
        display: none !important;
    }
}

.drawer-toggle {
    border: none;
    background: none;
    font-size: 34px;
    cursor: pointer;
}

/* SubMenu */
.drawer-submenu {
    position: absolute;
    top: 0;
    left: 100%;
    width: 100%;
    height: 100%;
    background: white;
    transition: .35s;
    overflow: auto;
}
.drawer-submenu.open {
    left: 0;
}

/* SubMenu Header */
.drawer-submenu-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 25px;
    border-bottom: 1px solid #eee;
}

.drawer-back {
    border: none;
    background: none;
    font-size: 24px;
    cursor: pointer;
}

.drawer-title {
    font-size: 18px;
    font-weight: bold;
}

/* Contenido */
.drawer-content {
    padding: 20px;
}
.drawer-content h4 {
    margin: 25px 0 15px;
    font-size: 15px;
    color: #999;
    text-transform: uppercase;
}
.drawer-content a {
    display: block;
    padding: 12px 0;
    color: #222;
    text-decoration: none;
}
.drawer-content a:hover {
    color: #6c7ae0;
}


/* -----------FIN MENU MOBILE --------------- */

/* tablat */
@media (max-width: 1024px) {
    .barnav {
        position: sticky;
        top: 0;
        z-index: 2000;
    }

    .hamburger {
        display: flex;
    }

    .menu-bz {
        display: none;
        flex-direction: column;
        background: black;
    }

    .menu.open {
        display: flex;
    }

}


/* mobile */
@media (max-width: 1024px) {
    .barnav {
        padding: 15px;
    }

    .menu-bz {
        flex-direction: column;
        gap: 0;
    }

    .menu-item {
        border-bottom: 1px solid #333;
    }

    .menu-item::after {
        display: none; /* desactivamos el puente */
    }

    .menu-item > a {
        display: block;
        padding: 15px;
    }

    /* Mega Menu Mobile */
    .mega-menu {
        position: static;
        width: 100%;
        padding: 20px;
        gap: 30px;

        transform: none;
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        visibility: hidden;
        pointer-events: none;

        transition: max-height 0.3s ease, opacity 0.3s ease;
        
    }
    /* Cuando este abierto */
    .mega-menu.open {
        opacity: 1;
        max-height: 2000px;
        visibility: visible;
        pointer-events: auto;
    }

    /* Columnas */
    .mega-menu {
        flex-direction: column;
    }

    /* Oculta el menu derecho (imagenes) en movil */
    .mega-right {
        display: none;
    }

    .card img {
        height: 220px;
    }

}

@media (max-width: 720px) {
    /* 1fr para que solo aparezca una imagen y las demas en cascada */
    .mega-right {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
  .mega-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  }

  .mega-menu.open {
    max-height: 2000px;
  }
}


/* User Menu Dropdown */
.user-menu {
    position: relative;
}

/* Boton como icono */
.user-btn {
    background: none;
    border: none;
    cursor: pointer;
}

/* Dropdown */
.user-dropdown {
    position: absolute;
    top: 120%;
    right: 0;
    background: white;
    min-width: 100%;
    min-height: 100%;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .15);

    transition: opacity .2s ease, transform .25s ease;
}


/* Links */
.user-dropdown a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #111;
}

.user-btn:focus-visible {
    outline: 2px solid aqua;
}


.user-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    pointer-events: none;
    transition: .25s ease;
}

.user-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}


