/* Filtry — UI/UX-слой (аудит 02.11.2026, принципы Apple HIG):
   контраст WCAG AA, сенсорные зоны ≥ 44 px, поля без автозума iOS, фокус, единая палитра бренда.
   Подключается последним; `body.flt-kit` поднимает специфичность над inline-стилями HTML-блоков. */

/* ---------- 1. Единая палитра: HTML-блоки (ats, atp, atk, atn, atv, aqt, atpr…) → цвета бренда ---------- */
body.flt-kit {
  --c-blue-text: #1862BD;       /* синий для текста на светлом фоне (#E1EBF5): 4.9:1 */
  --aq-navy: #0C2139; --aq-plum: #13304F; --aq-blue: #1862BD; --aq-blue2: #1E72D6; --aq-pink: #1E72D6; --aq-muted: #5F6676;
}
body.flt-kit :is(.ats, .ats2, .atp, .atk4, .atk5, .atn, .atv, .aqt, .atpr) {
  --navy: #0C2139; --plum: #13304F; --blue: #1862BD; --blue2: #1E72D6; --pink: #1E72D6; --muted: #5F6676;
}
body.flt-kit .atek-cat { --navy: #0C2139; --blue-d: #1862BD; }

/* ---------- 2. Контраст ---------- */
/* кнопки-«листы» и подписи на светло-голубом */
body.flt-kit .flt-btn, body.flt-kit .flt-shead__sub, body.flt-kit .flt-shead__link, body.flt-kit .flt-eyebrow,
body.flt-kit .flt-cta__sub, body.flt-kit .flt-scard__more { color: var(--c-blue-text) !important; }
body.flt-kit .flt-btn:hover, body.flt-kit .flt-btn:focus-visible { color: #fff !important; }
body.flt-kit button:where(:not([class*="flt-"])), body.flt-kit input[type="submit"]:where(:not([class*="flt-"])),
body.flt-kit input[type="button"]:where(:not([class*="flt-"])) { color: var(--c-blue-text); }
body.flt-kit .aqt__tab:not(.is-active):not([aria-selected="true"]), body.flt-kit .atek-facets__toggle,
body.flt-kit .ats2__nav, body.flt-kit .ats-fin__btn:not(.ats-fin__btn--tg) { color: var(--c-blue-text); }
body.flt-kit :is(button, input[type="submit"]):where(:not([class*="flt-"])):hover,
body.flt-kit .ats2__nav:hover, body.flt-kit .ats-fin__btn:not(.ats-fin__btn--tg):hover { color: #fff; }
/* счётчики: подпись белая вместо #E1EBF5 на синем */
body.flt-kit .flt-stat__label { color: #fff; }
/* Telegram-кнопки: фирменный голубой Telegram темнее, чтобы белый текст читался */
body.flt-kit :is(.atp__btn--tg, .atp__tg, .ats-fin__btn--tg) { background-color: #1877AD !important; color: #fff !important; }
body.flt-kit :is(.atp__btn--tg, .atp__tg, .ats-fin__btn--tg):hover { background-color: #12608C !important; }
/* бейджи и мета-текст */
body.flt-kit :is(.atpr__badge, .atp__pdf) { background: #E1EBF5 !important; color: #1862BD !important; }
body.flt-kit .atk4__tag--p { color: #B23C00 !important; }
body.flt-kit :is(.atk5__cls, .atk5__cls b) { color: #8A5A00 !important; }
body.flt-kit .ats2__stars { color: #B87300 !important; }
body.flt-kit :is(.atek-facet__count, .aqt__count) { color: #646B7E !important; }
body.flt-kit .step-n { background: #1862BD !important; }

/* ---------- 3. Типографика ---------- */
body.flt-kit :is(h1, h2, h3, .flt-shead__title, .flt-cta__title, .flt-about__title, .flt-phero__title) { text-wrap: balance; }
body.flt-kit :is(p, li) { text-wrap: pretty; }
body.flt-kit .woocommerce-breadcrumb { font-size: 13px !important; line-height: 1.6; }

/* ---------- 4. Фокус для клавиатуры ---------- */
body.flt-kit :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid #1E72D6; outline-offset: 2px; border-radius: 4px;
}
body.flt-kit :where(.flt-footer, .flt-stats, .atek-steps, .ats-fin) :where(a, button, input, select, textarea):focus-visible { outline-color: #fff; }

/* ---------- 5. Переполнение в каталоге WooCommerce на мобильном ---------- */
body.flt-kit .atek-shop__col { min-width: 0; flex: 1 1 0%; max-width: 100%; }
body.flt-kit ul.products li.product { min-width: 0; }
@media (max-width: 767px) { body.flt-kit .atek-shop ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
body.flt-kit ul.products li.product :is(h2, h3, .woocommerce-loop-product__title) { overflow-wrap: anywhere; hyphens: auto; }

/* ---------- 6. WooCommerce: пагинация и сортировка в стиле бренда ---------- */
body.flt-kit .woocommerce-pagination ul.page-numbers { border: 0 !important; display: flex !important; justify-content: center; gap: 6px; }
body.flt-kit .woocommerce-pagination ul.page-numbers li { border: 0 !important; }
body.flt-kit .woocommerce-pagination .page-numbers :is(a, span) {
  min-width: 44px; min-height: 44px; display: inline-flex !important; align-items: center; justify-content: center;
  border-radius: 12px; background: #fff; color: #0C2139; font: 500 16px/1 Roboto, sans-serif; border: 1px solid #E1EBF5; transition: background-color .2s, color .2s;
}
body.flt-kit .woocommerce-pagination .page-numbers a:hover { background: #E1EBF5; color: #1862BD; }
body.flt-kit .woocommerce-pagination .page-numbers span.current { background: #1E72D6; color: #fff; border-color: #1E72D6; }

/* ---------- 7. Сенсорные зоны ≥ 44 px и поля без автозума (мобильные) ---------- */
@media (max-width: 1024px) {
  body.flt-kit .flt-logo { padding: 3px 0; }
  body.flt-kit :is(.flt-shead__link, .flt-scard__more) { display: inline-flex; align-items: center; min-height: 44px; }
  body.flt-kit .flt-scard__more { margin-bottom: 8px; }
  body.flt-kit .flt-tabs__tab { min-height: 48px; }
  body.flt-kit .flt-slider__dot { width: 44px; height: 44px; }
  body.flt-kit .flt-slider__dots { bottom: 4px; gap: 0; }
  body.flt-kit .flt-pcard__go { position: relative; }
  body.flt-kit .flt-pcard__go::after { content: ""; position: absolute; inset: -5px; }
  body.flt-kit .woocommerce-breadcrumb { line-height: 2.2; }
  body.flt-kit .woocommerce-ordering select, body.flt-kit .orderby { min-height: 44px; }
  body.flt-kit .atpr__btn { min-height: 44px; display: inline-flex; align-items: center; }
  body.flt-kit .ats2__dot { position: relative; }
  body.flt-kit .ats2__dot::after { content: ""; position: absolute; inset: -18px -8px; }
  body.flt-kit .atp__crow a { display: inline-flex; align-items: center; min-height: 44px; }
  body.flt-kit .atek-anchors a { min-height: 44px; display: inline-flex; align-items: center; }
  body.flt-kit .woocommerce-product-gallery__trigger { width: 44px !important; height: 44px !important; display: flex !important; align-items: center; justify-content: center; }
  body.flt-kit .comment-form .form-submit input[type="submit"] { min-height: 44px; }
  body.flt-kit .posted_in a { display: inline-block; padding: 4px 0; }
  /* iOS увеличивает страницу при фокусе на поле со шрифтом < 16 px */
  body.flt-kit :is(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]), select, textarea) { font-size: 16px !important; }
}

/* ---------- 8. Таблица характеристик товара: подпись | значение, без курсива и «зебры» ---------- */
body.flt-kit table.shop_attributes { width: 100%; border-collapse: collapse; }
body.flt-kit table.shop_attributes tr { display: table-row !important; }
body.flt-kit table.shop_attributes :is(th, td) { display: table-cell !important; background: none !important; font-style: normal !important; vertical-align: top; }
body.flt-kit table.shop_attributes td p { margin: 0; font-style: normal; }
@media (max-width: 767px) {
  body.flt-kit table.shop_attributes :is(th, td) { padding: 12px 8px !important; font-size: 15px !important; }
  body.flt-kit table.shop_attributes td { overflow-wrap: anywhere; }
}

/* ---------- 9. Якоря товара: мягкое затухание справа — видно, что ленту можно прокрутить ---------- */
@media (max-width: 767px) {
  body.flt-kit .atek-anchors { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 32px; }
}

/* ---------- 10. Шапка на телефоне: одна строка «логотип · языки · меню» ---------- */
@media (max-width: 767px) {
  body.flt-kit .flt-hrow__in { flex-wrap: nowrap; gap: 8px; padding: 6px 0; }
  body.flt-kit .flt-hrow__in::after { content: none; }
  body.flt-kit .flt-logo img { width: 136px; height: 29px; }
  body.flt-kit .flt-logo { padding: 8px 0; margin-right: auto; }
  body.flt-kit .flt-lang { order: 2; }
  body.flt-kit .flt-burger { order: 3; }
  body.flt-kit .flt-lang a.glink { min-width: 44px; padding: 0 4px; font-size: 15px; }
}

/* ---------- 11. Кнопки: одна форма «лист» (радиусы 20/0/20/0, при наведении зеркально) ---------- */
/* основная (заливка) — главные действия в карточках, товаре, каталоге */
body.flt-kit :is(.atpr__btn, .atk5__btn, .atp__btn, .atek-buy__btn, ul.products li.product a.button, .woocommerce a.button.alt, .woocommerce button.button.alt),
body.flt-kit :is(.atp__btn--tg, .atp__tg, .ats-fin__btn--tg) {
  border-radius: 20px 0 20px 0 !important;
  font-family: Raleway, sans-serif !important; font-weight: 600 !important; letter-spacing: .5px;
  border: 0 !important; box-shadow: none !important;
  transition: background-color .25s ease, color .25s ease, border-radius .25s ease !important;
}
body.flt-kit :is(.atpr__btn, .atk5__btn, .atp__btn, .atek-buy__btn, ul.products li.product a.button, .woocommerce a.button.alt, .woocommerce button.button.alt):not(.atp__btn--tg) {
  background: #1862BD !important; color: #fff !important;
}
body.flt-kit :is(.atpr__btn, .atk5__btn, .atp__btn, .atek-buy__btn, ul.products li.product a.button, .woocommerce a.button.alt, .woocommerce button.button.alt):not(.atp__btn--tg):hover {
  background: #0C2139 !important; color: #fff !important; border-radius: 0 20px 0 20px !important;
}
body.flt-kit :is(.atp__btn--tg, .atp__tg, .ats-fin__btn--tg):hover { border-radius: 0 20px 0 20px !important; }
/* вторичная (светлая) — как фирменная кнопка темы */
body.flt-kit :is(.atn__all, .atek-buy__call, .comment-form .form-submit input[type="submit"], .woocommerce a.button:not(.alt):not(.product_type_simple):not(.product_type_variable), .woocommerce button.button:not(.alt)) {
  border-radius: 20px 0 20px 0 !important; border: 0 !important; box-shadow: none !important;
  background: #E1EBF5 !important; color: #1862BD !important;
  font-family: Raleway, sans-serif !important; font-weight: 600 !important; letter-spacing: .5px;
  transition: background-color .25s ease, color .25s ease, border-radius .25s ease !important;
}
body.flt-kit :is(.atn__all, .atek-buy__call, .comment-form .form-submit input[type="submit"], .woocommerce a.button:not(.alt):not(.product_type_simple):not(.product_type_variable), .woocommerce button.button:not(.alt)):hover {
  background: #1E72D6 !important; color: #fff !important; border-radius: 0 20px 0 20px !important;
}
body.flt-kit .comment-form .form-submit input[type="submit"] { padding: 15px 40px !important; }

/* ---------- 12. Заголовки: единая иерархия ---------- */
/* заголовки секций HTML-блоков = как у секций темы: Raleway 600, 40 px, заглавные */
body.flt-kit :is(.ats__h, .ats2__h, .atv__h, .atn__h, .atk5__head) h2,
body.flt-kit .atek-steps .sec-title {
  font-family: Raleway, sans-serif !important; font-weight: 600 !important; text-transform: uppercase;
  font-size: clamp(30px, 3.2vw, 40px) !important; line-height: 1.1 !important; letter-spacing: 0 !important;
}
/* заголовки страниц и карточек: вес 600 вместо 700–800 */
body.flt-kit :is(.ats, .ats2, .atp, .atk4, .atk5, .atn, .atv, .aqt, .atpr, .atek-cat, .atek-steps, .ats-fin) :is(h1, h2, h3),
body.flt-kit :is(.product_title, .woocommerce-products-header__title, .woocommerce-Reviews-title, .related > h2, .upsells > h2, .woocommerce-Tabs-panel > h2) {
  font-weight: 600 !important; letter-spacing: 0;
}
body.flt-kit .product_title { color: #0C2139 !important; }

/* обложки новостей: градиенты в гамме бренда вместо фиолетово-розовых */
body.flt-kit .atn__card:nth-child(1) .atn__thumb { background: linear-gradient(135deg, #0C2139, #1862BD); }
body.flt-kit .atn__card:nth-child(2) .atn__thumb { background: linear-gradient(135deg, #1862BD, #13304F); }
body.flt-kit .atn__card:nth-child(3) .atn__thumb { background: linear-gradient(135deg, #13304F, #1E72D6); }
