/* Keep an arbitrary number of categories on one row. Extra links scroll sideways. */
@media (min-width: 801px) {
  body .category-nav,
  body.home .category-nav,
  body.category-page-body .category-nav,
  body.design-page .category-nav {
    display: flex !important;
    grid-template-columns: none !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: clamp(4px, .6vw, 10px) !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    scrollbar-width: thin;
    scrollbar-color: #cba16a #fff;
    overscroll-behavior-x: contain;
  }

  body .category-nav > :is(a, .nav-item),
  body.home .category-nav > :is(a, .nav-item),
  body.category-page-body .category-nav > :is(a, .nav-item),
  body.design-page .category-nav > :is(a, .nav-item) {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: max-content !important;
    height: 100% !important;
    box-sizing: border-box !important;
    padding-inline: clamp(4px, .45vw, 8px) !important;
  }

  /* The category page also has an older, more specific 100% link width. */
  body.category-page-body .category-nav > a:not([data-api-menu-item]) {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: max-content !important;
    height: 100% !important;
    padding-inline: clamp(4px, .45vw, 8px) !important;
  }

  body .category-nav > a,
  body .category-nav > .nav-item > a {
    white-space: nowrap !important;
  }

  /* Spread the homepage links across the same width as the hero image. */
  body.home .category-nav {
    justify-content: space-between !important;
  }

  /* A fixed panel remains visible outside the horizontally scrolling row. */
  body .category-nav .nav-dropdown {
    position: fixed !important;
    top: var(--bho-category-dropdown-top, 0px) !important;
    left: var(--bho-category-dropdown-left, 0px) !important;
    right: auto !important;
    transform: translateY(10px) !important;
  }
  body .category-nav .nav-item:hover .nav-dropdown,
  body .category-nav .nav-item:focus-within .nav-dropdown {
    transform: translateY(0) !important;
  }
}
