/* ================================================================
   eldauto.ru — Мобильные стили (ТОЛЬКО для телефонов, max-width: 768px)
   Версия: v=181 (Единый размер 4:3 и заполнение object-fit: cover для всех фото карточек на телефоне без белых полей)
   ================================================================ */

@media (max-width: 768px) {
  /* ==========================================
     1. ШАПКА (ОБЩАЯ)
     ========================================== */
  header {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: 1px solid var(--border) !important;
    background: var(--bg) !important;
    box-shadow: none !important;
    position: sticky;
    top: 0;
    z-index: 1000;
  }
  header .logo {
    font-size: 1.4rem;
    color: var(--text) !important;
  }
  /* Прячем всё лишнее на мобилке */
  header .header-divider,
  header .header-main-nav,
  header .btn-add-listing,
  header .btn-login-desktop,
  header #headerUserDropdown,
  header .btn-region {
    display: none !important;
  }

  /* Переключатель темы и Бургер */
  .mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
  }
  .theme-toggle,
  .theme-toggle-desktop { display: flex !important; }
  body.chat-open header { display: none !important; }
  .theme-toggle-track { width: 52px; height: 28px; }
  .theme-toggle-thumb { width: 20px; height: 20px; }
  [data-theme="dark"] .theme-toggle-thumb { transform: translateX(24px); }

  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 4px;
  }
  .mobile-menu-btn svg { width: 28px; height: 28px; }

  /* ==========================================
     2. ГЛАВНАЯ СТРАНИЦА (index.html)
     ========================================== */
  .hero-section {
    display: none !important;
  }
  .hero-bg-car {
    width: 100%;
    opacity: 0.3;
    object-position: right 20%;
  }
  .hero-section::before {
    background: linear-gradient(0deg, #0f172a 20%, transparent 100%);
  }
  [data-theme="dark"] .hero-section::before {
    background: linear-gradient(0deg, #0a0a0a 22%, transparent 100%);
  }
  .hero-title {
    font-size: 1.8rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;
  }
  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }
  .hero-search {
    flex-direction: column;
    background: transparent;
    box-shadow: none;
    padding: 0;
    gap: 12px;
    border: none;
  }
  .hero-search input {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    color: #ffffff;
    padding: 16px;
    font-size: 16px;
  }
  [data-theme="dark"] .hero-search input {
    background: #161616;
    border: 1px solid #2b2b2b;
    color: #f5f5f5;
  }
  .hero-search input::placeholder { color: #94a3b8; }
  [data-theme="dark"] .hero-search input::placeholder { color: #737373; }
  .hero-search button {
    border-radius: 12px;
    padding: 16px;
    font-size: 16px;
    background: #0f172a;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.3);
  }
  [data-theme="dark"] .hero-search button {
    background: #ffffff;
    color: #0a0a0a;
    border: 1px solid #ffffff;
    box-shadow: none;
  }

  /* Категории на главной (плитки) */
  .category-cards {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 2rem;
    padding: 0 16px;
  }
  .category-card {
    display: flex !important;
    flex: none !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 10px 4px !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    border-radius: 18px !important;
    background: var(--card-bg) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow) !important;
    gap: 7px !important;
    overflow: hidden !important;
  }
  .category-card .cat-icon-badge {
    width: 42px !important;
    height: 42px !important;
  }
  .category-card svg {
    width: 29px !important;
    height: 29px !important;
  }
  .category-card .cat-card-label {
    font-size: 0.72rem !important;
    text-align: center;
    line-height: 1.2;
  }

  /* Прячем лишние кнопки и разделитель на мобилке (Избранное, Сравнение) */
  .category-cards > div,
  .category-cards .category-card:nth-child(n+5) {
    display: none !important;
  }

  /* Заголовок "Популярные" и кнопка "Все" */
  .popular-header {
    padding: 0 16px;
    margin-bottom: 1rem;
  }
  .popular-header h2 { font-size: 1.2rem; }
  .popular-header .btn-all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
  }
  .popular-header .btn-all svg { width: 16px; height: 16px; }


  /* Мобильная свайп-лента категорий пальцем (Легковые / Грузовые / Автобусы / Запчасти) */
  .home-cat-strip {
    display: flex !important;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    padding: 2px 16px 6px !important;
    margin-bottom: 12px !important;
  }
  .home-cat-strip::-webkit-scrollbar { display: none; }
  .home-cat-tabs {
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    flex: 0 0 auto;
    gap: 8px;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    align-items: stretch;
  }
  .home-cat-pill {
    flex: 0 0 auto !important;
    scroll-snap-align: start;
    width: 122px !important;
    min-width: 122px !important;
    height: 76px !important;
    padding: 10px 11px 8px !important;
    border-radius: 14px !important;
    background: #1a1a1c !important;
    border: 1px solid #2b2b2f !important;
    color: #f4f4f5 !important;
    display: inline-flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
  }
  .home-cat-pill.active {
    background: #242428 !important;
    border-color: rgba(255, 255, 255, 0.36) !important;
    color: #ffffff !important;
  }
  .home-compare-pill {
    flex: 0 0 auto !important;
    scroll-snap-align: start;
    height: 76px !important;
    border-radius: 14px !important;
  }
  #popularGrid,
  #popularOtherGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    padding: 0 16px !important;
  }

  /* Контейнер на главной */
  .popular-grid-layout { display: block; }
  .car-card { margin-bottom: 0; }

  /* Сайдбар "Безопасная сделка" прячем на мобилке */
  .sidebar { display: none; }

  /* Мобильное меню (модалка бургера) */
  .mobile-menu-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
    visibility: hidden !important;
    display: block !important;
    height: 100% !important;
    width: 100% !important;
  }
  .mobile-menu-overlay.active {
    opacity: 1 !important;
    pointer-events: auto !important;
    visibility: visible !important;
  }
  .mobile-menu {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 260px !important;
    height: 100dvh !important;
    background: var(--card-bg) !important;
    z-index: 2001;
    padding: 24px 20px !important;
    transform: translateX(100%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    border-left: 1px solid var(--border);
    visibility: hidden !important;
    overflow-y: auto !important;
  }
  .mobile-menu.active {
    transform: translateX(0) !important;
    visibility: visible !important;
  }
  .mobile-menu-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 16px !important;
    padding-bottom: 16px !important;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }
  .mobile-menu-close {
    background: none !important;
    border: none !important;
    color: var(--text-muted) !important;
    cursor: pointer !important;
    padding: 4px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
  }
  .mobile-menu-close svg { width: 24px !important; height: 24px !important; }
  .mobile-menu a {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px !important;
    color: var(--text) !important;
    text-decoration: none !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    border-radius: 10px !important;
    transition: background 0.2s !important;
    flex-shrink: 0;
  }
  .mobile-menu a:hover { background: var(--input-bg) !important; color: var(--text) !important; }
  .mobile-menu a svg { width: 20px !important; height: 20px !important; color: var(--text-muted) !important; }

  /* ==========================================
     3. КАТАЛОГ (catalog.html)
     ========================================== */
  .catalog-header {
    padding: 0 16px;
    margin-top: 1rem;
    margin-bottom: 1rem;
  }
  .catalog-header h1 {
    font-size: 1.4rem;
  }
  .mobile-search-bar {
    display: flex !important;
    gap: 8px;
    padding: 0 16px;
    margin-bottom: 1rem;
  }
  .search-input-inline {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    height: 46px;
  }
  .btn-search-inline {
    border-radius: 12px;
    height: 46px;
    padding: 0 20px;
    background: #0f172a;
    color: #ffffff;
    border: 1px solid #0f172a;
    font-weight: 700;
  }
  [data-theme="dark"] .btn-search-inline {
    background: #ffffff;
    color: #0a0a0a;
    border-color: #ffffff;
  }

  /* Кнопка фильтров */
  .mobile-filters-bar {
    display: flex !important;
    padding: 0 16px;
    margin-bottom: 1rem;
  }
  .mobile-filter-box {
    display: flex;
    align-items: center;
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    gap: 12px;
    box-shadow: var(--shadow);
  }
  [data-theme="dark"] .mobile-filter-box {
    background: #141414;
    border-color: #262626;
    box-shadow: none;
  }
  .mobile-filter-icon {
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-filter-icon svg { width: 24px; height: 24px; }
  .mobile-filter-text {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
  }
  .mobile-filter-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
  }
  .mobile-filter-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
  }
  .mobile-filter-settings svg { width: 20px; height: 20px; color: var(--text-muted); }

  /* Категории (горизонтальный скролл) */
  .mobile-category-nav {
    display: flex !important;
    gap: 8px;
    padding: 0 16px;
    margin-bottom: 1.25rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-category-nav::-webkit-scrollbar { display: none; }
  .mobile-category-nav .cat-btn {
    flex: 0 0 auto;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .mobile-category-nav .cat-btn.active {
    background: #0f172a !important;
    color: #ffffff !important;
    border-color: #0f172a !important;
  }
  [data-theme="dark"] .mobile-category-nav .cat-btn {
    background: #161616;
    border-color: #262626;
    color: #a3a3a3;
  }
  [data-theme="dark"] .mobile-category-nav .cat-btn.active {
    background: #ffffff !important;
    color: #0a0a0a !important;
    border-color: #ffffff !important;
  }

  /* Контейнер результатов */
  .catalog-layout {
    display: block;
    padding: 0 16px;
  }
  .catalog-results {
    width: 100%;
  }

  /* Панель результатов (Сортировка, счетчик) */
  .results-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 1rem;
  }
  .results-info {
    width: 100%;
    justify-content: space-between;
    display: flex;
  }
  .results-controls {
    width: 100%;
    justify-content: space-between;
  }
  .results-sort-select {
    width: 100%;
    max-width: 215px;
    font-size: 16px;
    padding: 8px 12px;
    height: 42px;
  }

  /* Сетка объявлений на мобилке (2 колонки, не перебиваем чипы и кнопки v=22) */
  #carsGrid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  #carsGrid .car-card {
    border-radius: 14px;
  }
  #carsGrid .badge {
    font-size: 0.62rem;
    padding: 3px 7px;
    top: 7px;
    left: 7px;
  }
  #carsGrid .fav-btn-card {
    width: 28px;
    height: 28px;
    top: 7px;
    right: 7px;
  }
  #carsGrid .fav-btn-card svg {
    width: 14px;
    height: 14px;
  }

  /* Пустое состояние */
  .empty-state-rich {
    padding: 2rem 1rem;
    border-radius: 16px;
  }
  .empty-state-icon-wrapper { width: 60px; height: 60px; margin-bottom: 1rem; }
  .empty-state-icon-wrapper svg { width: 24px; height: 24px; }
  .empty-state-title { font-size: 1.2rem; }
  .empty-state-text { font-size: 0.9rem; margin-bottom: 1.5rem; }
  .btn-empty-action { width: 100%; padding: 14px; font-size: 1rem; }

  /* Шторка фильтров (мобильная) */
  .filters-sheet {
    position: fixed !important;
    top: 0; right: 0; bottom: 0; left: 0;
    background: var(--bg);
    z-index: 3000;
    display: flex !important;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
  }
  .filters-sheet.open {
    transform: translateY(0);
  }
  .filters-sheet-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    background: var(--card-bg);
  }
  .filters-sheet-top h3 { margin: 0; font-size: 1.2rem; }
  .sheet-close { width: 32px; height: 32px; }
  .sheet-reset { color: var(--text); font-weight: 600; font-size: 0.9rem; background: none; border: none; }
  .sheet-tabs-nav {
    display: flex;
    padding: 12px 16px;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
  }
  .sheet-tabs-nav::-webkit-scrollbar { display: none; }
  .sheet-tab {
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
  }
  .sheet-tab.active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
  }
  [data-theme="dark"] .sheet-tab {
    background: #1a1a1a;
    border-color: #2c2c2c;
    color: #a3a3a3;
  }
  [data-theme="dark"] .sheet-tab.active {
    background: #ffffff;
    color: #0a0a0a;
    border-color: #ffffff;
  }
  .filters-sheet-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
  }
  .filters-sheet-footer {
    padding: 14px 16px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
    background: var(--card-bg);
    border-top: 1px solid var(--border);
  }
  .filters-sheet-footer .btn-primary-large {
    background: #0f172a !important;
    color: #ffffff !important;
    border: 1px solid #0f172a !important;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 0.98rem;
    font-weight: 700;
  }
  [data-theme="dark"] .filters-sheet-footer .btn-primary-large {
    background: #ffffff !important;
    color: #0a0a0a !important;
    border-color: #ffffff !important;
  }

  /* Внутри мобильной шторки убираем дублирующую ПК-кнопку «Показать» и верхнюю навигацию */
  .filters-sheet .filters-panel {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
  }
  .filters-sheet .desktop-category-nav,
  .filters-sheet .filters-footer {
    display: none !important;
  }
  .filters-sheet .filter-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
  }
}

