header {
    &{
        background: #ffffff;
        border-bottom: 1px solid #e8e8e8;
        display: flex;
        padding: 0 5%;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        height: 60rem;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 9999;
    }
}

/* ── Logotipo ── */

#logotipo {
    &{
        display: flex;
        align-items: center;
        gap: 8rem;
        text-decoration: none;
        flex-shrink: 0;
    }
}

#logotipo #logo {
    &{
        height: 34rem;
        width: auto;
    }
}

#logotipo #tipo {
    &{
        font-family: 'Bebas Neue', sans-serif;
        font-size: 26rem;
        letter-spacing: 2rem;
        color: #111111;
        line-height: 1;
    }
}

/* ── Menu desktop ── */

#menu {
    & {
        display: flex;
        align-items: center;
        height: 100%;
    }

    .mobile & {
        display: flex;
        position: absolute;
        top: 60rem;
        left: 0;
        right: 0;
        background: #ffffff;
        border-bottom: 1px solid #e8e8e8;
        padding: 16rem 5%;
        flex-direction: column;
        z-index: 9998;
        box-shadow: 0 8rem 24rem rgba(0,0,0,0.10);

        opacity: 0;
        transform: translateY(-20rem);
        pointer-events: none;

        transition: all 0.3s ease;
    }

    .mobile &.open {
        height: auto;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
}

#menu nav {
    &{
        display: flex;
        align-items: center;
        gap: 4rem;
        height: 100%;
    }

    .mobile &{
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        width: 100%;
    }
}

#menu nav a {
    &{
        display: flex;
        align-items: center;
        height: 100%;
        padding: 0 18rem;
        font-size: 15rem;
        font-weight: 500;
        color: #333333;
        white-space: nowrap;
        transition: color .2s;
        border-bottom: 2px solid transparent;
    }

    &:hover {
        color: #111111;
        border-bottom-color: #111111;
    }

    &.ativo {
        color: #111111;
        border-bottom-color: #111111;
        font-weight: 600;
    }

    .mobile &{
        height: auto;
        padding: 14rem 0;
        font-size: 16rem;
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
        border-radius: 0;
    }

    .mobile &:last-child { border-bottom: none; }
}

/* ── Direita: cart + hamburguer ── */

#nav-direita {
    &{
        display: flex;
        align-items: center;
        gap: 16rem;
    }
}

#nav-cart {
    &{
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40rem;
        height: 40rem;
        color: #111111;
        transition: opacity .2s;
    }

    &:hover { opacity: .7; }

    & svg {
        width: 24rem;
        height: 24rem;
    }
}

#cart-badge {
    &{
        position: absolute;
        top: 2rem;
        right: 2rem;
        background: #111111;
        color: #ffffff;
        font-size: 10rem;
        font-weight: 700;
        min-width: 17rem;
        height: 17rem;
        border-radius: 100rem;
        display: none;
        align-items: center;
        justify-content: center;
        line-height: 1;
        padding: 0 4rem;
    }
}

/* ── Hamburguer ── */

#hamburguer {
    &{
        display: none;
        flex-direction: column;
        justify-content: space-between;
        width: 24rem;
        height: 18rem;
        padding: 0;
        background: none;
        transform: none;
    }

    .mobile &{
        display: flex;
    }

    &:hover { transform: none; opacity: .7; }

    & span {
        display: block;
        width: 100%;
        height: 2rem;
        background: #111111;
        border-radius: 2rem;
        transition: all .3s;
    }

    &.open span:nth-child(1) {
        transform: translateY(8rem) rotate(45deg);
    }
    &.open span:nth-child(2) {
        opacity: 0;
    }
    &.open span:nth-child(3) {
        transform: translateY(-8rem) rotate(-45deg);
    }
}
