/*
 * Catalog-only sticky navigation. The category tree stylesheet intentionally
 * restores a static desktop sidebar, so override it after @stack('head').
 */
body.catalog-sticky-nav > .site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 0;
  background: #fff;
  box-shadow: 0 4px 16px rgba(16, 45, 85, 0.08);
}

@media (min-width: 821px) {
  body.catalog-sticky-nav .product-category-page .category-filter-panel {
    position: sticky;
    top: calc(var(--catalog-sticky-header-height, 96px) + 14px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    align-self: start;
    max-height: calc(100vh - var(--catalog-sticky-header-height, 96px) - 28px);
    max-height: calc(100dvh - var(--catalog-sticky-header-height, 96px) - 28px);
    overflow: hidden;
  }

  body.catalog-sticky-nav .product-category-page .category-filter-list[data-category-tree-ssr] {
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    padding-right: 4px;
  }
}
