/* =====================================================================
   Каталог ботов (template/v2/pages/catalog.twig)

   1. Страница: заголовок, поиск, две колонки
   2. Фильтры (слева; на телефоне — выезжающая панель)
   3. Строка над списком: найдено, условия, сортировка
   4. Плашки: «с Plus», платное закрепление
   5. Карточка бота (вид «Таблица»)
   6. Пагинация, пусто
   7. Узкие экраны

   Общие части (крошки, сегменты, подсказки .tip, рекламный блок,
   цвета аватарок) — в base.css.
   ===================================================================== */


/* ---------------------------------------------------------------------
   1. Страница
   --------------------------------------------------------------------- */

.catalog {
    display: flex;
    flex-direction: column;
    gap: 16px;

    padding-top: 20px;
    padding-bottom: 56px;
}

.catalog__head {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.catalog__title {
    margin: 0;

    font-family: var(--font-head);
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.catalog__sub {
    color: var(--muted);
}

/* Описание категории – внизу страницы, под списком */
.catalog__about {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.catalog__about-title {
    margin: 0 0 6px;

    font-family: var(--font-head);
    font-size: 16px;
    font-weight: 700;
}

.catalog__about-text {
    margin: 0;

    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}


/* Поиск */
.catalog-search {
    display: flex;
    gap: 10px;
}

.catalog-search__field {
    flex: 1;
    min-width: 0;
    height: 52px;
    padding: 0 16px;

    display: flex;
    align-items: center;
    gap: 10px;

    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--card);
    color: var(--muted-2);
}

.catalog-search__field:focus-within {
    border-color: var(--accent);
}

.catalog-search__field input {
    flex: 1;
    min-width: 0;

    border: 0;
    outline: none;
    background: transparent;

    color: var(--ink);
    font: inherit;
    font-size: 14px;
}

/* Кнопка «Фильтры» (только телефон) */
.catalog-search__filters {
    height: 52px;
    padding: 0 16px;

    align-items: center;
    gap: 8px;

    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--card);

    color: var(--ink);
    font: inherit;
    font-weight: 600;

    cursor: pointer;
}

/* Две колонки: фильтры и результаты */
.catalog__layout {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}


/* ---------------------------------------------------------------------
   2. Фильтры
   --------------------------------------------------------------------- */

.catalog-side {
    position: sticky;
    top: 12px;

    flex: 0 0 264px;
    width: 264px;

    display: flex;
    flex-direction: column;
    gap: 18px;

    padding: 18px;

    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);

    /* Выше экрана — своя прокрутка (иначе нижние разделы недостижимы) */
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;

    /* Полосу прокрутки прячем: в скруглённой панели она вылезает за углы.
       Прокрутка колесом, тачпадом и пальцем работает как обычно */
    scrollbar-width: none;
}

.catalog-side::-webkit-scrollbar {
    display: none;
}

.catalog-side__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.catalog-side__title {
    margin: 0;

    font-family: var(--font-head);
    font-size: 18px;
    font-weight: 800;
}

.catalog-side__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.catalog-side__reset {
    padding: 6px 0;

    color: var(--accent-ink);
    font-weight: 600;
}

.catalog-side__reset:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.catalog-side__close {
    width: 40px;
    height: 40px;

    align-items: center;
    justify-content: center;

    border: 1px solid var(--line);
    border-radius: 10px;
    background: transparent;
    color: var(--ink);

    cursor: pointer;
}

/* Одно поле фильтра: подпись + элемент + подсказка */
.catalog-field {
    min-width: 0;
    margin: 0;
    padding: 0;

    display: flex;
    flex-direction: column;
    gap: 8px;

    border: 0;
}

.catalog-field__label {
    padding: 0;
    margin-bottom: 0;

    color: var(--ink-2);
    font-size: 13px;
    font-weight: 600;
}

.catalog-field__hint {
    color: var(--muted-2);
    font-size: 12px;
}

