/* Storefront product search autocomplete */
.sm-search-results {
  padding: 12px 0 8px;
}

/* Подравняване с началото на текста в полето за търсене (икона + wrapper padding) */
.sm-search-results__inner {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--LAYOUT-WIDTH, 1450px);
  margin-left: auto;
  margin-right: auto;
  padding-left: calc(var(--outer, 20px) + 52px);
  padding-right: var(--outer, 20px);
}

.drawer__search .sm-search-results__inner {
  padding-left: 52px;
  padding-right: var(--outer, 20px);
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.search-popdown .sm-search-results__inner {
  padding-left: calc(var(--outer, 20px) + 52px);
}

.sm-search-results--empty {
  padding: 20px 0;
}

.sm-search-results__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sm-search-results__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}

.sm-search-results__item:hover,
.sm-search-results__item:focus-visible {
  background: rgba(0, 0, 0, 0.04);
  outline: none;
}

.sm-search-results__item .product__inline__image {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border-radius: 8px;
  background: #f4f4f4;
}

.sm-search-results__item .product__inline__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sm-search-results__subtitle {
  margin: 2px 0 0;
  font-size: 0.85em;
  opacity: 0.72;
  line-height: 1.3;
}

.sm-search-results__empty {
  margin: 0;
  text-align: center;
  opacity: 0.75;
}

.sm-search-results__footer {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  text-align: center;
}

.sm-search-results__view-all {
  font-size: 0.95em;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.header__search__results:not(:empty),
.search__predictive [data-predictive-search-results]:not(:empty) {
  max-height: min(70vh, 520px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Search results page */
.sm-search-page__header {
  margin-bottom: 28px;
}

.sm-search-page__title {
  margin: 0 0 16px;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.sm-search-page__form {
  display: flex;
  gap: 10px;
  max-width: 560px;
}

.sm-search-page__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 16px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  font-size: 1rem;
}

.sm-search-page__submit {
  flex: 0 0 auto;
  padding: 12px 22px;
  border: 0;
  border-radius: 8px;
  background: #1a1a1a;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}

.sm-search-page__submit:hover {
  background: #333;
}

.sm-search-page__hint,
.sm-search-page__count {
  margin: 0 0 20px;
  opacity: 0.8;
}

.sm-search-page__grid {
  margin-top: 8px;
}

.sm-search-page__grid.js-grid {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

.sm-search-page__grid .product-grid-item__images {
  max-width: 100%;
}

.sm-search-page__grid .product-grid-item__image {
  max-width: 100%;
  height: auto;
}

/* Header search inputs */
.search__predictive input[type="search"]::placeholder {
  opacity: 0.55;
}
