/**
 * Быстрый поиск — отдельный CSS для выката на прод без layout-v2.
 */
.block.search,
.shell-search {
  position: relative;
}

/* крестик очистки внутри инпута (слева от лупы) */
form.js-search-suggest input[name="query"],
.shell-search input[name="query"],
.block.search input[name="query"],
#search_mobile input[name="query"] {
  padding-right: 52px !important;
}

.search-clear {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 12;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #888;
  font-size: 20px;
  line-height: 22px;
  cursor: pointer;
  opacity: .75;
}

.search-clear:hover {
  opacity: 1;
  color: #222;
  background: rgba(0, 0, 0, .06);
}

.search-clear[hidden] {
  display: none !important;
}

.search-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 80;
  background: #fff;
  border: 1px solid #e0d6c6;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
  max-height: min(70vh, 420px);
  overflow: auto;
  text-align: left;
}

.search-suggest__label {
  padding: 8px 12px 4px;
  font-size: 12px;
  color: #777;
  text-transform: uppercase;
}

.search-suggest__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  text-decoration: none;
  color: #222;
  border: 0;
  border-top: 1px solid #f0ebe3;
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}

.search-suggest__item:hover {
  background: #f7f3eb;
}

.search-suggest__item--preview {
  min-height: 56px;
}

.search-suggest__thumb {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border: 1px solid #e0d6c6;
  background: #faf7f1;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-suggest__thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.search-suggest__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.search-suggest__name {
  font-size: 14px;
  line-height: 1.25;
}

.search-suggest__price {
  color: #b01a33;
  font-weight: 700;
  font-size: 13px;
}

.search-suggest__popular {
  display: block;
}

.search-suggest__all {
  display: block;
  padding: 10px 12px;
  text-align: center;
  font-weight: 700;
  color: #b01a33;
  text-decoration: none;
  border-top: 1px solid #e0d6c6;
  background: #faf7f1;
}

.search-suggest__all:hover {
  background: #f3eee4;
}

/* ширина бургер-меню (было 300px) */
#mobilemenu.leftside {
  width: 310px;
  min-width: 310px;
  max-width: 100%;
}

/* поиск внутри бургер-меню: поверх пунктов меню (scroller режет absolute) */
#mobilemenu .search-h.search-mobile,
#mobilemenu #search_mobile {
  position: relative;
  z-index: 3200;
}

#mobilemenu .search-suggest,
#mobilemenu #searchSuggestMobile {
  position: fixed;
  z-index: 4000;
  max-height: 45vh;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
}

@media (max-width: 767px) {
  .block.search,
  .shell-search,
  #search_mobile {
    z-index: 90;
  }
  .search-suggest {
    position: absolute;
    left: 0;
    right: 0;
    max-height: 55vh;
    -webkit-overflow-scrolling: touch;
  }
  #mobilemenu .search-suggest,
  #mobilemenu #searchSuggestMobile {
    position: fixed;
    max-height: 45vh;
  }
  .search-suggest__thumb {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }
  .search-suggest__name {
    font-size: 13px;
  }
  .search-suggest__item {
    padding: 10px 12px;
  }
}
