/* Компоненты магазина .com (корзина, ЛК, избранное, услуги, дилеры). Префикс ks- не пересекается с .com и Bootstrap. */

/* кнопки */
.ks-btn { height: 48px; padding: 0 28px; border: 0; background: #e62129; color: #fff; cursor: pointer; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.ks-btn--primary { background: #e62129; color: #fff; }
.ks-btn--primary:hover { background: #c41a21; color: #fff; }
.ks-btn--ghost { background: #fff; color: #222; border: 1px solid #222; }
.ks-btn--ghost:hover, .ks-btn--ghost.on { background: #fff; color: #e62129; border-color: #e62129; }
.ks-btn--sm { height: 40px; padding: 0 16px; font-size: inherit; flex: 1; }
.ks-btn:disabled { opacity: .6; cursor: default; }

/* поле количества: [−] [поле] [+] или одно поле */
.ks-qty { width: 80px; height: 48px; border: 1px solid #ccc; text-align: center; font-size: 16px; }
.ks-qty--sm { width: 64px; height: 40px; font-size: inherit; }
.ks-qty-box { display: inline-flex; align-items: stretch; }
.ks-qty-box .ks-qty { width: 56px; border-left: 0; border-right: 0; }
.ks-qty-box button { width: 36px; border: 1px solid #ccc; background: #fff; color: #222; font-size: 18px; cursor: pointer; }
.ks-qty-box button:hover { color: #e62129; border-color: #e62129; }

/* таблица; на узких экранах строки становятся карточками (data-label на td) */
.ks-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.ks-table th { text-align: left; font-weight: bold; color: #222; padding: 12px 10px; border-bottom: 2px solid #222; }
.ks-table td { padding: 12px 10px; border-bottom: 1px solid #e5e5e5; vertical-align: middle; }
.ks-table img { max-width: 80px; max-height: 80px; object-fit: contain; }
.ks-table a { color: #222; }
.ks-table a:hover { color: #e62129; }
@media (max-width: 767px) {
  .ks-table, .ks-table tbody, .ks-table tr, .ks-table td { display: block; width: 100%; }
  .ks-table thead { display: none; }
  .ks-table tr { border: 1px solid #e5e5e5; margin-bottom: 14px; padding: 6px 0; }
  .ks-table td { border: 0; padding: 6px 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: right; }
  .ks-table td::before { content: attr(data-label); color: #666; text-align: left; flex: none; }
  .ks-table td[data-label=""]::before, .ks-table td:not([data-label])::before { content: none; }
}

/* сообщения */
.ks-msg { padding: 14px 18px; margin: 0 0 20px; border: 1px solid; font-size: 15px; line-height: 1.5; }
.ks-msg--success { background: #eef8ef; border-color: #b9dfbd; color: #1e6a28; }
.ks-msg--danger { background: #fdeeee; border-color: #f0b8b8; color: #a11a1a; }
.ks-msg--warning { background: #fff8e6; border-color: #f0d9a0; color: #7a5a06; }
.ks-msg--info { background: #eef4fb; border-color: #b8cfe8; color: #1d4f80; }

/* вкладки: кнопки .ks-tabs__tab (.is-active), переключение — site.js (initKsTabs) */
.ks-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 35px; }
.ks-tabs__tab { padding: 8px 18px; border: 1px solid #e5e5e5; border-radius: 30px; background: #fff; color: #262626; font-size: 14px; cursor: pointer; transition: all .2s; }
.ks-tabs__tab:hover { border-color: #e62129; color: #e62129; }
.ks-tabs__tab.is-active { background: #e62129; border-color: #e62129; color: #fff; }

/* аккордеон */
.ks-acc { border-top: 1px solid #e5e5e5; }
.ks-acc__item { border-bottom: 1px solid #e5e5e5; }
.ks-acc__head { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 6px; background: none; border: 0; text-align: left; font-size: 16px; color: #222; cursor: pointer; }
.ks-acc__head::after { content: '+'; font-size: 22px; color: #666; flex: none; }
.ks-acc__item.is-open .ks-acc__head::after { content: '\2212'; }
.ks-acc__body { display: none; padding: 0 6px 16px; }
.ks-acc__item.is-open .ks-acc__body { display: block; }

/* узкая форма поверх .x-fo */
.ks-form { max-width: 560px; }
.ks-field-error { display: block; margin-top: 4px; color: #a11a1a; font-size: 13px; }
/* поля .x-inp вне .x-cont2 (стили .x-fo .com привязаны к .x-cont2 .x-le) */
.ks-form.x-fo { display: flex; flex-wrap: wrap; justify-content: space-between; }
.ks-form--wide { max-width: 760px; }
.ks-form .x-inp { width: 100%; margin-bottom: 18px; }
.ks-form .x-inp--half { width: 48.5%; }
.ks-form .x-inp label { display: block; margin-bottom: 8px; color: #222; font-size: 15px; }
.ks-form .x-inp label small { color: #999; font-size: 13px; }
.ks-form .x-inp input { display: block; width: 100%; height: 44px; padding: 0 16px; border: 1px solid #dfdfdf; border-radius: 6px; background: #fff; color: #222; font-size: 15px; }
.ks-form .x-inp input:focus { border-color: #e62129; outline: 0; }
.ks-form__hint { margin-top: 6px; color: #656567; font-size: 13px; }
.ks-form__actions { width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 6px; }
.ks-form__note { width: 100%; margin-top: 24px; color: #262626; }
.ks-form__note--top { margin: 0 0 18px; }
.ks-form a { color: #e62129; }
.ks-form a:hover { text-decoration: underline; }
/* ошибка поля из account_field_error() (класс Bootstrap) */
.ks-form .invalid-feedback { display: block; margin-top: 4px; color: #a11a1a; font-size: 13px; }
.ks-form .invalid-feedback a { color: inherit; text-decoration: underline; }

/* личный кабинет: меню слева (сверху на мобильном) и колонка содержимого */
.ks-account-box { padding-bottom: 60px; }
.ks-account { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
.ks-account--guest { grid-template-columns: minmax(0, 1fr); }
.ks-account__menu { display: flex; flex-direction: column; border: 1px solid #e5e5e5; }
.ks-account__menu a, .ks-account__menu button { display: block; width: 100%; padding: 14px 18px; border: 0; border-bottom: 1px solid #e5e5e5; background: #fff; color: #222; font-size: 15px; text-align: left; cursor: pointer; }
.ks-account__menu form { margin: 0; }
.ks-account__menu button { border-bottom: 0; color: #a11a1a; }
.ks-account__menu a:hover, .ks-account__menu button:hover { color: #e62129; }
.ks-account__menu a.is-active { background: #e62129; color: #fff; }
.ks-account__lead { margin-bottom: 20px; color: #656567; line-height: 1.6; }
.ks-account__lead + .ks-btn { margin-bottom: 10px; }
.ks-account__section { margin-bottom: 50px; scroll-margin-top: 120px; }
.ks-account__section h2 { margin-bottom: 18px; font-size: 22px; font-weight: bold; color: #222; }
.ks-account__section .ks-account__lead { margin-top: -8px; }
.ks-account__confirm { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; }
.ks-account__confirm form { margin: 0; }
.ks-account__confirm .ks-btn--sm { flex: none; }
.ks-order-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px; flex: 1; }
.ks-order-head__muted { color: #656567; }
.ks-order-head__sum { margin-left: auto; white-space: nowrap; }
.ks-order-items img { width: 60px; height: 60px; object-fit: cover; }
.ks-order-items__name { min-width: 0; }
.ks-order-items__art { margin-top: 4px; color: #656567; font-size: 13px; }
.ks-order-items__nowrap { white-space: nowrap; }
.ks-order-items__sum { text-align: right; font-weight: bold; }
.ks-order-info { margin-top: 10px; line-height: 1.6; }
.ks-form .x-inp select { display: block; width: 100%; height: 44px; padding: 0 12px; border: 1px solid #dfdfdf; border-radius: 6px; background: #fff; color: #222; font-size: 15px; }
.ks-form .x-inp select:focus { border-color: #e62129; outline: 0; }
.ks-form .x-inp input[readonly] { background: #f5f5f5; color: #656567; }
/* «Мои заказчики» партнёра: статус ИНН (зелёный — свободен, жёлтый — уже ваш, красный — занят/ошибка) */
.ks-inn-status { margin-top: 6px; font-size: 13px; line-height: 1.5; }
.ks-inn-status:empty { display: none; }
.ks-inn-status--wait { color: #656567; }
.ks-inn-status--free { color: #1e6a28; }
.ks-inn-status--own { color: #7a5a06; }
.ks-inn-status--error { color: #a11a1a; }
.ks-inn-status--free::before, .ks-inn-status--own::before, .ks-inn-status--error::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 0; }
.ks-inn-status--free::before { background: #2e9e3e; }
.ks-inn-status--own::before { background: #e0a800; }
.ks-inn-status--error::before { background: #d62b2b; }
.ks-inn-status a { color: inherit; text-decoration: underline; }
.ks-pclients__total { margin-bottom: 14px; font-weight: bold; color: #222; }
.ks-pclients tr.is-active td { background: #fff8e6; }
.ks-pclients__form { margin-top: 40px; }
@media (max-width: 991px) {
  .ks-account { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .ks-account__menu { flex-direction: row; flex-wrap: wrap; }
  .ks-account__menu a, .ks-account__menu form { flex: 1 1 auto; width: auto; }
  .ks-account__menu a, .ks-account__menu button { border-bottom: 0; border-right: 1px solid #e5e5e5; text-align: center; }
  .ks-account__menu form button { border-right: 0; }
}
@media (max-width: 767px) {
  .ks-form .x-inp--half { width: 100%; }
  .ks-order-head__sum { margin-left: 0; }
  .ks-order-items__nowrap { white-space: normal; }
}

/* сетка и карточки */
.ks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.ks-card { background: #fff; border: 1px solid #e5e5e5; padding: 24px; }
.ks-card h3, .ks-card h4 { font-size: 17px; margin-bottom: 14px; color: #1a1a1a; }
.ks-card p { margin-bottom: 8px; font-size: 14px; color: #262626; line-height: 1.5; word-break: break-word; }
.ks-card p span { color: #656567; }
.ks-card a { color: #262626; }
.ks-card a:hover { color: #e62129; }

@media (max-width: 767px) {
  .ks-btn { padding: 0 16px; height: 42px; font-size: 14px; }
  .ks-qty { width: 60px; height: 42px; }
}

/* дилеры */
.dealers-intro { max-width: 900px; margin: 0 0 30px; color: #656567; line-height: 1.6; }
.dealers-district { margin-bottom: 40px; }
.dealers-district h2 { font-size: 22px; margin-bottom: 20px; color: #1a1a1a; }

/* Полезные материалы */
.inner-news-details .news-head .info span + span { margin-left: 16px; }
.inner-news-details .public-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 16px 0; }
.inner-news-details .public-content td, .inner-news-details .public-content th { border: 1px solid #dfdfdf; padding: 6px 10px; vertical-align: top; }
.inner-news-details .public-content img { max-width: 100%; height: auto; }
.ks-help { margin: 40px 0 0; padding: 24px; background: #f5f5f5; border-radius: 6px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ks-help__title { font-size: 20px; font-weight: bold; color: #222; }
.inner-news .news-menu .info .details { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.inner-news-details .public-content { overflow-wrap: anywhere; }
.inner-news-details .public-content p + p, .inner-news-details .public-content p + table, .inner-news-details .public-content table + p { margin-top: 12px; }
.inner-news-details .public-content img { display: block; margin: 16px 0; }
.inner-news-details .public-content table { overflow-wrap: normal; }

/* Документация и софт: /dokumentaciya-i-soft (поиск, блоки, группы, строки-ссылки на PDF) */
.ks-docs { padding-bottom: 80px; }
.ks-docs [hidden] { display: none !important; }
.ks-docs__search { display: flex; gap: 12px; max-width: 640px; margin: 20px 0 40px; }
.ks-docs__search input { flex: 1; min-width: 0; height: 48px; padding: 0 16px; border: 1px solid #dfdfdf; border-radius: 6px; background: #fff; color: #222; font-size: 16px; }
.ks-docs__search input:focus { border-color: #e62129; outline: 0; }
.ks-docs__search .ks-btn { flex: none; }
.ks-doc-block { margin-bottom: 50px; }
.ks-doc-block__title { margin: 0 0 24px; padding-bottom: 12px; border-bottom: 2px solid #222; font-size: 26px; font-weight: bold; color: #222; overflow-wrap: anywhere; }
.ks-doc-group { margin-bottom: 28px; }
.ks-doc-group--sub { margin-bottom: 18px; }
.ks-doc-group__title { margin: 0 0 10px; color: #222; font-weight: bold; overflow-wrap: anywhere; }
h2.ks-doc-block__title, h3.ks-doc-group__title--sec { line-height: 1.3; }
.ks-doc-group__title--sec { font-size: 22px; }
.ks-doc-group__title--grp { font-size: 17px; color: #656567; }
.ks-doc-list { margin: 0; padding: 0; list-style: none; }
.ks-doc { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; padding: 10px 0; border-bottom: 1px solid #e5e5e5; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.ks-doc a { color: #222; text-decoration: underline; text-decoration-color: #e62129; text-underline-offset: 3px; }
.ks-doc a:hover { color: #e62129; }
.ks-doc__text { color: #656567; }
.ks-doc__meta { flex: none; color: #999; font-size: 13px; white-space: nowrap; }
.ks-docs__empty { padding: 30px 0; color: #656567; font-size: 18px; }
@media (max-width: 767px) {
  .ks-docs__search { margin-bottom: 28px; }
  .ks-doc-block__title { font-size: 21px; }
  .ks-doc-group__title--sec { font-size: 19px; }
}

/* «Контроль качества», карточки «Политика Kinco в области качества» (.quatw): в .com высоту задаёт картинка,
   а текст лежит поверх абсолютно — длинный русский текст вылезал на следующий блок. Картинка — фоном,
   текст — в потоке с теми же пропорциями (107.5%), карточка растёт, если текст длиннее. */
.quatw .box .item .itembox .public-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.quatw .box .item .itembox .public-img:before { display: none; }
.quatw .box .item .itembox .g_con { position: relative; height: auto; aspect-ratio: 213 / 229; }

/* Центр загрузок: /data-center. Разметка .com (.sdowon, .dowon .dowon_b .item, .g_dow, .public-pager) + правки:
   фильтр на сетке (скрытые input в форме ломают :nth-child у .g_sel), нативные select, вкладки без swiper,
   длинные названия переносятся, на узких экранах строка — карточка с датой/размером (в .com они скрыты ≤991px). */
.ks-dc-head .box h1 { font-weight: 900; color: #222; line-height: 1.2; }
.ks-dc-filter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: .2rem .3rem; }
.sdowon .sdowon_box .ks-dc-filter .g_sel { width: auto; min-width: 0; margin: 0; cursor: pointer; }
.ks-dc-filter .g_sel .p1 { color: #666; white-space: nowrap; }
.ks-dc-filter select { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: #222; font-size: inherit; cursor: pointer; text-overflow: ellipsis; }
.ks-dc-filter select:focus { outline: 0; }
.ks-dc-filter .g_sel:focus-within { border-color: #e62129; }
.ks-dc-filter__btn { height: 44px; }
.ks-dc-tabs { display: flex; gap: 0 .38rem; overflow-x: auto; scrollbar-width: none; }
.ks-dc-tabs::-webkit-scrollbar { display: none; }
.ks-dc-tab { flex: none; padding: 0 0 .16rem; color: #666; border-bottom: 2px solid transparent; white-space: nowrap; }
.ks-dc-tab:hover { color: #222; }
.ks-dc-tab.is-active { color: #222; font-weight: bold; border-bottom-color: #e62129; }
.dowon .box .dowon_t .g_search form .search_box .gl { flex: 1; min-width: 0; }
.dowon .box .dowon_t .g_search form .search_box .gl input { border: 0; background: transparent; height: 100%; }
.ks-dc .dowon_nav a { color: #666; }
.ks-dc .dowon_nav a.on { color: #222; }
.ks-dc-count { margin: 0 0 .14rem; color: #999; font-size: 14px; }
.ks-dc.dowon .box .dowon_b .item { gap: .2rem; }
.ks-dc.dowon .box .dowon_b .item .gl { width: 50%; padding-right: 0; }
.ks-dc.dowon .box .dowon_b .item .gl h3 { white-space: normal; overflow-wrap: anywhere; font-size: 16px; line-height: 1.4; color: #222; }
.ks-dc.dowon .box .dowon_b .item .gr { width: 50%; gap: .2rem; }
.ks-dc.dowon .box .dowon_b .item .gr .g_data { width: auto; flex: 1; flex-wrap: wrap; gap: 0 .2rem; }
.ks-dc.dowon .box .dowon_b .item .gr .g_data p { width: auto; margin: 0; white-space: nowrap; }
.ks-dc.dowon .box .dowon_b .item .gr .g_dow { width: auto; flex: none; flex-wrap: nowrap; gap: .08rem .1rem; }
.ks-dc.dowon .box .dowon_b .item .gr .g_dow a { margin: 0; padding: .05rem .2rem; }
.ks-dc.dowon .box .dowon_b .item .gr .g_dow a i { width: 18px; }
.ks-dc-na { color: #999; font-size: 13px; white-space: nowrap; }
.ks-dc-empty { padding: 30px 0; color: #656567; font-size: 18px; }
.ks-dc .public-pager { margin-top: 40px; flex-wrap: wrap; }
@media (max-width: 991px) {
  .ks-dc-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ks-dc.dowon .box .dowon_b .item { flex-direction: column; align-items: stretch; }
  .ks-dc.dowon .box .dowon_b .item .gl, .ks-dc.dowon .box .dowon_b .item .gr { width: 100%; }
  .ks-dc.dowon .box .dowon_b .item .gr { justify-content: space-between; flex-wrap: wrap; }
  .ks-dc.dowon .box .dowon_b .item .gr .g_data { display: flex; }
}
@media (max-width: 767px) {
  .ks-dc-filter { grid-template-columns: minmax(0, 1fr); }
  .sdowon .sdowon_box .ks-dc-filter .g_sel { height: 44px; }
  .ks-dc-tabs { width: 100%; padding-bottom: 0; }
  .ks-dc.dowon .box .dowon_b .item { padding: 14px 12px; }
  .ks-dc.dowon .box .dowon_b .item .gr .g_dow { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .ks-dc.dowon .box .dowon_b .item .gr .g_dow a { padding: 6px 14px; }
  .ks-dc-na { white-space: normal; }
}

/* Подбор продукции: /selection-tools. Шапка — как у «Центра загрузок» (.sdowon .ks-dc-head), вкладки направлений — .ks-dc-tabs;
   категории — чипы, подкатегории и серии — ссылки, слева фильтры (<details>, без JS — форма GET), справа карточки моделей. */
.ks-sel { padding: .3rem 0 .8rem; }
.ks-sel-dirs { margin-bottom: .3rem; border-bottom: 1px solid #e5e5e5; }
.ks-sel-dirs .ks-dc-tab { font-size: 18px; }
.ks-sel-hint { margin-bottom: 20px; color: #666; font-size: 16px; }
.ks-sel-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.ks-sel-cat { display: flex; flex-direction: column; border: 1px solid #e5e5e5; padding: 20px; color: #222; transition: border-color .2s; }
.ks-sel-cat:hover { border-color: #e62129; color: #222; }
.ks-sel-cat__img { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; margin-bottom: 14px; background: #f7f7f7; overflow: hidden; }
.ks-sel-cat__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ks-sel-cat__name { font-size: 18px; font-weight: bold; line-height: 1.35; }
.ks-sel-cat:hover .ks-sel-cat__name { color: #e62129; }
.ks-sel-cat__txt { display: flex; flex: 1; flex-direction: column; align-items: flex-start; min-width: 0; }
.ks-sel-cat__meta { margin-top: 6px; color: #999; font-size: 14px; }
.ks-sel-cat__tag { margin-top: 8px; padding: 2px 8px; border: 1px solid #f3c2c4; color: #e62129; font-size: 12px; line-height: 1.5; }
.ks-sel-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.ks-sel-chip { padding: 8px 16px; border: 1px solid #d9d9d9; color: #444; font-size: 15px; line-height: 1.3; }
.ks-sel-chip:hover { border-color: #e62129; color: #e62129; }
.ks-sel-chip.is-active { border-color: #e62129; background: #e62129; color: #fff; }
.ks-sel-level { display: flex; gap: 6px 14px; margin-bottom: 14px; font-size: 15px; line-height: 1.5; }
.ks-sel-level__label { flex: none; min-width: 110px; color: #999; }
.ks-sel-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.ks-sel-links a { color: #666; }
.ks-sel-links a:hover { color: #e62129; }
.ks-sel-links a.on { color: #222; font-weight: bold; box-shadow: inset 0 -2px 0 #e62129; }
.ks-sel-body { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 30px; align-items: start; margin-top: 26px; }
.ks-sel-body--wide { grid-template-columns: minmax(0, 1fr); }
.ks-sel-panel { border: 1px solid #e5e5e5; background: #fff; }
.ks-sel-panel__head { position: relative; padding: 14px 40px 14px 16px; font-size: 18px; font-weight: bold; color: #222; border-bottom: 1px solid #e5e5e5; cursor: pointer; list-style: none; }
.ks-sel-panel__head::-webkit-details-marker, .ks-sel-f summary::-webkit-details-marker { display: none; }
.ks-sel-badge { display: inline-block; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px; border-radius: 10px; background: #e62129; color: #fff; font-size: 12px; line-height: 20px; text-align: center; font-weight: normal; vertical-align: 2px; }
.ks-sel-f { border-bottom: 1px solid #f0f0f0; }
.ks-sel-f summary { position: relative; padding: 12px 34px 12px 16px; font-size: 15px; font-weight: bold; color: #222; cursor: pointer; list-style: none; line-height: 1.35; }
.ks-sel-panel__head::after, .ks-sel-f summary::after { content: ''; position: absolute; right: 18px; top: 50%; width: 7px; height: 7px; margin-top: -6px; border-right: 2px solid #999; border-bottom: 2px solid #999; transform: rotate(45deg); }
.ks-sel-panel[open] > .ks-sel-panel__head::after, .ks-sel-f[open] summary::after { margin-top: -2px; transform: rotate(-135deg); }
.ks-sel-f__vals { max-height: 252px; overflow-y: auto; padding: 0 16px 12px; }
.ks-sel-v { display: flex; align-items: flex-start; gap: 8px; padding: 4px 0; font-size: 14px; line-height: 1.4; color: #333; cursor: pointer; }
.ks-sel-v input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; -webkit-appearance: checkbox; appearance: auto; accent-color: #e62129; cursor: pointer; }
.ks-sel-v__t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ks-sel-v__n { flex: none; color: #999; font-size: 13px; }
.ks-sel-v:hover .ks-sel-v__t { color: #e62129; }
.ks-sel-v.is-off { color: #bbb; cursor: default; }
.ks-sel-v.is-off .ks-sel-v__t { color: #bbb; }
.ks-sel-actions { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: #fff; border-top: 1px solid #e5e5e5; }
.ks-sel-apply { height: 42px; padding: 0 24px; }
.ks-sel-filters.is-auto .ks-sel-actions { display: none; }
.ks-sel-reset { color: #e62129; font-size: 14px; white-space: nowrap; }
.ks-sel-reset:hover { text-decoration: underline; color: #e62129; }
.ks-sel-res__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ks-sel-empty { padding: 30px 0; color: #656567; font-size: 18px; }
.ks-sel-empty .ks-btn { margin-top: 16px; }
.ks-sel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ks-sel-body--wide .ks-sel-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ks-sel-card { display: flex; flex-direction: column; border: 1px solid #e5e5e5; padding: 16px; background: #fff; min-width: 0; }
.ks-sel-card__img { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; overflow: hidden; }
.ks-sel-card__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ks-sel-card__body { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.ks-sel-card h3 { margin-top: 12px; font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.ks-sel-card h3 a { color: #000; }
.ks-sel-card h3 a:hover { color: #e62129; }
.ks-sel-card__series { margin-top: 4px; color: #666; font-size: 13px; line-height: 1.4; }
.ks-sel-card__props { margin: 10px 0 0; font-size: 13px; line-height: 1.4; }
.ks-sel-card__props div { display: flex; gap: 6px; padding: 3px 0; border-top: 1px dashed #eee; }
.ks-sel-card__props dt { flex: 0 0 45%; color: #999; font-weight: normal; overflow-wrap: anywhere; }
.ks-sel-card__props dd { flex: 1; min-width: 0; margin: 0; color: #333; overflow-wrap: anywhere; }
.ks-sel-card__price { margin-top: auto; padding-top: 12px; font-size: 18px; font-weight: bold; color: #222; }
.ks-sel-card__buy { display: flex; gap: 8px; margin-top: 10px; }
.ks-sel-card__acts { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; margin-top: 10px; font-size: 14px; }
.ks-sel-card__acts a { color: #e62129; }
.ks-sel-card__acts a:hover { text-decoration: underline; }
.ks-sel .public-pager { margin-top: 40px; flex-wrap: wrap; }
.ks-sel-quote { padding: .4rem 0 .6rem; }
.ks-sel-quote .container .x-le { width: 100%; max-width: 900px; }
.ks-sel-quote h2 { font-size: 28px; font-weight: bold; color: #222; }
@media (max-width: 1199px) {
  .ks-sel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ks-sel-body--wide .ks-sel-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
  .ks-sel-body { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ks-sel-body--wide .ks-sel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ks-sel-f__vals { max-height: 210px; }
}
@media (max-width: 767px) {
  .ks-sel-dirs { flex-wrap: wrap; gap: 6px 20px; }
  .ks-sel-dirs .ks-dc-tab { font-size: 15px; }
  .ks-sel-cats { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ks-sel-cat { flex-direction: row; align-items: center; gap: 14px; padding: 12px; }
  .ks-sel-cat__img { flex: 0 0 96px; margin: 0; aspect-ratio: 4 / 3; }
  .ks-sel-cat__name { font-size: 16px; }
  .ks-sel-cat__meta { font-size: 13px; }
  .ks-sel-cat__tag { margin-top: 6px; font-size: 11px; }
  .ks-sel-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -15px 16px; padding: 0 15px 4px; scrollbar-width: none; }
  .ks-sel-chips::-webkit-scrollbar { display: none; }
  .ks-sel-chip { flex: none; padding: 7px 12px; font-size: 14px; }
  .ks-sel-level { flex-direction: column; gap: 4px; font-size: 14px; }
  .ks-sel-level__label { min-width: 0; }
  .ks-sel-links { flex-wrap: nowrap; gap: 0 16px; overflow-x: auto; margin-right: -15px; padding: 0 15px 6px 0; white-space: nowrap; scrollbar-width: none; }
  .ks-sel-links::-webkit-scrollbar { display: none; }
  .ks-sel-grid, .ks-sel-body--wide .ks-sel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ks-sel-card { padding: 10px; }
  .ks-sel-card h3 { font-size: 14px; }
  .ks-sel-card__series, .ks-sel-card__props { font-size: 12px; }
  .ks-sel-card__props div { flex-direction: column; gap: 0; }
  .ks-sel-card__props dt { flex: none; }
  .ks-sel-card__price { font-size: 15px; }
  .ks-sel-card__buy { gap: 6px; }
  .ks-sel-card__buy .ks-qty { width: 44px; height: 36px; }
  .ks-sel-card__buy .ks-btn { height: 36px; font-size: 13px; padding: 0 8px; }
  .ks-sel-card__acts { flex-direction: column; font-size: 13px; }
  .ks-sel-quote h2 { font-size: 20px; }
}

/* Сравнение моделей: /product-comparison. Шапка — как у «Подбора продукции»; таблица прокручивается внутри .ks-cmp-scroll,
   первая колонка (названия характеристик) закреплена. */
.ks-cmp { padding: .3rem 0 .8rem; }
.ks-cmp-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 16px; }
.ks-cmp-bar .ks-dc-count { margin: 0; }
.ks-cmp-diff { display: inline-flex; align-items: center; gap: 10px; color: #222; font-size: 15px; cursor: pointer; }
.ks-cmp-diff:hover { color: #e62129; }
.ks-cmp-diff__sw { position: relative; flex: none; width: 36px; height: 20px; border-radius: 10px; background: #ccc; transition: background .2s; }
.ks-cmp-diff__sw::after { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .2s; }
.ks-cmp-diff.is-on .ks-cmp-diff__sw { background: #e62129; }
.ks-cmp-diff.is-on .ks-cmp-diff__sw::after { left: 18px; }
.ks-cmp-diff.is-disabled { color: #bbb; cursor: default; }
.ks-cmp-diff.is-disabled .ks-cmp-diff__sw { background: #e5e5e5; }
.ks-cmp-scroll { overflow-x: auto; border: 1px solid #e5e5e5; -webkit-overflow-scrolling: touch; }
.ks-cmp-table { width: 100%; min-width: 1000px; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 14px; line-height: 1.5; color: #333; }
.ks-cmp-table th, .ks-cmp-table td { padding: 10px 14px; border-bottom: 1px solid #eee; border-left: 1px solid #eee; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.ks-cmp-table .ks-cmp-first { position: sticky; left: 0; z-index: 2; width: 220px; border-left: 0; background: #fafafa; color: #666; font-weight: normal; }
.ks-cmp-table thead .ks-cmp-first { vertical-align: bottom; background: #fff; }
.ks-cmp-first__t { color: #999; font-size: 13px; }
.ks-cmp-slot { padding: 16px !important; background: #fff; font-weight: normal; }
.ks-cmp-model { display: flex; flex-direction: column; height: 100%; }
.ks-cmp-model__img { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; overflow: hidden; }
.ks-cmp-model__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ks-cmp-model h3 { margin-top: 10px; font-size: 16px; line-height: 1.4; font-weight: bold; }
.ks-cmp-model h3 a { color: #000; }
.ks-cmp-model h3 a:hover { color: #e62129; }
.ks-cmp-model__series { margin-top: 4px; color: #666; font-size: 13px; line-height: 1.4; }
.ks-cmp-model__price { margin-top: 8px; font-size: 17px; font-weight: bold; color: #222; }
.ks-cmp-model__buy { display: flex; gap: 8px; margin-top: 10px; }
.ks-cmp-model__acts { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; margin-top: 10px; font-size: 14px; }
.ks-cmp-model__acts a { color: #e62129; }
.ks-cmp-model__acts a:hover { text-decoration: underline; }
.ks-cmp-model__acts .ks-cmp-rm { color: #999; }
.ks-cmp-slot--empty { background: #fafafa; }
.ks-cmp-pick { display: flex; flex-direction: column; gap: 8px; }
.ks-cmp-pick__t { font-size: 16px; font-weight: bold; color: #222; }
.ks-cmp-pick__f { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: #999; }
.ks-cmp-pick__f select { width: 100%; height: 38px; padding: 0 8px; border: 1px solid #d9d9d9; background: #fff; color: #222; font-size: 14px; cursor: pointer; text-overflow: ellipsis; }
.ks-cmp-pick__f select:focus { outline: 0; border-color: #e62129; }
.ks-cmp-pick__f select:disabled { background: #f3f3f3; color: #bbb; cursor: default; }
.ks-cmp-pick__go { flex: none; margin-top: 4px; }
.ks-cmp-pick.is-js .ks-cmp-pick__go { display: none; }
.ks-cmp-g__head th { padding: 0; background: #f3f3f3; border-left: 0; }
.ks-cmp-g__btn { position: sticky; left: 0; display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border: 0; background: none; color: #222; font-size: 15px; font-weight: bold; text-align: left; cursor: default; }
.ks-cmp-g.is-js .ks-cmp-g__btn { cursor: pointer; }
.ks-cmp-g.is-js .ks-cmp-g__btn::after { content: ''; width: 7px; height: 7px; margin-top: -4px; border-right: 2px solid #999; border-bottom: 2px solid #999; transform: rotate(45deg); }
.ks-cmp-g.is-closed .ks-cmp-g__btn::after { margin-top: 2px; transform: rotate(-135deg); }
.ks-cmp-g.is-closed tr:not(.ks-cmp-g__head) { display: none; }
.ks-cmp-g.is-js .ks-cmp-g__btn:hover { color: #e62129; }
.ks-cmp-none { color: #bbb; }
.ks-cmp-blank { background: #fafafa; }
.ks-cmp-empty { padding: 30px 14px !important; color: #656567; font-size: 16px; text-align: center !important; }
@media (max-width: 767px) {
  .ks-cmp-table { min-width: 840px; font-size: 13px; }
  .ks-cmp-table .ks-cmp-first { width: 120px; }
  .ks-cmp-table th, .ks-cmp-table td { padding: 8px 10px; }
  .ks-cmp-slot { padding: 10px !important; }
  .ks-cmp-model h3 { font-size: 14px; }
  .ks-cmp-model__price { font-size: 15px; }
  .ks-cmp-model__buy .ks-qty { width: 44px; height: 36px; }
  .ks-cmp-model__buy .ks-btn { height: 36px; font-size: 13px; padding: 0 8px; }
  .ks-cmp-g__btn { font-size: 14px; padding: 8px 10px; }
}

/* «Сравнение моделей»: состояние кнопки «В сравнении» и сообщение без layui */
.ks-sel-card__acts a[aria-pressed="true"], .com-models .links a[aria-pressed="true"] { color: #222; }
.ks-cmp-msg { position: fixed; left: 50%; top: 40%; transform: translateX(-50%); z-index: 99999; max-width: 90%; padding: 12px 18px; background: rgba(0, 0, 0, .8); color: #fff; border-radius: 4px; }
.ks-cmp-msg[hidden] { display: none; }
.ks-cmp-msg a { color: #fff; text-decoration: underline; }
/* «Открыть сравнение» в сообщении layer.msg (тёмный фон) — красная, заметная */
.layui-layer-msg .ks-cmp-link, .ks-cmp-msg .ks-cmp-link { color: #ff3b42; text-decoration: underline; }
.layui-layer-msg .ks-cmp-link:hover, .ks-cmp-msg .ks-cmp-link:hover { color: #ff6b70; }
