/* LOCAL supplier catalogue adaptive heading, not an SEO publication.
   If both fit, short H1 and actions share a row. If they do not fit,
   the full-width long heading comes first and actions wrap below.
   Limited to supplier catalogue; cards, sidebar and ads are unchanged. */
.producer-list--suppliers .producer-list-head--stacked {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  grid-template-columns: none;
  gap: var(--space-4);
}
.producer-list--suppliers .producer-list-head--stacked h1 {
  flex: 0 0 auto;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
  hyphens: auto;
}
.producer-list--suppliers .producer-list-head--stacked .producer-list-actions {
  flex: 0 1 auto;
  width: auto;
  max-width: 100%;
  min-width: 0;
  margin-left: auto;
  justify-content: flex-end;
}
@media (max-width: 640px) {
  .producer-list--suppliers .producer-list-head--stacked .producer-list-actions {
    flex: 0 0 100%;
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    gap: var(--space-2);
  }
}

/* Stage B UX follow-up: independent scrolling ONLY for supplier filters.
   The shared .filters-panel remains untouched on other pages. */
@media (min-width: 1021px) {
  .directory-grid > .supplier-filters-panel {
    position: sticky;
    top: 132px;
    max-height: calc(100vh - 148px);
    max-height: calc(100dvh - 148px);
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
  }
}
@media (max-width: 1020px) {
  .directory-grid > .supplier-filters-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }
}
