/* =============================================================================
   FOOTER STYLES — Fixar Suprimentos design system
   Appended to fixar-design.css via fixar-enqueue.php
   ============================================================================= */

/* ---------- Page shell ---------- */
#fx-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#fx-shell > main,
#fx-shell > .site-main,
body > main {
    flex: 1 0 auto;
}

/* ---------- Footer base ---------- */
.fx-footer {
    background: var(--fx-navy);
    color: var(--fx-white);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* ---------- Newsletter band ---------- */
.fx-footer-newsletter-band {
    background: var(--fx-orange);
    padding: 1.5rem 0;
}

.fx-footer-newsletter-inner {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.fx-footer-nl-copy {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1 1 260px;
    color: var(--fx-white);
}

.fx-footer-nl-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.fx-footer-nl-copy strong {
    display: block;
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--fx-white);
}

.fx-footer-nl-copy span {
    display: block;
    font-size: 0.8125rem;
    opacity: 0.9;
}

.fx-footer-nl-form {
    display: flex;
    gap: 0.5rem;
    flex: 1 1 320px;
    max-width: 480px;
}

.fx-footer-nl-input {
    flex: 1;
    padding: 0.625rem 1rem;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: var(--fx-radius);
    background: rgba(255,255,255,0.15);
    color: var(--fx-white);
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
}

.fx-footer-nl-input::placeholder {
    color: rgba(255,255,255,0.7);
}

.fx-footer-nl-input:focus {
    border-color: var(--fx-white);
    background: rgba(255,255,255,0.25);
}

.fx-footer-nl-btn {
    background: var(--fx-white) !important;
    color: var(--fx-orange) !important;
    font-weight: 700;
    white-space: nowrap;
    border: 2px solid var(--fx-white);
    padding: 0.625rem 1.25rem;
    border-radius: var(--fx-radius);
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.2s, color 0.2s;
}

.fx-footer-nl-btn:hover,
.fx-footer-nl-btn:focus {
    background: var(--fx-navy) !important;
    color: var(--fx-white) !important;
    border-color: var(--fx-navy);
}

/* ---------- Main footer grid ---------- */
.fx-footer-main {
    padding: 3rem 0 2rem;
}

.fx-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 2.5rem;
}

/* ---------- Col 1: Brand ---------- */
.fx-footer-brand {
    display: inline-block;
    margin-bottom: 0.875rem;
    text-decoration: none;
}

.fx-footer-brand img {
    max-height: 44px;
    width: auto;
    filter: brightness(0) invert(1);
}

.fx-footer-brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--fx-white);
}

.fx-footer-tagline {
    color: rgba(255,255,255,0.65);
    font-size: 0.8125rem;
    margin: 0 0 1.25rem;
    max-width: 260px;
}

.fx-footer-contact {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.fx-footer-contact-link,
.fx-footer-hours {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.fx-footer-contact-link:hover {
    color: var(--fx-orange);
}

.fx-footer-hours {
    cursor: default;
}

/* Social icons */
.fx-footer-social {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.fx-footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: var(--fx-white);
    text-decoration: none;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.fx-footer-social-link:hover {
    background: var(--fx-orange);
    transform: translateY(-2px);
}

/* ---------- Col 2 & 3: Links ---------- */
.fx-footer-heading {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fx-orange);
    margin: 0 0 1.125rem;
}

.fx-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.fx-footer-links a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s, padding-left 0.2s;
    display: block;
}

.fx-footer-links a:hover {
    color: var(--fx-white);
    padding-left: 4px;
}

/* ---------- Col 4: Trust + payments ---------- */
.fx-footer-trust-badges {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.fx-footer-trust-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: rgba(255,255,255,0.8);
    font-size: 0.8125rem;
}

.fx-footer-trust-item svg {
    flex-shrink: 0;
    color: var(--fx-orange);
}

.fx-footer-payments {}

.fx-footer-pay-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: rgba(255,255,255,0.5);
    margin: 0 0 0.625rem;
}

.fx-footer-pay-icons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.fx-pay-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--fx-white);
    border-radius: 4px;
    padding: 2px 6px;
    min-width: 46px;
    height: 28px;
}

.fx-pay-badge svg {
    width: 36px;
    height: 18px;
}

.fx-pay-pix {
    font-size: 0.75rem;
    font-weight: 800;
    color: #32bcad;
    letter-spacing: 0.05em;
}

.fx-pay-boleto svg {
    color: var(--fx-navy);
}

.fx-footer-parcelamento {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    margin: 0;
}

/* ---------- Bottom bar ---------- */
.fx-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1rem 0;
    font-size: 0.8125rem;
}

.fx-footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

.fx-footer-copy {
    margin: 0;
    color: rgba(255,255,255,0.55);
}

.fx-footer-copy a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
}

.fx-footer-copy a:hover {
    color: var(--fx-orange);
}

.fx-footer-cnpj {
    margin: 0;
    color: rgba(255,255,255,0.4);
}

.fx-footer-legal {
    display: flex;
    gap: 1rem;
}

