.search-page {
  padding-bottom: 32px;
}

.search-page .home-top-search__glass {
  font-size: 22px;
  width: 22px;
  text-align: center;
  line-height: 1;
}

.search-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .search-layout {
    grid-template-columns: 1fr;
  }
}

.search-sidebar {
  position: sticky;
  top: calc(var(--home-topbar-offset, var(--header-h, 64px)) + 12px);
  background: #fff;
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 14px;
  padding: 18px 16px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  overflow: visible;
  z-index: 5;
}

.search-filters {
  overflow: visible;
}

@media (max-width: 900px) {
  .search-sidebar {
    position: static;
  }
}

.search-filters__title {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.search-filters__field {
  margin-bottom: 14px;
}

.search-filters__field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #52525b;
  margin-bottom: 5px;
}

.search-filters__field input:not(.search-combo__input),
.search-filters__field select.search-combo__native {
  width: 100%;
  min-height: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  line-height: 42px;
  background-color: #fff;
  box-sizing: border-box;
}

.search-filters__field select.search-combo__native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  padding: 0;
  border: 0;
  margin: 0;
}

.search-filters__field input[type='number'] {
  line-height: 1.35;
  padding-top: 0;
  padding-bottom: 0;
}

.search-filters__attrs {
  margin: 4px 0 14px;
  padding: 12px 10px;
  background: #f8fafc;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
}

.search-filters__attrs-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: #3f3f46;
}

.search-combo {
  position: relative;
  width: 100%;
}

.search-combo__input {
  width: 100%;
  min-height: 42px;
  height: 42px;
  padding: 0 2.5rem 0 12px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  line-height: 42px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%23757575' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px auto;
  box-sizing: border-box;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-combo.is-open .search-combo__input {
  border-color: #00aaff;
  box-shadow: 0 0 0 3px rgba(0, 170, 255, 0.12);
}

.search-combo__toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 2.5rem;
  height: 42px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.search-combo__panel {
  position: fixed;
  z-index: 2000;
  max-height: min(280px, 50vh);
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
  box-sizing: border-box;
}

.search-combo__item {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.search-filters__hint {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted, #757575);
}

.search-combo__empty {
  margin: 0;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--muted, #757575);
}

.search-filters__field--city .search-combo__input {
  cursor: text;
}

.search-combo__item:hover,
.search-combo__item.is-active {
  background: #f0f9ff;
  color: #006da3;
}

.search-filters__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.search-filters__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.search-filters__submit {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: #00aaff;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.search-filters__submit:hover {
  background: #0095e0;
}

.search-filters__reset {
  text-align: center;
  font-size: 13px;
  color: #71717a;
}

.search-filters__reset:hover {
  color: #00aaff;
}

.search-main__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 16px;
}

.search-main__head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
}

.search-main__count {
  color: #757575;
  font-size: 14px;
}

.search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.search-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f4f4f5;
  font-size: 13px;
  color: #3f3f46;
}

.search-chip a {
  color: inherit;
  text-decoration: none;
}

.search-chip a:hover {
  color: #00aaff;
}

.search-chip__x {
  opacity: 0.55;
  font-size: 11px;
}

.search-query-inline {
  margin-bottom: 12px;
}

.search-query-inline input[type='search'] {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 2px solid #00aaff;
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  box-sizing: border-box;
}

@media (min-width: 901px) {
  .search-filters__field--sort-sidebar {
    display: none;
  }
}

.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #ebebeb;
}

.catalog-toolbar__left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  min-width: 0;
}

.catalog-toolbar__views {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  background: #f4f4f5;
  border-radius: 8px;
}

.catalog-toolbar__view {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  color: #71717a;
}

.catalog-toolbar__view:hover {
  color: #18181b;
}