/* ==========================================
   СКРЫТИЕ МОБИЛЬНЫХ ЭЛЕМЕНТОВ НА ПК
   ========================================== */
@media (min-width: 769px) {
  .mobile-menu-btn { display: none !important; }
  .mobile-header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
  .popular-header .btn-all {
    display: none !important;
  }
  .mobile-menu, .mobile-menu-overlay { display: none !important; }
  .filters-sheet, .filters-sheet-overlay { display: none !important; }
}


/* ================================================================
   Pure Carbon Dark — Мобильный редизайн главной и шторки (<= 768px)
   ================================================================ */
@media (min-width: 769px) {
  .m-mobile-home,
  .m-params-overlay,
  .m-params-sheet {
    display: none !important;
  }
}

@media (max-width: 768px) {
  [data-theme="dark"] body {
    background: #0c0c0c !important;
  }

  body.home-page header,
  body.home-page .home-top-stage {
    display: none !important;
  }

  .m-mobile-home {
    padding: 12px 14px 8px;
    background: #0c0c0c;
    color: #ffffff;
    transition: all 0.2s ease;
  }

  .m-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
  }

  .m-region-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .m-region-ico {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #1a1a1a;
    border: 1px solid #262626;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: all 0.2s ease;
  }

  .m-top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .m-icon-circle {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: #1a1a1a;
    border: 1px solid #262626;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .m-login-pill {
    height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    background: #262626;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
  }

  .m-search-hub {
    background: #141414;
    border: 1px solid #262626;
    border-radius: 24px;
    padding: 12px;
    margin-bottom: 18px;
    transition: all 0.2s ease;
  }

  .m-brand-box {
    background: #262626;
    border-radius: 16px;
    padding: 13px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .m-brand-box:active {
    transform: scale(0.99);
  }

  .m-brand-box-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
  }

  .m-brand-title {
    font-size: 1rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
  }

  .m-brand-sub {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 2px;
  }

  .m-brand-box-right {
    color: #ffffff;
    display: flex;
    align-items: center;
  }

  .m-cat-carousel {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .m-cat-carousel::-webkit-scrollbar {
    display: none;
  }

  .m-cat-tile {
    flex: 0 0 132px;
    height: 62px;
    scroll-snap-align: start;
    background: #333333;
    border: 1.5px solid transparent;
    border-radius: 16px;
    padding: 10px 10px 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    color: #ffffff;
    font-size: 0.86rem;
    font-weight: 800;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
  }

  .m-cat-tile.active {
    border-color: #ffffff;
    background: #3b3b3b;
  }

  .m-cat-tile svg {
    width: 48px;
    height: 24px;
    flex-shrink: 0;
    margin-right: -6px;
  }

  .popular-header {
    padding: 0 14px !important;
    margin-bottom: 12px !important;
  }

  .popular-header h2 {
    font-size: 1.35rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
  }

  #popularGrid,
  #popularOtherGrid,
  #carsGrid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    padding: 0 14px !important;
  }

  #popularGrid .car-card,
  #popularOtherGrid .car-card,
  #carsGrid .car-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 24px !important;
    overflow: visible !important;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
  }

  #popularGrid .car-img-wrapper,
  #popularOtherGrid .car-img-wrapper,
  #carsGrid .car-img-wrapper,
  .fav-grid .car-img-wrapper,
  .cars-grid .car-img-wrapper {
    width: 100% !important;
    aspect-ratio: 4 / 3 !important;
    border-radius: 16px !important;
    background: #f1f5f9 !important;
    overflow: hidden !important;
    position: relative !important;
    flex-shrink: 0 !important;
  }

  [data-theme="dark"] #popularGrid .car-img-wrapper,
  [data-theme="dark"] #popularOtherGrid .car-img-wrapper,
  [data-theme="dark"] #carsGrid .car-img-wrapper,
  [data-theme="dark"] .fav-grid .car-img-wrapper,
  [data-theme="dark"] .cars-grid .car-img-wrapper {
    background: #161616 !important;
  }

  #popularGrid .car-img-wrapper > img,
  #popularOtherGrid .car-img-wrapper > img,
  #carsGrid .car-img-wrapper > img,
  .fav-grid .car-img-wrapper > img,
  .cars-grid .car-img-wrapper > img,
  #popularGrid .car-img-wrapper > .car-img,
  #popularOtherGrid .car-img-wrapper > .car-img,
  #carsGrid .car-img-wrapper > .car-img,
  .fav-grid .car-img-wrapper > .car-img,
  .cars-grid .car-img-wrapper > .car-img,
  #popularGrid .car-img-wrapper > .car-img-carousel,
  #popularOtherGrid .car-img-wrapper > .car-img-carousel,
  #carsGrid .car-img-wrapper > .car-img-carousel,
  .fav-grid .car-img-wrapper > .car-img-carousel,
  .cars-grid .car-img-wrapper > .car-img-carousel {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  #popularGrid .car-img-carousel .carousel-track,
  #popularOtherGrid .car-img-carousel .carousel-track,
  #carsGrid .car-img-carousel .carousel-track,
  .fav-grid .car-img-carousel .carousel-track,
  .cars-grid .car-img-carousel .carousel-track {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
  }

  #popularGrid .car-img-wrapper img,
  #popularOtherGrid .car-img-wrapper img,
  #carsGrid .car-img-wrapper img,
  .fav-grid .car-img-wrapper img,
  .cars-grid .car-img-wrapper img {
    width: 100% !important;
    min-width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    display: block !important;
  }

  #popularGrid .car-img-carousel .carousel-track > img,
  #popularOtherGrid .car-img-carousel .carousel-track > img,
  #carsGrid .car-img-carousel .carousel-track > img,
  .fav-grid .car-img-carousel .carousel-track > img,
  .cars-grid .car-img-carousel .carousel-track > img {
    flex: 0 0 100% !important;
  }

  #popularGrid .badge,
  #popularOtherGrid .badge,
  #carsGrid .badge {
    background: #10b981 !important;
    color: #ffffff !important;
    border-radius: 999px !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    padding: 4px 10px !important;
    top: 10px !important;
    left: 10px !important;
  }

  #popularGrid .fav-btn-card,
  #popularOtherGrid .fav-btn-card,
  #carsGrid .fav-btn-card {
    width: 32px !important;
    height: 32px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.94) !important;
    color: #141414 !important;
    top: 8px !important;
    right: 8px !important;
  }

  #popularGrid .car-info,
  #popularOtherGrid .car-info,
  #carsGrid .car-info {
    padding: 8px 2px 0 !important;
    display: flex;
    flex-direction: column;
  }

  #popularGrid .car-price-row,
  #popularOtherGrid .car-price-row,
  #carsGrid .car-price-row {
    order: 1;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    margin-bottom: 2px;
  }

  #popularGrid .car-price-row::before,
  #popularOtherGrid .car-price-row::before,
  #carsGrid .car-price-row::before {
    content: none !important;
  }

  #popularGrid .car-title-row,
  #popularOtherGrid .car-title-row,
  #carsGrid .car-title-row {
    order: 2;
  }

  #popularGrid .car-title,
  #popularOtherGrid .car-title,
  #carsGrid .car-title {
    font-size: 0.84rem !important;
    font-weight: 500 !important;
    color: #9ca3af !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #popularGrid .car-actions,
  #popularOtherGrid .car-actions,
  #carsGrid .car-actions {
    display: none !important;
  }

  .m-params-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 3090;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
  }

  .m-params-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

  .m-params-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: 24px;
    z-index: 3100;
    background: #0c0c0c;
    border-radius: 24px 24px 0 0;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: all 0.25s ease;
    color: #ffffff;
  }

  .m-params-sheet.active {
    transform: translateY(0);
  }

  .m-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
  }

  .m-sheet-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.35rem;
    cursor: pointer;
    padding: 4px;
    transition: all 0.2s ease;
  }

  .m-sheet-title {
    font-size: 1.1rem;
    font-weight: 800;
  }

  .m-sheet-reset {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .m-sheet-tabs {
    display: flex;
    gap: 18px;
    padding: 0 18px;
    border-bottom: 1px solid #262626;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .m-sheet-tabs::-webkit-scrollbar { display: none; }

  .m-sheet-tab {
    background: none;
    border: none;
    border-bottom: 2.5px solid transparent;
    color: #9ca3af;
    font-size: 0.96rem;
    font-weight: 800;
    padding: 10px 2px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .m-sheet-tab.active {
    color: #ffffff;
    border-bottom-color: #ffffff;
  }

  .m-sheet-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .m-sheet-chips {
    display: flex;
    gap: 8px;
  }

  .m-chip {
    height: 36px;
    padding: 0 16px;
    border-radius: 999px;
    border: none;
    background: #1a1a1a;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .m-chip.active {
    background: #ffffff;
    color: #0c0c0c;
  }

  .m-sheet-card {
    background: #141414;
    border: 1px solid #262626;
    border-radius: 24px;
    padding: 16px;
    transition: all 0.2s ease;
  }

  .m-region-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
  }

  .m-region-left {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .m-field-hint {
    font-size: 0.78rem;
    color: #9ca3af;
  }

  .m-field-val {
    font-size: 0.98rem;
    font-weight: 800;
    color: #ffffff;
  }

  .m-clear-x {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.1rem;
    cursor: pointer;
  }

  .m-card-heading {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 14px;
  }

  .m-add-brand-row {
    width: 100%;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
    cursor: pointer;
  }

  .m-plus-circle {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1.8px solid #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
  }

  .m-divider-line {
    height: 1px;
    background: #262626;
    margin: 14px 0;
  }

  .m-ai-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: #ffffff;
  }

  .m-ai-left {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .m-spark-ico {
    font-size: 1.25rem;
  }

  .m-ai-title {
    font-size: 0.96rem;
    font-weight: 800;
  }

  .m-ai-sub {
    font-size: 0.8rem;
    color: #9ca3af;
  }

  .m-chevron {
    font-size: 1.4rem;
    color: #9ca3af;
  }

  .m-underline-field {
    padding: 12px 0;
    border-bottom: 1px solid #262626;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .m-underline-field.no-border {
    border-bottom: none;
    padding-bottom: 2px;
  }

  .m-underline-field label {
    font-size: 0.85rem;
    color: #9ca3af;
  }

  .m-underline-field select,
  .m-underline-field input {
    background: #1a1a1a;
    border: 1px solid #262626;
    border-radius: 16px;
    outline: none;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    width: 100%;
    padding: 10px 14px;
    transition: all 0.2s ease;
  }

  .m-inline-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .m-sheet-footer {
    padding: 12px 14px calc(14px + env(safe-area-inset-bottom));
    background: #0c0c0c;
  }

  .m-sheet-submit {
    width: 100%;
    height: 52px;
    border-radius: 999px;
    border: none;
    background: #ffffff;
    color: #0c0c0c;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
  }
}


/* ================================================================
   Кнопка «Все марки и модели» и полноэкранный оверлей фильтров (<= 768px)
   ================================================================ */
@media (min-width: 769px) {
  .m-filter-trigger-wrap,
  .mobile-filters-trigger,
  .mobile-filters-overlay {
    display: none !important;
  }
}

@media (max-width: 768px) {
  body.home-page .m-mobile-home .m-search-hub .m-brand-box,
  .mobile-filters-bar .mobile-filter-box {
    display: none !important;
  }

  .m-filter-trigger-wrap {
    padding: 0 14px 10px;
  }

  .mobile-filters-trigger {
    width: 100%;
    min-height: 50px;
    padding: 12px 16px;
    border-radius: 20px;
    background: #1a1a1a;
    border: 1px solid #262626;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.96rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .mobile-filters-trigger:active {
    transform: scale(0.99);
    background: #222222;
  }

  .mobile-filters-trigger .mft-car-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
  }

  .mobile-filters-trigger .mft-label {
    flex: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-filters-trigger .mft-chevron {
    font-size: 1.25rem;
    line-height: 1;
    color: #a3a3a3;
    flex-shrink: 0;
  }

  .mobile-filters-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    z-index: 9999;
    background: #0c0c0c;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.2s ease;
  }

  .mobile-filters-overlay.hidden {
    display: none !important;
  }

  .mfo-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    padding-top: calc(14px + env(safe-area-inset-top));
    border-bottom: 1px solid #262626;
    background: #0c0c0c;
    flex-shrink: 0;
  }

  .mfo-close-btn {
    background: #1a1a1a;
    border: 1px solid #262626;
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .mfo-title {
    font-size: 1.08rem;
    font-weight: 800;
    color: #ffffff;
  }

  .mfo-reset-btn {
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    padding: 6px 8px;
    transition: all 0.2s ease;
  }

  .mfo-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px 14px 24px;
    background: #0c0c0c;
  }

  .mfo-filter-expanded {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .mfo-filter-expanded .hf-field,
  .mfo-filter-expanded .hf-combo-trigger,
  .mfo-filter-expanded input,
  .mfo-filter-expanded select {
    background: #1a1a1a !important;
    border-color: #262626 !important;
    border-radius: 16px !important;
    color: #ffffff !important;
    transition: all 0.2s ease;
  }

  .mfo-filter-expanded .hf-state-btn.active,
  .mfo-filter-expanded .sub-tab.active {
    background: #ffffff !important;
    color: #0c0c0c !important;
    border-radius: 999px !important;
  }

  .mfo-footer {
    padding: 12px 14px calc(14px + env(safe-area-inset-bottom));
    background: #0c0c0c;
    border-top: 1px solid #262626;
    flex-shrink: 0;
  }

  .mfo-apply-btn {
    width: 100%;
    min-height: 52px;
    padding: 14px 18px;
    border-radius: 999px;
    border: none;
    background: #ffffff;
    color: #0c0c0c;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
  }
}


/* Убираем контейнер с карточками категорий (Легковые / Грузовые / Автобусы / Запчасти) на мобильном (<= 768px); ПК не трогаем */
@media (max-width: 768px) {
  .m-mobile-home .m-search-hub,
  #mCatCarousel,
  .m-cat-carousel {
    display: none !important;
  }
  .m-mobile-home {
    padding-bottom: 0 !important;
  }
  .m-top-bar {
    margin-bottom: 6px !important;
  }
  .m-filter-trigger-wrap {
    padding: 4px 14px 14px !important;
  }
}


/* Заголовок «Найдено для вас» с иконкой лупы на мобильной версии (<= 768px); ПК не трогаем */
.m-found-heading-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.m-found-lupa {
  display: none;
  flex-shrink: 0;
}

.m-catalog-found-heading {
  display: none;
}

@media (max-width: 768px) {
  .m-found-lupa {
    display: inline-block;
    width: 20px;
    height: 20px;
    color: #ffffff;
  }

  .m-catalog-found-heading {
    display: flex;
    align-items: center;
    padding: 0 16px 8px;
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
  }
}


/* Гарантированное скрытие кнопки «Все ->» на мобильной версии (<= 768px); ПК не трогаем */
@media (max-width: 768px) {
  .popular-header .btn-all,
  .popular-header a[href*="catalog"] {
    display: none !important;
    visibility: hidden !important;
  }
}


/* Иконка пина региона и корректное открытие модалки выбора региона на мобильной версии (<= 768px); ПК не трогаем */
@media (max-width: 768px) {
  .m-region-chip .m-region-ico {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #1a1a1a;
    border: 1px solid #262626;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  #regionModal.modal-overlay {
    z-index: 100020 !important;
  }
}


/* Гарантируем видимость списка городов #regionList в модалке региона на мобильных (<= 768px); ПК не трогаем */
@media (max-width: 768px) {
  #regionModal .modal-region {
    width: 100% !important;
    max-height: 82dvh !important;
    display: flex !important;
    flex-direction: column !important;
  }
  #regionModal .region-list {
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    min-height: 220px !important;
    max-height: 58dvh !important;
    -webkit-overflow-scrolling: touch;
  }
}


