/* Catalog sort: a consistent menu in place of the browser's native popup. */
.storefront .catalog-toolbar { position: relative; z-index: 4; }
.storefront.sort-menu-open .support-float { opacity: 0; pointer-events: none; }
.storefront .catalog-toolbar .sort-picker {
  position: relative;
  display: flex;
  align-items: center;
  width: 266px;
  min-width: 266px;
  height: 46px;
  min-height: 46px;
  gap: 10px;
  margin: 0;
  padding: 0 7px 0 13px;
  border: 1px solid #dfe5eb;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(31, 45, 60, .025);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.storefront .catalog-toolbar .sort-picker:hover { border-color: #c7d0d9; }
.storefront .catalog-toolbar .sort-picker.is-open {
  border-color: #d96a7d;
  box-shadow: 0 0 0 3px rgba(197, 27, 45, .09);
}
.storefront .sort-picker .sort-label {
  flex: none;
  color: #8491a0;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.storefront .sort-picker select { flex: 1; min-width: 0; color: #27374a; }
.storefront .sort-picker.is-enhanced select { display: none; }
.storefront .sort-picker .sort-trigger[hidden],
.storefront .sort-picker .sort-menu[hidden] { display: none !important; }
.storefront .sort-picker .sort-trigger {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  height: 38px;
  gap: 8px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: #f8fafc;
  color: #233449;
  font: 700 12px var(--font);
  text-align: left;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.storefront .sort-picker .sort-trigger:hover,
.storefront .sort-picker.is-open .sort-trigger { background: #fff1f4; color: #a71631; }
.storefront .sort-picker .sort-trigger:focus-visible {
  outline: 2px solid #d25169;
  outline-offset: 2px;
}
.storefront .sort-picker .sort-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.storefront .sort-picker .sort-trigger svg {
  width: 17px;
  height: 17px;
  flex: none;
  color: #68798b;
  transition: transform .2s ease;
}
.storefront .sort-picker.is-open .sort-trigger svg { transform: rotate(180deg); color: #a71631; }
.storefront .sort-picker .sort-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 35;
  width: max(100%, 266px);
  max-height: min(320px, calc(100dvh - 20px));
  overflow-y: auto;
  padding: 7px;
  border: 1px solid #e2e7ec;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 17px 42px rgba(27, 39, 55, .17), 0 3px 9px rgba(27, 39, 55, .06);
  animation: sort-menu-in .18s ease-out both;
}
.storefront .sort-picker .sort-menu.is-upward { top: auto; bottom: calc(100% + 8px); }
.storefront .sort-picker .sort-menu-heading {
  display: block;
  padding: 7px 11px 8px;
  color: #8b98a6;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .075em;
  text-transform: uppercase;
}
.storefront .sort-picker .sort-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 43px;
  gap: 12px;
  margin: 0;
  padding: 8px 11px;
  border: 0;
  border-radius: 9px;
  background: #fff;
  color: #2c3b4c;
  font: 650 12px var(--font);
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.storefront .sort-picker .sort-menu button::after {
  content: "";
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  flex: none;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #fff;
  font: 900 12px var(--font);
}
.storefront .sort-picker .sort-menu button:hover,
.storefront .sort-picker .sort-menu button:focus-visible { background: #f6f8fb; color: #a71631; }
.storefront .sort-picker .sort-menu button:focus-visible { outline: 2px solid #df91a0; outline-offset: -2px; }
.storefront .sort-picker .sort-menu button[aria-checked="true"] {
  background: #fff0f3;
  color: #b51734;
  font-weight: 800;
}
.storefront .sort-picker .sort-menu button[aria-checked="true"]::after {
  content: "✓";
  border-color: #c51b38;
  background: #c51b38;
}
@keyframes sort-menu-in { from { opacity: 0; transform: translateY(-5px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 650px) {
  .storefront .catalog-toolbar .sort-picker { width: 100%; min-width: 0; height: 50px; min-height: 50px; }
  .storefront .sort-picker .sort-label { font-size: 11px; }
  .storefront .sort-picker .sort-trigger { height: 40px; font-size: 13px; }
  .storefront .sort-picker .sort-menu { width: 100%; }
  .storefront .sort-picker .sort-menu button { min-height: 47px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .storefront .sort-picker .sort-trigger,
  .storefront .sort-picker .sort-trigger svg,
  .storefront .sort-picker .sort-menu button { transition: none; }
  .storefront .sort-picker .sort-menu { animation: none; }
}
