.site-search__form,
.search-page__form {
  position: relative;
}

.search-suggest {
  position: absolute;
  z-index: 500;
  top: calc(100% + 10px);
  left: 0;
  width: min(440px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid #d7d7d7;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(25, 25, 25, .2);
  color: #191919;
  text-align: left;
}

.search-suggest[hidden] {
  display: none;
}

.search-suggest__list {
  max-height: 330px;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  list-style: none;
}

.search-suggest__list[hidden] {
  display: none;
}

.search-suggest__item + .search-suggest__item {
  border-top: 1px solid #ededed;
}

.search-suggest__option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 7px;
  color: #191919;
  text-decoration: none;
}

.search-suggest__option:hover,
.search-suggest__option:focus-visible,
.search-suggest__option--active {
  outline: 0;
  background: #fff37a;
}

.search-suggest__title {
  min-width: 0;
  overflow: hidden;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-suggest__type {
  color: #696969;
  font-size: 12px;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.search-suggest__message {
  margin: 0;
  padding: 18px 20px 12px;
  color: #595959;
  font-size: 16px;
  line-height: 1.35;
}

.search-suggest__all {
  display: block;
  padding: 12px 20px;
  border-top: 1px solid #dedede;
  background: #f5f5f5;
  color: #191919;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
}

.search-suggest__all:hover,
.search-suggest__all:focus-visible {
  background: #f2df00;
  outline: 0;
}

.site-search--footer .search-suggest {
  top: auto;
  bottom: calc(100% + 10px);
}

.site-search--header .search-suggest {
  top: calc(100% + 11px);
  left: -21px;
}

.site-search--footer .search-suggest,
.site-search--catalog .search-suggest {
  right: 0;
  left: auto;
}

.search-page__form .search-suggest {
  right: -2px;
  left: -2px;
  width: auto;
}

@media (max-width: 767px) {
  .search-suggest {
    width: min(100%, calc(100vw - 30px));
    border-radius: 9px;
  }

  .search-suggest__option {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 11px 12px;
  }

  .search-suggest__title {
    font-size: 16px;
  }

  .search-suggest__type {
    font-size: 11px;
  }

  .search-page__form .search-suggest {
    top: calc(100% + 8px);
    right: 0;
    left: 0;
  }
}
