/* Mobile catalog navigation: desktop catalog and unrelated sidebars unchanged. */
.catalog-mobile-nav {
  display: none;
}

@media (max-width: 820px) {
  /* Hide the lower sidebar on catalog listing, category and product pages. */
  .page-catalog .catalog-layout > .catalog-sidebar,
  .page-product .product-layout > .catalog-sidebar,
  .page-brands .catalog-layout > .catalog-sidebar {
    display: none;
  }

  .catalog-mobile-nav {
    display: block;
    width: 100%;
    margin: 12px 0 0;
  }

  .catalog-mobile-nav__scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .catalog-mobile-nav__scroll::-webkit-scrollbar {
    display: none;
  }

  .catalog-mobile-nav__rail {
    display: flex;
    align-items: center;
    gap: 7px;
    width: max-content;
    min-width: 100%;
    padding: 3px 16px;
  }

  .catalog-mobile-nav__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 36px;
    padding: 7px 13px;
    border: 1px solid #b49c86;
    border-radius: 22px;
    background: #fff;
    color: var(--brown);
    font-size: 14px;
    line-height: 1.1;
    white-space: nowrap;
    text-align: center;
    text-decoration: none;
    transition: background-color .15s, border-color .15s;
  }

  .catalog-mobile-nav__link.is-active {
    border-color: var(--yellow);
    background: var(--yellow);
  }

  .catalog-mobile-nav__link:focus-visible {
    outline: 2px solid var(--brown);
    outline-offset: 2px;
  }

  /* Keep the strip close to the products under the catalog banner. */
  .page-catalog .catalog-layout,
  .page-brands .catalog-layout {
    padding-top: 16px;
  }

  .page-catalog .catalog-products,
  .page-brands .catalog-products {
    padding-top: 0;
  }
}