.fx-footer-legal a {
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    transition: color 0.2s;
}

.fx-footer-legal a:hover {
    color: var(--fx-orange);
}

/* =============================================================================
   RESPONSIVE — Footer
   ============================================================================= */
@media (max-width: 1023px) {
    .fx-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 639px) {
    .fx-footer-newsletter-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .fx-footer-nl-form {
        width: 100%;
        max-width: none;
        flex-direction: column;
    }

    .fx-footer-nl-btn {
        width: 100%;
        text-align: center;
    }

    .fx-footer-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .fx-footer-col-brand {
        order: 1;
    }

    .fx-footer-col-cats {
        order: 2;
    }

    .fx-footer-col-inst {
        order: 3;
    }

    .fx-footer-col-trust {
        order: 4;
    }

    .fx-footer-bottom-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.375rem;
    }
}


/* =============================================================================
   CORRECAO — LAYOUT DO FOOTER
   O fixar-design.css foi escrito para um markup antigo em que .fx-footer-main
   era o proprio grid de colunas e .fx-footer-bottom a propria linha flex.
   No markup atual os dois tem UM unico filho (.fx-container), entao o
   grid-template-columns: 1.4fr 1fr 1fr 1.2fr espremia todo o rodape na
   primeira coluna (~29% da largura) e deixava 3 colunas vazias.
   O grid real e .fx-footer-grid e a linha real e .fx-footer-bottom-inner,
   ambos definidos acima. Aqui apenas neutralizamos o layout obsoleto.
   ============================================================================= */

.fx-footer-main {
    display: block;
    grid-template-columns: none;
    gap: 0;
}

.fx-footer-bottom {
    display: block;
}


/* =============================================================================
   FOOTER NO CELULAR — REDUCAO DE ALTURA
   Medido em 375x812: o rodape tinha 1250px, ou seja, uma tela e meia so de
   rodape. Os quatro blocos ficavam empilhados em coluna unica (263 + 253 +
   225 + 240) com 28px de respiro entre eles e 80px de padding.
   Aqui "Categorias" e "A Empresa" passam a dividir a mesma linha — sao duas
   listas curtas de links, cabem lado a lado — e todos os respiros verticais
   foram recalibrados. Nenhum link foi escondido.
   ============================================================================= */

@media (max-width: 767px) {

    .fx-footer-main {
        padding: 28px 0 22px;
    }

    .fx-footer-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 18px;
        row-gap: 24px;
        align-items: start;
    }

    /* Marca e "Compra Segura" ocupam a linha inteira; as duas listas de links
       dividem a linha do meio. */
    .fx-footer-col-brand,
    .fx-footer-col-trust {
        grid-column: 1 / -1;
    }

    /* ---------- coluna da marca ---------- */
    .fx-footer-brand {
        margin: 0 0 10px;
    }

    .fx-footer-brand img {
        max-height: 34px;
        width: auto;
    }

    .fx-footer-tagline {
        margin: 0 0 14px;
        max-width: 34ch;
        font-size: 0.8125rem;
        line-height: 1.45;
    }

    .fx-footer-contact {
        gap: 0.375rem;
        margin: 0 0 14px;
    }

    .fx-footer-contact-link,
    .fx-footer-hours {
        font-size: 0.8125rem;
    }

    .fx-footer-social {
        gap: 0.5rem;
    }

    .fx-footer-social-link {
        width: 32px;
        height: 32px;
    }

    /* ---------- listas de links ---------- */
    .fx-footer-heading {
        margin: 0 0 0.625rem;
        font-size: 0.72rem;
    }

    .fx-footer-links {
        gap: 0.4375rem;
    }

    .fx-footer-links a {
        font-size: 0.8125rem;
        line-height: 1.35;
    }

    /* ---------- compra segura ---------- */
    .fx-footer-trust-badges {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .fx-footer-trust-item {
        gap: 0.5rem;
        font-size: 0.78rem;
        line-height: 1.3;
        align-items: flex-start;
    }

    .fx-footer-trust-item svg {
        width: 18px;
        height: 18px;
        margin-top: 1px;
    }

    .fx-footer-payments {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem 0.75rem;
    }

    .fx-footer-pay-label {
        margin: 0;
    }

    .fx-footer-pay-icons {
        margin: 0;
    }

    .fx-footer-parcelamento {
        flex: 1 1 100%;
        margin: 0;
    }

    /* ---------- barra final ---------- */
    .fx-footer-bottom {
        padding: 0.75rem 0;
    }

    .fx-footer-bottom-inner {
        gap: 0.25rem;
    }

    .fx-footer-copy,
    .fx-footer-cnpj {
        margin: 0;
        font-size: 0.72rem;
        line-height: 1.4;
    }

    .fx-footer-legal {
        display: flex;
        gap: 1rem;
        margin-top: 0.125rem;
    }
}

/* Telas bem estreitas: as duas listas voltam a empilhar para nao quebrar
   rotulo no meio da palavra. */
@media (max-width: 359px) {
    .fx-footer-grid {
        grid-template-columns: 1fr;
    }
}