.catalog-toolbar__view.is-active {
  background: #fff;
  color: #18181b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.catalog-toolbar__ico {
  display: block;
  width: 18px;
  height: 18px;
  background: currentColor;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

.catalog-toolbar__ico--list {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='4' cy='5' r='1.5' fill='black'/%3E%3Crect x='7' y='4' width='11' height='2' rx='1' fill='black'/%3E%3Ccircle cx='4' cy='10' r='1.5' fill='black'/%3E%3Crect x='7' y='9' width='11' height='2' rx='1' fill='black'/%3E%3Ccircle cx='4' cy='15' r='1.5' fill='black'/%3E%3Crect x='7' y='14' width='11' height='2' rx='1' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='4' cy='5' r='1.5' fill='black'/%3E%3Crect x='7' y='4' width='11' height='2' rx='1' fill='black'/%3E%3Ccircle cx='4' cy='10' r='1.5' fill='black'/%3E%3Crect x='7' y='9' width='11' height='2' rx='1' fill='black'/%3E%3Ccircle cx='4' cy='15' r='1.5' fill='black'/%3E%3Crect x='7' y='14' width='11' height='2' rx='1' fill='black'/%3E%3C/svg%3E");
}

.catalog-toolbar__ico--grid {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Crect x='3' y='3' width='6' height='6' rx='1' fill='black'/%3E%3Crect x='11' y='3' width='6' height='6' rx='1' fill='black'/%3E%3Crect x='3' y='11' width='6' height='6' rx='1' fill='black'/%3E%3Crect x='11' y='11' width='6' height='6' rx='1' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Crect x='3' y='3' width='6' height='6' rx='1' fill='black'/%3E%3Crect x='11' y='3' width='6' height='6' rx='1' fill='black'/%3E%3Crect x='3' y='11' width='6' height='6' rx='1' fill='black'/%3E%3Crect x='11' y='11' width='6' height='6' rx='1' fill='black'/%3E%3C/svg%3E");
}

.catalog-toolbar__ico--map {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M8 3 3 5v11l5-2 4 2 5-2V5l-5 2-4-2Z' fill='none' stroke='black' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M8 3v11M12 5v11' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M8 3 3 5v11l5-2 4 2 5-2V5l-5 2-4-2Z' fill='none' stroke='black' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M8 3v11M12 5v11' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E");
}

.catalog-toolbar__ico--sort {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 4v12M14 4v12' fill='none' stroke='black' stroke-width='1.5'/%3E%3Cpath d='M3.5 7 6 4.5 8.5 7M11.5 13 14 15.5 16.5 13' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 4v12M14 4v12' fill='none' stroke='black' stroke-width='1.5'/%3E%3Cpath d='M3.5 7 6 4.5 8.5 7M11.5 13 14 15.5 16.5 13' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

.catalog-toolbar__ico--notify {
  width: 20px;
  height: 20px;
  background: transparent;
  mask-image: none;
  -webkit-mask-image: none;
  background-image: url('/img/icon-notify-new.png?v=1');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.catalog-toolbar__sort-wrap {
  position: relative;
}

.catalog-toolbar__sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: #3f3f46;
  cursor: pointer;
}

.catalog-toolbar__sort:hover {
  background: #f4f4f5;
}

.catalog-toolbar__sort-caret {
  font-size: 11px;
  opacity: 0.6;
}

.catalog-toolbar__sort-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 20;
  min-width: 200px;
  padding: 6px;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.catalog-toolbar__sort-menu[hidden] {
  display: none !important;
}

.catalog-toolbar__sort-opt {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.catalog-toolbar__sort-opt:hover,
.catalog-toolbar__sort-opt.is-active {
  background: #f0f9ff;
  color: #0369a1;
}

.catalog-toolbar__near {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: #52525b;
  user-select: none;
}

.catalog-toolbar__near-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.catalog-toolbar__switch {
  position: relative;
  width: 40px;
  height: 22px;
  background: #d4d4d8;
  border-radius: 999px;
  flex-shrink: 0;
  transition: background 0.2s;
}

.catalog-toolbar__switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s;
}

.catalog-toolbar__near-input:checked + .catalog-toolbar__switch {
  background: #00aaff;
}

.catalog-toolbar__near-input:checked + .catalog-toolbar__switch::after {
  transform: translateX(18px);
}

.catalog-toolbar__notify {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  min-height: 36px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: #3f3f46;
  cursor: pointer;
}

.catalog-toolbar__notify:hover {
  color: #00aaff;
}

.catalog-toolbar__toast {
  margin: -8px 0 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #ecfdf5;
  color: #166534;
  font-size: 13px;
}

.catalog-toolbar__toast[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .catalog-toolbar__near-text {
    display: none;
  }

  .catalog-toolbar__notify span:not(.catalog-toolbar__ico) {
    display: none;
  }
}

.catalog-results[data-active-view='map'] [data-catalog-panel]:not([data-catalog-panel='map']) {
  display: none !important;
}

.catalog-results[data-active-view='list'] [data-catalog-panel='grid'],
.catalog-results[data-active-view='list'] [data-catalog-panel='empty'] {
  display: none !important;
}

.catalog-results[data-active-view='grid'] [data-catalog-panel='list'],
.catalog-results[data-active-view='grid'] [data-catalog-panel='map'] {
  display: none !important;
}

.ads-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.ad-list-item {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ad-list-item__media {
  position: relative;
  width: 168px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #f4f4f5;
}

.ad-list-item__img {
  display: block;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.ad-list-item__img img,
.ad-list-item__media .ad-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ad-list-item__media.ad-card__img--gallery .ad-card__story-bar {
  opacity: 0;
  transition: opacity 0.15s;
}

.ad-list-item__media.ad-card__img--gallery:hover .ad-card__story-bar,
.ad-list-item__media.ad-card__img--gallery.is-gallery-hover .ad-card__story-bar {
  opacity: 1;
}

.ad-list-item__body {
  display: block;
  text-decoration: none;
  color: inherit;
}

.ad-list-item__body:hover .ad-list-item__title {
  color: #00aaff;
}

.ad-list-item__price {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
}

.ad-list-item__title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.ad-list-item__meta {
  margin: 0;
  font-size: 13px;
  color: #71717a;
}

.catalog-map {
  margin-bottom: 24px;
}

.catalog-map__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.catalog-map__toolbar-text {
  margin: 0;
  font-size: 13px;
  color: #71717a;
}

.catalog-map__loc-btn {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #d4d4d8;
  border-radius: 8px;
  background: #fff;
  color: #18181b;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.catalog-map__loc-btn:hover {
  border-color: #00aaff;
  color: #00aaff;
}

.catalog-map__frame {
  width: 100%;
  min-height: min(58vh, 520px);
  border-radius: 14px;
  overflow: hidden;
  background: #e4e4e7;
  border: 1px solid #e4e4e7;
}

.catalog-map__status {
  margin: 10px 0 0;
  font-size: 13px;
  color: #71717a;
}

.catalog-map-balloon {
  box-sizing: border-box;
  width: 272px;
  max-width: 100%;
  padding-top: 22px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  color: #18181b;
  overflow: hidden;
}

.catalog-map-balloon__gallery {
  margin: 0 0 8px;
}

.catalog-map-balloon__frame {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f0f0;
  aspect-ratio: 16 / 10;
  max-height: 156px;
}

.catalog-map-balloon__frame.ad-card__img--gallery .ad-card__story-bar {
  opacity: 1;
  transform: none;
}

.catalog-map-balloon__frame.ad-card__img--gallery::before {
  opacity: 1;
}

.catalog-map-balloon__body {
  padding: 0 1px 0;
}

.catalog-map-balloon__price {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.catalog-map-balloon__title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: #111;
}

.catalog-map-balloon__city {
  margin: 0 0 6px;
  font-size: 12px;
  color: #71717a;
}

.catalog-map-balloon__excerpt {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.35;
  color: #52525b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.catalog-map-balloon__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 0 14px;
  border-radius: 8px;
  background: #00aaff;
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  box-sizing: border-box;
}

.catalog-map-balloon__btn:hover {
  background: #0095e0;
  color: #fff !important;
}

#catalog-map-yandex [class*='balloon__content'],
#catalog-map-yandex [class*='balloon__content'] > ymaps {
  margin: 0 !important;
  padding: 10px 10px 8px !important;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
}

#catalog-map-yandex [class*='balloon__close'] {
  top: 8px !important;
  right: 8px !important;
}

#catalog-map-yandex [class*='balloon__layout'],
#catalog-map-yandex [class*='balloon__panel'],
#catalog-map-yandex [class*='balloon__body'] {
  max-height: none !important;
  overflow: visible !important;
}

#catalog-map-yandex [class*='balloon'] {
  max-height: none !important;
}