/* Выверенный вид плашки пустого города и карточек на мобильном (<= 768px); ПК не трогаем */
@media (max-width: 768px) {
  .popular-section {
    padding-top: 2px !important;
    padding-bottom: 18px !important;
  }

  .popular-header {
    margin-bottom: 10px !important;
  }

  .popular-other-section,
  .popular-other-section.is-direct {
    margin-top: 2px !important;
    padding-top: 0 !important;
    border-top: none !important;
  }

  .popular-other-header {
    margin: 0 14px 12px !important;
    padding: 12px 14px !important;
    background: #141414 !important;
    border: 1px solid #262626 !important;
    border-radius: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .popular-other-header h3 {
    font-size: 0.88rem !important;
    line-height: 1.35 !important;
    font-weight: 600 !important;
    color: #e5e5e5 !important;
    margin: 0 !important;
  }

  .popular-reset-region-btn {
    background: #1f1f1f !important;
    border: 1px solid #333333 !important;
    color: #ffffff !important;
    border-radius: 11px !important;
    padding: 7px 12px !important;
    height: auto !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
  }

  #popularGrid:empty,
  #popularGrid[style*="display: none"] {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #popularOtherGrid {
    gap: 12px !important;
    padding: 0 14px !important;
  }

  #popularOtherGrid .car-card {
    padding-bottom: 6px !important;
  }

  #popularOtherGrid .car-info {
    padding-top: 6px !important;
  }

  #popularOtherGrid .car-title-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    margin-top: 2px !important;
  }

  #popularOtherGrid .car-title {
    font-size: 0.82rem !important;
    line-height: 1.25 !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }
}


