/* Search (Ruslan, 26.11.2026): the suggestions under every search field
   (static/front/js/search-suggest.js) and the /search page (tmpl/front/catalog/search_head.tpl).
   style.css sets every span to Montserrat !important and greys "p span" with !important, so the
   page uses divs for text with spans inside. */

/* ---- The field ---------------------------------------------------------------------------- */

.search-modern .search-input::-webkit-search-decoration,
.search-modern .search-input::-webkit-search-cancel-button,
.search-modern .search-input::-webkit-search-results-button,
.search-modern .search-input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
.search-modern .search-input {
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  text-overflow: ellipsis;
}
.search-modern .search-input::placeholder {
  font-style: normal;
}
.search-modern .ss-clear {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0 2px 0 6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #eef2f0;
  color: #5f6f69;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.search-modern .ss-clear svg {
  display: block;
  width: 14px;
  height: 14px;
  pointer-events: none;
}
.search-modern .ss-clear:hover {
  background: #e2ebe6;
  color: #2d5a42;
}
.search-modern .ss-clear:focus-visible {
  outline: 2px solid #60967d;
  outline-offset: 1px;
}
.search-modern.ss-has-text .ss-clear {
  display: inline-flex;
}
/* The field stays put while the list is open (style.css lifts it 1px on focus). */
.search-modern.ss-open .search-input-wrapper {
  transform: none !important;
}

/* ---- The suggestions ---------------------------------------------------------------------- */

.search-form.ss-host {
  position: relative;
}

.ss-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 1200;
  box-sizing: border-box;
  max-height: min(72vh, 600px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 8px;
  border: 1px solid #dce7e1;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(18, 33, 27, 0.16), 0 2px 6px rgba(18, 33, 27, 0.06);
  color: #1f2d27;
  font-family: Montserrat, 'Montserrat Fallback', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.35;
  text-align: left;
}
.ss-panel[hidden] {
  display: none;
}
.ss-panel *,
.ss-panel span {
  font-family: Montserrat, 'Montserrat Fallback', system-ui, sans-serif !important;
}
/* Wide fields (a computer's header): suggestions on the left, products on the right. The list
   is at least 720px wide and never narrower than the field, so on wide screens its edges are
   the field's edges. */
@media (min-width: 994px) {
  .header .ss-panel {
    left: 50%;
    right: auto;
    width: max(100%, min(720px, calc(100vw - 32px)));
    transform: translateX(-50%);
  }
  .ss-panel.ss-panel--split .ss-cols {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 8px;
  }
  .ss-panel.ss-panel--split .ss-col--products {
    padding-left: 8px;
    border-left: 1px solid #eef2f0;
  }
}
.ss-section + .ss-section {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid #eef2f0;
}
.ss-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px 4px;
  color: #7a8a84;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ss-label--sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.ss-label__action {
  padding: 2px 4px;
  border: 0;
  background: none;
  color: #4a7c59;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}
.ss-label__action:hover {
  text-decoration: underline;
}
.ss-option {
  display: flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 10px;
  color: #1f2d27 !important;
  text-decoration: none !important;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ss-option:hover,
.ss-option.is-active {
  background: #f1f7f4;
}
.ss-option.is-active {
  box-shadow: inset 0 0 0 1px #cfe2d8;
}
.ss-option__icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: #8aa39a;
}
.ss-option__text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #3b4a44;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ss-option__text b {
  color: #1f2d27;
  font-weight: 700;
}
.ss-option__meta {
  flex: 0 0 auto;
  margin-left: auto;
  color: #8a9893;
  font-size: 12px;
}
.ss-option--fix .ss-option__text {
  white-space: normal;
}
.ss-option--fix .ss-option__text b {
  color: #2d5a42;
}
.ss-cat__img {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  background: #eef5f2;
}
.ss-cat__ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #eef5f2;
  color: #4a7c59;
}
.ss-cat__ph svg {
  width: 16px;
  height: 16px;
}
.ss-product {
  align-items: center;
  min-height: 60px;
}
.ss-product__img {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  background: #eef5f2;
}
.ss-product__ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(160deg, #eef5f2, #e2eee8);
  color: #7fa794;
}
.ss-product__ph svg {
  width: 26px;
  height: 26px;
}
.ss-product__name {
  flex: 1 1 auto;
  min-width: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #1f2d27;
  font-size: 14px;
  line-height: 1.3;
}
.ss-product__price {
  flex: 0 0 auto;
  margin-left: auto;
  padding-left: 8px;
  text-align: right;
  white-space: nowrap;
}
.ss-product__now {
  display: block;
  color: #1f2d27;
  font-size: 14px;
  font-weight: 700;
}
.ss-product__old {
  display: block;
  color: #98a5a0;
  font-size: 12px;
  text-decoration: line-through;
}
.ss-product__out {
  display: block;
  color: #98a5a0;
  font-size: 12px;
}
.ss-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  min-height: 44px;
  margin-top: 6px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f1f7f4;
  color: #2d5a42 !important;
  font-weight: 700;
  text-decoration: none !important;
}
.ss-all:hover,
.ss-all.is-active {
  background: #e4f0ea;
}
.ss-all.is-active {
  box-shadow: inset 0 0 0 1px #c3d8cc;
}
.ss-all svg {
  width: 16px;
  height: 16px;
}
.ss-empty {
  padding: 14px 10px 6px;
  color: #5f6f69;
}
.ss-empty__title {
  margin-bottom: 4px;
  color: #1f2d27;
  font-weight: 700;
}
.ss-empty__text {
  color: #5f6f69;
  font-size: 13px;
}
.ss-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 10px 10px;
}
.ss-chip {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid #dce7e1;
  border-radius: 999px;
  background: #fff;
  color: #2d5a42 !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
}
.ss-chip:hover,
.ss-chip.is-active {
  border-color: #b9d3c6;
  background: #f1f7f4;
}
.ss-loading {
  height: 2px;
  margin: -8px -8px 6px;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}