/* Выпадающие списки: категория и сортировка */
.catalog-select {
    height: 40px;
    padding: 0 10px;

    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--soft);

    color: var(--ink);
    font: inherit;
    font-size: 14px;
}

.catalog-select--strong {
    background: var(--card);
    font-weight: 600;
}

/* Форма с разделами фильтров */
.catalog-filters {
    display: flex;
    flex-direction: column;
}

/* «от — до» */
.catalog-range {
    display: flex;
    align-items: center;
    gap: 8px;

    color: var(--muted-2);
}

.catalog-input {
    flex: 1;
    min-width: 0;
    height: 40px;
    padding: 0 12px;

    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--soft);

    color: var(--ink);
    font: inherit;
    font-size: 14px;
}

.catalog-input:focus {
    outline: none;
    border-color: var(--accent);
}

/* Фильтр только с Plus: поля приглушены, рядом пометка */
.catalog-field:disabled {
    opacity: 0.55;
}

.catalog-field:disabled .segments__item {
    cursor: not-allowed;
}

.catalog-plus {
    margin-left: 4px;
    padding: 1px 6px;

    border-radius: 6px;
    background: var(--plus-bg);

    color: var(--plus-fg);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    vertical-align: 1px;
}

/* Сегмент-радиокнопка: видна рамка фокуса с клавиатуры */
.segments__item:focus-within {
    outline: 2px solid #8FB0FF;
    outline-offset: 1px;
}

/* Выпадающий список с галочками (языки) */
.catalog-dd {
    position: relative;
}

.catalog-dd__button {
    width: 100%;
    height: 40px;
    padding: 0 12px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;

    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--soft);

    color: var(--ink);
    font: inherit;
    font-size: 14px;
    text-align: left;

    cursor: pointer;
}

.catalog-dd__button span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-dd__button.is-on {
    border-color: var(--accent);
}

.catalog-dd__panel {
    position: absolute;
    z-index: 30;
    top: 46px;
    left: 0;
    right: 0;

    padding: 6px;

    display: flex;
    flex-direction: column;

    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--card);
    box-shadow: 0 12px 32px rgba(11, 18, 32, 0.18);
}

.catalog-dd__list {
    max-height: 264px;
    overflow-y: auto;

    display: flex;
    flex-direction: column;
}

.catalog-dd__option {
    padding: 9px 10px;

    display: flex;
    align-items: center;
    gap: 10px;

    border-radius: 8px;

    color: var(--ink);
    font-size: 14px;

    cursor: pointer;
}

.catalog-dd__option:hover {
    background: var(--soft);
}

.catalog-dd__option input {
    width: 18px;
    height: 18px;
    margin: 0;

    accent-color: var(--accent);
}