/* Скрытие лупы поиска и кнопки «Войти» в верхней мобильной панели .m-top-bar (<= 768px); ПК не трогаем */
@media (max-width: 768px) {
  .m-top-bar .m-top-actions,
  .m-top-bar #mQuickSearchOpen,
  .m-top-bar .m-login-btn,
  .m-top-bar a[href*="login"],
  .m-top-bar button[id*="login"],
  .m-top-bar button[id*="Login"] {
    display: none !important;
  }
}


/* Аккуратное разведение бейджей «Активно» и «Просмотрено» в карточке на мобильном (<= 768px); ПК не трогаем */
@media (max-width: 768px) {
  #popularGrid .car-img-wrapper,
  #popularOtherGrid .car-img-wrapper,
  #carsGrid .car-img-wrapper {
    position: relative !important;
  }

  #popularGrid .car-img-wrapper > .badge,
  #popularOtherGrid .car-img-wrapper > .badge,
  #carsGrid .car-img-wrapper > .badge {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 4 !important;
    display: inline-flex !important;
    align-items: center !important;
    max-width: calc(100% - 54px) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    padding: 3px 8px !important;
    line-height: 1.2 !important;
    border-radius: 999px !important;
  }

}


/* Скрытие бейджа «Активно» в карточках объявлений на ПК и мобильной версии */
.car-card .badge[data-badge="active"],
.car-card .badge.badge-active {
  display: none !important;
}


