/* Header e footer montados por CmsHeaderFooter.js, espelhando o layout "Facelift" do site da Época. */

.cms-header,
.cms-footer {
    --cms-pink: #ff5f8a;
    --cms-ink: #292929;
    --cms-muted: #656565;
    --cms-line: #efefef;
    font-family: 'Montserrat', sans-serif;
    -webkit-font-smoothing: antialiased;
}

:where(.cms-header, .cms-footer) * {
    box-sizing: border-box;
    font-family: inherit;
}

:where(.cms-header, .cms-footer) ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

:where(.cms-header, .cms-footer) a {
    text-decoration: none;
}

/* O tema define font-family em button (style.css), que venceria o :where() abaixo. */
.cms-header button,
.cms-footer button,
.cms-footer summary {
    font-family: inherit;
}

:where(.cms-header, .cms-footer) :where(button, summary) {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

:where(.cms-header, .cms-footer) :is(a, button, summary):focus-visible {
    outline: 2px solid var(--cms-pink);
    outline-offset: 2px;
}

.cms-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.cms-chevron {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

[aria-expanded='true'] > .cms-chevron {
    transform: rotate(180deg);
}

/* ---------- Header ---------- */

.cms-header {
    position: relative;
    z-index: 1000;
    background: #fff;
    color: var(--cms-ink);
    border-bottom: 1px solid var(--cms-line);
}

/* Três colunas como no site: logo à esquerda, busca centralizada na página e atalhos à direita. */
.cms-header-bar {
    display: grid;
    grid-template-columns: 1fr minmax(0, 600px) 1fr;
    align-items: center;
    gap: 16px;
    padding: 16px 32px;
}

.cms-header-hamburger {
    display: none;
}

.cms-header-logo {
    justify-self: start;
}

.cms-header-logo img {
    display: block;
    width: 207px;
    height: auto;
}

/* Busca do site: o termo vai para a página de resultados do site (/s?q=termo). */
.cms-header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 16px;
    border: 1px solid var(--cms-ink);
    border-radius: 200px;
    background: #fff;
}

.cms-header-search-submit {
    display: flex;
    flex-shrink: 0;
}

.cms-header-search-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: none;
    font-size: 16px;
    color: var(--cms-ink);
}

.cms-header-search-input::placeholder {
    color: var(--cms-muted);
}

.cms-header-search:focus-within {
    outline: 2px solid var(--cms-pink);
    outline-offset: 2px;
}

.cms-header-shortcuts {
    display: flex;
    align-items: center;
    justify-self: end;
    gap: 8px;
    flex-shrink: 0;
}

.cms-header-shortcut {
    display: flex;
}

.cms-header-shortcut img {
    display: block;
}

.cms-menu-list {
    display: flex;
    justify-content: center;
    gap: 32px;
}

.cms-menu-top {
    display: flex;
    align-items: center;
    height: 48px;
    padding: 0 8px;
    border-bottom: 1px solid transparent;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    text-transform: uppercase;
    color: var(--cms-ink);
}

.cms-menu-top[data-bold='true'] {
    font-weight: 700;
}

.cms-menu-top[aria-expanded='true'],
.cms-menu-top:hover {
    border-bottom-color: var(--cms-ink);
    color: var(--cms-ink);
}

.cms-menu-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border-top: 1px solid var(--cms-line);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

/* Grade e espaçamentos do painel de categorias do site: seis colunas por linha. */
.cms-menu-panel-inner {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 24px;
    max-width: 1920px;
    margin: 0 auto;
    padding: 32px;
}

.cms-menu-group-title {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--cms-ink);
}