.catalog-dd__count {
    margin-left: auto;

    color: var(--muted-2);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.catalog-dd__actions {
    margin-top: 4px;
    padding: 8px 4px 2px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-top: 1px solid var(--line);
}

.catalog-dd__clear {
    padding: 6px;

    border: 0;
    background: transparent;

    color: var(--accent-ink);
    font: inherit;
    font-weight: 600;

    cursor: pointer;
}

.catalog-dd__done {
    padding: 7px 14px;
    border-radius: 8px;
}

/* Раскрывающийся раздел фильтров («Аудитория», «Динамика» …) */
.catalog-section {
    border-top: 1px solid var(--line);
}

.catalog-section__toggle {
    width: 100%;
    min-height: 49px;
    padding: 12px 0;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    border: 0;
    background: transparent;

    color: var(--muted-2);
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.065em;
    text-align: left;
    text-transform: uppercase;

    cursor: pointer;
}

.catalog-section__toggle:hover {
    color: var(--accent-ink);
}

.catalog-section__meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Сколько условий задано в разделе */
.catalog-section__count {
    min-width: 19px;
    height: 19px;
    padding: 0 4px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 6px;
    background: var(--accent-soft);

    color: var(--accent-ink);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0;
}

.catalog-section__body {
    display: flex;
    flex-direction: column;
    gap: 18px;

    padding: 5px 0 20px;
}

/* Низ панели на телефоне: «Показать N ботов» */
.catalog-side__footer {
    position: sticky;
    bottom: 0;

    padding-top: 12px;

    background: var(--card);
}

.catalog-side__show {
    width: 100%;
    height: 50px;

    font-size: 16px;
}

/* Затемнение под панелью (телефон) */
.catalog-shade {
    display: none;
}


/* ---------------------------------------------------------------------
   3. Строка над списком
   --------------------------------------------------------------------- */

.catalog-results {
    flex: 1 1 auto;
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

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

.catalog-bar__sort {
    display: flex;
    align-items: center;
    gap: 8px;

    color: var(--muted);
}

/* Выбранное условие: синяя «таблетка» с крестиком */
.catalog-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 5px 10px;

    border: 1px solid var(--accent);
    border-radius: 999px;
    background: var(--accent-soft);

    color: var(--accent-ink);
    font-size: 12px;
    font-weight: 600;
}

/* Кнопка направления сортировки ↓ / ↑ */
.catalog-dir {
    width: 40px;
    height: 40px;
    flex: none;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--card);

    color: var(--ink);
    font-size: 17px;
}

.catalog-dir:hover {
    border-color: var(--line-hover);
}


/* ---------------------------------------------------------------------
   4. Плашки
   --------------------------------------------------------------------- */

/* «Эта возможность — с Plus» */
.catalog-lock {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 14px;

    padding: 14px 16px;

    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--warm-soft);
}

.catalog-lock__icon {
    width: 36px;
    height: 36px;
    flex: none;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;
    background: var(--card);
    color: var(--plus-icon);
}

.catalog-lock__text {
    flex: 1 1 260px;
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 2px;

    font-size: 13px;
}

.catalog-lock__text span {
    color: var(--muted);
    font-size: 12px;
}

.catalog-lock__cta {
    padding: 9px 14px;
    font-size: 13px;
}

/* Платное закрепление над списком */
.catalog-pin {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 16px 18px;

    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--card);
}

.catalog-pin__icon {
    width: 40px;
    height: 40px;
    flex: none;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;
    background: var(--soft);
    color: var(--muted-2);
}

.catalog-pin__text {
    flex: 1;
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 4px;
}

