#sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-all);

    &.open {
        opacity: 1;
        visibility: visible;
    }
}

aside {
    position: fixed;
    height: 100vh;
    left: -280px;
    top: 0;
    width: 280px;
    background-color: var(--bg-base, #ffffff);
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;

    &.open {
        transform: translateX(280px);
    }

    .aside-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 24px;
        border-bottom: 1px solid var(--bg-base-grey-dark);
        background-color: var(--bg-base-light);

        img {
            height: 30px;
            width: auto;
        }

        #close {
            font-size: 1.5rem;
            color: var(--text-grey);
            cursor: pointer;
            transition: color 0.3s ease;

            &:hover {
                color: var(--text-danger);
                transform: scale(1.1);
            }
        }
    }

    .row-asider {
        padding: 24px;
        flex: 1;
        overflow-y: auto;

        .aside-group {
            & .nav {
                display: flex;
                flex-direction: column;

                & ul {
                    display: flex;
                    flex-direction: column;
                    list-style: none;
                    gap: 10px;
                    position: relative;
                    padding: 0;
                    margin: 0;
                    width: 100%;

                    & li a {
                        display: flex;
                        align-items: center;
                        gap: 15px;
                        text-decoration: none;
                        color: var(--text-dark);
                        font-size: 17px;
                        font-weight: 400;
                        padding: 12px 15px;
                        border-radius: 8px;
                        transition: var(--transition-all);

                        i {
                            color: var(--text-grey);
                            width: 20px;
                            text-align: center;
                            font-size: 1.1rem;
                            transition: var(--transition-all);
                        }

                        &:hover {
                            background-color: var(--bg-base-grey);
                            color: var(--text-yellow);
                            transform: translateX(5px);

                            i {
                                color: var(--text-yellow);
                            }
                        }
                    }

                    & li.active a {
                        background-color: rgba(255, 199, 87, 0.15);
                        color: var(--text-yellow);
                        font-weight: 600;

                        i {
                            color: var(--text-yellow);
                        }
                    }
                }
            }
        }
    }
}

