/* NAVBAR BASE */
#navContainer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.navbar {
    background-color: hwb(60 56% 44% / 0.6);
    height: 65px;
}

.navbar-nav {
    width: 100vw;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

#navLinksContainer {
    display: flex;
    gap: 3rem;
    align-items: center;
}

#navIconsContainer {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* HOME LINK */
#homeLink {
    color: #867960;
    transition: all 0.3s ease-in-out;
    font-size: 1.5rem;
}

#homeLink:hover {
    text-shadow: 0px 0px 3px hsla(0, 0%, 0%, 0.6);
    transition: all 0.3s ease-in-out;
    transform: scale(1.1);
}

/* SECTIONS LINKS */
#indumentariaLink,
#zapatillasLink,
#accesoriosLink {
    transition: all 0.3s ease-in-out;
    font-size: 1.3rem;
}

#indumentariaLink:hover,
#zapatillasLink:hover,
#accesoriosLink:hover {
    color: #867960;
    text-shadow: 0px 0px 3px hsla(0, 0%, 0%, 0.6);
    transition: all 0.3s ease-in-out;
    transform: scale(0.9);
}

/* ICON LINKS */
#cartLink,
#searchLink,
#profileLink,
#loginLink,
#logoutLink,
#registerLink {
    transition: all 0.3s ease-in-out;
    font-size: 1.4rem;
}

#closeNavBtn:hover,
#cartLink:hover,
#searchLink:hover,
#profileLink:hover,
#loginLink:hover,
#logoutLink:hover,
#registerLink:hover {
    transition: all 0.3s ease-in-out;
    transform: scale(1.2);
}

/* SEARCH BAR ANIMATIONS */
.fade-in {
    animation: fadeIn 0.3s ease-in-out forwards;
}

.fade-out {
    animation: fadeOut 0.3s ease-in-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

/* ANIMACIONES DE SLIDE PERSONALIZADAS */
.slide-in-up {
    animation: slideInUp 0.4s ease forwards;
}

.slide-out-up {
    animation: slideOutUp 0.4s ease forwards;
}

.slide-in-down {
    animation: slideInDown 0.4s ease forwards;
}

.slide-out-down {
    animation: slideOutDown 0.4s ease forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-30px);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(30px);
    }
}

/* SEARCH INPUT STYLE */
#searchInputContainer {
    align-items: center;
    justify-content: center;
    padding-left: 1rem;
    width: 100%;
    max-width: 400px;
    position: relative;
}

#searchInput {
    width: 100%;
    padding: 0.45rem 1rem;
    font-size: 1rem;
    border: 2px solid #867960;
    border-radius: 10px;
    outline: none;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease-in-out;
    color: #333;
}

.bi-x-lg {
    color: red;
}

#searchInput::placeholder {
    color: #a39484;
    font-style: italic;
}

#searchInput:focus {
    box-shadow: 0 0 10px 1px #867960;
    border-color: #867960;
}

/* Ocultar botón de cerrar menú en desktop */
#closeNavBtn {
    display: none;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .navbar-collapse {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100vw;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.95);
        padding: 2rem;
        transition: left 0.4s ease-in-out;
        display: flex !important;
        flex-direction: column;
        justify-content: start;
        align-items: start;
    }

    /* Cuando el navbar está abierto */
    .navbar-collapse.show {
        left: 0;
    }

    #navLinksContainer {
        width: 100%;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1.5rem;
        margin-top: 3rem;
    }

    #navIconsContainer {
        width: 100%;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    #closeNavBtn,
    #homeLink,
    #indumentariaLink,
    #zapatillasLink,
    #accesoriosLink,
    #searchLink,
    #loginLink,
    #registerLink,
    #logoutLink,
    #profileLink,
    #cartLink {
        font-size: 1.4rem;
    }

    /* Ocultar branding duplicado */
    .navbar-brand {
        display: inline-block !important;
        font-size: 1.5rem;
        color: #867960;
    }

    /* Estilos para el input de búsqueda en mobile */
    #searchInputContainer {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin-top: 1rem;
    }

    #searchInput {
        width: 80%;
    }

    #closeNavBtn {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
        z-index: 999;
    }
}