.catalog-pin__text > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.catalog-pin__text b {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.catalog-pin__text > span {
    color: var(--muted-2);
    font-size: 11px;
    line-height: 1.5;
}

.catalog-pin__ad {
    color: var(--muted-2);
    font-size: 9px;
}

.catalog-pin__cta {
    flex: none;
    padding: 8px 0;

    display: inline-flex;
    align-items: center;
    gap: 7px;

    color: var(--accent-ink);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.catalog-pin__cta:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Оплаченный закреп: карточка бота выделена цветом на общем фоне */
.catalog-pin.is-paid {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.catalog-pin__avatar {
    width: 44px;
    height: 44px;
    overflow: hidden;

    background: var(--card);
    color: var(--ink-2);
    font-weight: 600;
}

.catalog-pin__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.catalog-pin__name {
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
}

.catalog-pin__name:hover {
    color: var(--accent);
}

.catalog-pin__user {
    color: var(--muted);
    font-size: 12px;
}

.catalog-pin.is-paid .catalog-pin__text > span {
    color: var(--muted);
    font-size: 12px;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.catalog-pin__mau {
    flex: none;

    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.catalog-pin__mau b {
    font-size: 15px;
}

.catalog-pin__mau small {
    color: var(--muted);
    font-size: 10px;
}


/* ---------------------------------------------------------------------
   5. Карточка бота (вид «Таблица»)
   --------------------------------------------------------------------- */

.catalog-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bot-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--card);

    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.bot-card:hover {
    border-color: var(--line-hover);
    box-shadow: 0 5px 20px rgba(20, 40, 80, 0.055);
}

/* Верх: о боте слева, три цифры справа */
.bot-card__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 1fr);
    align-items: center;
    gap: 28px;

    padding: 22px 24px 18px;
}

.bot-card__identity {
    min-width: 0;

    display: flex;
    align-items: flex-start;
    gap: 13px;
}

/* Аватар 48×48 с номером в углу */
.bot-card__avatar {
    position: relative;

    width: 48px;
    height: 48px;
    flex: none;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 14px;

    color: #FFFFFF;
    font-size: 20px;
    font-weight: 700;
}

.bot-card__avatar img {
    width: 100%;
    height: 100%;

    display: block;

    border-radius: inherit;
    object-fit: cover;
}

.bot-card__rank {
    position: absolute;
    right: -6px;
    bottom: -6px;

    padding: 0 4px;

    border: 3px solid var(--card);
    border-radius: 7px;
    background: var(--soft);

    color: var(--muted-2);
    font-size: 9px;
    font-weight: 500;
}

.bot-card__about {
    flex: 1;
    min-width: 0;
}

.bot-card__title {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 7px;
}

.bot-card__name {
    min-width: 0;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    font-family: var(--font-head);
    font-size: 16px;
    font-weight: 800;
}

.bot-card__name:hover {
    color: var(--accent-ink);
}

.bot-card__verified {
    flex: none;

    color: var(--up);
    font-weight: 800;
}

.bot-card__scam {
    padding: 2px 6px;

    border-radius: 5px;
    background: var(--down-soft);

    color: var(--down);
    font-size: 10px;
    font-weight: 700;
}

/* «Удалён»: бот удалён или заблокирован Telegram (bots.gone_at) — серая метка */
.bot-card__gone {
    padding: 2px 6px;

    border-radius: 5px;
    border: 1px solid var(--line-hover);
    background: var(--soft);

    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

/* @username · категория · Продаётся */
.bot-card__meta {
    margin-top: 4px;

    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;

    color: var(--muted-2);
    font-size: 11px;
}

.bot-card__sale {
    padding: 1px 7px;

    display: inline-flex;
    align-items: center;
    gap: 4px;

    border-radius: 6px;
    background: var(--up);

    color: #FFFFFF;
    font-weight: 700;
}

/* Описание — одна строка */
.bot-card__desc {
    margin: 9px 0 0;

    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;

    color: var(--muted-2);
    font-size: 12px;
    line-height: 1.5;
}

/* Три цифры: живые, MAU, рост */
.bot-card__metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;

    font-variant-numeric: tabular-nums;
}

.bot-card__metric {
    min-width: 0;

    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.bot-card__metric b {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.25;
    white-space: nowrap;
}

.bot-card__metric b.bot-card__none {
    color: var(--muted);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 26.25px;
}

.bot-card__caption {
    color: var(--muted-2);
    font-size: 11px;
    font-weight: 400;
    white-space: nowrap;
}

.bot-card__sub {
    color: var(--muted-2);
    font-size: 10px;
}

.is-up {
    color: var(--up);
}

.is-down {
    color: var(--down);
}

.bot-card__scam-text {
    margin: 0;

    color: var(--down);
    font-size: 13px;
}

/* Низ: аудитория и «Подробнее» */
.bot-card__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    padding: 11px 24px;

    border-top: 1px solid var(--line);

    color: var(--muted-2);
    font-size: 11px;
}

.bot-card__audience {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 0;

    font-variant-numeric: tabular-nums;
}

/* Один показатель в нижней строке; между ними — вертикальная черта */
.bot-card__item {
    min-height: 22px;
    padding: 0 13px;

    display: inline-flex;
    align-items: center;
    gap: 6px;

    border: 0;
    border-left: 1px solid var(--line);
    background: transparent;

    color: var(--muted-2);
    font-family: inherit;
    font-size: 11px;
    line-height: 1.4;
    white-space: nowrap;
}

.bot-card__item:first-child {
    padding-left: 0;
    border-left: 0;
}

.bot-card__item b {
    color: var(--ink-2);
    font-weight: 600;
}

/* Пол: М 52% [полоска] Ж 48% */
.bot-card__sex {
    gap: 7px;
}

.bot-card__sex .is-male,
.bot-card__sex .is-male b {
    color: var(--sex-m);
}

.bot-card__sex .is-female,
.bot-card__sex .is-female b {
    color: var(--sex-f);
}

.bot-card__sex-track {
    width: 60px;
    height: 5px;
    flex: none;

    display: flex;
    gap: 2px;
    overflow: hidden;

    border-radius: 999px;
}

.bot-card__sex-track i {
    display: block;
    min-width: 0;
}

.bot-card__sex-track i.is-male {
    background: var(--sex-m);
}

.bot-card__sex-track i.is-female {
    background: var(--sex-f);
}

.bot-card__star {
    fill: var(--premium);
}

.bot-card__mentions {
    cursor: pointer;
}

.bot-card__mentions:hover .bot-card__caption {
    color: var(--accent-ink);
}

.bot-card__period {
    color: var(--muted-2);
}

.bot-card__more {
    min-height: 28px;
    padding: 3px 0;

    display: flex;
    align-items: center;
    gap: 6px;

    border: 0;
    background: transparent;

    color: var(--accent-ink);
    font: inherit;
    font-size: 12px;
    font-weight: 600;

    cursor: pointer;
}

/* «Подробнее» */
.bot-card__details {
    padding: 20px 24px;

    border-top: 1px solid var(--line);
}

.bot-card__full-desc {
    margin: 0;

    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.65;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.bot-card__details dl {
    margin: 20px 0 0;

    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px 16px;

    font-variant-numeric: tabular-nums;
}

.bot-card__details dt {
    margin-bottom: 5px;

    color: var(--muted-2);
    font-size: 11px;
}

.bot-card__details dd {
    margin: 0;

    font-size: 14px;
    font-weight: 600;
}

/* Свежесть статистики: ≤ 30 дн — зелёным, ≤ год — оранжевым, старше — красным */
.bot-card__details dd.is-fresh {
    color: var(--up);
}

.bot-card__details dd.is-mid {
    color: var(--warm);
}

.bot-card__details dd.is-old {
    color: var(--down);
}


/* ---------------------------------------------------------------------
   5б. Вид «Колонки»: карточки в две колонки
   --------------------------------------------------------------------- */

/* Какой вид показан: на компьютере — выбранный, на телефоне — всегда «Колонки» */
.catalog-cards {
    display: none;
}

.catalog-results.is-view-cards .catalog-list {
    display: none;
}

.catalog-results.is-view-cards .catalog-cards {
    display: grid;
}

.catalog-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 10px;
}

/* Рекламный блок — на обе колонки */
.catalog-cards__wide {
    grid-column: 1 / -1;
}

/* Переключатель «Таблица / Колонки» */
.catalog-views {
    display: flex;
    gap: 2px;

    padding: 3px;

    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--soft);
}

.catalog-views__item {
    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 7px;
    background: transparent;

    color: var(--muted-2);

    cursor: pointer;
}

.catalog-views__item[aria-pressed="true"] {
    background: var(--card);
    color: var(--accent-ink);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.09);
}