/* Карточки: «Просмотрено» убрано; слева вверху «В продаже» в насыщенно-зелёном стиле как на эталоне (ПК и телефон) */
#popularGrid .car-img-wrapper .badge-viewed,
#popularOtherGrid .car-img-wrapper .badge-viewed,
#carsGrid .car-img-wrapper .badge-viewed,
#popularGrid .car-img-wrapper .viewed-badge,
#popularOtherGrid .car-img-wrapper .viewed-badge,
#carsGrid .car-img-wrapper .viewed-badge,
.car-card .badge-viewed,
.car-card .viewed-badge,
.car-card [class*="viewed"]:not(.eldauto-card-eye-badge):not(.eldauto-for-sale-badge) {
  display: none !important;
}

.car-card .eldauto-for-sale-badge {
  position: absolute !important;
  top: 9px !important;
  left: 9px !important;
  right: auto !important;
  bottom: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #22b14c !important;
  color: #ffffff !important;
  border: none !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  padding: 4px 11px !important;
  border-radius: 10px !important;
  white-space: nowrap !important;
  z-index: 5 !important;
  box-shadow: 0 2px 8px rgba(34, 177, 76, 0.28) !important;
  transition: all 0.2s ease !important;
}

[data-theme="dark"] .car-card .eldauto-for-sale-badge {
  background: #28b954 !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.42) !important;
}

@media (max-width: 768px) {
  .car-card .eldauto-for-sale-badge {
    top: 7px !important;
    left: 7px !important;
    font-size: 0.62rem !important;
    padding: 3px 8px !important;
    border-radius: 8px !important;
  }

  

  .car-card .eldauto-card-eye-badge svg {
    width: 12px !important;
    height: 12px !important;
  }
}
/* Скрытие счётчика просмотров в метаданных карточки объявления на ПК и телефоне */
.car-card .car-views,
.car-card .views-count,
.car-card .listing-views,
.car-card [class*="views"]:not(.eldauto-card-eye-badge):not(.viewed-badge) {
  display: none !important;
}
/* Компактный поисковый баннер в стиле ПК и кнопка переключения темы в правом верхнем углу на мобильном (<= 768px); ПК не трогаем */
.m-mobile-search-row,
.m-top-theme-btn {
  display: none;
}