/* HEADER PRINCIPAL */
header {
    display: flex;
    width: 100%;
    z-index: 998;
    background-color: var(--bg-base);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;

    & .conteiner-header {
        display: flex;
        width: 100%;
        padding: 15px 48px;
        max-width: 1440px;
        margin: 0 auto;

        & .row-header {
            display: flex;
            justify-content: space-between;
            width: 100%;
            align-items: center;

            & .logo {
                display: flex;
                width: 22%;
                min-width: 150px;
                align-items: center;
                gap: 20px;

                & #bar {
                    display: none;
                    font-size: 24px;
                    color: var(--text-dark);
                    transition: color 0.3s;

                    &:hover {
                        color: var(--text-yellow);
                    }
                }

                & img {
                    width: auto;
                    height: 40px;
                }
            }

            & .nav {
                display: flex;
                justify-content: center;
                flex: 1;
                min-width: 0;

                & ul {
                    display: flex;
                    list-style: none;
                    gap: clamp(14px, 2.2vw, 35px);
                    position: relative;
                    padding: 0;
                    margin: 0;
                    align-items: center;
                    flex-wrap: nowrap;
                    white-space: nowrap;

                    &>li>a {
                        position: relative;
                        text-decoration: none;
                        color: var(--text-dark);
                        font-size: clamp(15px, 1.3vw, 18px);
                        font-weight: 450;
                        padding: 10px 0;
                        transition: color 0.3s;
                        display: flex;
                        align-items: center;

                        button {
                            padding: 0;
                            font-size: inherit;
                            font-family: inherit;
                            font-weight: inherit;
                            color: inherit;
                            background: transparent;
                            border: none;
                            cursor: pointer;
                            white-space: nowrap;
                        }
                    }

                    &>li>a::before {
                        content: "";
                        position: absolute;
                        width: 100%;
                        height: 3px;
                        background-color: var(--text-yellow);
                        left: 0;
                        bottom: 0px;
                        transform: scaleX(0);
                        transition: transform 0.3s ease;
                    }

                    &>li:hover>a {
                        color: var(--text-yellow);
                    }

                    &>li:hover>a::before {
                        transform: scaleX(1);
                    }

                    & .dropdown {
                        position: relative;

                        & .dropdown-menu {
                            list-style: none;
                            opacity: 0;
                            visibility: hidden;
                            transform: translateY(15px);
                            position: absolute;
                            top: 100%;
                            left: 50%;
                            margin-left: -100px;
                            flex-direction: column;
                            padding: 8px !important;
                            gap: 2px !important;
                            min-width: 200px;
                            background-color: var(--bg-base-light, #fff);
                            border-radius: 12px;
                            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
                            border: 1px solid var(--bg-base-grey-dark);
                            transition: all 0.3s ease;
                            z-index: 100;

                            &::before {
                                content: '';
                                position: absolute;
                                top: -20px;
                                left: 0;
                                width: 100%;
                                height: 20px;
                                background: transparent;
                            }

                            & li {
                                padding: 0;
                                text-align: left;
                                width: 100%;

                                & a {
                                    display: block;
                                    padding: 8px 15px !important;
                                    border-radius: 6px;
                                    text-decoration: none;
                                    color: var(--text-dark);
                                    font-size: 16px;
                                    font-weight: 400;
                                    transition: all 0.2s ease;

                                    &::before {
                                        display: none !important;
                                    }

                                    &:hover {
                                        background-color: var(--bg-base-grey);
                                        color: var(--text-yellow);
                                        padding-left: 20px !important;
                                    }
                                }
                            }
                        }

                        &:hover .dropdown-menu {
                            opacity: 1;
                            visibility: visible;
                            transform: translateY(0);
                            display: flex;
                        }
                    }
                }
            }

            & .account {
                display: flex;
                gap: clamp(12px, 1.8vw, 25px);
                justify-content: flex-end;
                width: 22%;
                min-width: 120px;
                align-items: center;

                & .basket {
                    & a {
                        position: relative;
                        color: var(--text-dark);
                        text-decoration: none;
                        display: flex;
                        align-items: center;
                        transition: transform 0.2s ease;

                        &:hover {
                            transform: scale(1.1);
                        }

                        & span {
                            position: absolute;
                            top: -5px;
                            right: -8px;
                            z-index: 2;
                            background-color: var(--bg-base-yellow);
                            font-size: 12px;
                            border-radius: 50px;
                            min-width: 20px;
                            height: 20px;
                            display: flex;
                            align-items: center;
                            justify-content: center;
                            color: var(--text-dark);
                            font-weight: bold;
                            border: 2px solid var(--bg-base, #fff);
                        }

                        & h3 {
                            font-size: 26px;
                            margin: 0;
                        }
                    }
                }

                & .perfil {
                    display: flex;
                    gap: 5px;
                    align-items: center;

                    & .perfil-config {
                        position: relative;

                        & .perfil-group {
                            display: flex;
                            align-items: center;
                            gap: 8px;
                            cursor: pointer;

                            & .perfil-img {
                                width: 45px;
                                height: 45px;
                                border-radius: 50%;
                                border: 2px solid var(--bg-base-grey-dark);
                                object-fit: cover;
                                padding: 2px;
                                transition: border-color 0.3s ease;
                            }

                            &:hover .perfil-img {
                                border-color: var(--text-yellow);
                            }
                        }

                        & .dropdown-perfil {
                            opacity: 0;
                            visibility: hidden;
                            transform: translateY(15px);
                            display: flex;
                            flex-direction: column;
                            position: absolute;
                            top: 100%;
                            right: 0;
                            width: 220px;
                            background-color: var(--bg-base-light, #fff);
                            padding: 8px !important;
                            gap: 2px !important;
                            border-radius: 12px;
                            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
                            border: 1px solid var(--bg-base-grey-dark);
                            z-index: 100;
                            transition: all 0.3s ease;

                            &::before {
                                content: '';
                                position: absolute;
                                top: -20px;
                                left: 0;
                                width: 100%;
                                height: 20px;
                                background: transparent;
                            }

                            & a {
                                text-decoration: none;
                                width: 100%;

                                & button {
                                    display: flex;
                                    align-items: center;
                                    gap: 12px;
                                    width: 100%;
                                    padding: 10px 12px;
                                    border-radius: 6px;
                                    font-size: 16px;
                                    font-weight: 500;
                                    color: var(--text-dark);
                                    transition: var(--transition-all);
                                    background: transparent;

                                    & i {
                                        width: 20px;
                                        text-align: center;
                                        color: var(--text-dark);
                                        transition: var(--transition-all);
                                    }
                                }

                                &:hover button {
                                    background-color: var(--bg-base-grey);
                                    color: var(--text-yellow);
                                    transform: translateX(5px);

                                    & i {
                                        color: var(--text-yellow);
                                    }
                                }
                            }
                        }

                        &:hover .dropdown-perfil {
                            opacity: 1;
                            visibility: visible;
                            transform: translateY(0);
                        }

                        & .login {
                            background-color: var(--color-bg-btn-dark);
                            color: var(--text-light);
                            padding: 10px 24px;
                            border-radius: 8px;
                            transition: var(--transition-all);
                            font-size: 16px;
                            font-weight: 600;

                            &:hover {
                                background-color: var(--bg-base-yellow);
                                color: var(--text-dark);
                            }
                        }
                    }
                }
            }
        }
    }
}

/* RESPONSIVIDADE */
@media (max-width: 1200px) {
    header {
        & .conteiner-header {
            padding: 15px 28px;

            & .row-header {
                & .logo {
                    width: auto;
                    min-width: 135px;

                    & img {
                        height: 36px;
                    }
                }

                & .nav {
                    & ul {
                        gap: 16px;

                        &>li>a {
                            font-size: 15px;
                        }
                    }
                }

                & .account {
                    width: auto;
                    min-width: 110px;
                    gap: 14px;
                }
            }
        }
    }
}

/* A partir daqui vira mobile */
@media (max-width: 1100px) {
    header {
        & .conteiner-header {
            padding: 15px 24px !important;

            & .row-header {
                display: flex;
                justify-content: space-between;
                align-items: center;

                & .logo {
                    width: auto !important;
                    min-width: initial !important;
                    flex: 0 0 auto;
                    gap: 16px;

                    & #bar {
                        display: flex !important;
                        align-items: center;
                        justify-content: center;
                        cursor: pointer;
                    }

                    & img {
                        height: 32px !important;
                    }
                }

                & > .nav {
                    display: none !important;
                }

                & .account {
                    width: auto !important;
                    min-width: initial !important;
                    flex: 0 0 auto;
                    gap: 14px;

                    & .basket {
                        & a {
                            & h3 {
                                font-size: 22px;
                            }

                            & span {
                                min-width: 18px;
                                height: 18px;
                                font-size: 11px;
                            }
                        }
                    }

                    & .perfil {
                        & .perfil-config {
                            & .perfil-group {
                                gap: 6px;

                                & .perfil-img {
                                    width: 40px;
                                    height: 40px;
                                }
                            }

                            & .login {
                                padding: 8px 16px;
                                font-size: 14px;
                            }
                        }
                    }
                }
            }
        }
    }
}

@media (max-width: 520px) {
    header {
        & .conteiner-header {
            padding: 12px 18px !important;

            & .row-header {
                & .logo {
                    gap: 12px;

                    & #bar {
                        font-size: 22px;
                    }

                    & img {
                        height: 29px !important;
                    }
                }

                & .account {
                    gap: 10px;

                    & .basket {
                        & a {
                            & h3 {
                                font-size: 21px;
                            }

                            & span {
                                top: -6px;
                                right: -7px;
                                min-width: 17px;
                                height: 17px;
                                font-size: 10px;
                            }
                        }
                    }

                    & .perfil {
                        & .perfil-config {
                            & .perfil-group {
                                & i {
                                    display: none;
                                }

                                & .perfil-img {
                                    width: 38px;
                                    height: 38px;
                                }
                            }

                            & .dropdown-perfil {
                                right: -8px;
                                width: 210px;
                            }

                            & .login {
                                padding: 8px 14px;
                                font-size: 14px;
                            }
                        }
                    }
                }
            }
        }
    }
}

@media (max-width: 420px) {
    header {
        & .conteiner-header {
            padding: 12px 14px !important;

            & .row-header {
                & .logo {
                    gap: 10px;

                    & img {
                        height: 27px !important;
                    }
                }

                & .account {
                    gap: 8px;
                }
            }
        }
    }

    aside {
        width: 260px;
        left: -260px;

        &.open {
            transform: translateX(260px);
        }
    }
}