.ss-loading::before {
  content: "";
  display: block;
  width: 40%;
  height: 100%;
  background: #60967d;
  animation: ss-loading 0.9s ease-in-out infinite;
}
@keyframes ss-loading {
  from { transform: translateX(-100%); }
  to { transform: translateX(260%); }
}
@media (prefers-reduced-motion: reduce) {
  .ss-loading::before { animation: none; width: 100%; opacity: 0.4; }
}
/* Phones: a list as wide as the field, with bigger rows. */
@media (max-width: 993px) {
  .ss-panel {
    top: calc(100% + 6px);
    border-radius: 14px;
    font-size: 15px;
  }
  .ss-option {
    min-height: 46px;
  }
  .ss-product {
    min-height: 62px;
  }
  .ss-chip {
    min-height: 38px;
    font-size: 14px;
  }
}

/* ---- The /search page --------------------------------------------------------------------- */

.srch {
  margin: 4px 0 20px;
  color: #1f2d27;
}
.srch-field {
  display: none;
}
@media (max-width: 993px) {
  .srch-field {
    display: block;
    margin: 0 0 16px;
  }
  .srch-field .search-input-wrapper {
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    padding: 6px 6px 6px 14px;
    border: 1px solid #dce7e1;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  }
  .srch-field .search-input-wrapper:focus-within {
    border-color: #8fbca6;
    transform: none;
  }
  .srch-field .search-icon {
    margin-right: 10px;
    color: #4f866e;
  }
  .srch-field .search-input {
    font-size: 16px;
  }
  .srch-field .search-button {
    width: 36px;
    height: 36px;
    margin-left: 6px;
    padding: 0;
    border-radius: 10px;
    background: #4f9a5d;
  }
}
.srch-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
}
.srch-head {
  min-width: 0;
}
.srch .srch-title {
  margin: 0;
  padding: 0;
  color: #1f2d27;
  font-family: Montserrat, 'Montserrat Fallback', system-ui, sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-align: left;
  overflow-wrap: anywhere;
}
.srch .srch-title__q {
  color: #3e735d;
}
.srch-count {
  margin-top: 6px;
  color: #5f6f69;
  font-size: 15px;
  line-height: 1.4;
}
.srch-count__price {
  color: #5f6f69;
}
.srch-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #dce7e1;
  border-radius: 12px;
  background: #f3f8f5;
  color: #2f3f39;
  font-size: 14px;
  line-height: 1.45;
}
.srch-note__icon {
  flex: 0 0 auto;
  margin-top: 1px;
  color: #4a7c59;
}
.srch-note__text {
  color: #2f3f39;
}
.srch-refine {
  margin-top: 14px;
}
.srch-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.srch-chips--center {
  justify-content: center;
}
.srch-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid #dce7e1;
  border-radius: 999px;
  background: #fff;
  color: #2d5a42 !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.srch-chip:hover {
  border-color: #b9d3c6;
  background: #f1f7f4;
}
.srch-chip:focus-visible {
  outline: 2px solid #60967d;
  outline-offset: 2px;
}
.srch-chip--category {
  background: #f3f8f5;
}
.srch-chip__icon {
  flex: 0 0 auto;
  color: #4a7c59;
}
.srch-chip__text {
  color: inherit;
}
.srch-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}
.srch-select {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  min-width: 190px;
  height: 52px;
  margin: 0;
  padding: 6px 36px 6px 14px;
  border: 1px solid #dce7e1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(22, 33, 28, 0.05);
  cursor: pointer;
}
.srch-select:hover {
  border-color: #c3d8cc;
}
.srch-select:focus-within {
  border-color: #8fbca6;
  box-shadow: 0 0 0 3px rgba(96, 150, 125, 0.18);
}
.srch-select.is-set {
  border-color: #b9d3c6;
  background: #f6faf8;
}
.srch-select__k {
  color: #7a8a84;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-transform: uppercase;
}
.srch-select__v {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #1f2d27;
  font-family: Montserrat, 'Montserrat Fallback', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
}
.srch-select__v::-ms-expand {
  display: none;
}
/* The whole pill opens the list: the select covers it, the label shows above. */
.srch-select__v {
  position: static;
}
.srch-select__chev {
  position: absolute;
  top: 50%;
  right: 14px;
  margin-top: -7px;
  color: #4f866e;
  pointer-events: none;
}
.srch-tools__go {
  height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  background: #4a7c59;
  color: #fff;
  font-weight: 700;
}
.srch-bar {
  margin: 18px 0 8px;
}
.srch-empty {
  box-sizing: border-box;
  max-width: 640px;
  margin: 8px auto 8px;
  padding: 32px 28px 28px;
  border: 1px solid #e4ece8;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(18, 33, 27, 0.06);
  text-align: center;
}
.srch-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: #eef5f2;
  color: #4a7c59;
}
.srch .srch-empty__title {
  margin: 0 0 8px;
  padding: 0;
  color: #1f2d27;
  font-family: Montserrat, 'Montserrat Fallback', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  overflow-wrap: anywhere;
}
.srch-empty__text {
  max-width: 480px;
  margin: 0 auto;
  color: #5f6f69;
  font-size: 15px;
  line-height: 1.5;
}
.srch-empty__popular {
  margin-top: 22px;
}
.srch-empty__label {
  margin-bottom: 10px;
  color: #7a8a84;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.srch-empty__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 46px;
  margin-top: 24px;
  padding: 12px 24px;
  border-radius: 12px;
  background: linear-gradient(135deg, #60967d 0%, #4a7c59 100%);
  box-shadow: 0 6px 16px rgba(74, 124, 89, 0.25);
  color: #fff !important;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none !important;
}
.srch-empty__btn:hover {
  background: linear-gradient(135deg, #4a7c59 0%, #3d6a4a 100%);
}
.srch-empty--budget {
  max-width: none;
  margin-top: 18px;
  padding: 24px;
  box-shadow: none;
}
.srch-empty--budget .srch-empty__btn {
  margin-top: 14px;
}
.srch .srch-section {
  margin: 36px 0 4px;
  padding: 0;
  color: #1f2d27;
  font-family: Montserrat, 'Montserrat Fallback', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
}
.srch .srch-section::after {
  display: none;
}
@media (max-width: 767px) {
  .srch {
    margin-bottom: 14px;
  }
  .srch .srch-title {
    font-size: 22px;
  }
  .srch-count {
    font-size: 14px;
  }
  .srch-refine {
    margin-left: -12px;
    margin-right: -12px;
  }
  .srch-refine .srch-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0 12px 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .srch-refine .srch-chips::-webkit-scrollbar {
    display: none;
  }
  .srch-tools {
    flex-wrap: nowrap;
    width: 100%;
    gap: 8px;
  }
  .srch-select {
    flex: 1 1 0;
    min-width: 0;
    height: 50px;
    padding-right: 30px;
  }
  /* «Сначала дешевле» is the longest choice. */
  .srch-select--sort {
    flex-grow: 1.25;
  }
  .srch-select__chev {
    right: 10px;
  }
  .srch-select__v {
    font-size: 14px;
    text-overflow: ellipsis;
  }
  .srch-empty {
    padding: 26px 18px 22px;
    border-radius: 18px;
  }
  .srch .srch-empty__title {
    font-size: 19px;
  }
  .srch-empty__text {
    font-size: 14px;
  }
  .srch .srch-section {
    margin-top: 28px;
    font-size: 19px;
  }
}
