/**
 * Cabeçalho da loja — desktop intermediário (769px–1919px).
 * Fonte única sincronizada com /inicio (cabeçalho pai). Carregar após site-store-chrome.css.
 * Não altera mobile (≤768) nem 1920×1080+ (regras em inicio.html / padrão).
 */
@media (min-width: 769px) and (max-width: 1919px) {
    body.has-site-header-shell {
        --site-header-container-padding: clamp(0.65rem, 1.35vw, 1.75rem);
    }

    body.has-site-header-shell .site-topbar-inner,
    body.has-site-header-shell .site-contact-bar-inner,
    body.has-site-header-shell .mega-nav-inner,
    body.has-site-header-shell .header .container {
        max-width: min(1200px, calc(100% - 2rem));
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }

    body.has-site-header-shell .header .container {
        padding-left: var(--site-header-container-padding, clamp(0.65rem, 1.35vw, 1.75rem));
        padding-right: var(--site-header-container-padding, clamp(0.65rem, 1.35vw, 1.75rem));
    }

    body.has-site-header-shell .site-topbar-inner {
        gap: clamp(10px, 1.8vw, 40px);
        padding-left: clamp(12px, 2vw, 16px);
        padding-right: clamp(12px, 2vw, 16px);
    }

    body.has-site-header-shell .site-topbar-link {
        font-size: clamp(10px, 0.72vw, 12px);
    }

    body.has-site-header-shell .site-contact-bar-inner {
        gap: 8px 12px;
    }

    body.has-site-header-shell .site-contact-item--address span {
        display: inline-block;
        max-width: min(44vw, 500px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        vertical-align: bottom;
    }

    /* Layout legado (sem .home-header-chrome) — páginas antigas */
    body.has-site-header-shell:not(:has(.home-header-chrome)):not(.home-page) .header-content--desktop,
    body.has-site-header-shell.catalog-page:not(:has(.home-header-chrome)) .header .container > .header-content {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, max-content) !important;
        align-items: center;
        column-gap: clamp(1rem, 2.2vw, 2.5rem);
        row-gap: clamp(0.5rem, 1vw, 1rem);
        width: 100%;
        min-width: 0;
        flex-wrap: nowrap !important;
    }

    body.has-site-header-shell.home-page .header-content--desktop,
    body.has-site-header-shell:has(.home-header-chrome) .header-content--desktop {
        display: flex !important;
        justify-content: flex-start !important;
        align-items: center !important;
    }

    body.has-site-header-shell .header-main-cluster {
        grid-column: 1 !important;
        justify-self: stretch !important;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        align-self: center;
        display: flex;
        align-items: center;
    }

    body.has-site-header-shell.home-page .header-main-cluster {
        justify-self: center !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: min(1200px, calc(100% - 2rem));
    }

    body.has-site-header-shell .header-search-group {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        gap: clamp(10px, 1.1vw, 14px);
    }

    body.has-site-header-shell.home-page .header-search-group {
        justify-content: flex-start !important;
        width: 100% !important;
        max-width: 100%;
    }

    body.has-site-header-shell.home-page .header-quick-icons {
        margin-left: auto !important;
    }

    body.has-site-header-shell.home-page .header-content--desktop {
        justify-content: flex-start !important;
    }

    body.has-site-header-shell.home-page .header-main-cluster {
        justify-content: flex-start !important;
        width: 100% !important;
        max-width: 100%;
    }

    body.has-site-header-shell.home-page .header-quick-icons {
        margin-left: 0 !important;
    }

    body.has-site-header-shell.home-page .header-content--desktop .search-bar {
        margin-left: 0 !important;
    }

    body.has-site-header-shell .header-brand {
        flex-shrink: 0;
        margin-left: 0;
        padding-left: 0;
    }

    body.has-site-header-shell .header-cep-slot,
    body.has-site-header-shell .header-row-cep-slot {
        display: flex !important;
        flex-shrink: 0;
        min-width: max-content;
        align-items: center;
        margin-right: clamp(6px, 0.8vw, 12px);
    }

    body.has-site-header-shell .header-location,
    body.has-site-header-shell .header-location-lines {
        min-width: max-content;
    }

    body.has-site-header-shell .header-location-value {
        max-width: none;
        overflow: visible;
        text-overflow: clip;
    }

    body.has-site-header-shell .header-quick-icons {
        display: flex;
        align-items: center;
        flex-shrink: 0;
        gap: clamp(6px, 0.75vw, 10px);
        margin-left: clamp(4px, 0.5vw, 8px);
        padding-right: clamp(2px, 0.35vw, 6px);
    }

    body.has-site-header-shell .header-quick-icons > .header-icon-btn {
        flex-shrink: 0;
    }

    body.has-site-header-shell .header-quick-icons .user-area--icons {
        margin-left: clamp(2px, 0.35vw, 6px);
    }

    body.has-site-header-shell .header-icon-btn {
        width: clamp(36px, 3.2vw, 44px);
        height: clamp(36px, 3.2vw, 44px);
        font-size: clamp(1rem, 1.1vw, 1.2rem);
    }

    body.has-site-header-shell .header-content--desktop .search-bar,
    body.has-site-header-shell .header-content--desktop .search-bar-desktop,
    body.has-site-header-shell.catalog-page:not(:has(.home-header-chrome)) .header .container > .header-content .search-bar {
        flex: 0 1 auto;
        width: clamp(260px, 38vw, 480px);
        min-width: clamp(200px, 28vw, 280px);
        max-width: 480px;
        margin-left: clamp(4px, 0.5vw, 8px);
    }

    body.has-site-header-shell:not(.home-page):not(:has(.home-header-chrome)) .header-nav {
        grid-column: 2 !important;
        justify-self: end !important;
        flex-shrink: 0;
        min-width: max-content;
        padding-left: clamp(10px, 1.2vw, 20px);
        margin-left: 0;
        display: flex !important;
        align-items: center;
        justify-content: flex-end;
    }

    body.has-site-header-shell.home-page .header-content--desktop .header-nav,
    body.has-site-header-shell:has(.home-header-chrome) .header-content--desktop .header-nav {
        display: none !important;
    }

    body.has-site-header-shell.home-page .header-quick-icons {
        margin-left: 0;
    }

    body.has-site-header-shell:not(:has(.home-header-chrome)) .header-nav .user-guest-auth {
        font-size: clamp(11px, 0.85vw, 13px);
        gap: clamp(8px, 0.75vw, 12px);
        padding-left: clamp(2px, 0.25vw, 4px);
        display: inline-flex !important;
        align-items: center;
    }

    body.has-site-header-shell .header-nav .user-guest-icon {
        margin-right: clamp(2px, 0.25vw, 4px);
        flex-shrink: 0;
    }

    body.has-site-header-shell .mega-nav-menu-group,
    body.has-site-header-shell .mega-nav-inner > .header-categories-nav.mega-nav-menu-group {
        gap: clamp(0.85rem, 2vw, 2rem);
    }

    body.has-site-header-shell .mega-nav-link,
    body.has-site-header-shell .mega-nav-btn {
        font-size: clamp(0.68rem, 0.75vw, 0.8rem);
        padding: 0.35rem clamp(0.35rem, 0.5vw, 0.6rem);
    }

    body.has-site-header-shell .site-announcement-bar {
        padding: 8px clamp(12px, 2vw, 16px);
        font-size: clamp(11px, 0.85vw, 13px);
    }

    body.has-site-header-shell .site-header-shell,
    body.has-site-header-shell .header,
    body.has-site-header-shell .mega-nav {
        max-width: 100%;
    }
}

@media (min-width: 769px) and (max-width: 1100px) {
    body.has-site-header-shell .site-contact-ra-label {
        display: none;
    }

    body.has-site-header-shell .site-contact-ra-logo {
        max-width: 92px;
    }

    body.has-site-header-shell .header-content--desktop .search-bar,
    body.has-site-header-shell .header-content--desktop .search-bar-desktop,
    body.has-site-header-shell.catalog-page:not(:has(.home-header-chrome)) .header .container > .header-content .search-bar {
        width: clamp(220px, 36vw, 420px);
        min-width: clamp(180px, 24vw, 260px);
        max-width: 420px;
    }
}

@media (min-width: 769px) and (max-width: 900px) {
    body.has-site-header-shell .site-topbar-carousel-nav {
        flex-shrink: 0;
    }

    body.has-site-header-shell .site-topbar-inner {
        gap: clamp(8px, 1.2vw, 20px);
    }
}
