/* Страницы «Ремонт телефонов / планшетов / …» (компонент 334 «Бренд», шаблон страницы 104), 2026-09.
   Все правила привязаны к классам .cat-* из class/334 — страницы брендов и моделей они не затрагивают. */

/* Текст без выключки по ширине: на узких экранах она давала «дыры» между словами */
.cat-page .mainbar p,
.cat-page .consults-item--question,
.cat-page .consults-item--answer {
    text-align: left;
}

/* ---------- Сетка марок ---------- */
.cat-brands__heading {
    margin: 36px 0 16px;
    font-size: 26px;
    line-height: 1.3;
    font-weight: 300;
    color: #323a45;
    text-align: left;
}
.cat-brands {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}
.cat-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 44px;
    padding: 12px 8px 10px;
    background: #fff;
    border: 1px solid #e4e8ea;
    border-radius: 8px;
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s;
}
.cat-brand:hover,
.cat-brand:focus-visible {
    border-color: #64d57a;
    box-shadow: 0 4px 12px rgba(50, 58, 69, .12);
    text-decoration: none;
}
.cat-brand__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 64px;
}
.cat-brand__logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 64px;
    margin: 0;
    object-fit: contain;
}
.cat-brand__name {
    font-size: 14px;
    line-height: 1.25;
    color: #323a45;
    text-align: center;
    overflow-wrap: anywhere;
}
.cat-brand.is-extra {
    display: none;
}
.cat-brands.is-open .cat-brand.is-extra {
    display: flex;
}
.cat-brands__toggle {
    display: block;
    min-height: 44px;
    margin: 16px auto 0;
    padding: 10px 26px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #23803f;
    background: #fff;
    border: 1px solid #64d57a;
    border-radius: 22px;
    cursor: pointer;
}
.cat-brands__toggle:hover {
    background: #f0fbf2;
}

/* ---------- Таблица цен ---------- */
.cat-prices .data__table {
    margin-bottom: 0;
}
.cat-prices__note {
    margin: 14px 0 0;
    font-size: 14px;
    line-height: 1.55;
    color: #5b6670;
}
.cat-prices__note a {
    color: #23803f;
    text-decoration: underline;
}

