/* ==================================================
   SAGE STORE — HEADER NOVO
   Fino, sem pílula e sem brilho. Fica por último no
   <head> pra valer por cima dos estilos antigos.
================================================== */

:root {
    --st-fundo: #07090b;
    --st-texto: #f1f5f6;
    --st-apagado: #8d9aa0;
    --st-gelo: #8fe6f1;
    --st-largo: 'Archivo', 'Inter', system-ui, sans-serif;
}

.sage-topo {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: rgba(7, 9, 11, .72);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    backdrop-filter: blur(16px) saturate(1.2);
    font-family: 'Inter', system-ui, sans-serif;
}

.topo-linha {
    max-width: 1440px;
    height: 68px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
}


/* MARCA */

.topo-marca {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--st-texto);
    text-decoration: none;
}

    .topo-marca b {
        font-family: var(--st-largo);
        font-variation-settings: "wdth" 125;
        font-stretch: 125%;
        font-weight: 900;
        font-size: 21px;
        letter-spacing: .01em;
        line-height: 1;
    }

    .topo-marca span {
        font-size: 10.5px;
        font-weight: 600;
        letter-spacing: .32em;
        color: var(--st-apagado);
    }

    .topo-logo {
        align-self: center;
        width: 40px;
        height: 40px;
        margin-right: 4px;
        border-radius: 50%;
        box-shadow: 0 0 0 1.5px rgba(143, 230, 241, .45), 0 0 18px rgba(143, 230, 241, .2);
        transition: box-shadow .3s ease, scale .3s cubic-bezier(.2, .8, .2, 1);
    }

    .topo-marca:hover .topo-logo,
    .topo-marca:focus-visible .topo-logo {
        scale: 1.06;
        box-shadow: 0 0 0 1.5px rgba(143, 230, 241, .8), 0 0 24px rgba(143, 230, 241, .35);
    }


/* MENU */

.topo-menu {
    display: flex;
    gap: 32px;
}

    .topo-menu a {
        position: relative;
        padding: 8px 0;
        color: #c3cdd1;
        font-size: 14px;
        font-weight: 500;
        text-decoration: none;
        transition: color .25s ease;
    }

        .topo-menu a::after {
            content: "";
            position: absolute;
            left: 50%;
            bottom: 0;
            width: 4px;
            height: 4px;
            border-radius: 50%;
            background: var(--st-gelo);
            transform: translateX(-50%) scale(0);
            transition: transform .3s cubic-bezier(.2, 1.4, .4, 1);
        }

        .topo-menu a:hover,
        .topo-menu a:focus-visible,
        .topo-menu a.active {
            color: var(--st-texto);
        }

            .topo-menu a.active::after {
                transform: translateX(-50%) scale(1);
            }


/* AÇÕES */

.topo-acoes {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 6px;
}

.topo-busca {
    position: relative;
    display: flex;
    align-items: center;
    width: 220px;
    height: 40px;
    padding: 0 14px 0 4px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .06);
    transition: background .25s ease, width .35s cubic-bezier(.2, .8, .2, 1);
}

    .topo-busca:focus-within {
        width: 280px;
        background: rgba(255, 255, 255, .1);
    }

    .topo-busca > button {
        width: 34px;
        height: 34px;
        flex: none;
        display: grid;
        place-items: center;
        border: 0;
        background: none;
        color: var(--st-apagado);
        font-size: 14px;
        cursor: pointer;
    }

    .topo-busca input {
        width: 100%;
        min-width: 0;
        border: 0;
        outline: 0;
        background: none;
        color: var(--st-texto);
        font: 500 13.5px 'Inter', system-ui, sans-serif;
    }

        .topo-busca input::placeholder {
            color: #6f7c82;
        }

        .topo-busca input::-webkit-search-cancel-button {
            display: none;
        }

    /* o painel de sugestões continua com o estilo do header-search.css */
    .topo-busca .header-search-panel {
        top: calc(100% + 10px);
        left: 0;
        min-width: 340px;
    }

