/* Wyszukiwarka produktów: [sb_product_search] */

.sb_search_results_title__phrase {
  color: var(--sb-color-secondary, #007c30);
}

.sb_search_results_title__count {
  color: #8b8f99;
  font-weight: 400;
}

.sb_product_search {
  position: relative;
  z-index: 20;
  width: 270px;
  max-width: 100%;
  font-family: inherit;
}

.sb_product_search__form,
.sb_product_search__field {
  position: relative;
  width: 100%;
  margin: 0;
}

.sb_product_search__search-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 13px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  opacity: 0.62;
  pointer-events: none;
}

.sb_product_search .by-search-input {
  width: 100% !important;
  height: 36px !important;
  padding: 0 36px 0 40px !important;
  border: 1px solid #d5d5d5 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #111 !important;
  font-family: inherit !important;
  font-size: 12px !important;
  line-height: normal !important;
  outline: none !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.sb_product_search .by-search-input::-webkit-search-cancel-button {
  display: none;
  appearance: none;
  -webkit-appearance: none;
}

.sb_product_search .by-search-input::placeholder {
  color: #9ca3af !important;
  opacity: 1 !important;
}

.sb_product_search .by-search-input:focus {
  border-color: #b9b9b9 !important;
  outline: none !important;
  box-shadow: none !important;
}

.sb_product_search__dropdown {
  position: absolute;
  z-index: 1000;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  max-height: min(480px, calc(100vh - 120px));
  padding: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--sb-color-border, #e5e5e5);
  border-radius: 12px;
  background: var(--sb-color-white, #fff);
  box-shadow: 0 12px 28px rgba(16, 16, 16, 0.1);
  box-sizing: border-box;
}

.sb_product_search__dropdown[hidden],
.sb_product_search__status:empty,
.sb_product_search__all[hidden] {
  display: none;
}

.sb_product_search__results {
  display: grid;
  gap: 4px;
}

.sb_product_search__item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 7px;
  border-radius: 8px;
  color: var(--sb-color-text, #101010);
  text-decoration: none;
  transition: background-color 140ms ease;
}

.sb_product_search__item:hover,
.sb_product_search__item:focus-visible,
.sb_product_search__item.is-active {
  background: #f6f6f6;
  color: var(--sb-color-text, #101010);
  outline: none;
}

.sb_product_search__item.is-out-of-stock {
  opacity: 0.58;
}

.sb_product_search__media {
  display: flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
}

.sb_product_search__media img {
  width: 100%;
  height: 100%;
  padding: 4px;
  object-fit: contain;
  object-position: center;
  box-sizing: border-box;
}

.sb_product_search__details {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.sb_product_search__title {
  display: -webkit-box;
  overflow: hidden;
  color: #101010;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sb_product_search__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
}

.sb_product_search__price {
  color: #101010;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.sb_product_search__price del {
  color: #8a8a8a;
  font-weight: 400;
}

.sb_product_search__price ins {
  color: #101010;
  text-decoration: none;
}

.sb_product_search__net-content {
  color: #686868;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.2;
}

.sb_product_search__stock {
  grid-column: 1 / -1;
  width: fit-content;
  padding: 2px 5px;
  border-radius: 4px;
  background: #eeeeee;
  color: #5f6368;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
}

.sb_product_search__status {
  min-height: 54px;
  padding: 16px 10px;
  color: #686868;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
  box-sizing: border-box;
}

.sb_product_search__status.is-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sb_product_search__status.is-loading::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 2px solid #e2e2e2;
  border-top-color: #007c30;
  border-radius: 50%;
  animation: sb-product-search-spin 650ms linear infinite;
}

.sb_product_search__all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding: 10px 8px 4px;
  border-top: 1px solid #ededed;
  color: #101010;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
}

.sb_product_search__all:hover,
.sb_product_search__all:focus-visible {
  color: #000;
  outline: none;
}

.sb_product_search__all img {
  width: 18px;
  height: 18px;
  transition: transform 150ms ease;
}

.sb_product_search__all:hover img,
.sb_product_search__all:focus-visible img {
  transform: translate(2px, -2px);
}

@keyframes sb-product-search-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 767px) {
  .sb_product_search {
    width: min(270px, 100%);
  }

  .sb_product_search__dropdown {
    max-height: min(420px, calc(100vh - 96px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .sb_product_search__item,
  .sb_product_search__all img {
    transition: none;
  }

  .sb_product_search__status.is-loading::before {
    animation-duration: 1.2s;
  }
}
