:root {
    --shell-header-top: 0px;
    --shell-header-bottom: calc(var(--shell-header-top) + var(--shell-header-height, 177px));
    scroll-padding-top: calc(var(--shell-header-bottom) + 12px);
}

@media (min-width: 601px) {
    :root:has(#wpadminbar) { --shell-header-top: var(--wp-admin--admin-bar--height, 32px); }
}

.site-header.site-header--image {
    position: sticky;
    top: var(--shell-header-top);
}

.site-header.site-header--image .desktop-header .catalog-menu.active {
    max-height: calc(100dvh - var(--shell-header-bottom) - 12px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.site-header.site-header--image .desktop-header .quick-search {
    max-height: min(620px, calc(100dvh - 150px - var(--shell-header-top)));
}

.site-header.site-header--image .mobile-header .burger-menu {
    height: calc(100dvh - var(--shell-header-bottom));
}

.site-header.site-header--image .mobile-header .quick-search {
    max-height: calc(100dvh - var(--shell-header-bottom) - 10px);
}

/* Keep existing sticky page controls below the shared header. */
body .intent-sidebar-consult { top: calc(var(--shell-header-bottom) + 18px); }
body .product .call-consultant:not(.mobile),
body .product-reviews-layout--has-reviews .product-review-form-wrap {
    top: calc(var(--shell-header-bottom) + 12px);
}
