.search-bar { position: relative; display: flex; align-items: center; width: 100%; min-width: 0; }
.search-bar input {
  width: 100%;
  height: 48px;
  padding: 0 62px 0 var(--space-17);
  color: var(--jaroni-dark);
  border: 1px solid #d8dfdc;
  border-radius: 5px;
  background: var(--jaroni-white);
  box-shadow: inset 0 1px 1px rgba(4, 15, 9, .025);
  outline: none;
  transition: border-color var(--duration-normal) ease, box-shadow var(--duration-normal) ease;
}
.search-bar input::placeholder { color: #89928d; }
.search-bar:focus-within input { border-color: var(--jaroni-green); box-shadow: 0 0 0 3px rgba(0, 166, 81, .1); }
.search-bar button {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 40px;
  padding: 0;
  color: var(--jaroni-dark);
  border: 0;
  border-radius: var(--radius-3);
  background: var(--jaroni-yellow);
  cursor: pointer;
  transition: color var(--duration-normal) ease, background var(--duration-normal) ease;
}
.search-bar button:hover { color: white; background: var(--jaroni-green); }
.search-bar button svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 2; }

.search-suggestions {
  position: absolute;
  z-index: var(--z-160);
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  max-height: min(470px, calc(100vh - var(--jaroni-header-height) - 28px));
  padding: var(--space-8);
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--jaroni-dark);
  border: 1px solid var(--color-control-border);
  border-radius: 6px;
  background: var(--jaroni-white);
  box-shadow: 0 18px 44px rgba(7, 25, 15, .17);
}

.search-suggestions[hidden] { display: none; }
.search-suggestions__group + .search-suggestions__group { margin-top: var(--space-5); padding-top: var(--space-5); border-top: 1px solid #edf1ef; }
.search-suggestions__group h2 {
  margin: 0;
  padding: var(--space-7) var(--space-9) var(--space-5);
  color: #718078;
  font-size: var(--text-66);
  font-weight: var(--font-extrabold);
  letter-spacing: .09em;
  text-transform: uppercase;
}

.search-suggestions__item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: var(--space-11);
  align-items: center;
  min-height: 52px;
  padding: var(--space-7) var(--space-9);
  color: #16231d;
  border-radius: var(--radius-4);
  text-decoration: none;
  transition: background .16s ease, color .16s ease;
}

.search-suggestions__item:hover,
.search-suggestions__item.is-active { color: #0b6f3b; background: #f0f8f4; }
.search-suggestions__badge {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #087641;
  font-size: var(--text-68);
  font-weight: var(--font-weight-850);
  background: #eaf8f0;
  border: 1px solid #d0ebdc;
  border-radius: var(--radius-4);
}
.search-suggestions__item--catalogs .search-suggestions__badge { color: #a16c00; background: #fff8df; border-color: #f1e2aa; }
.search-suggestions__item--brands .search-suggestions__badge { color: #9e262c; background: #fff0f1; border-color: #f2d5d7; }
.search-suggestions__content { display: grid; min-width: 0; gap: var(--space-2); }
.search-suggestions__content strong { overflow: hidden; font-size: var(--text-82); line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.search-suggestions__content small { overflow: hidden; color: #718078; font-size: .69rem; text-overflow: ellipsis; white-space: nowrap; }
.search-suggestions__type { color: #7e8983; font-size: .65rem; font-weight: var(--font-bold); white-space: nowrap; }
.search-suggestions__all {
  display: flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  margin-top: var(--space-7);
  padding: var(--space-8) var(--space-12);
  color: #075f35;
  font-size: var(--text-76);
  font-weight: var(--font-extrabold);
  text-align: center;
  background: #f2f8f5;
  border-top: 1px solid #e0ebe5;
  border-radius: var(--radius-3);
}

@media (max-width: 768px) {
  .search-suggestions { top: calc(100% + 5px); max-height: min(430px, calc(100vh - 150px)); padding: var(--space-6); }
  .search-suggestions__item { grid-template-columns: 34px minmax(0, 1fr); min-height: 50px; padding: var(--space-7); }
  .search-suggestions__type { display: none; }
  .search-suggestions__badge { width: 34px; height: 34px; }
}