@media (max-width: 768px) {
  .m-top-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  .m-region-chip {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 48px) !important;
  }

  #mRegionText {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .m-top-theme-btn {
    flex-shrink: 0 !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    background: #ffffff !important;
    color: #111827 !important;
    border: 1px solid #d1d5db !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08) !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
  }

  .m-top-theme-btn:active {
    transform: scale(0.95) !important;
  }

  [data-theme="dark"] .m-top-theme-btn {
    background: #141414 !important;
    color: #f5f5f5 !important;
    border-color: #2b2b2b !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45) !important;
  }

  .m-mobile-search-row {
    display: block !important;
    padding: 0 14px 10px !important;
  }

  .m-search-banner {
    width: 100% !important;
    border-radius: 16px !important;
    padding: 12px !important;
    background: linear-gradient(120deg, #f8fafc 0%, #eef2ff 55%, #e2e8f0 100%) !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  [data-theme="dark"] .m-search-banner {
    background: linear-gradient(120deg, #121212 0%, #181818 55%, #1f1f1f 100%) !important;
    border-color: #262626 !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5) !important;
  }

  .m-search-banner-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  .m-search-banner-title {
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.2px !important;
    color: #0f172a !important;
  }

  .m-search-banner-title span {
    color: #475569 !important;
  }

  [data-theme="dark"] .m-search-banner-title {
    color: #ffffff !important;
  }

  [data-theme="dark"] .m-search-banner-title span {
    color: #a3a3a3 !important;
  }

  .m-mobile-search-row .m-top-search-box {
    width: 100% !important;
    height: 38px !important;
    padding: 3px 4px 3px 12px !important;
    border-radius: 11px !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05) !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  [data-theme="dark"] .m-mobile-search-row .m-top-search-box {
    background: #0d0d0d !important;
    border-color: #2c2c2c !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
  }

  .m-mobile-search-row .m-top-search-input {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    height: 100% !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    color: #0f172a !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    padding: 0 !important;
  }

  .m-mobile-search-row .m-top-search-input::placeholder {
    color: #64748b !important;
  }

  [data-theme="dark"] .m-mobile-search-row .m-top-search-input {
    color: #f5f5f5 !important;
  }

  [data-theme="dark"] .m-mobile-search-row .m-top-search-input::placeholder {
    color: #737373 !important;
  }

  .m-mobile-search-row .m-top-search-btn {
    flex-shrink: 0 !important;
    height: 30px !important;
    padding: 0 13px !important;
    border-radius: 8px !important;
    border: 1px solid #1e293b !important;
    background: #0f172a !important;
    color: #ffffff !important;
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  [data-theme="dark"] .m-mobile-search-row .m-top-search-btn {
    background: linear-gradient(180deg, #242424 0%, #111111 100%) !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
  }
}
/* Чёткое разделение светлой и тёмной темы на мобильном (<= 768px); ПК не трогаем */
@media (max-width: 768px) {
  html:not([data-theme="dark"]) .m-mobile-home,
  [data-theme="light"] .m-mobile-home {
    background: #ffffff !important;
    color: #0f172a !important;
  }

  html:not([data-theme="dark"]) .m-top-bar,
  [data-theme="light"] .m-top-bar {
    background: transparent !important;
  }

  html:not([data-theme="dark"]) .m-region-chip,
  [data-theme="light"] .m-region-chip {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06) !important;
  }

  html:not([data-theme="dark"]) .m-filter-trigger,
  [data-theme="light"] .m-filter-trigger {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06) !important;
  }

  html:not([data-theme="dark"]) .popular-header h2,
  [data-theme="light"] .popular-header h2,
  html:not([data-theme="dark"]) .m-found-heading-wrap,
  [data-theme="light"] .m-found-heading-wrap {
    color: #0f172a !important;
  }

  html:not([data-theme="dark"]) .popular-other-header,
  [data-theme="light"] .popular-other-header {
    background: transparent !important;
    border-color: #cbd5e1 !important;
  }

  html:not([data-theme="dark"]) .popular-other-header h3,
  [data-theme="light"] .popular-other-header h3 {
    color: #0f172a !important;
  }

  html:not([data-theme="dark"]) .popular-reset-region-btn,
  [data-theme="light"] .popular-reset-region-btn {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
  }

  html:not([data-theme="dark"]) #popularGrid .car-price-row,
  html:not([data-theme="dark"]) #popularOtherGrid .car-price-row,
  html:not([data-theme="dark"]) #carsGrid .car-price-row,
  [data-theme="light"] #popularGrid .car-price-row,
  [data-theme="light"] #popularOtherGrid .car-price-row,
  [data-theme="light"] #carsGrid .car-price-row {
    color: #0f172a !important;
  }

  html:not([data-theme="dark"]) #popularGrid .car-title,
  html:not([data-theme="dark"]) #popularOtherGrid .car-title,
  html:not([data-theme="dark"]) #carsGrid .car-title,
  [data-theme="light"] #popularGrid .car-title,
  [data-theme="light"] #popularOtherGrid .car-title,
  [data-theme="light"] #carsGrid .car-title {
    color: #475569 !important;
  }
}
/* Светлая тема на мобильном (<= 768px) в единой цветовой гамме Strict Graphite */
@media (max-width: 768px) {
  html:not([data-theme="dark"]) .m-region-chip,
  [data-theme="light"] .m-region-chip {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 999px !important;
    padding: 5px 12px 5px 6px !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06) !important;
  }

  html:not([data-theme="dark"]) .m-region-chip .m-region-ico,
  [data-theme="light"] .m-region-chip .m-region-ico {
    background: #f1f5f9 !important;
    color: #0f172a !important;
  }

  html:not([data-theme="dark"]) .m-top-theme-btn,
  [data-theme="light"] .m-top-theme-btn {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06) !important;
  }

  html:not([data-theme="dark"]) .m-search-banner,
  [data-theme="light"] .m-search-banner {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06) !important;
  }

  html:not([data-theme="dark"]) .m-search-banner-title,
  [data-theme="light"] .m-search-banner-title {
    color: #0f172a !important;
  }

  html:not([data-theme="dark"]) .m-search-banner-title span,
  [data-theme="light"] .m-search-banner-title span {
    color: #475569 !important;
  }

  html:not([data-theme="dark"]) .m-mobile-search-row .m-top-search-box,
  [data-theme="light"] .m-mobile-search-row .m-top-search-box {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
  }

  html:not([data-theme="dark"]) .m-mobile-search-row .m-top-search-input,
  [data-theme="light"] .m-mobile-search-row .m-top-search-input {
    color: #0f172a !important;
  }

  html:not([data-theme="dark"]) .m-mobile-search-row .m-top-search-input::placeholder,
  [data-theme="light"] .m-mobile-search-row .m-top-search-input::placeholder {
    color: #64748b !important;
  }

  html:not([data-theme="dark"]) .m-mobile-search-row .m-top-search-btn,
  [data-theme="light"] .m-mobile-search-row .m-top-search-btn {
    background: #0f172a !important;
    border-color: #0f172a !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.16) !important;
  }

  html:not([data-theme="dark"]) .mobile-filters-trigger,
  html:not([data-theme="dark"]) .m-filter-trigger,
  [data-theme="light"] .mobile-filters-trigger,
  [data-theme="light"] .m-filter-trigger {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1.5px solid #1e293b !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05) !important;
  }
}
/* Чёткие полоски листания поверх фото 4:3 с мягким градиентом снизу (<= 768px); ПК не трогаем */
@media (max-width: 768px) {
  .car-card .car-img-carousel::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 24px;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.38), rgba(15, 23, 42, 0));
    pointer-events: none;
    z-index: 3;
  }

  .car-card .carousel-dots {
    position: absolute !important;
    left: 8px !important;
    right: 8px !important;
    bottom: 6px !important;
    z-index: 4 !important;
    display: flex !important;
    gap: 3px !important;
    pointer-events: none;
  }

  .car-card .carousel-dot {
    flex: 1 1 0 !important;
    height: 2.5px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.45) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.24) !important;
  }

  .car-card .carousel-dot.active,
  .car-card .carousel-dot.is-active {
    background: #ffffff !important;
  }
}
/* Выравнивание окошка «Найди автомобиль своей мечты» по краям с блоками «Вся область» и «Все марки и модели» на мобильном (<= 768px); ПК не трогаем */
@media (max-width: 768px) {
  .m-mobile-search-row {
    display: block !important;
    width: 100% !important;
    padding: 0 0 10px 0 !important;
    box-sizing: border-box !important;
  }

  .m-search-banner {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    border-radius: 18px !important;
    padding: 12px 14px !important;
  }

  .m-mobile-search-row .m-top-search-box {
    width: 100% !important;
    box-sizing: border-box !important;
  }
}
/* Кнопка «Все фильтры» с иконкой трёх ползунков на мобильном (<= 768px) в светлой и тёмной темах; ПК не трогаем */
@media (max-width: 768px) {
  .mobile-filters-trigger {
    width: 100% !important;
    min-height: 48px !important;
    padding: 11px 18px !important;
    border-radius: 999px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1.5px solid #0f172a !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06) !important;
  }

  .mobile-filters-trigger .mft-car-ico,
  .mobile-filters-trigger .mft-chevron {
    display: none !important;
  }

  .mobile-filters-trigger .mft-label {
    flex: 1 1 auto !important;
    text-align: center !important;
    font-size: 0.98rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.2px !important;
    color: #0f172a !important;
  }

  .mobile-filters-trigger .mft-sliders-ico {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #475569 !important;
    flex-shrink: 0 !important;
  }

  [data-theme="dark"] .mobile-filters-trigger {
    background: #141414 !important;
    color: #f5f5f5 !important;
    border: 1.5px solid #2e2e2e !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45) !important;
  }

  [data-theme="dark"] .mobile-filters-trigger .mft-label {
    color: #f5f5f5 !important;
  }

  [data-theme="dark"] .mobile-filters-trigger .mft-sliders-ico {
    color: #a3a3a3 !important;
  }
}
.car-card .eldauto-card-eye-badge,
.listing-card .eldauto-card-eye-badge {
  position: absolute !important;
  top: 9px !important;
  right: 9px !important;
  left: auto !important;
  bottom: auto !important;
  width: 28px !important;
  height: 28px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  color: #1f2937 !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12) !important;
  z-index: 5 !important;
  pointer-events: none !important;
  transition: all 0.2s ease !important;
}

[data-theme="dark"] .car-card .eldauto-card-eye-badge,
[data-theme="dark"] .listing-card .eldauto-card-eye-badge {
  background: rgba(20, 20, 20, 0.84) !important;
  color: #e5e7eb !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.38) !important;
}