@media (max-width: 1023px) {
    .cat-brands {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .cat-brands__heading {
        margin-top: 28px;
        font-size: 22px;
        text-align: center;
    }
    .cat-brands {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }
    .cat-brand {
        padding: 10px 6px 8px;
    }
    .cat-brand__logo {
        height: 48px;
    }
    .cat-brand__logo img {
        max-height: 48px;
    }
    .cat-brand__name {
        font-size: 13px;
    }

    /* «Не нашли марку»: без декоративной картинки на 190 px */
    .cat-page .help {
        max-width: none;
        margin: 24px 0 32px;
        padding: 16px;
    }
    .cat-page .help:after {
        display: none;
    }

    /* Мобильная таблица цен: крупнее текст, цена не упирается в край */
    .cat-prices .data__table {
        font-size: 13px;
        line-height: 18px;
        font-weight: 400;
    }
    .cat-prices .data__table tr {
        min-height: 64px;
        padding: 12px 110px 12px 60px;
    }
    .cat-prices .data__table-title {
        font-size: 15px;
        line-height: 20px;
    }
    .cat-prices .data__table-icon {
        left: 14px;
        width: 34px;
        height: 34px;
        margin-top: -17px;
        padding: 6px;
    }
    .cat-prices .data__table td.data__table-reposition {
        width: 100px;
        padding: 0 4px;
        font-size: 13px;
        line-height: 18px;
    }
    .cat-prices .data__table-price {
        letter-spacing: 0;
    }
}

@media (max-width: 359px) {
    .cat-brands {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =====================================================================
   Редизайн по дизайн-системе UI/UX Pro Max (seo-reports/dilaxy-design), 2026-09-24:
   первый экран с преимуществами и действием → марки → цены + призыв → доказательства → текст
   ===================================================================== */

/* ---------- Кнопки ---------- */
.cat-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    min-height: 44px;
    padding: 10px 22px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 22px;
    cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s;
}
.cat-btn:hover,
.cat-btn:focus {
    text-decoration: none;
}
.cat-btn:focus-visible {
    outline: 3px solid rgba(50, 58, 69, .35);
    outline-offset: 2px;
}
/* Кнопки с белым текстом — тёмный оттенок фирменного зелёного: контраст с белым 4.96:1 (норма WCAG AA — 4.5:1).
   Светлый #64d57a давал 1.85:1 — текст на кнопке читался плохо */
.cat-btn--primary {
    color: #fff;
    background: #23803f;
    border: 1px solid #23803f;
}
.cat-btn--primary:hover,
.cat-btn--primary:focus {
    color: #fff;
    background: #1a6d33;
    border-color: #1a6d33;
}
.cat-btn--outline {
    color: #23803f;
    background: #fff;
    border: 1px solid #23803f;
    letter-spacing: 0;
    text-transform: none;
    font-size: 15px;
}
.cat-btn--outline:hover,
.cat-btn--outline:focus {
    color: #23803f;
    background: #f0fbf2;
}
.cat-btn--block {
    display: flex;
    width: 100%;
}
.cat-btn__ico {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ---------- Первый экран ---------- */
.cat-hero {
    margin: 0 0 8px;
    padding: 22px 24px;
    background: #fff;
    border: 1px solid #e4e8ea;
    border-radius: 8px;
}
.cat-hero__lead,
.cat-page .mainbar .cat-hero__lead p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #3b444e;
    text-align: left;
}
.cat-hero__lead p + p {
    margin-top: 8px;
}
.cat-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}
.cat-hero__badges .cat-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 6px 12px 6px 8px;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 600;
    color: #23803f;
    background: #f0fbf2;
    border-radius: 16px;
    list-style: none;
}
.cat-hero__badges .cat-hero__badge:before {
    display: none;
}
.cat-hero__check {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.cat-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 0;
}
.cat-hero__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0 18px;
    margin: 16px 0 0;
    padding: 6px 0 0;
    border-top: 1px solid #eef1f2;
    font-size: 14px;
}
.cat-hero__nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: #3f5fa6;
    font-weight: 600;
    text-decoration: none;
}
.cat-hero__nav a:hover,
.cat-hero__nav a:focus-visible {
    color: #2c4483;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Марки: подсказка под сеткой ---------- */
.cat-page .mainbar .cat-brands__hint {
    margin: 14px 0 0;
    font-size: 14px;
    line-height: 1.55;
    color: #5b6670;
}
.cat-brands__hint a {
    color: #23803f;
    font-weight: 600;
    white-space: nowrap;
}

/* ---------- Призыв к действию после цен ---------- */
.cat-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    margin: 24px 0 8px;
    padding: 22px 24px;
    background: #f0fbf2;
    border: 1px solid #cdeed5;
    border-radius: 8px;
}
.cat-cta__text {
    flex: 1 1 300px;
    min-width: 0;
}
.cat-cta .cat-cta__title {
    margin: 0 0 6px;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 600;
    color: #323a45;
    text-align: left;
}
.cat-page .mainbar .cat-cta__desc {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    color: #3b444e;
}
.cat-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1 1 300px;
}
.cat-cta .orderform__btn {
    flex: 1 1 auto;
    height: 48px;
    padding: 0 18px;
    gap: 8px;
}
.cat-cta .orderform__ico {
    flex-basis: 20px;
    width: 20px;
    height: 20px;
}

/* ---------- Рейтинг в основной колонке ---------- */
.cat-rating {
    margin: 32px 0 0;
    text-align: center;
}

/* ---------- Карточка контактов в правой колонке ---------- */
.cat-contact {
    margin: 0 0 24px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e4e8ea;
    border-radius: 8px;
}
.cat-contact .cat-contact__title {
    margin: 0 0 10px;
    font-size: 17px;
    line-height: 1.3;
    font-weight: 600;
    color: #323a45;
    text-align: left;
}
.cat-contact .cat-contact__list {
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}
.cat-contact .cat-contact__list li {
    margin: 0 0 4px;
    padding: 0;
    font-size: 14px;
    line-height: 1.45;
    color: #5b6670;
    list-style: none;
}
.cat-contact .cat-contact__list li:before {
    display: none;
}
.cat-contact__msgr {
    display: flex;
    gap: 8px;
    margin: 8px 0 0;
}
.cat-contact__msgr-link {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid currentColor;
    border-radius: 22px;
    transition: background-color .2s;
}
.cat-contact__msgr-link--tg {
    color: #1877ab;
}
.cat-contact__msgr-link--max {
    color: #5d22c6;
}
.cat-contact__msgr-link:hover,
.cat-contact__msgr-link:focus-visible {
    background: #f4f6f7;
    text-decoration: none;
}
.cat-contact__route {
    display: inline-block;
    margin: 12px 0 0;
    font-size: 14px;
    font-weight: 600;
    color: #3f5fa6;
}

