/**
 * Rodapé da loja — layout único (referência: https://stelc.site/)
 * Usar com site-store-chrome.css (cores/tipografia) em todas as páginas.
 */

/* Fundo igual ao da logo (desktop + mobile) */
body.has-site-store-footer .footer,
body.has-site-store-footer > #siteFooter.footer,
body.has-site-store-footer > footer.footer#siteFooter,
body.has-site-store-footer > footer.footer,
#siteFooter.footer,
footer.footer#siteFooter {
    background: var(--site-footer-bg, var(--site-header-bg, #1e3370)) !important;
}

/* Full width: filho direto do body ocupa 100% da viewport */
body.has-site-store-footer {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

body.has-site-store-footer > #siteFooter.footer,
body.has-site-store-footer > footer.footer#siteFooter,
body.has-site-store-footer > footer.footer {
    width: 100%;
    max-width: 100%;
    align-self: stretch;
    flex: 0 0 auto;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
}

/* Páginas de login/cadastro: body com align-items:center quebrava a largura do rodapé */
body.has-site-store-footer.store-footer-auth-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: stretch !important;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
}

body.has-site-store-footer.store-footer-auth-page {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.has-site-store-footer.store-footer-auth-page > #siteFooter.footer,
body.has-site-store-footer.store-footer-auth-page > footer.footer#siteFooter,
body.has-site-store-footer.store-footer-auth-page > footer.footer {
    margin-top: auto;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
}

/* Formulário centralizado; rodapé continua full width */
body.has-site-store-footer.store-footer-auth-page > .wrapper {
    align-self: center;
    width: 100%;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
}

@media (max-width: 500px) {
    body.has-site-store-footer.store-footer-auth-page > .wrapper {
        justify-content: flex-start;
        padding-top: 0.5rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

body.has-site-store-footer .footer {
    width: 100%;
    max-width: 100%;
    margin-top: 2rem;
    flex-shrink: 0;
    box-sizing: border-box;
}

body.has-site-header-shell.catalog-page .footer {
    margin-top: 1.5rem;
}

/* Isola o rodapé de estilos locais (ex.: sobrenos .contact-card) */
body.has-site-store-footer .footer .contact-card.contact-card--reclame {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    transform: none !important;
    box-shadow: none !important;
}

body.has-site-store-footer .footer .contact-card.contact-card--reclame:hover {
    transform: none !important;
    border: none !important;
}

body.has-site-store-footer .footer .contact-ra-label {
    color: rgba(255, 255, 255, 0.75) !important;
}

body.has-site-store-footer .footer .contact-card-ra-link:hover .contact-ra-label {
    color: #F0E000 !important;
}

/* Mobile — espelha home-mobile-fluid.css (body.home-page) */
@media (max-width: 768px) {
    body.home-page .footer,
    body.has-site-store-footer .footer {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    body.home-page .footer-main,
    body.has-site-store-footer .footer-main {
        flex-direction: column;
        align-items: center;
        gap: 0.85rem;
        padding: 1.1rem 0 1.25rem;
    }

    body.home-page .footer-logo-img,
    body.has-site-store-footer .footer-logo-img {
        height: 52px;
    }

    body.home-page .footer-contact,
    body.has-site-store-footer .footer-contact {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.65rem;
        width: 100%;
        max-width: 320px;
        text-align: center;
    }

    body.home-page .footer-social,
    body.has-site-store-footer .footer-social {
        justify-content: center;
        gap: 0.85rem;
        width: 100%;
    }

    body.home-page .footer-hsep,
    body.has-site-store-footer .footer-hsep {
        display: none;
    }

    body.home-page .footer-vdivider,
    body.has-site-store-footer .footer-vdivider {
        display: block;
        width: 1px;
        height: 28px;
        background: rgba(240, 224, 0, 0.35);
        margin: 0.2rem 0;
        flex-shrink: 0;
    }

    body.home-page .footer-phone,
    body.has-site-store-footer .footer-phone {
        justify-content: center;
        font-size: 0.82rem;
    }

    body.home-page .footer-address,
    body.has-site-store-footer .footer-address {
        justify-content: center;
        align-items: flex-start;
        text-align: center;
        font-size: 0.8rem;
        line-height: 1.45;
        max-width: 300px;
    }

    body.home-page .footer-address span,
    body.has-site-store-footer .footer-address span {
        display: inline;
        text-align: center;
    }

    body.home-page .footer-links,
    body.has-site-store-footer .footer-links {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }

    body.home-page .footer-links-col,
    body.has-site-store-footer .footer-links-col {
        align-items: center;
    }

    body.home-page .footer-bottom,
    body.has-site-store-footer .footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: 0.45rem;
        padding: 0.85rem 3.75rem 1.1rem 0.75rem;
        text-align: center;
    }

    body.home-page .footer-bottom-text,
    body.has-site-store-footer .footer-bottom-text {
        white-space: normal;
        line-height: 1.45;
        max-width: 100%;
        font-size: 0.72rem;
    }

    body.home-page .footer-dev,
    body.has-site-store-footer .footer-dev {
        font-size: 0.72rem;
        line-height: 1.45;
    }
}