@media (max-width: 768px) {
  .car-card .eldauto-card-eye-badge,
  .listing-card .eldauto-card-eye-badge {
    top: 7px !important;
    right: 7px !important;
    width: 24px !important;
    height: 24px !important;
  }

  .car-card .eldauto-card-eye-badge svg,
  .listing-card .eldauto-card-eye-badge svg {
    width: 12px !important;
    height: 12px !important;
  }
}
/* Единый белоснежный фон (#ffffff) верхней и нижней частей мобильной версии на светлой теме (<= 768px); тёмная тема и ПК не трогаем */
@media (max-width: 768px) {
  html:not([data-theme="dark"]) body,
  html:not([data-theme="dark"]) .container,
  html:not([data-theme="dark"]) main,
  html:not([data-theme="dark"]) .m-mobile-home,
  html:not([data-theme="dark"]) .m-top-bar,
  html:not([data-theme="dark"]) .m-mobile-search-row,
  html:not([data-theme="dark"]) .m-filter-trigger-wrap,
  [data-theme="light"] body,
  [data-theme="light"] .container,
  [data-theme="light"] main,
  [data-theme="light"] .m-mobile-home,
  [data-theme="light"] .m-top-bar,
  [data-theme="light"] .m-mobile-search-row,
  [data-theme="light"] .m-filter-trigger-wrap {
    background: #ffffff !important;
    background-color: #ffffff !important;
  }
}

/* ================================================================
   Выравнивание 2-колоночных карточек объявлений на мобильном (v=148)
   ПК (> 768px) не затрагивается
   ================================================================ */
@media (max-width: 768px) {
  #popularGrid,
  #popularOtherGrid,
  #carsGrid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    align-items: stretch !important;
  }

  #popularGrid .car-card,
  #popularOtherGrid .car-card,
  #carsGrid .car-card {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    padding-bottom: 4px !important;
  }

  #popularGrid .car-img-wrapper,
  #popularOtherGrid .car-img-wrapper,
  #carsGrid .car-img-wrapper {
    flex-shrink: 0 !important;
  }

  /* Убираем наложение дубля старого бейджа «В ПРОДАЖЕ» под новым .eldauto-for-sale-badge */
  #popularGrid .car-img-wrapper > .badge:not(.eldauto-for-sale-badge),
  #popularOtherGrid .car-img-wrapper > .badge:not(.eldauto-for-sale-badge),
  #carsGrid .car-img-wrapper > .badge:not(.eldauto-for-sale-badge) {
    display: none !important;
  }

  #popularGrid .car-info,
  #popularOtherGrid .car-info,
  #carsGrid .car-info {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    padding: 8px 2px 0 !important;
    min-width: 0 !important;
  }

  /* Чипы характеристик всегда сверху под фото, компактные */
  #popularGrid .car-specs-chips,
  #popularOtherGrid .car-specs-chips,
  #carsGrid .car-specs-chips {
    order: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-content: flex-start !important;
    gap: 4px !important;
    margin: 0 !important;
  }

  #popularGrid .spec-chip,
  #popularOtherGrid .spec-chip,
  #carsGrid .spec-chip {
    padding: 2.5px 6px !important;
    font-size: 0.66rem !important;
    line-height: 1.15 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Город и дата: строго 1 строка + прижатие нижнего блока к низу карточки */
  #popularGrid .car-location-meta,
  #popularOtherGrid .car-location-meta,
  #carsGrid .car-location-meta {
    order: 1 !important;
    margin-top: auto !important;
    padding-top: 3px !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 3px !important;
    font-size: clamp(0.64rem, 2.7vw, 0.72rem) !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-width: 0 !important;
  }

  #popularGrid .car-location-meta svg,
  #popularOtherGrid .car-location-meta svg,
  #carsGrid .car-location-meta svg {
    width: 11px !important;
    height: 11px !important;
    flex-shrink: 0 !important;
  }

  #popularGrid .car-location-meta > span,
  #popularOtherGrid .car-location-meta > span,
  #carsGrid .car-location-meta > span {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    min-width: 0 !important;
  }

  #popularGrid .car-location-meta .car-meta-sep,
  #popularOtherGrid .car-location-meta .car-meta-sep,
  #carsGrid .car-location-meta .car-meta-sep {
    flex-shrink: 0 !important;
    overflow: visible !important;
  }

  /* Адаптивная цена в 1 строку — ровно по линии у обеих карточек в ряду */
  #popularGrid .car-price-row,
  #popularOtherGrid .car-price-row,
  #carsGrid .car-price-row {
    order: 2 !important;
    font-size: clamp(0.9rem, 4.1vw, 1.06rem) !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.02em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-variant-numeric: tabular-nums !important;
    margin: 1px 0 0 !important;
  }

  /* Нижняя строка: название + сердечко строго на одном уровне */
  #popularGrid .car-title-row,
  #popularOtherGrid .car-title-row,
  #carsGrid .car-title-row {
    order: 3 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    min-height: 30px !important;
    margin-top: 1px !important;
  }

  #popularGrid .car-title,
  #popularOtherGrid .car-title,
  #carsGrid .car-title {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    font-size: clamp(0.76rem, 3.3vw, 0.84rem) !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    -webkit-line-clamp: unset !important;
    min-height: 0 !important;
    margin: 0 !important;
  }

  #popularGrid .car-title-row .fav-btn-card,
  #popularOtherGrid .car-title-row .fav-btn-card,
  #carsGrid .car-title-row .fav-btn-card {
    position: static !important;
    top: auto !important;
    right: auto !important;
    width: 30px !important;
    height: 30px !important;
    flex-shrink: 0 !important;
  }
}

/* ================================================================
   Мгновенное переключение темы без серого мигания (v=151)
   ================================================================ */
html.theme-switching,
html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after {
  transition: none !important;
  transition-duration: 0s !important;
  transition-delay: 0s !important;
}

@media (max-width: 768px) {
  body,
  .container,
  main,
  .m-mobile-home,
  .m-top-bar,
  .m-region-chip,
  .m-region-ico,
  .m-top-theme-btn,
  .m-mobile-search-row,
  .m-search-banner,
  .m-top-search-box,
  .m-top-search-input,
  .m-top-search-btn,
  .m-filter-trigger-wrap,
  .mobile-filters-trigger,
  .popular-header,
  .popular-header h2,
  .popular-other-header,
  .popular-reset-region-btn,
  #popularGrid .car-card,
  #popularOtherGrid .car-card,
  #carsGrid .car-card,
  #popularGrid .car-info,
  #popularOtherGrid .car-info,
  #carsGrid .car-info,
  #popularGrid .spec-chip,
  #popularOtherGrid .spec-chip,
  #carsGrid .spec-chip,
  #popularGrid .car-price-row,
  #popularOtherGrid .car-price-row,
  #carsGrid .car-price-row,
  #popularGrid .car-title,
  #popularOtherGrid .car-title,
  #carsGrid .car-title,
  #globalBottomNav,
  .bottom-nav {
    transition: transform 0.15s ease !important;
  }
}


/* ================================================================
   Адаптация под компактные экраны Android / iPhone SE (<= 360px)
   и защита от залипания :hover на тачскринах (v=166)
   ================================================================ */
@media (hover: none) and (pointer: coarse) {
  .car-card:hover {
    transform: none !important;
  }
}

@media (max-width: 360px) {
  #popularGrid,
  #popularOtherGrid,
  #carsGrid,
  .fav-grid {
    gap: 8px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  .m-mobile-home {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  .m-filter-trigger-wrap {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  #popularGrid .car-price-row,
  #popularOtherGrid .car-price-row,
  #carsGrid .car-price-row {
    font-size: 0.88rem !important;
  }
  #popularGrid .car-title,
  #popularOtherGrid .car-title,
  #carsGrid .car-title {
    font-size: 0.75rem !important;
  }
  #globalBottomNav .bottom-nav-item {
    font-size: 10px !important;
    padding: 5px 1px !important;
  }
  #globalBottomNav .bottom-nav-item svg {
    width: 20px !important;
    height: 20px !important;
  }
}


