/**
 * Cabeçalho estilo /inicio — todas as páginas com .has-site-header-shell.
 * Bloco final: exclusivo da home (trust bar, main-content).
 */
/**
 * Home (/inicio) — layout exclusivo da página inicial.
 * Cabeçalho desktop 769–1919px (grid busca): site-header-desktop-fluid.css.
 */
@media (min-width: 769px) {
    /* PC: não exibir camada mobile (header compacto / busca mobile / shell flutuante) */
    body.has-site-header-shell .header-content--mobile,
    body.has-site-header-shell #headerMobileRow,
    body.has-site-header-shell .search-bar-mobile,
    body.has-site-header-shell #headerMobileSearch,
    body.has-site-header-shell .header-mobile-row-placeholder,
    body.has-site-header-shell .header-mobile-search-placeholder,
    body.has-site-header-shell .mobile-compact-shell,
    body.has-site-header-shell .mobile-compact-header,
    body.has-site-header-shell .mobile-compact-search {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        min-height: 0 !important;
        max-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
        border: none !important;
    }

    body.has-site-header-shell .header-content--desktop {
        display: flex !important;
    }

    /* Topbar no mesmo azul do cabeçalho (PC) */
    body.has-site-header-shell .site-topbar {
        background: var(--site-header-bg, #1e3370) !important;
        color: #fff;
        border-bottom: none;
    }

    body.has-site-header-shell .site-topbar-link {
        color: #fff;
    }

    body.has-site-header-shell .site-topbar-link:hover {
        color: #fff;
        opacity: 0.85;
    }

    body.has-site-header-shell .site-topbar-link i {
        color: inherit;
    }

    body.has-site-header-shell .site-topbar-link--whatsapp i {
        color: #25d366;
    }

    /* Bloco único: logo + header + menu (mesma posição no topo e ao rolar) */
    body.has-site-header-shell {
        --home-logo-col: clamp(88px, 8.5vw, 108px);
        --home-logo-gap: clamp(8px, 1vw, 14px);
        --home-logo-offset-left: clamp(-36px, -4vw, -18px);
    }

    body.has-site-header-shell .home-header-chrome {
        position: relative;
        width: 100%;
        max-width: min(1200px, calc(100% - 2rem));
        margin-left: auto;
        margin-right: auto;
        padding-left: clamp(12px, 2vw, 24px);
        padding-right: clamp(12px, 2vw, 24px);
        box-sizing: border-box;
        overflow: visible;
    }

    body.has-site-header-shell .home-header-chrome__stack {
        min-width: 0;
        width: 100%;
    }

    body.has-site-header-shell .home-header-dual-row {
        position: relative;
        display: flex;
        align-items: center;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        gap: var(--home-logo-gap);
        min-height: clamp(76px, 8vw, 96px);
        overflow: visible;
    }

    body.has-site-header-shell .home-header-logo-slot {
        position: relative;
        flex: 0 0 var(--home-logo-col);
        width: var(--home-logo-col);
        height: clamp(76px, 8vw, 96px);
        margin-left: var(--home-logo-offset-left);
        align-self: center;
        z-index: 6;
        padding: 0;
        overflow: visible;
    }

    body.has-site-header-shell .home-header-logo-slot .header-brand--dual-row {
        position: relative;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        padding: 0;
    }

    body.has-site-header-shell .home-header-logo-slot .logo,
    body.has-site-header-shell .home-header-logo-slot .logo a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
    }

    body.has-site-header-shell .home-header-logo-slot .logo-img {
        width: clamp(76px, 7.5vw, 96px) !important;
        height: clamp(76px, 7.5vw, 96px) !important;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    body.has-site-header-shell .home-header-dual-row__body {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: stretch;
        overflow: visible;
        align-self: center;
    }

    body.has-site-header-shell .home-header-dual-row .header {
        width: 100%;
        flex: 0 0 auto;
    }

    body.has-site-header-shell .home-header-dual-row .header .container {
        max-width: none;
        width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    /* Linha 1: busca à esquerda, ícones + login à direita */
    body.has-site-header-shell .header-content--desktop {
        display: flex !important;
        justify-content: flex-start !important;
        align-items: center !important;
        width: 100%;
        padding: 0.35rem 0;
    }

    body.has-site-header-shell .header-content--desktop .header-nav {
        display: none !important;
    }

    body.has-site-header-shell .header-main-cluster {
        display: flex !important;
        justify-content: flex-start !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100%;
        margin: 0;
    }

    body.has-site-header-shell .header-search-group {
        display: flex !important;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-start !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100%;
        gap: clamp(10px, 1.2vw, 16px);
    }

    body.has-site-header-shell .header-row-cep-slot {
        display: flex !important;
        flex: 0 0 auto;
        align-items: center;
        align-self: center;
        margin: 0;
        order: 0;
    }

    body.has-site-header-shell .header-row-cep-slot .header-location {
        align-items: center;
    }

    body.has-site-header-shell .header-row-cep-slot .header-location-value {
        max-width: min(22vw, 180px);
        overflow: hidden;
        text-overflow: ellipsis;
    }

    body.has-site-header-shell .header-content--desktop .search-bar {
        flex: 0 1 auto;
        width: clamp(260px, 38vw, 480px);
        min-width: clamp(200px, 28vw, 280px);
        max-width: 480px;
        margin-left: 0 !important;
        margin-right: 0 !important;
        order: 1;
    }

    body.has-site-header-shell .header-quick-icons {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: flex-end;
        flex: 0 0 auto;
        gap: clamp(6px, 0.65vw, 10px);
        margin-left: auto !important;
        padding-right: 0;
        order: 2;
    }

    body.has-site-header-shell .header-quick-icons > .header-icon-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    body.has-site-header-shell .header-quick-icons .user-area--icons {
        margin-left: 0;
        display: inline-flex;
        align-items: center;
    }

    body.has-site-header-shell .header-quick-icons .user-guest-auth:not([hidden]) {
        display: inline-flex !important;
        align-items: center !important;
        gap: clamp(8px, 0.75vw, 12px);
        min-height: 44px;
        color: #fff;
        font-size: clamp(11px, 0.85vw, 13px);
        font-weight: 400;
        line-height: 1.2;
        white-space: nowrap;
        flex-shrink: 0;
        margin-left: clamp(8px, 0.85vw, 14px);
        padding: 0;
    }

    body.has-site-header-shell .header-quick-icons .user-guest-auth[hidden],
    body.has-site-header-shell .header-quick-icons:has(.user-area.logged-in) .user-guest-auth {
        display: none !important;
    }

    body.has-site-header-shell .header-quick-icons .user-guest-auth .user-guest-link {
        color: #fff;
        text-decoration: none;
        font-weight: 400;
        font-size: inherit;
        line-height: 1.2;
    }

    body.has-site-header-shell .header-quick-icons .user-guest-auth .user-guest-link:hover {
        color: #fff;
        opacity: 0.85;
    }

    body.has-site-header-shell .header-quick-icons .user-guest-auth .user-guest-icon {
        color: #fff;
        flex-shrink: 0;
        margin: 0;
    }

    /* Aba de menu (categorias) — faixa própria, largura total, abaixo do header */
    body.has-site-header-shell .home-header-menu-bar.site-announcement-bar--categories {
        display: flex !important;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        width: 100%;
        max-width: 100%;
        min-height: 40px;
        height: auto !important;
        padding: 0;
        margin: 0;
        overflow: visible;
        visibility: visible !important;
        opacity: 1 !important;
        border: none;
        box-sizing: border-box;
        /* site-bars usa display:grid — flex evita colapso com o header */
        grid-template-rows: none !important;
    }

    body.has-site-header-shell .home-header-menu-bar-inner {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 6px 0;
        box-sizing: border-box;
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: visible;
    }

    body.has-site-header-shell .home-header-menu-bar .mega-nav-categories-cluster {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: clamp(0.5rem, 1.1vw, 1.35rem);
        flex-wrap: nowrap;
        width: auto;
        max-width: 100%;
        margin: 0 auto;
    }

    body.has-site-header-shell .home-header-menu-bar .mega-nav-categories-cluster > .mega-nav-dropdown-wrap,
    body.has-site-header-shell .home-header-menu-bar .mega-nav-categories-cluster > .mega-nav-link--direct {
        flex: 0 0 auto;
        position: relative;
    }

    body.has-site-header-shell .home-header-menu-bar .mega-nav-link--direct {
        white-space: nowrap;
        text-decoration: none;
    }

    body.has-site-header-shell .home-header-menu-bar .mega-nav-link,
    body.has-site-header-shell .home-header-menu-bar .mega-nav-btn {
        color: #fff;
    }

    body.has-site-header-shell .home-header-menu-bar .mega-nav-dropdown {
        z-index: 10020;
    }

    body.has-site-header-shell.search-dropdown-active .home-header-menu-bar,
    body.has-site-header-shell.user-dropdown-active .home-header-menu-bar {
        pointer-events: none !important;
    }

    /* Categorias permanecem visíveis ao rolar */
    body.has-site-header-shell.site-header-scroll-compact .home-header-menu-bar.site-announcement-bar--categories {
        display: flex !important;
        grid-template-rows: none !important;
        height: auto !important;
        min-height: 40px !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    /* Ao rolar: bloco inteiro gruda; logo não muda posição/tamanho */
    body.has-site-header-shell.site-header-scroll-compact .site-header-shell {
        overflow: visible !important;
    }

    body.has-site-header-shell.site-header-scroll-compact .home-header-chrome {
        position: sticky;
        top: 0;
        z-index: 10009;
        background: var(--site-header-bg, #1e3370);
        overflow: visible;
    }

    body.has-site-header-shell.site-header-scroll-compact .home-header-chrome .header {
        position: relative !important;
        top: auto !important;
    }

    body.has-site-header-shell.site-header-scroll-compact .home-header-menu-bar {
        position: relative;
        top: auto;
        z-index: 10008;
    }

    body.has-site-header-shell.site-header-scroll-compact .home-header-menu-bar.site-announcement-bar--categories {
        overflow: visible !important;
    }
}

@media (max-width: 768px) {
    body.has-site-header-shell .home-header-chrome {
        display: block;
        max-width: none;
        padding: 0;
    }

    body.has-site-header-shell .home-header-chrome__stack {
        margin-left: 0;
    }

    body.has-site-header-shell .home-header-dual-row {
        display: block;
        max-width: none;
        padding: 0;
        gap: 0;
    }

    body.has-site-header-shell .home-header-logo-slot {
        display: none !important;
    }

    body.has-site-header-shell .home-header-dual-row__body {
        display: block;
    }

    body.has-site-header-shell .home-header-menu-bar.site-announcement-bar--categories {
        display: none !important;
    }
}

@media (min-width: 769px) and (max-width: 1919px) {
    body.home-page {
        --container-padding: clamp(0.65rem, 1.35vw, 1.75rem);
    }

    body.home-page .home-trust-bar-inner {
        max-width: min(1200px, calc(100% - 2rem));
        padding: clamp(16px, 2vw, 22px) clamp(12px, 2.5vw, 28px);
        gap: clamp(8px, 1.2vw, 20px);
    }

    body.home-page .home-trust-bar-payments-list {
        gap: clamp(6px, 0.8vw, 10px);
    }

    body.home-page .home-trust-bar-payments-list img {
        height: clamp(18px, 2vw, 24px);
        max-height: clamp(18px, 2vw, 24px);
    }

    body.home-page .main-content {
        max-width: min(1440px, calc(100vw - 2 * var(--container-padding, 1rem)));
        box-sizing: border-box;
    }
}