.cms-menu-link {
    display: block;
    padding: 4px 0;
    font-size: 16px;
    line-height: 20px;
    color: var(--cms-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Espaçamentos só do painel do desktop; o menu lateral do mobile mantém os seus. */
.cms-menu-panel .cms-menu-group {
    display: flex;
    flex-direction: column;
    row-gap: 16px;
}

.cms-menu-panel .cms-menu-links {
    display: flex;
    flex-direction: column;
    row-gap: 8px;
}

.cms-menu-panel .cms-menu-group-title {
    margin-bottom: 0;
    line-height: 1;
}

/* Não sobrescreve a linha de 20px da base (o site usa 16px) para o corte de texto longo não apagar o acento de Ó e Á; o espaço de 8px entre links compensa. */
.cms-menu-panel .cms-menu-link {
    padding: 0;
    font-weight: 500;
}

a.cms-menu-group-title:hover,
.cms-menu-link:hover {
    color: var(--cms-pink);
}

.cms-drawer,
.cms-drawer-backdrop {
    display: none;
}

/* ---------- Header mobile ---------- */

@media (max-width: 1023px) {
    .cms-header-bar {
        display: flex;
        flex-wrap: wrap;
        padding: 12px 16px;
        gap: 12px;
    }

    .cms-header-hamburger {
        display: flex;
        color: var(--cms-ink);
    }

    .cms-header-logo img {
        width: 136px;
    }

    /* No mobile a busca desce para uma linha própria, com largura total, como no site. */
    .cms-header-search {
        order: 1;
        flex-basis: 100%;
        min-width: 0;
    }

    .cms-header-shortcuts {
        gap: 4px;
        margin-left: auto;
    }

    .cms-header-shortcut img {
        width: 32px;
        height: 32px;
    }

    .cms-menu {
        display: none;
    }

    .cms-drawer-backdrop:not([hidden]) {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1001;
        background: rgba(0, 0, 0, 0.4);
    }

    .cms-drawer:not([hidden]) {
        display: block;
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1002;
        width: min(90vw, 360px);
        overflow-y: auto;
        background: #fff;
    }

    body.cms-drawer-open {
        overflow: hidden;
    }

    .cms-drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 24px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    }

    .cms-drawer-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: var(--cms-line);
    }

    .cms-drawer-list {
        padding: 0 24px;
    }

    .cms-drawer-item {
        border-bottom: 1px solid var(--cms-line);
    }

    .cms-drawer-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 16px 0;
        font-size: 16px;
        font-weight: 500;
        text-transform: uppercase;
        text-align: left;
        color: var(--cms-ink);
    }

    .cms-drawer-top[data-bold='true'] {
        font-weight: 700;
    }

    .cms-drawer-panel {
        display: grid;
        gap: 16px;
        padding: 0 0 16px 12px;
    }

    .cms-drawer-see-all {
        font-size: 14px;
        font-weight: 600;
        color: var(--cms-pink);
    }
}

/* ---------- Footer ---------- */

.cms-footer {
    background: var(--cms-ink);
    color: #fff;
}

/* Vence "footer a:visited/:focus { color: #444 }" do style.css, que sumiria no fundo escuro. */
.cms-footer a,
.cms-footer a:is(:link, :visited, :hover, :focus, :active) {
    color: #fff;
}

.cms-footer-inner {
    padding: 24px 32px 32px;
}

.cms-footer-main {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1fr);
    gap: 32px;
}

.cms-footer-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    text-align: left;
    text-transform: uppercase;
    cursor: default;
}

.cms-footer-title .cms-chevron {
    display: none;
}

.cms-footer-list {
    display: grid;
    gap: 24px;
    margin-top: 16px !important;
}

.cms-footer-link {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    transition: padding 0.2s ease;
}

.cms-footer-link:hover {
    padding-left: 4px;
    color: #fff;
}

.cms-footer-aside {
    display: grid;
    align-content: start;
    gap: 24px;
}

.cms-footer-heading {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
}

.cms-footer-social {
    display: flex;
    gap: 32px;
}

.cms-footer-social-link {
    display: flex;
}

.cms-footer-apps {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.cms-footer-apps a {
    display: flex;
    height: 40px;
    overflow: hidden;
    background: #fff;
    border-radius: 6px;
}

.cms-footer-apps img {
    display: block;
    width: auto;
    height: 100%;
}

.cms-footer-divider {
    margin: 32px 0 24px;
    border: 0;
    border-top: 1px solid #525252;
}

/* Mesma tipografia do texto legal do site: resumo em cinza, CNPJ em branco e "Ver mais" menor. */
.cms-footer-legal-summary,
.cms-footer-legal-cnpj {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: #fff;
}

.cms-footer-legal-summary {
    color: #bdbdbd;
}

.cms-footer-legal-details summary {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    text-decoration: underline;
    list-style: none;
}

.cms-footer-legal-details summary::-webkit-details-marker {
    display: none;
}

.cms-footer-legal-details[open] .cms-footer-heading {
    margin-top: 16px;
}

.cms-footer-legal-content {
    max-width: 960px;
    font-size: 14px;
    line-height: 1.5;
    color: #dcdcdc;
}

.cms-footer-legal-content ul {
    list-style: disc;
    margin: 4px 0 12px;
    padding-left: 20px;
}

.cms-footer-legal-content a {
    text-decoration: underline;
}

/* Texto legal à esquerda e selos à direita, como na última linha do footer do site. */
.cms-footer-bottom {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
}

.cms-footer-seals {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    margin: 0;
    padding: 16px 0 0;
    list-style: none;
}

.cms-footer-seals img {
    display: block;
}

@media (max-width: 1023px) {
    .cms-footer-inner {
        padding: 24px 16px 32px;
    }

    .cms-footer-main {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .cms-footer-column {
        padding: 16px 0;
    }

    .cms-footer-title {
        cursor: pointer;
    }

    .cms-footer-title .cms-chevron {
        display: block;
    }

    .cms-footer-title[aria-expanded='false'] + .cms-footer-list {
        display: none;
    }

    .cms-footer-list {
        gap: 16px;
    }

    .cms-footer-aside {
        padding-top: 16px;
    }

    .cms-footer-bottom {
        flex-direction: column;
        gap: 8px;
    }
}
