@media (min-width: 1200px) {
  #submenu-manufacturers {
    --velvetoo-brands-desktop-limit: var(--velvetoo-brands-menu-height, max(0px, calc(100dvh - 220px)));
    max-height: var(--velvetoo-brands-desktop-limit);
  }

  #submenu-manufacturers .submenu__row > .submenu__left {
    position: relative;
    max-height: max(0px, calc(var(--velvetoo-brands-desktop-limit) - 2px));
    /* The storefront menu overrides the outer panel with visible overflow. */
    overflow: hidden auto !important;
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
  }
}

@media (max-width: 1199.98px) {
  #mobileMenu .menu--current:has(> .menu__list > li.type-manufacturer) {
    /* The menu starts below the 72px toolbar. Reserve 48px for the floating buttons. */
    max-height: max(0px, calc(100dvh - 120px - env(safe-area-inset-bottom, 0px)));
    overflow: hidden auto !important;
    overscroll-behavior: contain;
  }
}

body#manufacturer #center-column > .brand__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(126px, 100%), 1fr));
  gap: .75rem;
  padding-inline-start: 0;
}

body#manufacturer .brand__list > .brand {
  min-width: 0;
  min-height: 0;
  padding: .8rem .5rem;
  gap: .35rem;
  overflow-wrap: anywhere;
}

body#manufacturer .brand__list > .brand[hidden] {
  display: none;
}

body#manufacturer .brand__list .brand__image {
  display: grid;
  place-items: center;
  width: 100%;
  height: 48px;
  margin: 0;
}

body#manufacturer .brand__list .brand__img {
  display: block;
  width: 66px;
  height: 48px;
  object-fit: contain;
}

body#manufacturer .brand__list .brand__title {
  font-size: .95rem;
}

body#manufacturer .brand__list .brand__products {
  margin: 0;
  font-size: .8rem;
}

.velvetoo-brands-index {
  margin: 0 0 1rem;
}

.velvetoo-brands-index label {
  display: block;
  margin-bottom: .35rem;
}

.velvetoo-brands-index input {
  max-width: 22rem;
}

.velvetoo-brands-index__letters {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .75rem;
}

.velvetoo-brands-index__letters button {
  min-width: 2rem;
  min-height: 2rem;
  padding: .2rem .55rem;
  border: 1px solid #d5dce4;
  border-radius: .25rem;
  color: #0c3568;
  background: #fff;
}

.velvetoo-brands-index__letters button:hover {
  background: #edf4fb;
}

.velvetoo-brands-index__letters button[aria-pressed="true"] {
  border-color: #0c3568;
  background: #0c3568;
  color: #fff;
}

@media (max-width: 767.98px) {
  .velvetoo-brands-index__letters button {
    min-width: 2.5rem;
    min-height: 2.5rem;
  }
}
