/* Native fallback when JavaScript is unavailable.
   Do not change display: product variants also use intentionally hidden selects. */
html body select:not([multiple]):not([size]),
html body select[size="1"] {
  -webkit-appearance: none;
  appearance: none;
  color-scheme: light;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  min-height: 46px;
  height: auto;
  padding: 11px 46px 11px 14px;
  border: 1px solid #cdd4e2;
  border-radius: 10px;
  background-color: var(--white, #fff);
  background-image: url('/assets/img/select-chevron.svg');
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 20px 20px;
  color: var(--midnight, #0a1024);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  text-overflow: ellipsis;
  cursor: pointer;
  box-shadow: 0 1px 2px rgb(10 16 36 / 3%);
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

html body select:not([multiple]):not([size]):hover:not(:disabled),
html body select[size="1"]:hover:not(:disabled) {
  border-color: #8b9de0;
  background-color: #fafbff;
}

html body select:not([multiple]):not([size]):focus,
html body select[size="1"]:focus {
  border-color: var(--cobalt, #1746ff);
  outline: 2px solid var(--cobalt, #1746ff);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgb(23 70 255 / 8%);
}

html body select:not([multiple]):not([size]):disabled,
html body select[size="1"]:disabled {
  color: #687285;
  background-color: var(--soft, #eef0f4);
  border-color: var(--border, #dde1e8);
  opacity: .75;
  cursor: not-allowed;
  box-shadow: none;
}

html body select[aria-invalid="true"] {
  border-color: #be283b;
}

html body select option,
html body select optgroup {
  background-color: #fff;
  color: #0a1024;
}

html body select option:disabled { color: #687285; }

@media (max-width: 760px) {
  html body select:not([multiple]):not([size]),
  html body select[size="1"] {
    min-height: 48px;
    font-size: 16px; /* Prevent iPhone zoom when focusing a form control. */
  }
}

@media (prefers-reduced-motion: reduce) {
  html body select { transition: none !important; }
}

@media (forced-colors: active) {
  html body select:not([multiple]):not([size]),
  html body select[size="1"] {
    -webkit-appearance: auto;
    appearance: auto;
    background-image: none;
    border-color: ButtonText;
    color: ButtonText;
  }
}

/* Enhanced menus are placed above the page, outside clipped product panels. */
.bd-select { position: relative; min-width: 0; width: 100%; margin-top: 7px; }
.sort-form .bd-select { width: 230px; max-width: 100%; margin-top: 0; }
.mobile-filter-select .bd-select { margin-top: 0; }
html body select.bd-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  pointer-events: none;
}
html body button.bd-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid #cdd4e2;
  border-radius: 10px;
  background: #fff;
  color: var(--midnight, #0a1024);
  font: 600 14px/1.5 Inter, Arial, sans-serif;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
  box-shadow: 0 1px 2px rgb(10 16 36 / 3%);
}
.bd-select-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-select-trigger::after {
  content: '';
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  background: url('/assets/img/select-chevron.svg') center / 20px no-repeat;
  transition: transform .16s ease;
}
html body .bd-select-trigger:hover:not(:disabled) { border-color: #8b9de0; background-color: #fafbff; }
html body .bd-select-trigger[aria-expanded="true"],
html body .bd-select-trigger:focus-visible { border-color: var(--cobalt); outline: 2px solid var(--cobalt); outline-offset: 2px; }
.bd-select-trigger[aria-expanded="true"]::after { transform: rotate(180deg); }
html body .bd-select-trigger:disabled { opacity: .7; color: #687285; background: #eef0f4; cursor: not-allowed; }
html body .bd-select-trigger[aria-invalid="true"] { border-color: #be283b; }
.bd-select-menu {
  position: fixed;
  z-index: 12000;
  box-sizing: border-box;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid #d5ddef;
  border-radius: 12px;
  background: #fff;
  color: var(--midnight, #0a1024);
  box-shadow: 0 16px 40px rgb(10 16 36 / 16%), 0 3px 8px rgb(10 16 36 / 6%);
  font: 500 14px/1.45 Inter, Arial, sans-serif;
  text-transform: none;
  letter-spacing: normal;
  scrollbar-width: thin;
  scrollbar-color: #bcc8ed #f4f6fc;
}
.bd-select-menu[hidden] { display: none !important; }
.bd-select-option {
  position: relative;
  min-height: 44px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  padding: 11px 38px 11px 12px;
  border-radius: 7px;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.bd-select-option + .bd-select-option { margin-top: 3px; }
.bd-select-option[aria-selected="true"] { color: #123bd7; background: #edf1ff; font-weight: 650; }
.bd-select-option[aria-selected="true"]::after {
  content: '';
  position: absolute;
  right: 15px;
  width: 6px;
  height: 11px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-2px);
}
.bd-select-option.is-active { background: #e7edff; box-shadow: inset 0 0 0 1px #afc0ff; color: #123bd7; }
.bd-select-option[aria-disabled="true"] { color: #737b8a; background: #f7f8fa; cursor: not-allowed; }
.bd-select-group { padding: 12px 12px 5px; color: #687285; font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 760px) {
  html body button.bd-select-trigger { min-height: 48px; font-size: 16px; }
  .bd-select-menu { font-size: 16px; }
  .bd-select-option { min-height: 48px; }
  .sort-form { min-width: 0; }
  .sort-form .bd-select { flex: 1; width: 200px; }
  .results-tools > a { flex-shrink: 0; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) { .bd-select-trigger::after { transition: none; } }
@media (forced-colors: active) {
  .bd-select-menu, html body button.bd-select-trigger { border-color: ButtonText; background: Canvas; color: CanvasText; }
  .bd-select-option.is-active { outline: 2px solid Highlight; outline-offset: -2px; }
  .bd-select-option[aria-selected="true"] { color: Highlight; }
}
