* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


header.nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fdfdfb;
    border-bottom: 2px solid rgba(0,0,0,.08);
    padding: 1rem 5rem;
}
/* BOTONES */

.nav-button {

    font-size: small;

    background: var(--bg-main);

    border: 1px solid rgba(0,0,0,.05);

    border-radius: 999px;

    padding: .5rem 1.5rem;

    box-shadow: var(--shadow-soft);

    transition: .3s;
}

.nav-button-green {
    background:var(--primary);
    color: var(--bg-main);
}

.nav-button:hover{
    background: var(--primary-soft-dark);
    box-shadow: var(--shadow-hover);
}

.nav-button-green:hover{
    background: var(--primary-dark);
    box-shadow: var(--shadow-hover);
}

.dashboard {
    background: blue;
    border: solid 1px white;
    color: var(--bg-main);
}

.dashboard:hover {
    background: rgb(11, 11, 137);
    color: var(--bg-main);
}

/* LOGO */
@import url('https://fonts.googleapis.com/css2?family=Fjalla+One&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

.nav-logo {
    color: var(--primary);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-right: 2rem;

    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal; 
}

/* PADRE NAVEGADOR */
.nav {
    /* Ocupa todo el espacio libre */
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* NAV LINKS */
.nav-list {
    /* Ocupa todo el espacio libre (salvo el mínimo por los actions) */
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    gap: 4rem;
}


/* TEST TRANSITION NAV */
.nav-link a {
    position: relative;
    text-decoration: none;
    padding-bottom: .25rem;
    transition: color .3s ease;
}

.nav-active {
    color: var(--primary);
    font-size: medium;
    font-weight: bold;
}
/* END TRANSITION NAV */

/* Alineamos los li */
.nav-list li {
    display: flex;
    align-items: center;
    color: inherit;
    font-size: small;
    /* font-weight: 500; */
}

.nav-list li a {
    text-decoration: none;
}

.nav-link:hover {
    color: var(--primary-dark);
}

/* ACCIONES DERECHA */

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Imagen cart */
.cart-icon {
    max-width: 2rem;
    transition: transform 0.3s ease;
}

.cart-icon:hover {
    transform: scale(1.1);
    border-radius: 50%;
    box-shadow: 0 0 5px yellowgreen;
}


/* Alinear imagen y conteo de productos  */
.nav-cart {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
}


/* Abrir menú oculto en pc */

.abrir-menu,
.cerrar-menu {
    display: none;
}

/* USERNAME */

.nav-user {
    color: var(--primary-dark);
    font-style: italic;
}

@media screen and (max-width: 1060px) {

    header {
        text-align: center;
    }

    /* mostramos bototnes de abrir y cerrar menú */
    .abrir-menu,
    .cerrar-menu {
        display: block;
        border: 0;
        background-color: transparent;
        cursor: pointer;
    }

    /* Nuevo nav */
    .nav {
        z-index: 10000;
        /* Esto es lo que muestra o oculta el nuevo nav */
        opacity: 0;
        /* no usamos hidden para que cuando se esconda lo haga con transición y no de golpe */
        visibility: hidden;
        pointer-events: none;

        position: fixed;
        inset: 0;

        background: rgba(0,0,0,.5);

        display: flex;
        flex-direction: column;
        align-items: end;
        justify-content: flex-start;

        padding: 2rem;

        transform: none;
        transition: opacity .3s ease;
    }

    .nav::before {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;

        width: 200px;
        max-width: 85vw;

        background: #1c1c1c;
        z-index: -1;

        transform: translateX(100%);
        transition: transform .3s ease;
    }

    .nav.visible {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav.visible::before {
        transform: translateX(0);
    }

    /* bloquear el scroll cuando se abra el menú */
    body.bloquear-scroll {
        overflow: hidden;
        touch-action: none;
    }

    .nav-list {
        flex: unset;
        flex-direction: column;
        align-items: end;
        gap: 2rem;
    }

    .nav-actions {
        flex-direction: column;
        align-items: end;
        gap: 1rem;
    }

    .nav-list .nav-link {
        color: #ececec;
    }

    /* Sobreescribir los botones de acciones */
    .nav-button {
        background: transparent;
        color: var(--primary-dark) !important;
        border: solid 1px var(--primary-dark);
    }

    /* icono hamburguesa */
    .icono {
        max-width: 1.25rem;
    }


    span#cart-count {
        color: white;
    }

    .nav-list li {
        font-weight: 100;
    }

}