.topo-icone {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #c3cdd1;
    font-size: 16px;
    text-decoration: none;
    transition: background .25s ease, color .25s ease;
}

    .topo-icone:hover,
    .topo-icone:focus-visible,
    .topo-icone.active {
        background: rgba(255, 255, 255, .07);
        color: var(--st-texto);
    }

.sage-topo .sage-account-entry {
    margin-left: 6px;
}

.sage-topo .login-button {
    height: 38px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: 0;
    border-radius: 19px;
    background: var(--st-texto);
    box-shadow: none;
    color: #0a0d0f;
    font: 600 13.5px 'Inter', system-ui, sans-serif;
    cursor: pointer;
    transition: background .25s ease, transform .25s ease;
}

    .sage-topo .login-button:hover,
    .sage-topo .login-button:focus-visible {
        background: #ffffff;
        transform: translateY(-1px);
    }

    .sage-topo .login-button i {
        font-size: 13px;
    }

.sage-topo .sage-account-dropdown summary {
    list-style: none;
}


/* MENU DO CELULAR */

.sage-topo .menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: none;
    box-shadow: none;
    color: var(--st-texto);
    font-size: 17px;
    cursor: pointer;
}

.sage-topo .mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    padding: 8px 20px 22px;
    background: rgba(7, 9, 11, .97);
    border: 0;
    border-radius: 0;
    box-shadow: 0 30px 50px rgba(0, 0, 0, .5);
}

    .sage-topo .mobile-menu[hidden] {
        display: none;
    }

    .sage-topo .mobile-menu a {
        padding: 14px 0;
        color: #c3cdd1;
        font-family: var(--st-largo);
        font-variation-settings: "wdth" 112;
        font-weight: 800;
        font-size: 20px;
        text-transform: uppercase;
        text-decoration: none;
        border: 0;
    }

        .sage-topo .mobile-menu a.active {
            color: var(--st-texto);
        }


@media (max-width: 1100px) {
    .topo-linha {
        padding: 0 24px;
    }

    .topo-menu {
        gap: 22px;
    }

    .topo-busca,
    .topo-busca:focus-within {
        width: 40px;
        padding: 0 3px;
    }

        .topo-busca input {
            display: none;
        }

    .sage-topo.busca-aberta .topo-busca {
        position: absolute;
        left: 24px;
        right: 24px;
        width: auto;
        z-index: 2;
        padding-right: 14px;
        background: #141a1d;
    }

        .sage-topo.busca-aberta .topo-busca input {
            display: block;
        }
}

@media (max-width: 860px) {
    .topo-linha {
        grid-template-columns: auto 1fr auto;
        height: 60px;
        padding: 0 12px 0 8px;
        gap: 8px;
    }

    .sage-topo .menu-toggle {
        display: grid;
    }

    .topo-menu {
        display: none;
    }

    .topo-marca {
        justify-self: center;
    }

        .topo-marca b {
            font-size: 18px;
        }

        .topo-marca span {
            font-size: 9px;
        }

        .topo-logo {
            width: 32px;
            height: 32px;
        }

    .sage-topo .login-button {
        width: 38px;
        padding: 0;
        justify-content: center;
    }

        .sage-topo .login-button span {
            display: none;
        }

    .sage-topo.busca-aberta .topo-busca {
        left: 12px;
        right: 12px;
    }

    .topo-busca .header-search-panel {
        min-width: 0;
        right: 0;
    }
}

