.bon-gift-finder {
  --bon-gift-accent: #A54BD9;
  --bon-gift-accent-light: #A54BD9;
  --bon-gift-button: #E1E13D;
  --bon-gift-text: #212121;
  --bon-gift-border: #CDCDCD;

  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 700px;
  margin: 40px 0;
  padding: 94px 24px 38px;
  border-radius: 16px;
  background-color: var(--bon-gift-accent);
  background-image: url('/image/catalog/banners/gift-finder-bg.jpg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  box-sizing: border-box;
}

.bon-gift-finder * {
  box-sizing: border-box;
}

.bon-gift-finder .bon-gift-finder__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.bon-gift-finder .bon-gift-finder__title {
  max-width: 520px;
  margin: 0 auto 30px;
  color: #ffffff;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.08;
  text-align: center;
}

.bon-gift-finder .bon-gift-finder__form {
  padding: 42px 44px 40px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: none;
}

.bon-gift-finder .bon-gift-finder__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 14px;
}

.bon-gift-finder .bon-gift-finder__field {
  min-width: 0;
}

.bon-gift-finder .bon-gift-finder__label {
  display: block;
  margin: 0 0 7px;
  color: var(--bon-gift-text);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
}

/* ========================================= Gift Finder custom select ========================================= */
.bon-gift-finder .bon-gift-finder__field {
  position: relative;
  z-index: 1;
}

.bon-gift-finder .bon-gift-finder__field.is-select-open {
  z-index: 100;
}

.bon-gift-finder .bon-gift-finder__select-wrap {
  position: relative;
  width: 100%;
}

/* * Старую CSS-стрелку отключаем. * Новая находится внутри кнопки custom select. */
.bon-gift-finder .bon-gift-finder__select-wrap::after {
  display: none;
  content: none;
}

/* * Настоящий select остаётся в форме, * но визуально скрывается после инициализации JS. */
.bon-gift-finder .bon-gift-finder__select.is-enhanced {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

/* Обёртка */
.bon-gift-finder .bon-gift-select {
  position: relative;
  width: 100%;
}

/* Кнопка закрытого списка */
.bon-gift-finder .bon-gift-select__toggle {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 44px;
  padding: 0 42px 0 16px;
  border: 1px solid var(--bon-gift-border);
  border-radius: 9px;
  background: #ffffff;
  color: #444444;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, border-radius 0.2s ease;
}

.bon-gift-finder .bon-gift-select__toggle:hover {
  border-color: #b8b8b8;
}

.bon-gift-finder .bon-gift-select__toggle:focus {
  border-color: var(--bon-gift-accent);
  box-shadow: 0 0 0 3px rgba(165, 75, 217, 0.12);
  outline: none;
}

/* Стрелка */
.bon-gift-finder .bon-gift-select__toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 17px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--bon-gift-accent);
  border-bottom: 1.5px solid var(--bon-gift-accent);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
  pointer-events: none;
}

.bon-gift-finder .bon-gift-select.is-open .bon-gift-select__toggle {
  border-color: #CDCDCD;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
  box-shadow: none;
}

.bon-gift-finder .bon-gift-select.is-open .bon-gift-select__toggle::after {
  transform: translateY(-25%) rotate(225deg);
}

/* Выпадающая панель */
.bon-gift-finder .bon-gift-select__menu {
  position: absolute;
  top: calc(100% - 1px);
  right: 0;
  left: 0;
  z-index: 200;
  display: none;
  max-height: 230px;
  margin: 0;
  padding: 4px 0;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid #CDCDCD;
  border-top: 0;
  border-radius: 0;
  background: #F4F4F4;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  scrollbar-width: thin;
  scrollbar-color: var(--bon-gift-accent) #dedede;
}

.bon-gift-finder .bon-gift-select.is-open .bon-gift-select__menu {
  display: block;
}

/* Scrollbar Chrome, Edge, Safari */
.bon-gift-finder .bon-gift-select__menu::-webkit-scrollbar {
  width: 5px;
}

.bon-gift-finder .bon-gift-select__menu::-webkit-scrollbar-track {
  background: #dedede;
}

.bon-gift-finder .bon-gift-select__menu::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: var(--bon-gift-accent);
}