/* Карточка */
.bot-tile {
    position: relative;

    padding: 14px;

    display: flex;
    flex-direction: column;
    gap: 12px;

    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--card);
}

/* Поверх соседних карточек — чтобы подсказки не прятались */
.bot-tile:hover,
.bot-tile:focus-within {
    z-index: 3;
}

.bot-tile__head {
    position: relative;

    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.bot-tile__avatar {
    position: relative;

    width: 40px;
    height: 40px;
    flex: none;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    color: #FFFFFF;
    font-weight: 700;
}

.bot-tile__avatar img {
    width: 100%;
    height: 100%;

    display: block;

    border-radius: inherit;
    object-fit: cover;
}

.bot-tile__about {
    flex: 1;
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bot-tile__name {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 5px;
}

.bot-tile__name b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bot-tile__name:hover b {
    color: var(--accent-ink);
}

.bot-tile__user {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 6px;

    color: var(--muted-2);
    font-size: 12px;
}

.bot-tile__handle {
    min-width: 0;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bot-tile__groups {
    flex: none;
    color: var(--muted-2);
}

/* Кнопка «i» — описание */
.bot-tile__info {
    width: 22px;
    height: 22px;
    flex: none;
    padding: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--card);

    color: var(--muted-2);

    cursor: pointer;
}

.bot-tile__info[aria-expanded="true"] {
    border-color: var(--accent);
    color: var(--accent-ink);
}

.bot-tile__badges {
    flex: none;

    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.bot-tile__cat {
    padding: 2px 8px;

    border: 1px solid var(--line);
    border-radius: 999px;

    color: var(--ink-2);
    font-size: 11.5px;
}

/* Всплывающее описание */
.bot-tile__desc {
    position: absolute;
    z-index: 25;
    top: 62px;
    left: 12px;
    right: 12px;

    padding: 14px 40px 14px 16px;

    border-radius: 12px;
    background: var(--tip-bg);
    border: 1px solid var(--tip-line);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);

    color: var(--tip-fg);
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* Сам текст описания: переносы строк из описания бота сохраняем */
.bot-tile__desc-text {
    margin: 0;

    white-space: pre-line;
}

.bot-tile__desc-close {
    position: absolute;
    top: 8px;
    right: 8px;

    width: 28px;
    height: 28px;

    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);

    color: inherit;
    font-size: 16px;
    line-height: 1;

    cursor: pointer;
}

/* Три цифры в рамке */
.bot-tile__metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    border: 1px solid var(--line);
    border-radius: 12px;
}

.bot-tile__metric {
    min-width: 0;
    padding: 10px 12px;

    display: flex;
    flex-direction: column;
}

.bot-tile__metric + .bot-tile__metric {
    border-left: 1px solid var(--line);
}

.bot-tile__metric > span {
    color: var(--muted-2);
    font-size: 11px;
}

.bot-tile__metric b {
    font-size: 17px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.bot-tile__metric b.bot-tile__none {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.bot-tile__metric small {
    color: var(--muted-2);
    font-size: 10.5px;
}

/* Язык · Premium */
.bot-tile__badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bot-tile__badges-row > span {
    padding: 4px 9px;

    display: inline-flex;
    align-items: center;
    gap: 5px;

    border-radius: 8px;
    background: var(--soft);

    color: var(--muted-2);
    font-size: 11.5px;
}

.bot-tile__badges-row b {
    color: var(--ink-2);
    font-weight: 600;
}

/* Пол */
.bot-tile__sex {
    display: flex;
    flex-direction: column;
    gap: 5px;

    font-size: 12px;
}

.bot-tile__sex-values {
    display: flex;
    justify-content: space-between;

    font-weight: 600;
}

.bot-tile__sex-values .is-male {
    color: var(--sex-m);
}

.bot-tile__sex-values .is-female {
    color: var(--sex-f);
}

.bot-tile__sex-track {
    height: 6px;

    display: flex;
    overflow: hidden;

    border-radius: 999px;
    background: var(--chip);
}

.bot-tile__sex-track .is-male {
    background: var(--sex-m);
}

.bot-tile__sex-track .is-female {
    background: var(--sex-f);
}

/* Плитки с цифрами */
.bot-tile__tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.bot-tile__tile {
    min-width: 0;
    padding: 9px 10px;

    border: 1px solid var(--line);
    border-radius: 12px;
}

.bot-tile__tile-label,
.bot-tile__tile-sub {
    display: block;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: var(--muted-2);
}

.bot-tile__tile-label {
    font-size: 11px;
}

.bot-tile__tile-sub {
    font-size: 10.5px;
}

.bot-tile__tile b {
    display: block;

    font-size: 14.5px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Низ: дата проверки с цветной точкой и «Подробнее» */
.bot-tile__footer {
    padding-top: 11px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    border-top: 1px solid var(--line);
}

.bot-tile__updated {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    color: var(--muted-2);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.bot-tile__updated i {
    width: 6px;
    height: 6px;
    flex: none;

    display: block;

    border-radius: 50%;
    background: var(--line-hover);
}

.bot-tile__updated.is-fresh i { background: var(--up); }
.bot-tile__updated.is-mid i   { background: var(--warm); }
.bot-tile__updated.is-old i   { background: var(--down); }


/* ---------------------------------------------------------------------
   6. Пагинация, пусто
   --------------------------------------------------------------------- */

.catalog-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    padding-top: 4px;
}

.catalog-pager__range {
    color: var(--muted);
    font-size: 13px;
}

.catalog-pager__nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.catalog-pager__page,
.catalog-pager__arrow {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--card);

    color: var(--ink-2);
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.catalog-pager__page:hover,
a.catalog-pager__arrow:hover {
    border-color: var(--line-hover);
}

.catalog-pager__page[aria-current="page"] {
    border-color: var(--accent);
    background: var(--accent);
    color: #FFFFFF;
}

.catalog-pager__arrow.is-off {
    color: var(--line-hover);
}

.catalog-pager__gap {
    padding: 0 4px;
    color: var(--muted-2);
}

.catalog-empty {
    padding: 40px 20px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;

    border: 1px dashed var(--line);
    border-radius: 16px;
    background: var(--card);

    text-align: center;
}

.catalog-empty span {
    color: var(--muted);
}

.catalog-empty .btn {
    margin-top: 8px;
}


/* ---------------------------------------------------------------------
   7. Узкие экраны
   --------------------------------------------------------------------- */

/* Цифры карточки уходят под название */
@media (max-width: 1100px) {
    .bot-card__top {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .bot-card__metric {
        align-items: flex-start;
    }

    .bot-card__details dl {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Узкий компьютер: карточки в одну колонку */
@media (max-width: 1100px) {
    .catalog-cards {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Телефон: фильтры — выезжающая панель слева */
@media (max-width: 900px) {
    /* Только «Колонки» — широкие строки на телефоне не помещаются */
    .catalog-results .catalog-list {
        display: none;
    }

    .catalog-results .catalog-cards {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .catalog__title {
        font-size: 26px;
    }

    .catalog-side {
        position: fixed;
        z-index: 60;
        top: 0;
        bottom: 0;
        left: 0;

        width: min(340px, 88vw);
        max-height: none;
        overflow-y: auto;

        border-radius: 0 var(--radius) var(--radius) 0;

        transform: translateX(-105%);
        transition: transform 0.2s ease;
    }

    .catalog-side.is-open {
        transform: none;
    }

    .catalog-shade {
        position: fixed;
        z-index: 55;
        inset: 0;

        display: block;

        background: rgba(6, 10, 18, 0.45);
    }

    .catalog-bar__sort label {
        display: none;
    }

    /* Сортировка на всю ширину: список растягивается, стрелка — справа */
    .catalog-bar__sort {
        width: 100%;
    }

    .catalog-bar__sort .catalog-select {
        flex: 1 1 auto;
        min-width: 0;
    }

    /* Кнопка в плашке «доступно с Plus / после входа» — на всю ширину */
    .catalog-lock__cta {
        flex: 1 1 100%;

        justify-content: center;
        text-align: center;
    }

    .catalog-paid,
    .catalog-pin {
        flex-wrap: wrap;
        gap: 10px;
        padding: 14px;
    }

    .catalog-pin__cta {
        margin-left: 50px;
        padding: 0;
        font-size: 11px;
    }

    .bot-card__top {
        padding: 18px 16px 14px;
    }

    .bot-card__footer,
    .bot-card__details {
        padding-left: 16px;
        padding-right: 16px;
    }

    .bot-card__details dl {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .bot-card__metric b {
        font-size: 18px;
    }

    .bot-card__item {
        padding: 0 9px;
    }
}


/* Категория в строке и карточке бота — ссылка на страницу категории */
.bot-cat-link {
    color: inherit;
    text-decoration: none;
}

.bot-cat-link:hover {
    color: var(--accent);
}

.bot-tile__cat.bot-cat-link:hover {
    border-color: var(--accent);
}


/* ---------- Гость: вместо значений – серые плашки (значения в странице ненастоящие) ---------- */

/* Значение прячем: текст прозрачный, на его месте – скруглённая серая плашка */
.guest-blur,
.is-guestvals b,
.is-guestvals .bot-card__period,
.is-guestvals .bot-tile__sex-values span,
.is-guestvals .bot-tile__tile-sub {
    border-radius: 6px;

    background: var(--soft);
    color: transparent !important;

    user-select: none;
    pointer-events: none;
}

/* Цвет бывает и на вложенных элементах (рост +/− зелёным и красным) – тоже прячем */
.guest-blur *,
.is-guestvals b * {
    color: transparent !important;
}

/* Полоска пола – серая, без цветов */
.is-guestvals .bot-card__sex-track i,
.is-guestvals .bot-tile__sex-track i {
    background: var(--line) !important;
}

/* На крупных цифрах (живые, MAU, рост) – маленький замок по центру плашки */
b.guest-blur {
    position: relative;
}

b.guest-blur::after {
    content: '';

    position: absolute;
    inset: 0;

    margin: auto;
    width: 14px;
    height: 14px;

    background: var(--muted-2);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='2.5'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='2.5'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.is-guestvals .tip::after {
    display: none;
}

/* Обёртка блоков карточки «Колонки» – как будто её нет (у гостя размываются значения внутри) */
.guest-wrap {
    display: contents;
}

/* «Войдите, чтобы увидеть…» над размытыми цифрами */
.guest-cta {
    align-self: flex-start;

    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 7px 12px;
    border-radius: 999px;

    background: var(--accent-soft);
    color: var(--accent-ink);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.guest-cta:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bot-card__details .guest-cta {
    margin-bottom: 12px;
}

/* Плашка «Цифры бота – после входа»: иконка, текст, кнопка */
.guest-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 14px;

    padding: 14px 16px;
    border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line));
    border-radius: 14px;

    background: var(--accent-soft);
}

.guest-box__icon {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;
    border-radius: 11px;

    background: var(--accent);
    color: #FFFFFF;
}

.guest-box__text {
    flex: 1 1 260px;

    display: flex;
    flex-direction: column;
    gap: 2px;

    font-size: 13px;
    line-height: 1.45;
}

.guest-box__text b {
    font-size: 14px;
}

.guest-box__text span {
    color: var(--ink-2);
}

.guest-box__btn {
    flex: 0 0 auto;
}

/* В узкой карточке «Колонки» – кнопка на всю ширину */
.bot-tile .guest-box__btn {
    flex: 1 1 100%;
}


/* =================================================================
   Закреп в каталоге (реклама, формат cat): та же карточка бота первой в списке,
   выделена цветом, без номера места, с пометкой «Реклама» и кнопкой «Запустить бот»
   ================================================================= */

.bot-card.is-pin,
.bot-tile.is-pin {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.bot-card.is-pin .bot-card__footer {
    border-top-color: color-mix(in srgb, var(--accent) 25%, var(--line));
}

.bot-card__ad {
    padding: 2px 7px;
    border-radius: 999px;

    background: var(--card);
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.bot-card__launch {
    margin-left: auto;
    padding: 7px 14px;

    font-size: 13px;
    white-space: nowrap;
}

.bot-tile__footer .bot-card__launch {
    margin-left: 0;
}