@media (max-width: 380px) {
    .topo-marca span {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .topo-busca,
    .topo-menu a::after,
    .sage-topo .login-button {
        transition: none;
    }
}


/* ==================================================
   HEADER 05/12: vidro que esmaece embaixo, sem faixa
   reta, com um brilho de gelo bem leve atrás da marca.
================================================== */

.sage-topo {
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    isolation: isolate;
}

    .sage-topo::before {
        content: "";
        position: absolute;
        z-index: -1;
        inset: 0 0 -34px;
        pointer-events: none;
        background:
            radial-gradient(38% 120% at 12% 0%, rgba(143, 230, 241, .09), transparent 70%),
            radial-gradient(30% 110% at 88% 0%, rgba(143, 230, 241, .05), transparent 70%),
            linear-gradient(180deg, rgba(6, 9, 11, .9) 0%, rgba(6, 9, 11, .74) 58%, rgba(6, 9, 11, 0) 100%);
        -webkit-backdrop-filter: blur(16px) saturate(1.25);
        backdrop-filter: blur(16px) saturate(1.25);
        -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
        mask-image: linear-gradient(180deg, #000 55%, transparent);
    }

/* o menu do meio vira uma pílula de vidro; o item ativo ganha um brilho */
.topo-menu {
    gap: 2px;
    padding: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .035);
    box-shadow: inset 0 12px 16px -14px rgba(220, 250, 255, .25);
}

    .topo-menu a {
        padding: 8px 16px;
        border-radius: 999px;
        transition: color .25s ease, background .35s ease;
    }

        .topo-menu a:hover,
        .topo-menu a:focus-visible {
            background: rgba(255, 255, 255, .05);
        }

        .topo-menu a.active {
            background: radial-gradient(80% 120% at 50% 100%, rgba(143, 230, 241, .2), rgba(143, 230, 241, .06) 70%);
        }

            .topo-menu a.active::after {
                bottom: 2px;
            }

/* menu do celular: o fundo também esmaece embaixo */
.sage-topo .mobile-menu {
    padding-bottom: 40px;
    background: linear-gradient(180deg, rgba(7, 9, 11, .97) 70%, rgba(7, 9, 11, 0));
    box-shadow: none;
}

@media (max-width: 1100px) {
    .topo-menu a { padding: 8px 11px; }
}


/* ==================================================
   MENU DA CONTA (Olá, fulano): as regras antigas eram
   de .site-header, que o topo novo não usa mais.
   Vidro escuro, sem fio, abre com fade.
================================================== */

.sage-topo .sage-account-entry {
    position: relative;
}

.sage-topo .sage-account-dropdown > summary {
    list-style: none;
}

    .sage-topo .sage-account-dropdown > summary::-webkit-details-marker {
        display: none;
    }

.sage-topo .sage-account-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 1100;
    min-width: 232px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border: 0;
    border-radius: 16px;
    background: rgba(13, 19, 23, .94);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    backdrop-filter: blur(18px) saturate(1.2);
    box-shadow: 0 22px 50px rgba(0, 0, 0, .55);
    animation: topo-menu-entra .22s cubic-bezier(.2, .8, .2, 1) backwards;
}

@keyframes topo-menu-entra {
    from { opacity: 0; translate: 0 -6px; }
}

.sage-topo .sage-account-menu form {
    margin: 0;
}

.sage-topo .sage-account-menu > a,
.sage-topo .sage-account-menu > form > button {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 11px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #dbe6ea;
    font: 600 13px 'Inter', system-ui, sans-serif;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

    .sage-topo .sage-account-menu > a i,
    .sage-topo .sage-account-menu > form > button i {
        width: 16px;
        text-align: center;
        color: var(--st-apagado);
        transition: color .2s ease;
    }

    .sage-topo .sage-account-menu > a:hover,
    .sage-topo .sage-account-menu > a:focus-visible,
    .sage-topo .sage-account-menu > form > button:hover,
    .sage-topo .sage-account-menu > form > button:focus-visible {
        background: rgba(255, 255, 255, .07);
        color: #fff;
        outline: none;
    }

        .sage-topo .sage-account-menu > a:hover i,
        .sage-topo .sage-account-menu > form > button:hover i {
            color: var(--st-gelo);
        }

.sage-topo .sage-account-menu .sage-admin-shortcut,
.sage-topo .sage-account-menu .sage-admin-shortcut i {
    color: var(--st-gelo);
}

@media (max-width: 860px) {
    .sage-topo .sage-account-menu {
        right: -4px;
        min-width: min(232px, calc(100vw - 24px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .sage-topo .sage-account-menu {
        animation: none;
    }
}
