.sb-search {
  --sb-accent: #1f8fe5;
  --sb-bg: #ffffff;
  --sb-line: #e8e8e8;
  --sb-soft: #f3f3f3;
  --sb-text: #1d1d1f;
  --sb-muted: #6f7580;
  --sb-icon: #0f2236;

  position: relative;
  width: 100%;
  max-width: 420px;
}

.sb-search,
.sb-search * {
  box-sizing: border-box;
}

.sb-search__bar {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--sb-soft);
  border-radius: 10px;
  width: 300px;
  padding: 0 12px;
  height: 38px;
}

.sb-search__input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  border: 0;
  background: transparent;
  color: #7b7b7b;
  font-size: 14px;
  outline: none;
  padding: 0;
}

.sb-search__input::placeholder {
  color: #777;
  opacity: 1;
}

.sb-search__clear {
  display: none !important;
  pointer-events: none;
}

.sb-search__submit {
  all: unset;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  color: var(--sb-icon);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.sb-search__submit:hover,
.sb-search__submit:focus-visible {
  opacity: 0.85;
}

.sb-search__icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: -10px;
}

.sb-search__icon svg {
  width: 100%;
  height: 100%;
  display: block;
  stroke: currentColor;
  fill: none;
}

@media (max-width: 768px) {
  .sb-search {
    max-width: 100%;
  }

  .sb-search__bar {
    min-height: 48px;
  }

  .sb-search__input {
    font-size: 15px;
    padding-right: 42px;
  }

  .sb-search__submit {
    width: 30px;
    height: 30px;
  }

  .sb-search__icon {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 480px) {
  .sb-search__input {
    font-size: 14px;
  }
}

.sb-search__panel {
  position: absolute;
  z-index: 9999;
  top: calc(100% + 10px);
  left: 0;
  width: 100%;
  background: var(--sb-bg);
  border: 1px solid var(--sb-line);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.12);
  overflow: hidden;
}

.sb-search__results {
  max-height: 70vh;
  overflow: auto;
}

.sb-search__more-wrap {
  padding: 12px 14px;
  border-top: 1px solid var(--sb-line);
  background: #fff;
}

.sb-search__more {
  display: block;
  width: 100%;
  border: 1px solid #dbe6f3;
  border-radius: 8px;
  background: #f7fbff;
  color: var(--sb-accent);
  text-align: center;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 12px;
}

.sb-search__more:hover {
  background: #eef6ff;
}

.sb-search__empty {
  padding: 18px;
  font-size: 14px;
  color: var(--sb-muted);
}

.sb-search__brands {
  border-bottom: 1px solid var(--sb-line);
  background: #fff;
}

.sb-search__brands-head {
  padding: 10px 14px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--sb-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sb-search__brands-list {
  display: grid;
}

.sb-search__brand-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--sb-text);
  border-top: 1px solid var(--sb-line);
}

.sb-search__brand-item:hover {
  background: #f7fbff;
}

.sb-search__brand-name {
  font-size: 14px;
  font-weight: 600;
}

.sb-search__brand-count {
  font-size: 12px;
  color: var(--sb-muted);
  white-space: nowrap;
}

.sb-search__products {
  background: #fff;
}

.sb-search__products-head {
  padding: 10px 14px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--sb-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--sb-line);
  background: #fafcfe;
}

.sb-search__group-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--sb-line);
  background: #fafcfe;
}

.sb-search__group-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--sb-text);
}

.sb-search__group-title .type {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--sb-muted);
}

.sb-search__group-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--sb-muted);
  font-weight: 500;
}

.sb-search__list {
  display: grid;
}

.sb-search__item {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--sb-text);
  border-bottom: 1px solid var(--sb-line);
  background: white;
}

.sb-search__item:hover {
  background: #f7fbff;
}

.sb-search__thumb {
  width: 55px;
  height: 55px;
  border-radius: 10px;
  overflow: hidden;
  background: #f8f8f8;
  display: grid;
  place-items: center;
}

.sb-search__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sb-search__name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.sb-search__price {
  margin-top: 4px;
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 14px;
  font-weight: 500;
}

.sb-search__price .is-strike {
  text-decoration: line-through;
  color: #111;
  opacity: 0.8;
}

.sb-search__price .sale {
  color: var(--sb-text);
}

.sb-search__badge {
  display: none;
}
