/* home-critical.css — first-paint subset; full home.css loads deferred */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--theme-font-family, "Inter", "Segoe UI", sans-serif);
  color: var(--theme-text-primary, #1a1a1a);
  background: var(--theme-bg, #f6f7fb);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Sticky footer - main content grows to push footer down */
main, .main-content {
  flex: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1400px; /* общий контейнер сайта: и header, и контент */
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* Мобильные и планшеты: симметричные поля (иначе safe-area слева/справа разный — «косит» контент) */
@media (max-width: 768px) {
  .container {
    max-width: 100%;
    /* Один отступ с двух сторон: 16px + максимум из safe-area (не разные left/right) */
    padding-left: max(16px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
    padding-right: max(16px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  }

  /* Обрезаем вылезающий контент без горизонтального скролла страницы (не вешаем overflow на body — модалки/sticky) */
  .main-content {
    overflow-x: clip;
  }
}

/* ===== HEADER ===== */
/* ── Maintenance indicator bar ── */
.maintenance-bar {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  color: #fff;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.maintenance-bar a {
  color: #fff;
  text-decoration: underline;
  margin-left: 4px;
}
.maintenance-bar a:hover {
  opacity: .85;
}

/* Режим импersonации (панель → сайт от имени пользователя) */
.impersonation-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 12px 20px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: #422006;
  background: linear-gradient(100deg, #fde68a 0%, #fcd34d 35%, #fbbf24 70%, #f59e0b 100%);
  border-bottom: 1px solid rgba(120, 53, 15, 0.18);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset;
}

.impersonation-banner__text strong {
  font-weight: 700;
}

.impersonation-banner__form {
  display: inline-flex;
  margin: 0;
}

.impersonation-banner__exit {
  background: rgba(66, 32, 6, 0.14);
  border: 1px solid rgba(66, 32, 6, 0.22);
  padding: 7px 16px;
  border-radius: 10px;
  color: #422006;
  font-weight: 600;
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.impersonation-banner__exit:hover {
  background: rgba(66, 32, 6, 0.22);
  border-color: rgba(66, 32, 6, 0.35);
}

.impersonation-banner__exit:active {
  transform: scale(0.98);
}

.site-header {
  background: var(--theme-header-bg, #ffffff);
  border-bottom: 1px solid var(--theme-border, #e6e8ef);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Не использовать padding: 16px 0 — shorthand сбрасывает padding-left/right и ломает
     горизонтальные отступы .container на мобилке (шапка на всю ширину, контент с полями). */
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 20px;
  flex-wrap: wrap;
}

.logo {
  font-weight: 700;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: var(--theme-logo-text-gap, 12px);
  flex-shrink: 0;
}

.logo img {
  height: 36px;
  border-radius: 6px;
}

.logo-text {
  color: var(--theme-logo-text-color, #1a1a1a);
  font-size: var(--theme-logo-text-size, 20px);
  font-weight: var(--theme-logo-text-weight, 700);
  font-family: var(--theme-logo-text-family, "Inter", "Segoe UI", sans-serif);
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 16px;
  flex-wrap: nowrap;
}

.nav-link {
  color: var(--theme-text-secondary, #4b5563);
  font-size: var(--theme-font-size-base, 14px);
  white-space: nowrap;
}

.nav-link--soon {
  color: var(--theme-primary, #2f5eff);
  cursor: pointer;
}
.nav-link--soon::after {
  content: none;
}

/* Блок «лого + город» — расстояние между ними 24px */
.header-inner .header-logo-region {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}

/* Кнопка «Город» в шапке — по клику открывает модалку смены региона */
.header-region {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--theme-border, #e6e8ef);
  border-radius: 8px;
  background: var(--theme-surface, #ffffff);
  color: var(--theme-header-text, #1a1a1a);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  flex-shrink: 0;
  white-space: nowrap;
}
.header-region:hover {
  background: var(--theme-bg, #f6f7fb);
  border-color: var(--theme-primary, #2f5eff);
  color: var(--theme-primary, #2f5eff);
}
.header-region__icon {
  font-size: 14px;
  color: var(--theme-primary, #2f5eff);
}
.header-region:hover .header-region__icon {
  color: var(--theme-primary, #2f5eff);
}
.header-region__label {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Полноэкранный слой объявления (fetch partial + history), только мобилка в JS */
.ad-detail-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: var(--theme-bg, #f8fafc);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.ad-detail-mobile-overlay.is-open {
  display: block;
}
body.ad-detail-mobile-overlay-open {
  overflow: hidden;
}

/* Карточка объявления — мобильная шапка: назад + иконки вместо «Добавить объявление» */
.ad-detail-mobile-toolbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

/* Подача объявления — мобильная шапка (только «назад»); на десктопе не показываем */
.listing-create-mobile-toolbar {
  display: none;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 10px;
}

/* Предпросмотр объявления — та же мобильная шапка */
.listing-preview-mobile-toolbar {
  display: none;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 10px;
}

.ad-detail-mobile-toolbar__back {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1px solid var(--theme-border, #e6e8ef);
  border-radius: 12px;
  background: var(--theme-surface, #fff);
  color: var(--theme-text-primary, #0f172a);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.ad-detail-mobile-toolbar__back:hover {
  background: var(--theme-bg, #f6f7fb);
  border-color: var(--theme-primary, #2f5eff);
  color: var(--theme-primary, #2f5eff);
}

.ad-detail-mobile-toolbar__back:active {
  transform: scale(0.97);
}

.ad-detail-mobile-toolbar__center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  margin: 0 auto;
}

.ad-detail-mobile-toolbar__icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  min-width: 0;
}

.ad-detail-mobile-toolbar__icon-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1px solid var(--theme-border, #e6e8ef);
  border-radius: 12px;
  background: var(--theme-surface, #fff);
  color: var(--theme-text-secondary, #475569);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  font-size: 16px;
  padding: 0;
}

.ad-detail-mobile-toolbar__icon-btn i {
  display: block;
  line-height: 1;
}

.ad-detail-mobile-toolbar__icon-btn .fa-heart {
  margin-right: 0 !important;
}

.ad-detail-mobile-toolbar__theme-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid var(--theme-border, #e6e8ef);
  border-radius: 12px;
  background: var(--theme-surface, #fff);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ad-detail-mobile-toolbar__icon-btn:hover {
  background: var(--theme-bg, #f6f7fb);
  border-color: #cbd5e1;
  color: var(--theme-primary, #2f5eff);
}

.ad-detail-mobile-toolbar__icon-btn:active {
  transform: scale(0.97);
}

.ad-detail-mobile-toolbar__icon-btn.favorite-btn.is-favorite {
  color: #e11d48;
  border-color: rgba(225, 29, 72, 0.35);
  background: rgba(225, 29, 72, 0.06);
}

.ad-detail-mobile-toolbar__icon-btn--disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

@media (max-width: 768px) {
  body.page-ad-detail #beta-banner {
    display: none !important;
  }

  body.page-ad-detail .header-logo-region,
  body.page-ad-detail .site-header .nav {
    display: none !important;
  }

  body.page-ad-detail .site-header .actions > a.btn.primary {
    display: none !important;
  }

  body.page-ad-detail .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 10px;
    padding-top: max(10px, env(safe-area-inset-top, 0px));
    padding-bottom: 10px;
  }

  /* Перебиваем общий mobile (<768) column layout для шапки карточки */
  body.page-ad-detail .actions {
    width: auto;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: nowrap;
    flex-shrink: 0;
    margin: 0;
    margin-left: auto;
    margin-right: 16px;
    padding-left: 0;
    padding-right: 0;
  }

  body.page-ad-detail .ad-detail-mobile-toolbar {
    display: flex;
    margin-top: 10px;
  }

  body.page-ad-detail .ad-detail-mobile-toolbar__back {
    margin-left: 16px;
  }

  body.page-ad-detail .actions .user-menu__toggle {
    margin-right: 0;
  }

  /* Переключатель темы переносим в центр (рядом с иконками) */
  body.page-ad-detail .actions .theme-toggle {
    display: none !important;
  }

  body.page-ad-detail .listing-detail__actions-secondary {
    display: none !important;
  }

  /* Карточка объявления: действия — одной строкой и компактно */
  body.page-ad-detail .listing-detail__actions {
    flex-direction: row;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 8px;
  }

  body.page-ad-detail .listing-detail__actions > .btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 48px;
    box-sizing: border-box;
    padding: 10px 10px !important;
    font-size: 13px !important;
    line-height: 1.2;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
  }

  body.page-ad-detail .listing-detail__actions > .btn.btn--large {
    padding: 10px 10px !important;
    font-size: 13px !important;
  }

  body.page-ad-detail .listing-detail__actions > .btn i {
    margin-right: 6px;
    flex-shrink: 0;
  }

  /* Телефон — зелёный акцент, в одну линию по размеру с «Написать» */
  body.page-ad-detail .listing-detail__actions > .listing-detail__phone-btn {
    background: #16a34a !important;
    color: #fff !important;
    border: 1px solid #15803d !important;
    font-weight: 600;
  }

  body.page-ad-detail .listing-detail__actions > .listing-detail__phone-btn:hover {
    background: #15803d !important;
    border-color: #166534 !important;
    color: #fff !important;
  }

  body.page-ad-detail .listing-detail__actions > .listing-detail__phone-btn i {
    color: #fff !important;
  }

  /* Подача объявления (/new/) и предпросмотр — мобильная шапка */
  body.page-ad-create .listing-create-mobile-toolbar,
  body.page-ad-preview .listing-preview-mobile-toolbar {
    display: flex;
  }

  body.page-ad-create .header-logo-region,
  body.page-ad-create .site-header .nav,
  body.page-ad-preview .header-logo-region,
  body.page-ad-preview .site-header .nav {
    display: none !important;
  }

  body.page-ad-create .site-header .actions > a.btn.primary.header-add-ad-btn,
  body.page-ad-preview .site-header .actions > a.btn.primary.header-add-ad-btn {
    display: none !important;
  }

  body.page-ad-create .header-inner,
  body.page-ad-preview .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 10px;
    padding-top: max(10px, env(safe-area-inset-top, 0px));
    padding-bottom: 10px;
  }

  body.page-ad-create .actions,
  body.page-ad-preview .actions {
    width: auto;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: nowrap;
    flex-shrink: 0;
    margin: 0;
    margin-left: auto;
    margin-right: 16px;
    padding-left: 0;
    padding-right: 0;
  }

  body.page-ad-create .listing-create-mobile-toolbar__back,
  body.page-ad-preview .listing-preview-mobile-toolbar__back {
    margin-left: 16px;
  }
}

.btn {
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

/* Header primary button — выравниваем по высоте с меню пользователя и слегка анимируем, чтобы привлекать внимание */
@keyframes header-primary-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(47, 94, 255, 0);
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(47, 94, 255, 0.18);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(47, 94, 255, 0);
    transform: translateY(0);
  }
}

.site-header .actions .btn.primary {
  min-height: 48px;
  animation: header-primary-pulse 2.8s ease-in-out infinite;
}

.btn.primary {
  background: var(--theme-btn-primary-bg, #2f5eff);
  color: var(--theme-btn-primary-text, #ffffff);
  transition: background 0.2s;
}

.btn.primary:hover {
  background: var(--theme-btn-primary-hover, #1e40af);
}

.btn.ghost {
  background: var(--theme-btn-secondary-bg, #ffffff);
  border-color: var(--theme-btn-secondary-border, #d4d9e5);
  color: var(--theme-btn-secondary-text, #334155);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

/* --- end range 1-598 --- */
/* ===== HERO ===== */
.hero {
  padding: 40px 0 20px; /* вернул как было: только вертикальные отступы */
  overflow: visible; /* баннер под карточкой — absolute, без padding-bottom «на всю ширину» */
}

.hero-inner {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr 280px;
  align-items: end;
}

.hero-inner.hero-inner--no-right-rail {
  grid-template-columns: 1fr;
}

/* Строка: поиск + компактная кнопка «Мои объявления» у авторизованных без блоков статистики */
.hero-searchbar-first-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 12px;
  width: 100%;
}

/* Компактный hero: левая колонка = только полоса поиска + баннер под ней (правый край по «Найти»); справа — кнопка и split-баннер.
   Две строки сетки + display:contents у primary: иначе одна строка = высота max(слева, справа), и под горизонтальным баннером остаётся пустая ячейка слева от высокого вертикального баннера. */
.hero-searchbar-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 290px);
  grid-template-rows: auto auto;
  gap: 12px;
  align-items: start;
  width: 100%;
}

.hero-searchbar-band__primary {
  display: contents;
}

.hero-searchbar-band .hero-searchbar-first-row {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.hero-searchbar-band .hero-searchbar-band__below-main {
  grid-column: 1;
  grid-row: 2;
  margin-top: 12px;
  width: 100%;
  min-width: 0;
}

.hero-searchbar-band__rail {
  grid-column: 2;
  grid-row: 2;
  align-self: stretch;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  align-items: stretch;
}

.hero-searchbar-band__rail .hero-card--auth-inline {
  width: 100%;
}

@media (max-width: 900px) {
  .hero-searchbar-band {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .hero-searchbar-band .hero-searchbar-first-row,
  .hero-searchbar-band .hero-searchbar-band__below-main,
  .hero-searchbar-band__rail {
    grid-column: 1;
    grid-row: auto;
  }
}

.hero-searchbar-first-row .modern-searchbar__inner {
  flex: 1 1 auto;
  min-width: 0;
}

/* Та же сетка, что у .hero-below-searchband--split: левый край inner = левому баннеру */
.hero-searchbar-first-row--split-band {
  display: grid;
  grid-template-columns: 1fr minmax(0, 290px);
  gap: 12px;
  align-items: stretch;
}

.hero-searchbar-first-row--split-band .modern-searchbar__inner {
  flex: unset;
  width: 100%;
}

.hero-searchbar-first-row--split-band .hero-card--auth-inline {
  max-width: none;
  width: 100%;
}

/* Без правой колонки hero: .hero-content на всю ширину, а сетка категорий — max-width calc(100% - 304px).
   Иначе .modern-searchbar__inner шире сетки; правый край «Найти» выравниваем с категориями.
   container-type + cqi: при --split-band строка — grid, иначе % у flex-элемента был бы от узкой колонки. */
@media (min-width: 1025px) {
  .hero-inner.hero-inner--no-right-rail .hero-content {
    container-type: inline-size;
  }

  .hero-inner.hero-inner--no-right-rail .hero-searchbar-first-row .modern-searchbar__inner,
  .hero-inner.hero-inner--no-right-rail .hero-searchbar-band .modern-searchbar__inner {
    max-width: calc(100cqi - 304px);
  }
}

/* Было как .home-after-hero__right (280px); +10px по запросу — 290px. */
.hero-card--auth-inline {
  flex: 0 0 auto;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  margin-top: 0 !important;
  padding: 0;
  overflow: visible;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: transparent;
  border: none;
  box-sizing: border-box;
  width: 290px;
  max-width: 100%;
}

.hero-card--auth-inline .hero-card-btn {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Баннер под карточкой вне потока: иначе низ колонки совпадает с низом баннера и кнопка уезжает выше «Найти». */
.hero-side {
  position: relative;
  align-self: end;
  width: 100%;
}

.hero-below-card-banner {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  width: 100%;
  margin-top: 24px;
  /* Выше правой колонки home-after-hero; слева категории с max-width не заходят под баннер */
  z-index: 4;
}

/* Липкий верхний баннер home_right_top (колонка справа от контента; JS вешает --js-pinned) */
.home-right-top-banner--js-pinned {
  position: fixed !important;
  top: 90px;
  margin-top: 0;
  z-index: 40;
  max-width: min(280px, 100vw - 32px);
  box-sizing: border-box;
}

.hero-below-card-banner .site-banner-slot__placeholder {
  min-height: 180px;
}

/* Резерв высоты на планшете (баннер под карточкой скрыт на мобиле — см. блок ниже). */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero.hero--has-under-card-banner:has(.hero-below-card-banner:not(.hero-below-card-banner--scroll-follow)) {
    padding-bottom: 280px;
  }
}

/* Баннер под карточкой героя — только desktop / крупный планшет; на мобиле не показываем */
@media (max-width: 768px) {
  .hero-below-card-banner {
    display: none !important;
  }

  .hero.hero--has-under-card-banner:has(.hero-below-card-banner) {
    padding-bottom: 0;
  }
}

.hero-content h1 {
  font-size: 28px;
  margin-bottom: 12px;
  line-height: 1.3;
}

.hero-content p {
  color: var(--theme-text-muted, #5f6b7b);
  margin-bottom: 20px;
}

.hero-post-ad-cta {
  margin: 0 0 20px;
}

.hero-post-ad-cta .btn.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ===== SEARCH FORM ===== */
.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.search-form .search-input {
  flex: 2 1 200px;
  min-width: 180px;
}

.search-form select[name="category"],
.search-form select[name="region"] {
  flex: 1 1 150px;
  min-width: 140px;
}

.search-form input[name="price_min"],
.search-form input[name="price_max"] {
  flex: 0 1 110px;
  min-width: 100px;
}

.search-form .btn {
  flex: 0 0 auto;
}

.search-form input,
.search-form select {
  padding: 12px 14px;
  border-radius: var(--theme-radius-md, 10px);
  border: 1px solid var(--theme-border, #d4d9e5);
  background: var(--theme-surface, #ffffff);
  width: 100%;
  font-size: var(--theme-font-size-base, 14px);
}

.search-input {
  position: relative;
}

.suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: 48px;
  background: var(--theme-surface, #ffffff);
  border: 1px solid var(--theme-border, #e6e8ef);
  border-radius: var(--theme-radius-md, 10px);
  box-shadow: 0 8px 24px rgba(28, 32, 38, 0.12);
  display: none;
  z-index: 10;
}

.suggestions.open {
  display: block;
}

.suggestion-item {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f2f6;
  cursor: pointer;
}

.suggestion-item:last-child {
  border-bottom: none;
}

/* ===== HERO CARD ===== */
.hero-card {
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

/* Гость: светлая карточка, по высоте с tight-поиском (~−15% к прежним 58px) */
.hero-card.hero-card--guest {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid var(--theme-border, #e2e8f0);
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  height: 49px;
  min-height: unset;
}

.hero-card-guest__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #f97316;
  flex-shrink: 0;
}

.hero-card-guest__value {
  font-size: 26px;
  font-weight: 700;
  color: var(--theme-primary, #7c3aed);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero-card-guest__label {
  font-size: 18px;
  color: var(--theme-text-secondary, #64748b);
  line-height: 1.2;
}

/* Авторизованный: по макету — верх белый с лёгким градиентом, низ — сплошная кнопка без зазора */
.hero-card--auth {
  padding: 0;
  overflow: hidden;
  border: none;
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.1);
  margin-top: 12px;
  background: transparent;
}

.hero-side .hero-card--auth {
  margin-top: 0;
}

/* Верхняя часть карточки: белый фон с лёгким голубоватым градиентом сверху */
.hero-card__top {
  background: linear-gradient(180deg, #f0f4ff 0%, #ffffff 35%, #ffffff 100%);
  padding: 24px 24px 20px;
}

.hero-card-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Когда ни один блок не выбран — только кнопка */
.hero-card--auth-compact .hero-card-btn {
  border-radius: 18px;
}

.hero-card-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--theme-text-secondary, #64748b);
}

.hero-card-stat__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.hero-card-stat__icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.hero-card-stat__icon--draft img {
  width: 26px;
  height: 28px;
}

.hero-card-stat__icon--published {
  background: transparent;
  color: #fff;
}

.hero-card-stat__icon--draft,
.hero-card-stat__icon--awaiting {
  background: transparent;
}

.hero-card-stat__icon--moderation {
  background: transparent;
}

.hero-card-stat__icon--moderation img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.hero-card-stat__icon--blocked {
  background: transparent;
}

.hero-card-stat__icon--blocked img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.hero-card-stat__text {
  font-weight: 500;
  color: var(--theme-text-secondary, #64748b);
}

.hero-card-stat__text strong {
  font-weight: 700;
  color: var(--theme-text-primary, #1e293b);
}

/* Кнопка по макету: сплошной сине-фиолетовый блок на всю ширину, без зазора с верхней частью */
.hero-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 16px 24px;
  margin-top: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: #6366f1;
  border: none;
  border-radius: 0 0 18px 18px;
  text-decoration: none;
  transition: background 0.2s, opacity 0.2s;
  box-sizing: border-box;
}

.hero-card--auth-compact .hero-card-btn {
  padding: 16px 24px;
}

.hero-card--auth-inline.hero-card--auth-compact .hero-card-btn {
  border-radius: 14px;
  min-height: 0;
  padding: 12px 22px;
  font-size: 14px;
}

.hero-card-btn:hover {
  background: #4f46e5;
  color: #fff;
}

.site-banner-slot {
  width: 100%;
}

.site-banner-slot__link {
  display: block;
}

.site-banner-slot__body {
  transition: opacity 0.45s ease;
}

.site-banner-slot__body.site-banner-slot__body--fading {
  opacity: 0;
}

.site-banner-slot__image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

.site-banner-slot__video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

.site-banner-slot__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 180px;
  padding: 12px;
  border: 1px dashed var(--theme-border, #cbd5e1);
  border-radius: 14px;
  color: var(--theme-text-muted, #64748b);
  background: rgba(248, 250, 252, 0.92);
  font-size: 13px;
  text-align: center;
}

.home-right-banners {
  width: 280px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.home-right-banners .site-banner-slot--scroll-follow {
  position: sticky;
  top: 90px;
  z-index: 4;
  align-self: stretch;
}

.home-right-banners .site-banner-slot__placeholder {
  min-height: 180px;
}

.home-after-hero {
  position: relative;
  overflow: visible;
}

.home-after-hero__content {
  position: relative;
}

.home-after-hero__right {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  z-index: 2;
  width: 280px;
}

/* Верхний баннер absolute — нависает над колонкой; точный padding-top выставляет home.js по фактической высоте */
.home-after-hero--under-hero-top-banner .home-after-hero__right {
  padding-top: 0;
}

.section-before-city-banner {
  max-width: calc(100% - 304px);
  margin: 12px auto 0 0;
}


/* --- end range 600-1163 --- */
/* ===== SECTIONS ===== */
.section {
  padding: 40px 0 50px;
}

.section--categories {
  padding-top: 20px;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--theme-text-primary, #1a1a1a);
  letter-spacing: -0.02em;
}


/* --- end range 1164-1180 --- */
/* ===== CATEGORIES GRID ===== */
.categories-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.categories-grid.main-categories {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.section--categories .categories-all-link-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

/* На desktop выравниваем правую границу блока категорий
   с правой границей modern-searchbar (без правой hero-card колонки). */
@media (min-width: 1025px) {
  .section--categories .section-header.stacked,
  .section--categories .categories-all-link-row,
  .section--categories .categories-grid.main-categories {
    max-width: calc(100% - 304px); /* 280px hero-card + 24px gap из .hero-inner */
    margin-right: auto;
  }
}

.category-tile {
  position: relative;
  min-height: 130px;
  padding: 0;
  border: none;
  border-radius: 18px;
  overflow: hidden;
  background-color: linear-gradient(135deg, #cbd5f7, #9aa3c9);
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  display: flex;
  align-items: flex-end;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.category-tile--no-image {
  background: linear-gradient(135deg, #d6dbe8, #eef1f7) !important;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0) 0%,
    rgba(15, 23, 42, 0.45) 100%
  );
}

.category-tile-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 14px;
}

.category-count-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(124, 58, 237, 0.9);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  z-index: 2;
}

.main-categories .category-title {
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 0;
  font-size: 14px;
}

.category-card {
  background: var(--theme-surface, #ffffff);
  border-radius: var(--theme-radius-md, 12px);
  padding: 16px;
  border: 1px solid var(--theme-border, #eef0f6);
}

.category-media {
  width: 100%;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  background: #f0f2f7;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.category-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-media-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #dde2f0;
}

.category-title {
  font-weight: 600;
  margin-bottom: 8px;
}

.category-count {
  font-size: 12px;
  color: #8a93a6;
  margin-bottom: 8px;
}

.category-children span {
  display: inline-block;
  font-size: 12px;
  color: #5f6b7b;
  margin-right: 6px;
}


/* --- end range 3326-3467 --- */
/* ===== RECOMMENDED FOR YOU (horizontal slider, one row) ===== */
.recommended-for-you .section-header--one-line {
  margin-bottom: 12px;
}

.recommended-ads-slider {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 0 -4px;
}

.recommended-ads-slider__btn {
  flex-shrink: 0;
  width: 40px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--theme-border, #eef0f6);
  background: var(--theme-surface, #fff);
  color: var(--theme-text-secondary, #64748b);
  border-radius: var(--theme-radius-md, 12px);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  z-index: 2;
}

.recommended-ads-slider__btn:hover {
  background: var(--theme-bg, #f6f7fb);
  color: var(--theme-primary, #2f5eff);
}

.recommended-ads-slider__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.recommended-ads-slider__btn--prev {
  margin-right: 4px;
}

.recommended-ads-slider__btn--next {
  margin-left: 4px;
}

.recommended-ads-slider__track {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}

.recommended-ads-slider__inner {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0;
  touch-action: pan-x pan-y;
}

.recommended-ads-slider__inner::-webkit-scrollbar {
  display: none;
}

.recommended-ads-slider__card-wrap {
  flex: 0 0 auto;
  width: 200px;
  min-width: 200px;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

.recommended-for-you .listing-card.recommended-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.recommended-for-you .listing-card .listing-image {
  aspect-ratio: 1;
}

.recommended-for-you .listing-card .listing-body {
  flex: 1;
  min-height: 0;
}

@media (max-width: 768px) {
  .recommended-ads-slider__btn {
    width: 32px;
    min-height: 80px;
  }
  .recommended-ads-slider__card-wrap {
    width: 160px;
    min-width: 160px;
  }
  .recommended-ads-slider__inner {
    scroll-snap-type: x mandatory;
    cursor: grab;
  }
  .recommended-ads-slider__inner:active {
    cursor: grabbing;
  }
}


/* --- end range 4981-5093 --- */
/* ===== ADS GRID ===== */
.listings-grid,
.blog-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Главная — блок «Объявления вашего города» (#infinite-ads-grid): плотная сетка, до 5 карточек в ряд */
#infinite-ads-grid.listings-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

/* Одна высота карточек в ряду: объявления, однослайдовая реклама и карусель (#infinite-ads-grid). */
#infinite-ads-grid.listings-grid > .inline-banner-carousel {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#infinite-ads-grid.listings-grid > .inline-banner-carousel .inline-banner-carousel__viewport {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
}

#infinite-ads-grid.listings-grid > .inline-banner-carousel .inline-banner-carousel__slide {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#infinite-ads-grid.listings-grid > .listing-card-link,
#infinite-ads-grid.listings-grid > .inline-banner-carousel .inline-banner-carousel__slide > .listing-card-link {
  height: 100%;
  display: flex;
  flex-direction: column;
}

#infinite-ads-grid.listings-grid > .listing-card-link > .listing-card,
#infinite-ads-grid.listings-grid > .inline-banner-carousel .inline-banner-carousel__slide > .listing-card-link > .listing-card {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

#infinite-ads-grid.listings-grid > .listing-card-link > .listing-card .listing-body,
#infinite-ads-grid.listings-grid > .inline-banner-carousel .inline-banner-carousel__slide > .listing-card-link > .listing-card .listing-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

#infinite-ads-grid.listings-grid > .listing-card-link > .listing-card .listing-stats,
#infinite-ads-grid.listings-grid > .inline-banner-carousel .inline-banner-carousel__slide > .listing-card-link > .listing-card .listing-stats {
  margin-top: auto;
  padding-top: 6px;
}

@media (min-width: 1025px) {
  .section--infinite-home .section-header,
  .section--infinite-home #infinite-ads-grid,
  .section--infinite-home #infinite-ads-loading,
  .section--infinite-home #infinite-ads-end {
    max-width: calc(100% - 304px); /* 280px hero-card + 24px gap из .hero-inner */
    margin-right: auto;
  }
}

@media (max-width: 1280px) {
  #infinite-ads-grid.listings-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  #infinite-ads-grid.listings-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Премиум на главной */
.section.premium .listings-grid {
  gap: 16px;
}

/* Desktop: 2 ряда по 4 карточки и правая граница как у categories-grid */
@media (min-width: 1025px) {
  .section.premium .section-header,
  .section.premium .listings-grid {
    max-width: calc(100% - 304px); /* 280px hero-card + 24px gap из .hero-inner */
    margin-right: auto;
  }

  .section.premium .listings-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Карточки магазинов не растягиваются при малом количестве — фиксированная ширина колонки */
.shops-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 200px));
  justify-content: start;
  align-items: stretch;
}

@media (min-width: 1025px) {
  .section--shops-home .section-header,
  .section--shops-home .shops-grid {
    max-width: calc(100% - 304px); /* 280px hero-card + 24px gap из .hero-inner */
    margin-right: auto;
  }

  .section--shops-home .shops-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    justify-content: stretch;
  }

  .section--blog-home .section-header,
  .section--blog-home .blog-grid {
    max-width: calc(100% - 304px);
    margin-right: auto;
  }
}

@media (min-width: 1025px) and (max-width: 1300px) {
  .section--categories .section-header.stacked,
  .section--categories .categories-all-link-row,
  .section--categories .categories-grid.main-categories,
  .section.premium .section-header,
  .section.premium .listings-grid,
  .section--shops-home .section-header,
  .section--shops-home .shops-grid,
  .section--blog-home .section-header,
  .section--blog-home .blog-grid,
  .section--infinite-home .section-header,
  .section--infinite-home #infinite-ads-grid,
  .section--infinite-home #infinite-ads-loading,
  .section--infinite-home #infinite-ads-end,
  .section-before-city-banner {
    max-width: 100%;
  }

  /* Абсолютный баннер под hero-card остаётся в правой «колонке» ~280px; без этого контент на 100% заезжает под баннер. */
  body:has(.hero.hero--has-under-card-banner) .section--categories .section-header.stacked,
  body:has(.hero.hero--has-under-card-banner) .section--categories .categories-all-link-row,
  body:has(.hero.hero--has-under-card-banner) .section--categories .categories-grid.main-categories,
  body:has(.hero.hero--has-under-card-banner) .section.premium .section-header,
  body:has(.hero.hero--has-under-card-banner) .section.premium .listings-grid,
  body:has(.hero.hero--has-under-card-banner) .section--shops-home .section-header,
  body:has(.hero.hero--has-under-card-banner) .section--shops-home .shops-grid,
  body:has(.hero.hero--has-under-card-banner) .section--blog-home .section-header,
  body:has(.hero.hero--has-under-card-banner) .section--blog-home .blog-grid,
  body:has(.hero.hero--has-under-card-banner) .section--infinite-home .section-header,
  body:has(.hero.hero--has-under-card-banner) .section--infinite-home #infinite-ads-grid,
  body:has(.hero.hero--has-under-card-banner) .section--infinite-home #infinite-ads-loading,
  body:has(.hero.hero--has-under-card-banner) .section--infinite-home #infinite-ads-end,
  body:has(.hero.hero--has-under-card-banner) .section-before-city-banner {
    max-width: calc(100% - 304px);
    margin-right: auto;
  }
}

.listing-card {
  background: var(--theme-surface, #ffffff);
  border-radius: var(--theme-radius-md, 12px);
  overflow: hidden;
  border: 1px solid var(--theme-border, #eef0f6);
  min-width: 0;
}

.listing-card:has(.listing-card__badges),
.search-card:has(.listing-card__badges) {
  position: relative;
}

.listing-card:has(.listing-card__badge--premium),
.search-card:has(.listing-card__badge--premium) {
  overflow: visible;
}

.listing-card:has(.listing-card__badge--premium) .listing-card__badges,
.search-card:has(.listing-card__badge--premium) .listing-card__badges {
  top: -12px;
  right: 10px;
}

/* Контейнер бэйджей — несколько бэйджей столбиком в углу */
.listing-card__badges {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  pointer-events: none;
}

/* Бэйдж на карточке объявления (Премиум / ТОП / Срочно) — поверх фото */
.listing-card__badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}

.listing-card__badge--premium {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08)) padding-box,
    linear-gradient(135deg, #fff7d6 0%, #fbbf24 38%, #d97706 100%) border-box;
  border: 1px solid transparent;
  color: #92400e;
  box-shadow:
    0 6px 18px rgba(251, 191, 36, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.listing-card__badge--premium::before {
  content: "👑";
  font-size: 11px;
  line-height: 1;
  margin-right: 6px;
  text-shadow: 0 1px 2px rgba(120, 53, 15, 0.35);
}

.listing-card__badge--top {
  background: linear-gradient(135deg, #2f5eff, #2f5eff);
}

.listing-card__badge--top::before {
  content: "★ ";
  color: #fcd34d;
}

.listing-card__badge--ad {
  background: linear-gradient(135deg, #64748b, #475569);
  color: #f8fafc;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Блок «Премиум объявления»: золотая плашка заметнее синей ТОП */
.section.premium .listing-card__badges--premium-section {
  gap: 5px;
}

.section.premium .listing-card__badges--premium-section .listing-card__badge--premium {
  position: relative;
  z-index: 2;
  font-size: 12px;
  padding: 5px 12px;
  box-shadow:
    0 4px 14px rgba(217, 119, 6, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.section.premium .listing-card__badges--premium-section .listing-card__badge--top {
  position: relative;
  z-index: 1;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 9px;
  opacity: 0.9;
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.22);
}

.listing-card__badge--accent {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  font-size: 10px;
}

.listing-card__badge--urgent {
  display: none;
}

/* Премиум: золотая рамка и мягкое теплое свечение */
.listing-card.premium-card,
.search-card.premium-card {
  border: 1px solid rgba(245, 158, 11, 0.55);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0)) padding-box,
    linear-gradient(135deg, #fef3c7 0%, #f59e0b7a 35%, #b4530900 100%) border-box;
  box-shadow:
    0 10px 28px rgba(180, 83, 9, 0.12),
    0 0 0 1px rgba(252, 211, 77, 0.3);
}

.listing-card.premium-card .listing-image {
  border-radius: 12px 12px 0 0;
}

.listing-card.premium-card .listing-body,
.search-card.premium-card .search-card-body {
  background: transparent;
}

.listing-card.premium-card .listing-image,
.search-card.premium-card .search-card-media {
  border-bottom: 1px solid rgba(245, 158, 11, 0.22);
}

.listing-card.premium-card .listing-title,
.search-card.premium-card .search-card-body h3 {
  color: #92400e;
}

.listing-card.premium-card:hover,
.search-card.premium-card:hover {
  border-color: rgba(217, 119, 6, 0.7);
  box-shadow:
    0 14px 34px rgba(180, 83, 9, 0.16),
    0 0 0 1px rgba(252, 211, 77, 0.42);
}

.listing-card.highlight-card {
  background:
    radial-gradient(circle at 18% 100%, rgba(251, 191, 36, 0.34) 0%, rgba(251, 191, 36, 0) 42%),
    radial-gradient(circle at 100% 14%, rgba(249, 115, 22, 0.2) 0%, rgba(249, 115, 22, 0) 34%),
    linear-gradient(135deg, rgba(255, 251, 235, 0.98) 0%, rgba(254, 243, 199, 0.84) 48%, rgba(255, 237, 213, 0.62) 100%);
  box-shadow: 0 12px 28px rgba(180, 83, 9, 0.14);
}

.listing-card.highlight-card .listing-body {
  background: transparent;
}

.listing-card.top-card,
.search-card.top-card {
  border: 2px solid #2f5eff;
  background: linear-gradient(135deg, rgba(47, 94, 255, 0.12) 0%, rgba(47, 94, 255, 0.02) 100%);
  box-shadow: 0 6px 18px rgba(47, 94, 255, 0.24);
}

.listing-card.top-card .listing-body,
.search-card.top-card .search-card-body {
  background: transparent;
}

.listing-card.premium-card.top-card,
.search-card.premium-card.top-card {
  border: 1px solid rgba(245, 158, 11, 0.62);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0)) padding-box,
    linear-gradient(135deg, #fef3c7 0%, #f59e0b7a 35%, #b4530900 100%) border-box;
  box-shadow:
    0 10px 28px rgba(180, 83, 9, 0.14),
    0 0 0 1px rgba(252, 211, 77, 0.32);
}

.listing-card.premium-card.highlight-card,
.search-card.premium-card.highlight-card {
  border: 1px solid rgba(245, 158, 11, 0.62);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0)) padding-box,
    linear-gradient(135deg, #fef3c7 0%, #f59e0b7a 35%, #b4530900 100%) border-box;
  box-shadow:
    0 10px 28px rgba(180, 83, 9, 0.14),
    0 0 0 1px rgba(252, 211, 77, 0.32);
}

.listing-image {
  position: relative;
  height: 150px;
  background: #f1f3f8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Размытый фон той же фотки — края заполнены, без белых рамок (как на Авито) */
.listing-image-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: blur(20px);
  transform: scale(1.08);
  z-index: 0;
  pointer-events: none;
}

/* Фото объявлений — целиком без обрезки, поверх блюра */
.listing-image img:not(.listing-image-bg) {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* Кружки-индикаторы внизу блока фото (несколько фото) */
.listing-image-dots,
.search-card-media .listing-image-dots {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  z-index: 2;
  pointer-events: none;
}

.listing-image-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.25);
  transition: background 0.2s, transform 0.2s;
}

.listing-image-dot.active {
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

/* Кнопка «В избранное» на карточках */
.listing-image .favorite-btn,
.search-card-media .favorite-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s, color 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.listing-image .favorite-btn:hover,
.search-card-media .favorite-btn:hover {
  background: rgba(0, 0, 0, 0.5);
  transform: scale(1.08);
}
.listing-image .favorite-btn.is-favorite,
.search-card-media .favorite-btn.is-favorite {
  color: #e11b22;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.listing-image .favorite-btn.is-favorite:hover,
.search-card-media .favorite-btn.is-favorite:hover {
  background: #fff;
  color: #c4161c;
}

/* Кнопка «В избранное» на странице объявления (в блоке действий) */
.favorite-btn--detail .fa-heart {
  margin-right: 4px;
}
.favorite-btn--detail.is-favorite {
  color: var(--theme-danger, #e11b22);
}

.shop-card img,
.blog-card img,
.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f3f8;
  color: #8a93a6;
  font-size: 12px;
}

.image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #d6dbe8, #eef1f7);
}

.listing-body {
  position: relative;
  padding: 12px;
  padding-top: 28px;
  min-width: 0;
}

.listing-title {
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 14px;
  line-height: 1.4;
  min-height: 38px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
  overflow-wrap: break-word;
}

.listing-urgent-slot {
  position: absolute;
  top: 0;
  right: 12px;
  z-index: 3;
  min-height: 0;
  margin: 0;
  transform: translateY(-52%);
  pointer-events: none;
}

.listing-urgent-ribbon {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  filter: drop-shadow(0 4px 14px rgba(234, 88, 12, 0.32));
  pointer-events: auto;
}

.listing-urgent-ribbon__body,
.listing-detail__urgent-strip-body {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  isolation: isolate;
  color: #ffffff;
  background: linear-gradient(135deg, #ff0000 0%, #ea0c0c 50%, #ff0016 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 10px 24px rgba(220, 38, 38, 0.18);
}

.listing-urgent-ribbon__body {
  padding: 7px 13px;
  border-radius: 12px;
}

.listing-urgent-ribbon__body::before,
.listing-detail__urgent-strip-body::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
  opacity: 0.95;
  z-index: -1;
}

.listing-urgent-ribbon__body::after,
.listing-detail__urgent-strip-body::after {
  content: "";
  position: absolute;
  inset: auto auto -45% -10%;
  width: 52%;
  height: 120%;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.38), rgba(250, 204, 21, 0));
  pointer-events: none;
  z-index: -1;
}

.listing-urgent-ribbon__flame,
.listing-detail__urgent-strip-flame {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  font-size: 15px;
  line-height: 1;
  transform-origin: bottom center;
  filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.82));
  animation: urgentStickerFlameFlicker 1.2s ease-in-out infinite;
}

.listing-urgent-ribbon__text,
.listing-detail__urgent-strip-label {
  position: relative;
  z-index: 1;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.24);
}

.listing-urgent-ribbon__text {
  font-size: 11px;
  line-height: 1;
}

.listing-urgent-ribbon__dot,
.listing-detail__urgent-strip-dot {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #fde047;
  box-shadow:
    0 0 6px rgba(251, 191, 36, 0.8),
    0 0 14px rgba(250, 204, 21, 0.35);
  animation: urgentStickerDotPulse 1.5s ease-in-out infinite;
}

.listing-urgent-ribbon__shimmer-wrap,
.listing-detail__urgent-strip-shimmer-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.listing-urgent-ribbon__shimmer,
.listing-detail__urgent-strip-shimmer {
  position: absolute;
  top: -50%;
  left: -100%;
  width: 58%;
  height: 200%;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.24) 45%,
    rgba(255, 255, 255, 0.46) 50%,
    rgba(255, 255, 255, 0.24) 55%,
    transparent 70%
  );
  animation: urgentStickerShineSweep 3s ease-in-out infinite;
}

.listing-card-link:hover .listing-urgent-ribbon,
.listing-card:hover .listing-urgent-ribbon,
.search-card:hover .listing-urgent-ribbon {
  animation: urgentStickerWobble 0.5s ease;
}

@keyframes urgentStickerFlameFlicker {
  0%, 100% { transform: scaleY(1) scaleX(1); opacity: 1; }
  25% { transform: scaleY(1.15) scaleX(0.92); opacity: 0.9; }
  50% { transform: scaleY(0.9) scaleX(1.08); opacity: 1; }
  75% { transform: scaleY(1.1) scaleX(0.95); opacity: 0.85; }
}

@keyframes urgentStickerDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.6); }
}

@keyframes urgentStickerShineSweep {
  0%, 100% { left: -100%; }
  40%, 60% { left: 200%; }
}

@keyframes urgentStickerWobble {
  0% { transform: rotate(0deg) scale(1); }
  20% { transform: rotate(-3deg) scale(1.08); }
  40% { transform: rotate(3deg) scale(1.08); }
  60% { transform: rotate(-1.5deg) scale(1.04); }
  80% { transform: rotate(1deg) scale(1.02); }
  100% { transform: rotate(0deg) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .listing-urgent-ribbon__flame,
  .listing-detail__urgent-strip-flame,
  .listing-urgent-ribbon__dot,
  .listing-detail__urgent-strip-dot,
  .listing-urgent-ribbon__shimmer,
  .listing-detail__urgent-strip-shimmer,
  .listing-card-link:hover .listing-urgent-ribbon,
  .listing-card:hover .listing-urgent-ribbon,
  .search-card:hover .listing-urgent-ribbon {
    animation: none !important;
  }
}

.listing-meta {
  font-size: 12px;
  color: #8a93a6;
  margin-bottom: 8px;
}

.listing-price {
  font-weight: 700;
}


/* --- end range 5094-5815 --- */
/* ===== BANNERS ===== */
.banners-inner {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.banner {
  background: #ffffff;
  border-radius: 12px;
  padding: 8px;
  border: 1px solid #eef0f6;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.banner img {
  border-radius: 8px;
}

.banner-placeholder {
  width: 100%;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f3f8;
  color: #8a93a6;
  font-size: 12px;
  border-radius: 8px;
}

/* ===== SHOPS & BLOG ===== */
.shop-card,
.blog-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eef0f6;
  padding: 12px;
  text-align: center;
}

/* Чтобы бэйдж .shop-card__badge позиционировался относительно карточки */
.shop-card:has(.shop-card__badge),
.shop-card--large,
.shop-card--marked {
  position: relative;
}

.shop-card img,
.blog-card img {
  height: 150px;
  border-radius: 10px;
  margin-bottom: 8px;
}

/* Блюр фона картинок в блоге и магазинах (как у объявлений) */
.blog-card__image {
  position: relative;
  height: 150px;
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f3f8;
}

.blog-card-image-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: blur(20px);
  transform: scale(1.08);
  z-index: 0;
  pointer-events: none;
}

.blog-card__image img:not(.blog-card-image-bg) {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.blog-article__image {
  position: relative;
}

.blog-article__image-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: blur(20px);
  transform: scale(1.08);
  z-index: 0;
  pointer-events: none;
}

.blog-article__image img:not(.blog-article__image-bg) {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
}

.blog-card--large .blog-card__image img:not(.blog-card-image-bg) {
  object-fit: cover;
}

.shop-card__logo {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.shop-card__logo-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: blur(14px);
  transform: scale(1.08);
  z-index: 0;
  pointer-events: none;
}

.shop-card--large .shop-card__logo img:not(.shop-card__logo-bg) {
  position: relative;
  z-index: 1;
}

.shop-card__image {
  position: relative;
  height: 150px;
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f3f8;
}

.shop-card-image-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: blur(20px);
  transform: scale(1.08);
  z-index: 0;
  pointer-events: none;
}

.shop-card__image img:not(.shop-card-image-bg) {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.shop-image-placeholder,
.blog-image-placeholder {
  width: 100%;
  height: 100px;
  border-radius: 10px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f3f8;
  color: #8a93a6;
  font-size: 12px;
}

.blog-image-placeholder i {
  font-size: 2rem;
}

.blog-image-placeholder--large {
  height: 180px;
  margin-bottom: 0;
  border-radius: 12px 12px 0 0;
}

.blog-image-placeholder--large i {
  font-size: 3rem;
}

.shop-title,
.blog-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
}

.blog-date {
  font-size: 12px;
  color: #8a93a6;
  margin-top: 6px;
}

.empty-state {
  padding: 20px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px dashed #d4d9e5;
  color: #8a93a6;
  text-align: center;
}


/* --- end range 5816-6047 --- */
/* ===== FOOTER ===== */
.site-footer {
  background: #000000;
  color: #ffffff;
  padding: 56px 0 28px;
  margin-top: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

body.page-services .site-footer,
body.page-auth .site-footer {
  margin-top: auto;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px 48px;
}

.footer-brand {
  flex: 1 1 240px;
  max-width: 300px;
}

.footer-col {
  flex: 1 1 150px;
  max-width: 220px;
}

.footer-col--contacts {
  flex: 0 1 220px;
}

.footer-brand__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  margin-bottom: 14px;
}

.footer-brand__logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.06);
}

.footer-brand__name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.footer-brand__desc {
  margin: 0 0 20px;
  max-width: 28em;
  font-size: 14px;
  line-height: 1.55;
  color: #9ca3af;
}

.footer-social-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-social-list__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #e5e7eb;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.footer-social-list__link i {
  width: 20px;
  text-align: center;
  font-size: 16px;
}

.footer-social-list__link .fa-telegram { color: #2aabee; }
.footer-social-list__link .fa-vk { color: #0077ff; }
.footer-social-list__link .fa-whatsapp { color: #25d366; }
.footer-social-list__link .fa-youtube { color: #ff0000; }
.footer-social-list__link .fa-instagram { color: #e1306c; }
.footer-social-list__link .fa-tiktok { color: #fff; }
.footer-social-list__link .fa-facebook { color: #1877f2; }

.footer-social-list__link:hover {
  color: #fff;
}

.footer-col__title {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.footer-col__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col__list a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
  transition: color 0.15s ease;
}

.footer-col__list a:hover {
  color: #fff;
}

.footer-col__more {
  color: #d1d5db !important;
  font-weight: 500;
}

.footer-contacts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-contacts__link,
.footer-contacts__address {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  color: #9ca3af;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.45;
}

.footer-contacts__link i,
.footer-contacts__address i {
  margin-top: 2px;
  color: #e5e7eb;
  width: 16px;
  text-align: center;
}

.footer-contacts__link:hover {
  color: #fff;
}

.footer-bottom {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(0, 1.6fr) auto;
  gap: 20px 28px;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #6b7280;
}

.footer-bottom__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: center;
}

.footer-bottom__legal a {
  color: #6b7280;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.4;
  transition: color 0.15s ease;
}

.footer-bottom__legal a:hover {
  color: #d1d5db;
}

.footer-bottom__apps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.footer-app-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  background: #fff;
  color: #111827;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.footer-app-badge:hover {
  color: #111827;
  opacity: 0.92;
  transform: translateY(-1px);
}

.footer-app-badge i {
  font-size: 22px;
  line-height: 1;
}

.footer-app-badge__icon {
  display: block;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 7px;
}

.footer-app-badge__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.15;
}

.footer-app-badge__eyebrow {
  font-size: 10px;
  font-weight: 500;
  color: #4b5563;
  text-transform: none;
}

.footer-app-badge__name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

@media (max-width: 1024px) {
  .footer-top {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 24px;
  }

  .footer-brand {
    grid-column: 1 / -1;
    max-width: none;
    flex: none;
  }

  .footer-col,
  .footer-col--contacts {
    max-width: none;
    flex: none;
  }

  .footer-bottom {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 16px;
  }

  .footer-bottom__legal {
    justify-content: flex-start;
  }

  .footer-bottom__apps {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .site-footer {
    padding: 40px 0 24px;
    margin-top: 32px;
  }

  .footer-inner {
    gap: 28px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom {
    text-align: left;
  }
}


/* --- end range 6048-6377 --- */
/* ===== RESPONSIVE: TABLET (768-1024px) ===== */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-card--guest {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .hero-card--auth {
    min-width: 0;
  }

  .search-body {
    grid-template-columns: 200px 1fr;
  }

  .categories-grid.main-categories {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* ===== RESPONSIVE: MOBILE (< 768px) ===== */
@media (max-width: 768px) {
  /* Профиль: скрываем город и главную навигацию — есть боковое меню профиля */
  body.page-profile .header-region,
  body.page-profile .site-header .nav {
    display: none !important;
  }

  body.page-profile .header-add-ad-btn {
    display: none !important;
  }

  .header-inner {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .header-inner .header-logo-region {
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 12px;
  }

  .logo {
    justify-content: center;
  }

  .nav {
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    padding-top: 0;
    padding-left: 8px;
    padding-right: 8px;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  position: relative;
  z-index: 1;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    font-size: 13px;
  }

  .actions {
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .actions .header-add-ad-btn,
  .actions .user-menu,
  .actions .theme-toggle {
    flex-shrink: 0;
  }

  /* Профиль (мобилка): назад | логотип по центру | тема + меню (как на карточке объявления) */
  body.page-profile .header-inner .profile-mobile-toolbar.ad-detail-mobile-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex: unset;
    min-width: 0;
  }

  body.page-profile .site-header .header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 12px;
    flex-direction: unset;
    flex-wrap: unset;
    justify-content: unset;
  }

  body.page-profile .site-header .header-inner .header-logo-region {
    justify-self: stretch;
    display: flex;
    justify-content: center;
    width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
  }

  body.page-profile .site-header .logo {
    justify-content: center;
  }

  body.page-profile .site-header .actions {
    justify-self: end;
    justify-content: flex-end;
    flex-wrap: nowrap;
    flex-shrink: 0;
    width: auto;
    margin-left: 0;
  }

  /* Одна сетка с контейнером: колонка профиля и карточки на всю ширину content-box .container */
  body.page-profile .profile-page > .container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  body.page-profile .profile-layout {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 0;
  }

  body.page-profile .profile-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    align-self: stretch;
    box-sizing: border-box;
  }

  body.page-profile .profile-content > .profile-section,
  body.page-profile .profile-content > .profile-verify-banner {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
  }

  .hero {
    padding: 24px 0 16px;
  }

  .hero-content h1 {
    font-size: 24px;
    text-align: center;
  }

  .hero-content p {
    text-align: center;
  }

  .hero-card--guest {
    flex-direction: column;
    text-align: center;
  }
  .hero-card-guest__value {
    font-size: 28px;
  }

  .search-form {
    flex-direction: column;
  }

  .search-inline {
    display: grid;
  }

  .search-form > *,
  .search-inline > * {
    width: 100%;
    flex: none;
  }

  .search-form .btn,
  .search-inline .btn {
    width: 100%;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .categories-grid.main-categories {
    grid-template-columns: repeat(2, 1fr);
  }

  .search-body {
    grid-template-columns: 1fr;
  }

  .search-sidebar {
    order: 1;
  }

  .search-results {
    order: 2;
  }

  .search-sidebar-banners {
    display: none !important;
  }

  .search-sidebar-premium {
    margin-top: 0;
    margin-bottom: 12px;
  }

  .search-sidebar .filter-card {
    padding: 14px;
  }

  .filter-card__title {
    margin: 0;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .filter-card__toggle {
    display: inline-flex;
  }

  .filter-card__content.is-collapsed {
    display: none;
  }

  .search-card {
    grid-template-columns: 100px 1fr;
  }

  .search-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-views {
    justify-content: center;
  }

  .search-sort {
    justify-content: center;
  }

  .listings-grid,
  .shops-grid,
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  #infinite-ads-grid.listings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section.premium .listings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    justify-content: stretch;
  }

  .banners-inner {
    grid-template-columns: 1fr;
  }
}

/* ===== RESPONSIVE: SMALL MOBILE (< 480px) ===== */
@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 20px;
  }

  .section-header h2 {
    font-size: 18px;
  }

  .categories-grid.main-categories {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .category-tile {
    min-height: 100px;
  }

  /* Сетка карточек: 2 колонки и на мобильной (премиум + объявления внизу) */
  .listings-grid,
  .shops-grid,
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .search-card {
    grid-template-columns: 1fr;
  }

  .search-card-media {
    height: 140px;
  }

  .search-results.grid .search-card-media {
    height: 180px; /* выше превью в сетке на мобильной */
  }

  .search-results.grid .search-card-media .listing-image-placeholder {
    min-height: 180px;
  }
}


/* --- end range 6378-6715 --- */
/* ===== MODERN SEARCHBAR ===== */
.modern-searchbar {
  width: 100%;
}

/* Герой: чуть ниже по вертикали (~85% от прежних отступов) */
.modern-searchbar--hero-tight .modern-searchbar__inner {
  border-radius: 14px;
}

.modern-searchbar--hero-tight .modern-searchbar__select {
  padding: 13px 17px;
}

.modern-searchbar--hero-tight .modern-searchbar__icon {
  left: 17px;
  font-size: 14px;
}

.modern-searchbar--hero-tight .modern-searchbar__input {
  padding: 15px 17px 15px 43px;
  font-size: 14px;
}

.modern-searchbar--hero-tight .modern-searchbar__submit {
  padding: 13px 24px;
  font-size: 14px;
  border-radius: 0 14px 14px 0;
}

.modern-searchbar__inner {
  display: flex;
  align-items: stretch;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  overflow: visible;
}

.modern-searchbar__below-slot {
  margin-top: 14px;
  width: 100%;
}

.hero .modern-searchbar__below-slot {
  /* Небольшой зазор между строкой поиска и баннером (полная hero-side справа) */
  margin-top: 12px;
}

/* Мобильный hero: баннер под строкой поиска не показываем (кроме превью в панели — узкий iframe) */
@media (max-width: 768px) {
  body:not(.banner-preview-mode) .hero .hero-searchbar-band__below-main,
  body:not(.banner-preview-mode) .hero .modern-searchbar__below-slot {
    display: none !important;
  }
}

/* Компактный hero: слот под поиском слева, home_right_top справа под кнопкой */
.hero-below-searchband {
  margin-top: 14px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}

.hero-below-searchband--split {
  grid-template-columns: 1fr minmax(0, 290px);
}

.hero-below-searchband__main {
  min-width: 0;
}

.hero-below-searchband__aside {
  min-width: 0;
}

.hero-below-searchband__aside.hero-below-card-banner {
  position: relative;
  margin-top: 0;
  left: auto;
  right: auto;
  top: auto;
  width: 100%;
}

.hero-below-searchband-main-banner .site-banner-slot__placeholder {
  min-height: 153px;
}

.hero-below-searchband__aside .site-banner-slot__image,
.hero-below-searchband__aside .site-banner-slot__video,
.hero-below-searchband__aside .site-banner-slot__placeholder {
  border-radius: 16px;
}

.hero-below-searchband__aside .site-banner-slot__placeholder {
  min-height: 136px;
}

@media (max-width: 900px) {
  .hero-below-searchband--split {
    grid-template-columns: 1fr;
  }
}

.modern-searchbar-below-banner .site-banner-slot__image,
.modern-searchbar-below-banner .site-banner-slot__video,
.modern-searchbar-below-banner .site-banner-slot__placeholder {
  border-radius: 16px;
}

.modern-searchbar__control {
  position: relative;
  display: flex;
  align-items: center;
}

.modern-searchbar__control--category {
  flex: 0 0 auto;
  border-right: 1px solid #e6e8ef;
}

.modern-searchbar__control--query {
  flex: 1 1 auto;
  min-width: 0;
}

.modern-searchbar__control--region {
  flex: 0 0 auto;
  border-left: 1px solid #e6e8ef;
}

.modern-searchbar__select {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.modern-searchbar__select:hover {
  background: #f8fafc;
}

.modern-searchbar__select-icon {
  color: #6366f1;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2em;
}

.modern-searchbar__select-icon .modern-searchbar__select-flag.flag-emoji {
  width: auto;
  height: auto;
  font-size: 18px;
  line-height: 1;
  display: inline-block;
}


/* --- end range 6716-6881 --- */
/* ===== AD CARD LINKS ===== */
.listing-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  max-width: 250px;
  min-width: 0; /* чтобы в гриде ячейка сжималась и заголовок не вылезал */
}

/* В сетке объявлений ячейка часто шире 250px — ссылка заполняет колонку (иначе пустые поля по бокам) */
.listings-grid > .listing-card-link {
  max-width: none;
  width: 100%;
}
.search-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.listing-card-link:hover .listing-card,
.search-card-link:hover .search-card {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.listing-card-link:hover .listing-card.highlight-card {
  box-shadow: 0 16px 34px rgba(180, 83, 9, 0.18);
}

.search-card-link:hover .search-card.highlight-card {
  box-shadow: 0 16px 34px rgba(180, 83, 9, 0.18);
}

.listing-card-link:hover .listing-card.premium-card,
.search-card-link:hover .search-card.premium-card {
  box-shadow:
    0 14px 34px rgba(180, 83, 9, 0.16),
    0 0 0 1px rgba(252, 211, 77, 0.42);
}

.listing-card,
.search-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}


/* --- end range 8190-8236 --- */
/* ===== ГЛАВНАЯ: контент 1100px, слева и справа — рекламные баннеры ===== */
.page-with-side-banners {
  display: block;
  position: relative;
  width: 100%;
  max-width: 1400px;  /* общий блок: контент + боковые рекламы */
  min-height: 0;
  margin: 0 auto;     /* центрируем весь блок на странице */
}

.page-with-side-banners__left,
.page-with-side-banners__right {
  flex: 0 0 auto;           /* ширина по содержимому (баннеру), не растягиваем */
  position: relative;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 24px;
}

.page-with-side-banners__left {
  justify-content: flex-end;
  padding-right: 0;
}

.page-with-side-banners__right {
  display: none;
}

.page-with-side-banners__center {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

@media (max-width: 1300px) {
  .page-with-side-banners__left,
  .page-with-side-banners__right,
  .home-after-hero__right {
    display: none !important;
  }
  .page-with-side-banners__center {
    width: 100%;
  }
}

/* Баннер в колонке слева/справа от контента */
.side-banner {
  /* по умолчанию обычный блок, без липкого позиционирования */
  width: 100%;
  max-width: 200px;
  border-radius: 16px;
  background: transparent;
  overflow: hidden;
}

.side-banner__link {
  display: block;
  width: 100%;
}

.side-banner__link img,
.side-banner__link video,
.side-banner__media {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  background: transparent;
}

.side-banner__placeholder {
  width: 100%;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e5e7eb;
  font-size: 32px;
}

/* Отступы между правыми боковыми баннерами (10px) */
.page-with-side-banners__right .side-banner { margin-bottom: 10px; }
.page-with-side-banners__right .side-banner:last-child { margin-bottom: 0; }

/* ===== HOME BANNERS (карусель сверху) ===== */
.banners-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.banners-main {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #0f172a;
}

.banners-main__slides {
  position: relative;
  min-height: 140px;
  max-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%; /* по ширине основной колонки (как listings-grid внутри container) */
}

.banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.banner-slide img,
.banner-slide video,
.banners-main__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #ffffff; /* белый фон под прозрачные PNG */
}

/* На мобильных не обрезаем баннер: показываем целиком */
@media (max-width: 640px) {
  .banners-main__slides {
    min-height: auto;
    max-height: none;
  }
  .banner-slide img,
  .banner-slide video,
  .banners-main__media {
    height: auto;
    object-fit: contain;
  }
}

.banners-main__controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.8), transparent);
}

.banners-main__dots {
  display: flex;
  gap: 6px;
}

.banners-main__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: rgba(148, 163, 184, 0.7);
  cursor: pointer;
}

.banners-main__dot.is-active {
  width: 18px;
  background: #6366f1;
}

.banners-main__progress {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.5);
  overflow: hidden;
}

.banners-main__progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: #6366f1;
}

.banners-sidebar {
  border-radius: 16px;
  background: #0f172a;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 360px;
  margin-left: auto; /* прижатие к правому краю, как “боковой” блок под основным баннером */
}

.banners-sidebar__link {
  display: block;
  width: 100%;
}

.banners-sidebar__link img {
  width: 100%;
  height: 100%;
  max-height: 260px;
  object-fit: contain;
  display: block;
  border-radius: 12px;
}

.banners-sidebar__placeholder {
  width: 100%;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e5e7eb;
  font-size: 32px;
}

@media (max-width: 900px) {
  .banners-inner {
    grid-template-columns: minmax(0, 1fr); /* на мобильных боковой баннер уходит под основную колонку */
  }

  .banners-sidebar {
    max-width: 400px;
    margin: 8px auto 0;
  }
}


/* --- end range 10425-10670 --- */
/* ===== USER MENU ===== */
.user-menu {
  position: relative;
}

.user-menu__toggle {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.user-menu__toggle:hover {
  border-color: #6366f1;
}

.user-menu__avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
}

.user-menu__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid var(--theme-border, #e5e7eb);
  background: var(--theme-surface, #ffffff);
  color: #f59e0b;
  cursor: pointer;
  margin-right: 4px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.theme-toggle__icon {
  font-size: 16px;
}

.theme-toggle__icon--dark {
  display: none;
}

[data-theme="dark"] .theme-toggle {
  background: #020617;
  color: #e5e7eb;
  border-color: #020617;
}

[data-theme="dark"] .theme-toggle__icon--light {
  display: none;
}

[data-theme="dark"] .theme-toggle__icon--dark {
  display: inline-block;
}

.user-menu__name {
  font-size: 14px;
  font-weight: 500;
  color: #334155;
}

.user-menu__toggle i {
  font-size: 12px;
  color: #94a3b8;
  transition: transform 0.2s;
}

.user-menu.active .user-menu__toggle i {
  transform: rotate(180deg);
}

.user-menu__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  padding: 8px;
  display: none;
  z-index: 100;
}

.user-menu.active .user-menu__dropdown {
  display: block;
  animation: fadeInDown 0.2s ease;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-menu__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: #334155;
  transition: all 0.2s;
}

.user-menu__item:hover {
  background: #f1f5f9;
}

.user-menu__item i {
  width: 18px;
  color: #64748b;
}

.user-menu__divider {
  height: 1px;
  background: #e2e8f0;
  margin: 8px 0;
}

.user-menu__item--logout {
  color: #ef4444;
}

.user-menu__item--logout:hover {
  background: #fef2f2;
}

.user-menu__item--logout i {
  color: #ef4444;
}

.user-menu__badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.user-menu__item-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#user-menu-messages {
  position: relative;
}


/* --- end range 13857-14061 --- */
/* ===== AD FAVORITE BUTTON ===== */
.listing-image {
  position: relative;
}

.listing-favorite-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #94a3b8;
  transition: all 0.2s;
}

.listing-favorite-btn:hover {
  background: #ffffff;
  color: #ef4444;
}

.listing-favorite-btn.active {
  color: #ef4444;
}

@media (max-width: 768px) {
  .settings-form .form-row-2 {
    grid-template-columns: 1fr;
  }
}


/* --- end range 17258-17294 --- */
/* ===== COOKIE CONSENT BANNER ===== */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  padding: 0 16px 16px;
  pointer-events: none;
  transform: translateY(100%);
  opacity: 0;
  transition: transform .4s cubic-bezier(.22,.68,0,1.1), opacity .3s;
}
.cookie-consent--show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.cookie-consent--hide {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}
.cookie-consent__inner {
  max-width: 680px;
  margin: 0 auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 40px rgba(0,0,0,.12), 0 0 0 1px rgba(0,0,0,.04);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.cookie-consent__icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  flex-shrink: 0;
}
.cookie-consent__body {
  flex: 1;
  min-width: 200px;
}
.cookie-consent__title {
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
}
.cookie-consent__text {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}
.cookie-consent__link {
  color: var(--theme-primary, #6366f1);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-consent__link:hover { text-decoration: none; }
.cookie-consent__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.cookie-consent__accept {
  padding: 10px 22px;
  background: var(--theme-primary, #6366f1);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
  white-space: nowrap;
}
.cookie-consent__accept:hover { opacity: .9; }
.cookie-consent__accept:active { transform: scale(.97); }
.cookie-consent__settings {
  padding: 10px 18px;
  background: #f3f4f6;
  color: #374151;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
}
.cookie-consent__settings:hover { background: #e5e7eb; }

/* Details panel */
.cookie-details {
  max-width: 680px;
  margin: 0 auto;
}
.cookie-details__inner {
  background: #fff;
  border-radius: 0 0 18px 18px;
  margin-top: -14px;
  padding: 20px 24px 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,.08);
  border-top: 1px solid #f3f4f6;
}
.cookie-details__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
}
.cookie-details__item:last-of-type { border-bottom: none; }
.cookie-details__info { flex: 1; }
.cookie-details__name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 2px;
}
.cookie-details__desc {
  display: block;
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.4;
}
.cookie-details__check {
  width: 20px;
  height: 20px;
  accent-color: var(--theme-primary, #6366f1);
  flex-shrink: 0;
  cursor: pointer;
}
.cookie-details__check:disabled {
  opacity: .6;
  cursor: default;
}
.cookie-details__actions {
  padding-top: 12px;
  text-align: right;
}

@media (max-width: 600px) {
  .cookie-consent { padding: 0 8px 8px; }
  .cookie-consent__inner {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 12px;
    border-radius: 16px;
  }
  .cookie-consent__icon { display: none; }
  .cookie-consent__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .cookie-consent__accept,
  .cookie-consent__settings { text-align: center; }
  .cookie-details__inner { padding: 16px; }
}


/* --- end range 17635-17806 --- */

/* Skeleton placeholders for home SSR sections */
.home-skel {
  background: linear-gradient(90deg, #eef1f6 0%, #f7f8fb 50%, #eef1f6 100%);
  background-size: 200% 100%;
  animation: home-skel-shine 1.2s ease-in-out infinite;
  border-radius: 10px;
}
@keyframes home-skel-shine {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
