.bee1-smart-search {
  --bee1-search-bg: #ffffff;
  --bee1-search-surface: #ffffff;
  --bee1-search-text: #161616;
  --bee1-search-muted: #6f7177;
  --bee1-search-border: rgba(20, 20, 20, 0.14);
  --bee1-search-accent: #111111;
  --bee1-search-accent-text: #ffffff;
  --bee1-search-radius: 8px;
  --bee1-search-shadow: 0 18px 50px rgba(0, 0, 0, 0.14);
  position: relative;
  width: 100%;
  max-width: 620px;
  color: var(--bee1-search-text);
}

.bee1-smart-search__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bee1-smart-search__box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  min-height: 46px;
  background: var(--bee1-search-bg);
  border: 1px solid var(--bee1-search-border);
  border-radius: var(--bee1-search-radius);
  overflow: hidden;
}

.bee1-smart-search__input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--bee1-search-text);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  padding: 0 16px;
}

.bee1-smart-search__input::-webkit-search-cancel-button {
  opacity: 0.65;
}

.bee1-smart-search__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  border: 0;
  border-inline-start: 1px solid var(--bee1-search-border);
  background: var(--bee1-search-accent);
  color: var(--bee1-search-accent-text);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 18px;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.bee1-smart-search__button:hover,
.bee1-smart-search__button:focus-visible {
  opacity: 0.88;
}

.bee1-smart-search__panel {
  position: absolute;
  z-index: 50;
  inset-inline: 0;
  top: calc(100% + 8px);
  max-height: min(560px, calc(100vh - 120px));
  overflow: auto;
  background: var(--bee1-search-surface);
  border: 1px solid var(--bee1-search-border);
  border-radius: var(--bee1-search-radius);
  box-shadow: var(--bee1-search-shadow);
  padding: 8px;
}

.bee1-smart-search__section + .bee1-smart-search__section,
.bee1-smart-search__all {
  margin-top: 8px;
}

.bee1-smart-search__heading {
  padding: 8px 10px 6px;
  color: var(--bee1-search-muted);
  font-size: 13px;
  font-weight: 700;
}

.bee1-smart-search__item,
.bee1-smart-search__all {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 8px 10px;
  color: var(--bee1-search-text);
  text-decoration: none;
  border-radius: calc(var(--bee1-search-radius) - 2px);
}

.bee1-smart-search__item:hover,
.bee1-smart-search__item:focus-visible,
.bee1-smart-search__item.is-active,
.bee1-smart-search__all:hover,
.bee1-smart-search__all:focus-visible,
.bee1-smart-search__all.is-active {
  background: rgba(0, 0, 0, 0.045);
  outline: none;
}

.bee1-smart-search__thumb {
  display: block;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.05);
}

.bee1-smart-search__thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.bee1-smart-search__content {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.bee1-smart-search__title {
  display: block;
  min-width: 0;
  color: var(--bee1-search-text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bee1-smart-search__meta {
  color: var(--bee1-search-muted);
  font-size: 13px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bee1-smart-search__side {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 84px;
}

.bee1-smart-search__price {
  color: var(--bee1-search-text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.bee1-smart-search__stock {
  color: var(--bee1-search-muted);
  font-size: 12px;
  line-height: 1.2;
}

.bee1-smart-search__stock.is-in {
  color: #167a3b;
}

.bee1-smart-search__stock.is-out {
  color: #a03535;
}

.bee1-smart-search__term-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--bee1-search-muted);
  font-weight: 800;
}

.bee1-smart-search__item--term {
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 52px;
}

.bee1-smart-search__all {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--bee1-search-accent);
  font-size: 14px;
  font-weight: 800;
  border: 1px solid var(--bee1-search-border);
}

.bee1-smart-search__state {
  padding: 18px 14px;
  color: var(--bee1-search-muted);
  font-size: 14px;
  text-align: center;
}

.bee1-smart-search.is-loading .bee1-smart-search__box {
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

@media (max-width: 640px) {
  .bee1-smart-search {
    max-width: none;
  }

  .bee1-smart-search__box {
    min-height: 44px;
  }

  .bee1-smart-search__button {
    min-width: 54px;
    padding-inline: 12px;
  }

  .bee1-smart-search__button-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .bee1-smart-search__button::before {
    content: "";
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-radius: 50%;
    box-sizing: border-box;
  }

  .bee1-smart-search__button::after {
    content: "";
    width: 8px;
    height: 2px;
    margin-inline-start: -3px;
    margin-top: 13px;
    background: currentColor;
    transform: rotate(45deg);
  }

  .bee1-smart-search__panel {
    position: fixed;
    left: 10px;
    right: 10px;
    top: auto;
    margin-top: 8px;
    max-height: min(70vh, 560px);
  }

  .bee1-smart-search__item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .bee1-smart-search__side {
    grid-column: 2;
    justify-items: start;
    min-width: 0;
  }
}
