.header-search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}

.boroda-search-modal {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 104px 20px 32px;
  visibility: hidden;
  pointer-events: none;
}

.boroda-search-modal.is-open {
  visibility: visible;
  pointer-events: auto;
}

.boroda-search-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.66);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.boroda-search-modal.is-open .boroda-search-modal__overlay {
  opacity: 1;
}

.boroda-search-modal__panel {
  position: relative;
  width: min(720px, calc(100% - 32px));
  max-height: calc(100vh - 126px);
  overflow: visible;
  padding: 0;
  background: transparent;
  box-shadow: none;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.boroda-search-modal.is-open .boroda-search-modal__panel {
  opacity: 1;
  transform: translateY(0);
}

.boroda-search-modal__close {
  position: absolute;
  top: 1px;
  right: 0;
  z-index: 3;
  width: 46px;
  height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.boroda-search-modal__close span {
  position: absolute;
  top: 18px;
  left: 11px;
  width: 24px;
  height: 1px;
  background: #fff;
}

.boroda-search-modal__close span:first-child {
  transform: rotate(45deg);
}

.boroda-search-modal__close span:last-child {
  transform: rotate(-45deg);
}

.boroda-search-modal__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.boroda-search-modal__field {
  position: relative;
  display: flex;
  align-items: stretch;
  height: 40px;
  padding: 0 46px 0 44px;
  border: 1px solid #ff9700;
  background: #5c5c5c;
}

.boroda-search-modal__field::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 15px;
  width: 16px;
  height: 16px;
  background: url("../../img/icons/Search-wt.svg") center / contain no-repeat;
  transform: translateY(-50%);
}

.boroda-search-modal__field input {
  flex: 1 1 auto;
  min-width: 0;
  height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 38px;
  text-transform: uppercase;
  outline: none;
}

.boroda-search-modal__field input::placeholder {
  color: rgba(255, 255, 255, 0.86);
}

.boroda-search-modal__field input::-webkit-search-cancel-button {
  display: none;
}

.boroda-search-modal__field button {
  display: none;
}

.boroda-search-modal__status {
  min-height: 22px;
  padding: 10px 16px 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.boroda-search-modal__results {
  display: grid;
  gap: 18px;
  max-height: calc(100vh - 190px);
  overflow: auto;
  margin-top: 10px;
}

.boroda-search-modal__results:not(:empty) {
  padding: 18px 22px 22px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
}

.boroda-search-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.boroda-search-section__title {
  margin: 0;
  color: #000;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 6px;
  line-height: 1.3;
  text-transform: uppercase;
}

.boroda-search-section__all {
  color: #ff9700;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.boroda-search-products,
.boroda-search-categories,
.boroda-search-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.boroda-search-product {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 8px 0;
  border-bottom: 1px solid #ededed;
  color: #000;
  text-decoration: none;
}

.boroda-search-product__image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: #fafafa;
}

.boroda-search-product__image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.boroda-search-product__title {
  display: block;
  margin: 0 0 5px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.boroda-search-product__price {
  color: #ff9700;
  font-size: 13px;
  font-weight: 800;
}

.boroda-search-product__status {
  display: inline-block;
  margin-left: 8px;
  color: #777;
  font-size: 11px;
}

.boroda-search-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 9px 0;
  border-bottom: 1px solid #ededed;
  color: #000;
  text-decoration: none;
}

.boroda-search-category span {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.boroda-search-category em {
  flex: 0 0 auto;
  color: #777;
  font-size: 11px;
  font-style: normal;
}

.boroda-search-content__item {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid #ededed;
  color: #000;
  text-decoration: none;
}

.boroda-search-content__type {
  display: block;
  margin-bottom: 5px;
  color: #ff9700;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.boroda-search-content__title {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.boroda-search-content__excerpt {
  display: block;
  color: #555;
  font-size: 12px;
  line-height: 1.45;
}

.boroda-search-empty {
  padding: 12px 0;
  color: #555;
  font-size: 14px;
}

.boroda-search-page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0 80px;
}

.boroda-search-page__title {
  display: block;
  margin: 0 0 22px;
  color: #000;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.16;
  text-align: center;
  text-transform: uppercase;
}

.boroda-search-page__form {
  display: flex;
  align-items: stretch;
  max-width: 740px;
  margin: 0 auto 36px;
  border: 1px solid #d9d9d9;
  background: #fff;
}

.boroda-search-page__form input {
  flex: 1 1 auto;
  min-width: 0;
  height: 52px;
  padding: 0 18px;
  border: 0;
  color: #000;
  font: inherit;
  outline: none;
}

.boroda-search-page__form button {
  flex: 0 0 auto;
  min-width: 132px;
  padding: 0 24px;
  border: 0;
  background: #ff9700;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  cursor: pointer;
}

.boroda-search-page__sections {
  display: grid;
  gap: 32px;
  margin-top: 30px;
}

.boroda-search-page .products {
  margin-top: 0;
}

.boroda-search-page .boroda-search-categories {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.boroda-search-page .boroda-search-category {
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid #ededed;
}

.boroda-search-page__content-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.boroda-search-page__content-item {
  color: #000;
  text-decoration: none;
}

.boroda-search-page__content-item h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.3;
}

.boroda-search-page__content-item p {
  margin: 0;
  color: #555;
  font-size: 13px;
  line-height: 1.5;
}

body.boroda-search-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .boroda-search-modal {
    padding: 72px 12px 0;
  }

  .boroda-search-modal__panel {
    width: 100%;
    max-height: calc(100vh - 84px);
  }

  .boroda-search-modal__results {
    max-height: calc(100vh - 146px);
  }

  .boroda-search-modal__results:not(:empty) {
    padding: 16px;
  }

  .boroda-search-page .boroda-search-categories,
  .boroda-search-page__content-list {
    grid-template-columns: 1fr;
  }

  .boroda-search-page__title {
    font-size: 26px;
    text-align: left;
  }

  .boroda-search-page__form {
    flex-direction: column;
    border: 0;
    gap: 10px;
  }

  .boroda-search-page__form input {
    border: 1px solid #d9d9d9;
  }

  .boroda-search-page__form button {
    width: 100%;
    height: 48px;
  }

  .boroda-search-section__title {
    letter-spacing: 5px;
  }
}