/* ================================================================
   Светлая тема шторки фильтров #mobileFiltersOverlay (Strict Graphite):
   контрастная кнопка «Показать объявления» (#0f172a) и чистый заголовок (v=176)
   ================================================================ */
@media (max-width: 768px) {
  html:not([data-theme="dark"]) #mobileFiltersOverlay,
  html:not([data-theme="dark"]) #mobileFiltersOverlay .mfo-topbar,
  html:not([data-theme="dark"]) #mobileFiltersOverlay .mfo-body,
  html:not([data-theme="dark"]) #mobileFiltersOverlay .mfo-footer {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: #e5e7eb !important;
  }

  html:not([data-theme="dark"]) #mobileFiltersOverlay .mfo-title {
    color: #0f172a !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  html:not([data-theme="dark"]) #mobileFiltersOverlay .mfo-close-btn {
    color: #0f172a !important;
    background: #f3f4f6 !important;
    border-color: #e5e7eb !important;
  }

  html:not([data-theme="dark"]) #mobileFiltersOverlay .mfo-reset-btn {
    color: #64748b !important;
  }

  html:not([data-theme="dark"]) #mobileFiltersOverlay .mfo-apply-btn {
    background: #0f172a !important;
    color: #ffffff !important;
    border: 1px solid #0f172a !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18) !important;
  }

  [data-theme="dark"] #mobileFiltersOverlay .mfo-apply-btn {
    background: #ffffff !important;
    color: #0c0c0c !important;
    border: 1px solid #ffffff !important;
  }
}


/* ================================================================
   Мобильная шторка параметров #mobileFiltersOverlay (v=178):
   1) Все 4 вкладки (Авто / Грузовые / Автобусы / Запчасти) вмещаются без обрезки
   2) Ровные 2-колоночные пары (.hf-pair) и единая высота селектов (включая Цвет)
   3) Скрытие дублирующего десктопного подвала в catalog.html внутри шторки
   ================================================================ */
@media (max-width: 768px) {
  #mobileFiltersOverlay .hf-top-row {
    margin-bottom: 12px !important;
  }

  #mobileFiltersOverlay .hf-state-segment.m-cat-swipe-row,
  #mobileFiltersOverlay .m-cat-swipe-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 4px !important;
    padding: 4px !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  #mobileFiltersOverlay .m-cat-swipe-row .m-cat-chip {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    height: 36px !important;
    padding: 0 9px !important;
    border-radius: 999px !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  [data-theme="dark"] #mobileFiltersOverlay .m-cat-swipe-row {
    background: #161616 !important;
    border: 1px solid #262626 !important;
  }

  [data-theme="dark"] #mobileFiltersOverlay .m-cat-swipe-row .m-cat-chip:not(.active) {
    background: transparent !important;
    color: #e5e7eb !important;
  }

  [data-theme="dark"] #mobileFiltersOverlay .m-cat-swipe-row .m-cat-chip.active {
    background: #ffffff !important;
    color: #0c0c0c !important;
  }

  html:not([data-theme="dark"]) #mobileFiltersOverlay .m-cat-swipe-row {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
  }

  html:not([data-theme="dark"]) #mobileFiltersOverlay .m-cat-swipe-row .m-cat-chip:not(.active) {
    background: transparent !important;
    color: #0f172a !important;
    border-color: transparent !important;
  }

  html:not([data-theme="dark"]) #mobileFiltersOverlay .m-cat-swipe-row .m-cat-chip.active {
    background: #0f172a !important;
    color: #ffffff !important;
  }

  #mobileFiltersOverlay .hf-pair:not(.hf-brand-model-pair):not(.hf-hidden) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
  }

  #mobileFiltersOverlay .hf-brand-model-pair:not(.hf-hidden) {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }

  #mobileFiltersOverlay .mfo-filter-expanded .hf-combo-trigger,
  #mobileFiltersOverlay .mfo-filter-expanded .hf-field {
    min-height: 46px !important;
    height: 46px !important;
    font-size: 15px !important;
  }

  #mobileFiltersOverlay .mfo-filter-expanded input.hf-field {
    font-size: 16px !important;
  }

  #mobileFiltersOverlay .filters-footer {
    display: none !important;
  }
}

@media (max-width: 380px) {
  #mobileFiltersOverlay .m-cat-swipe-row .m-cat-chip {
    padding: 0 6px !important;
    font-size: 0.76rem !important;
    height: 34px !important;
  }
}


/* ================================================================
   Мобильный блок «О сервисе, помощь и документы» в Профиле (v=179)
   Строго <= 768px (на ПК пункты находятся в верхнем меню «Ещё»).
   Палитры: Strict Graphite (Light) + Pure Carbon Dark (Dark).
   ================================================================ */
.m-profile-info-hub {
  display: none;
}

@media (max-width: 768px) {
  .m-profile-info-hub {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 560px;
    margin: 16px auto 0;
    padding: 0 0 calc(84px + env(safe-area-inset-bottom));
    box-sizing: border-box;
  }

  /* В режиме «Объявления» (+ Объявления) информационные карточки скрыты */
  html[data-profile-section="ads"] .m-profile-info-hub {
    display: none !important;
  }

  .mpi-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
  }

  .mpi-group-title {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    padding: 0 6px;
  }

  [data-theme="dark"] .mpi-group-title {
    color: #8a8a8a;
  }

  .mpi-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  }

  [data-theme="dark"] .mpi-card {
    background: #141414;
    border-color: #262626;
    box-shadow: none;
  }

  .mpi-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    text-decoration: none;
    color: #0f172a;
    background: transparent;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }

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

  .mpi-item:active {
    background: #f8fafc;
  }

  [data-theme="dark"] .mpi-item {
    color: #f5f5f5;
    border-bottom-color: #202020;
  }

  [data-theme="dark"] .mpi-item:active {
    background: #1c1c1c;
  }

  .mpi-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: #f1f5f9;
    border: 1px solid rgba(15, 23, 42, 0.05);
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .mpi-icon svg {
    width: 18px;
    height: 18px;
  }

  [data-theme="dark"] .mpi-icon {
    background: #1f1f1f;
    border-color: #2b2b2b;
    color: #e5e7eb;
  }

  .mpi-icon.is-support {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.2);
    color: #059669;
  }

  [data-theme="dark"] .mpi-icon.is-support {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.28);
    color: #34d399;
  }

  .mpi-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .mpi-title {
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.25;
    color: inherit;
  }

  .mpi-sub {
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.3;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  [data-theme="dark"] .mpi-sub {
    color: #8a8a8a;
  }

  .mpi-arrow {
    width: 17px;
    height: 17px;
    color: #94a3b8;
    flex-shrink: 0;
  }

  [data-theme="dark"] .mpi-arrow {
    color: #525252;
  }

  .mpi-foot-note {
    text-align: center;
    font-size: 0.76rem;
    font-weight: 500;
    color: #94a3b8;
    padding-top: 2px;
  }

  [data-theme="dark"] .mpi-foot-note {
    color: #525252;
  }
}

/* --- Фирменный логотип eldauto на мобильных экранах (v=279) --- */
@media (max-width: 768px) {
  header .logo {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-size: 1.32rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  header .logo .logo-bolt {
    width: 17px !important;
    height: 20px !important;
  }
}
@media (max-width: 380px) {
  header .logo {
    font-size: 1.2rem !important;
    gap: 4px !important;
  }
  header .logo .logo-bolt {
    width: 15px !important;
    height: 18px !important;
  }
}