/* Варианты */
.bon-gift-finder .bon-gift-select__option {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 27px;
  margin: 0;
  padding: 5px 12px;
  border: 0;
  background: transparent;
  color:  var(--bon-color-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.bon-gift-finder .bon-gift-select__option:hover,
.bon-gift-finder .bon-gift-select__option:focus {
  background: #e8e8e8;
  color:  var(--bon-color-muted);
  outline: none;
}

.bon-gift-finder .bon-gift-select__option.is-selected {
  background: #ece2f3;
  color: var(--bon-gift-accent);
  font-weight: 500;
}

.bon-gift-finder .bon-gift-select__option:disabled,
.bon-gift-finder .bon-gift-select__option.is-disabled {
  color: #aaaaaa;
  cursor: default;
  pointer-events: none;
}

/* * Форма не должна обрезать открытый список. */
.bon-gift-finder .bon-gift-finder__form,
.bon-gift-finder .bon-gift-finder__fields {
  overflow: visible;
}

@media (max-width: 767px) {
  .bon-gift-finder .bon-gift-select__toggle {
    height: 44px;
    font-size: 13px;
  }

  .bon-gift-finder .bon-gift-select__menu {
    max-height: 210px;
  }

  .bon-gift-finder .bon-gift-select__option {
    min-height: 32px;
    font-size: 13px;
  }
}

.bon-gift-finder .bon-gift-finder__bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 1fr);
  align-items: end;
  gap: 18px;
  margin-top: 22px;
}

.bon-gift-finder .bon-gift-finder__range {
  position: relative;
  height: 58px;
  padding-top: 13px;
}

.bon-gift-finder .bon-gift-finder__range-track,
.bon-gift-finder .bon-gift-finder__range-fill {
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 3px;
}

.bon-gift-finder .bon-gift-finder__range-track {
  background: #eeeeee;
}

.bon-gift-finder .bon-gift-finder__range-fill {
  left: 0;
  right: 0;
  background: var(--bon-gift-accent);
}

.bon-gift-finder .bon-gift-finder__range-input {
  position: absolute;
  top: 10px;
  left: 0;
  z-index: 2;
  width: 100%;
  height: 20px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  outline: none;
  pointer-events: none;
  appearance: none;
  -webkit-appearance: none;
}

.bon-gift-finder .bon-gift-finder__range-input::-webkit-slider-runnable-track {
  height: 3px;
  background: transparent;
  border: 0;
}

.bon-gift-finder .bon-gift-finder__range-input::-moz-range-track {
  height: 3px;
  background: transparent;
  border: 0;
}

.bon-gift-finder .bon-gift-finder__range-input::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--bon-gift-accent);
  box-shadow: 0 0 0 1px rgba(170, 67, 223, .12);
  cursor: pointer;
  pointer-events: auto;
  appearance: none;
  -webkit-appearance: none;
}

.bon-gift-finder .bon-gift-finder__range-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--bon-gift-accent);
  box-shadow: 0 0 0 1px rgba(170, 67, 223, .12);
  cursor: pointer;
  pointer-events: auto;
}

.bon-gift-finder .bon-gift-finder__price-values {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color:  var(--bon-color-muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
}

.bon-gift-finder .bon-gift-finder__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 44px;
  padding: 10px 18px;
  color:  var(--bon-color-muted);
  background: var(--bon-gift-button);
  border: 0;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: transform .2s ease, filter .2s ease;
}

.bon-gift-finder .bon-gift-finder__submit:hover {
  filter: brightness(.97);
  transform: translateY(-1px);
}

.bon-gift-finder .bon-gift-finder__submit-icon {
  flex: 0 0 auto;
}

@media (max-width: 767px) {
  .bon-gift-finder {
    min-height: 0;
    margin: 24px 0;
    padding: 22px 10px 10px;
    border-radius: 6px;
    background-position: top center;
  }

  .bon-gift-finder .bon-gift-finder__inner {
    max-width: none;
  }

  .bon-gift-finder .bon-gift-finder__title {
    max-width: 260px;
    margin-bottom: 18px;
    font-size: 22px;
    line-height: 1.12;
  }

  .bon-gift-finder .bon-gift-finder__form {
    padding: 24px 16px 20px;
    border-radius: 10px;
  }

  .bon-gift-finder .bon-gift-finder__fields {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .bon-gift-finder .bon-gift-finder__bottom {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 18px;
  }

  .bon-gift-finder .bon-gift-finder__select {
    height: 44px;
    font-size: 13px;
  }

  .bon-gift-finder .bon-gift-finder__submit {
    min-height: 48px;
  }
}