/* Compact product-list sorting without affecting other Bootstrap dropdowns. */
body:is(#category, #search, #best-sales, #prices-drop, #new-products, #manufacturer, #supplier)
  .products__sort-dropdown-button {
  min-width: 145px;
  height: 34px;
  padding: 5px 12px;
  font: 400 14px/20px "DM Sans", sans-serif;
}

body:is(#category, #search, #best-sales, #prices-drop, #new-products, #manufacturer, #supplier)
  .products__sort-dropdown .dropdown-menu {
  width: max-content;
  min-width: 180px;
  max-width: min(210px, calc(100vw - 24px));
  padding: 5px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

body:is(#category, #search, #best-sales, #prices-drop, #new-products, #manufacturer, #supplier)
  .products__sort-dropdown .dropdown-item {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 6px;
  font: 400 14px/20px "DM Sans", sans-serif;
}

body:is(#category, #search, #best-sales, #prices-drop, #new-products, #manufacturer, #supplier)
  .products__sort-dropdown .dropdown-item:is(:hover, :focus) {
  color: #111;
  background: #f5f5f3;
}

body:is(#category, #search, #best-sales, #prices-drop, #new-products, #manufacturer, #supplier)
  .products__sort-dropdown .dropdown-item.current {
  font-weight: 600;
  background: #f5f5f3;
}

@media (max-width: 992px) {
  body:is(#category, #search, #best-sales, #prices-drop, #new-products, #manufacturer, #supplier)
    .products__sort-dropdown-button {
    height: 40px;
    min-height: 40px;
    font-size: 14px;
    line-height: 20px;
  }

  body:is(#category, #search, #best-sales, #prices-drop, #new-products, #manufacturer, #supplier)
    .products__sort-dropdown .dropdown-item {
    min-height: 38px;
    padding-block: 9px;
  }
}