/* ---------- SEO-текст раздела ---------- */
.cat-text {
    max-width: 72ch;
    margin: 32px 0 0;
    font-size: 16px;
    line-height: 1.65;
    color: #3b444e;
}
.cat-page .mainbar .cat-text p,
.cat-page .mainbar .cat-text li {
    font-size: 16px;
    line-height: 1.65;
    color: #3b444e;
    text-align: left;
}
.cat-text h2,
.cat-text h3 {
    margin: 28px 0 10px;
    line-height: 1.3;
    color: #323a45;
    text-align: left;
}

/* ---------- Перебиваем общие правила темы ----------
   .contentfield a {color:#728abd} сильнее одиночного класса, .sidebar ul li {margin-left:23px !important}
   и .contentfield ul li {text-align:justify} ломают список в карточке, p.afterstars центрирует подпись рейтинга */
.contentfield a.cat-btn--primary,
.contentfield a.cat-btn--primary:hover,
.contentfield a.cat-btn--primary:focus,
.contentfield .cat-cta a.orderform__btn,
.contentfield .cat-cta a.orderform__btn:hover,
.contentfield .cat-cta a.orderform__btn:focus {
    color: #fff;
}
.contentfield a.cat-btn--outline,
.contentfield a.cat-btn--outline:hover,
.contentfield a.cat-btn--outline:focus {
    color: #23803f;
}
.contentfield a.cat-contact__msgr-link--tg {
    color: #1877ab;
}
.contentfield a.cat-contact__msgr-link--max {
    color: #5d22c6;
}
.contentfield a.cat-contact__route {
    color: #3f5fa6;
}
.contentfield .sidebar .cat-contact .cat-contact__list li {
    margin-left: 0 !important;
    text-align: left;
}
.cat-page .cat-prices {
    margin-top: 36px;
}
/* Кнопки темы и призыва на странице раздела — те же тёмные оттенки (тема при наведении делает зелёную кнопку
   ещё светлее, здесь наоборот — темнее). Telegram: #1877ab вместо #2aabee (контраст с белым 4.92:1 вместо 2.57:1) */
.contentfield.cat-page .btn--green {
    color: #fff;
    background: #23803f;
}
.contentfield.cat-page .btn--green:hover,
.contentfield.cat-page .btn--green:focus {
    color: #fff;
    background: #1a6d33;
}
.cat-cta .orderform__btn--call {
    background: #23803f;
}
.cat-cta .orderform__btn--call:hover,
.cat-cta .orderform__btn--call:focus {
    background: #1a6d33;
}
.cat-cta .orderform__btn--tg {
    background: #1877ab;
}
.cat-cta .orderform__btn--tg:hover,
.cat-cta .orderform__btn--tg:focus {
    background: #156fa0;
}
.cat-page .mainbar .cat-rating p {
    text-align: center;
}

@media (max-width: 767px) {
    .cat-hero {
        padding: 18px 16px;
    }
    .cat-hero__lead,
    .cat-page .mainbar .cat-hero__lead p {
        font-size: 15px;
    }
    .cat-hero__actions .cat-btn {
        flex: 1 1 100%;
    }
    .cat-hero__nav {
        gap: 0 16px;
    }
    .cat-cta {
        padding: 18px 16px;
    }
    .cat-cta .cat-cta__title {
        font-size: 18px;
    }
    .cat-cta .orderform__btn {
        flex: 1 1 100%;
        width: auto;
        max-width: none;
    }
    .cat-text {
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cat-btn,
    .cat-contact__msgr-link,
    .cat-cta .orderform__btn {
        transition: none;
    }
    .cat-cta .orderform__btn:hover,
    .cat-cta .orderform__btn:focus {
        transform: none;
    }
}
