/* ============================================================
   ART-GSM 2026 — PAGES 3  (info · wholesale · contacts · about · blog · error)
   ============================================================ */

/* ---------- INFO / ARTICLE PROSE ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin: var(--s-28) 0 var(--s-12); }
.prose h3 { font-size: 17px; font-weight: 700; margin: var(--s-20) 0 var(--s-8); }
.prose p { font-size: 15px; color: var(--ink-2); line-height: 1.65; margin-bottom: var(--s-12); }
.prose ul { display: flex; flex-direction: column; gap: 8px; margin: var(--s-8) 0 var(--s-16); }
.prose ul li { position: relative; padding-left: 26px; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.prose ul li::before { content: ''; position: absolute; left: 4px; top: 7px; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose a { color: var(--accent); font-weight: 600; }

/* info cards grid (delivery methods, payment) */
.info-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-14); margin: var(--s-16) 0 var(--s-8); }
.info-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: var(--s-20); }
.info-card .ic-top { display: flex; align-items: center; gap: var(--s-12); margin-bottom: var(--s-12); }
.info-card .ic-ic { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--blue-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.info-card .ic-ic svg { width: 23px; height: 23px; }
.info-card .ic-name { font-weight: 700; font-size: 15px; }
.info-card .ic-price { font-family: var(--mono); font-weight: 700; font-size: 18px; }
.info-card .ic-price.free { color: #16a34a; }
.info-card .ic-desc { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }

/* steps row (return procedure) */
.steps-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-14); counter-reset: st; }
.step-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm); padding: var(--s-20) var(--s-16); position: relative; }
.step-card .st-n { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: 14px; margin-bottom: var(--s-12); }
.step-card .st-t { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.step-card .st-d { font-size: 13px; color: var(--ink-2); line-height: 1.45; }

/* ---------- WHOLESALE / B2B ---------- */
.b2b-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--s-32); align-items: start; }
.b2b-feats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-12); margin: var(--s-20) 0; }
.b2b-feat { display: flex; gap: 10px; align-items: flex-start; padding: var(--s-14); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.b2b-feat svg { width: 20px; height: 20px; color: #16a34a; flex: none; margin-top: 1px; }
.b2b-feat .bf-t { font-weight: 700; font-size: 14px; }
.b2b-feat .bf-d { font-size: 12.5px; color: var(--ink-3); }
.b2b-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-md); padding: var(--s-24); border-top: 3px solid var(--accent); }
.b2b-form h3 { font-size: 18px; font-weight: 700; margin-bottom: var(--s-16); }
.b2b-form .field-grid { gap: var(--s-12); margin-bottom: var(--s-16); }

/* ---------- CONTACTS ---------- */
/* location blocks — each address gets its own embedded Yandex map */
.loc-list { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-16); margin-bottom: var(--s-24); }
.loc-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.loc-map { position: relative; min-height: 300px; background: var(--surface-2);
  background-image: linear-gradient(rgba(37,99,235,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(37,99,235,.06) 1px, transparent 1px); background-size: 32px 32px; }
.loc-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.loc-info { padding: var(--s-24); display: flex; flex-direction: column; gap: var(--s-10); flex: 1; }
.loc-info .loc-badge { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; height: 26px; padding: 0 11px; border-radius: var(--r-pill); background: var(--blue-soft); color: var(--accent); font-size: 12px; font-weight: 700; }
.loc-info .loc-badge svg { width: 14px; height: 14px; }
.loc-info h3 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.loc-info .loc-addr { font-size: 14px; color: var(--ink-2); }
.loc-meta { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.loc-meta li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.loc-meta svg { width: 17px; height: 17px; color: var(--accent); flex: none; }
.loc-actions { display: flex; gap: var(--s-10); margin-top: auto; padding-top: var(--s-10); flex-wrap: wrap; }

.contact-cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-14); }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: var(--s-20); }
.contact-card .cc-ic { width: 42px; height: 42px; border-radius: var(--r-md); background: var(--blue-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: var(--s-12); }
.contact-card .cc-ic svg { width: 22px; height: 22px; }
.contact-card .cc-t { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: 4px; }
.contact-card .cc-v { font-size: 15px; font-weight: 600; line-height: 1.4; }
.contact-card .cc-v.phone { font-family: var(--mono); font-size: 18px; }
.contact-card a.cc-link { display: inline-block; color: var(--accent); transition: color .15s; }
.contact-card a.cc-link:hover { color: var(--blue-deep); text-decoration: underline; }
.contact-card .cc-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.contact-card.span2 { grid-column: span 2; }
.contact-actions { display: flex; gap: var(--s-10); margin-top: var(--s-12); flex-wrap: wrap; }
.map-frame { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); position: relative; aspect-ratio: 4/5; min-height: 320px;
  background-image: linear-gradient(rgba(37,99,235,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(37,99,235,.06) 1px, transparent 1px); background-size: 32px 32px; }
.map-frame .map-lbl { position: absolute; top: 14px; left: 14px; font-family: var(--mono); font-size: 11px; color: var(--ink-3); background: var(--surface); border: 1px dashed var(--line-2); padding: 5px 10px; border-radius: 6px; }
.map-pin { position: absolute; display: flex; flex-direction: column; align-items: center; transform: translate(-50%, -100%); }
.map-pin svg { width: 30px; height: 30px; color: var(--accent); filter: drop-shadow(0 4px 8px rgba(37,99,235,.4)); }
.map-pin .mp-lbl { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 3px 10px; font-size: 11px; font-weight: 700; box-shadow: var(--shadow-sm); white-space: nowrap; margin-top: -4px; }

/* ---------- ABOUT ---------- */
.about-hero { background: linear-gradient(150deg, var(--surface), var(--surface-2)); border: 1px solid var(--line); border-radius: var(--r-xl); padding: var(--s-40); box-shadow: var(--shadow-sm); }
.about-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-14); margin: var(--s-24) 0; }
.about-stat { text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: var(--s-24) var(--s-16); }
.about-stat .num { font-family: var(--mono); font-weight: 700; font-size: 34px; letter-spacing: -.02em; color: var(--accent); }
.about-stat .lbl { font-size: 13px; color: var(--ink-2); margin-top: 6px; }

/* ---------- BLOG ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-16); }
.post-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .18s, box-shadow .22s, border-color .2s; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.post-card .pc-cover { aspect-ratio: 16/9; position: relative; overflow: hidden; background: var(--surface-2);
  background-image: repeating-linear-gradient(135deg, rgba(37,99,235,.06) 0 10px, transparent 10px 20px); display: grid; place-items: center; }
.post-card .pc-cover .pc-ph { font-family: var(--mono); font-size: 11px; color: var(--ink-3); border: 1px dashed var(--line-2); padding: 5px 10px; border-radius: 6px; background: var(--surface); }
.post-card .pc-cat { position: absolute; top: 12px; left: 12px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; }
.post-card .pc-body { padding: var(--s-16); display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card .pc-title { font-weight: 700; font-size: 16px; line-height: 1.25; letter-spacing: -.01em; }
.post-card .pc-excerpt { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.post-card .pc-meta { margin-top: auto; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-3); padding-top: var(--s-8); }
.post-card .pc-meta svg { width: 14px; height: 14px; }

.tag-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--s-20); }

/* article */
.article-hero { max-width: 820px; margin: 0 auto; }
.article-hero .ah-cover { aspect-ratio: 21/9; border-radius: var(--r-lg); margin: var(--s-20) 0; background: var(--surface-2); border: 1px solid var(--line);
  background-image: repeating-linear-gradient(135deg, rgba(37,99,235,.06) 0 12px, transparent 12px 24px); display: grid; place-items: center; }
.article-hero .ah-cover .ph { font-family: var(--mono); font-size: 12px; color: var(--ink-3); border: 1px dashed var(--line-2); padding: 6px 12px; border-radius: 6px; background: var(--surface); }
.article-body { max-width: 820px; margin: 0 auto; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--s-32); align-items: start; } /* ART-GSM 2026-09-05: minmax(0,…) — таблица с длинными ячейками не расширяет колонку и документ */
/* ART-GSM 2026-09-01 (ag-blog-notoc). У статей без оглавления (легаси-контент без h2/h3)
   aside.toc не рендерится, единственный ребёнок грида попадает в первую колонку 200px,
   и весь текст статьи сжимается до ~140px. Проверено headless: 16 из 19 статей блога.
   Нет оглавления -> одна колонка на всю ширину. Откат: удалить это правило. */
.article-body:not(:has(> .toc)) { grid-template-columns: minmax(0, 1fr); }
.toc { position: sticky; top: 92px; font-size: 13px; }
.toc h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: var(--s-12); }
.toc a { display: block; padding: 6px 0 6px 12px; border-left: 2px solid var(--line); color: var(--ink-2); font-weight: 600; }
.toc a:hover, .toc a.on { border-left-color: var(--accent); color: var(--accent); }

/* ---------- ERROR ---------- */
.err-wrap { min-height: calc(100vh - var(--header-h) - 120px); display: grid; place-items: center; text-align: center; padding: var(--s-40) var(--s-16); }
.err-code { font-family: var(--mono); font-weight: 700; font-size: clamp(72px, 14vw, 140px); line-height: 1; letter-spacing: -.04em; color: var(--accent); }
.err-wrap h1 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; letter-spacing: -.02em; margin: var(--s-12) 0 var(--s-8); }
.err-wrap p { font-size: 15px; color: var(--ink-2); margin-bottom: var(--s-20); max-width: 44ch; }
.err-search { max-width: 440px; width: 100%; position: relative; margin: 0 auto var(--s-20); }
.err-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--ink-3); }
.err-search input { width: 100%; height: 52px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--surface); padding: 0 16px 0 46px; font: inherit; font-size: 15px; }
.err-search input:focus { outline: none; border-color: var(--accent); }
.err-actions { display: flex; gap: var(--s-12); justify-content: center; flex-wrap: wrap; margin-bottom: var(--s-28); }
.err-cats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 540px; }

@media (max-width: 1023px) {
  .info-cards { grid-template-columns: 1fr; }
  .steps-row { grid-template-columns: 1fr 1fr; }
  .b2b-hero { grid-template-columns: 1fr; }
  .contacts-grid { grid-template-columns: 1fr; }
  .loc-list { grid-template-columns: 1fr; }
  .loc-map { min-height: 240px; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .blog-grid { grid-template-columns: 1fr 1fr; }
  .article-body { grid-template-columns: minmax(0, 1fr); } /* ART-GSM 2026-09-05: на телефоне статья N8N с таблицей расползалась до 503 px при экране 375 */
  /* ag content-article-03: на мобиле TOC не прячем, а показываем сверху компактным блоком */
  .toc { position: static; top: auto; margin: 0 0 var(--s-20); padding: var(--s-12) var(--s-16);
         border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); font-size: 13px; }
  .toc h4 { margin-bottom: var(--s-8); }
  .toc a { padding: 4px 0 4px 12px; }
}
@media (max-width: 768px) {
  .b2b-feats { grid-template-columns: 1fr; }
  .contact-cards { grid-template-columns: 1fr; }
  .contact-card.span2 { grid-column: span 1; }
  .steps-row { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .about-hero { padding: var(--s-24); }
}

/* ============================================================
   Style B 2026 — БЛОГ (список) + СТАТЬЯ: правки раскладки
   2026-06-08, по замечаниям Артака: прижать к верху, убрать
   пустые сайдбары, полосатые заглушки обложек, лишний RSS-значок.
   Только тест-шаблон (файл грузится лишь под aspro_max_artgsm).
   ============================================================ */

/* 1) Пустой сайдбар Aspro -> контент на всю ширину */
.wrapper_inner:has(.styleb-blog) .left_block,
.wrapper_inner:has(.article-hero) .left_block,
.wrapper_inner:has(.article-body) .left_block { display: none !important; }

.wrapper_inner:has(.styleb-blog) > .right_block,
.wrapper_inner:has(.article-hero) > .right_block,
.wrapper_inner:has(.article-body) > .right_block {
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 100% !important;
  margin: 0 !important;
  float: none !important;
}
.wrapper_inner:has(.styleb-blog) > .right_block > .middle,
.wrapper_inner:has(.article-hero) > .right_block > .middle,
.wrapper_inner:has(.article-body) > .right_block > .middle {
  width: 100% !important;
  max-width: 100% !important;
}

/* 2) Прижать контент к верху — убрать большой отступ сверху */
.wrapper_inner:has(.styleb-blog) .page-top,
.wrapper_inner:has(.article-hero) .page-top { margin-bottom: 6px !important; padding-bottom: 0 !important; }
.right_block:has(.styleb-blog),
.right_block:has(.article-hero) { padding-top: 0 !important; margin-top: 0 !important; }
.content_wrapper_block.styleb-blog { margin-top: 0 !important; padding-top: 0 !important; }
.content_wrapper_block.styleb-blog .ph-sub { margin-top: 4px; }

/* 3) Спрятать легаси RSS-значок (выглядит как «wifi») на блоге/статье */
.wrapper_inner:has(.styleb-blog) .rss,
.wrapper_inner:has(.article-hero) .rss,
.wrapper_inner:has(.styleb-blog) .side-block:has(.rss),
.wrapper_inner:has(.article-hero) .side-block:has(.rss),
.wrapper_inner:has(.styleb-blog) .product_share .colored_theme_hover_bg-block,
.wrapper_inner:has(.article-hero) .product_share .colored_theme_hover_bg-block { display: none !important; }

/* 4) Обложка карточки блога: фото должно заполнять, без полосатой заглушки */
.post-card .pc-cover { display: block !important; background-image: none !important; }
.post-card .pc-cover img {
  position: absolute !important; inset: 0 !important;
  width: 100% !important; height: 100% !important; object-fit: cover !important; display: block !important;
}
.post-card .pc-cover .pc-ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  background-image: repeating-linear-gradient(135deg, rgba(37,99,235,.06) 0 10px, transparent 10px 20px);
}

/* RSS feed icon hidden in redesign (test bundle only) */
a.rss{display:none!important;}

/* ===== Blog/Article full-width fix v2 (2026-06-08) — .container_inner лежит между wrapper_inner и right_block, поэтому descendant, не > ===== */
.wrapper_inner:has(.styleb-blog) .right_block,
.wrapper_inner:has(.article-hero) .right_block,
.wrapper_inner:has(.article-body) .right_block {
  flex: 1 1 100% !important; width: 100% !important; max-width: 100% !important; margin: 0 !important; float: none !important;
}
.wrapper_inner:has(.styleb-blog) .left_block,
.wrapper_inner:has(.article-hero) .left_block,
.wrapper_inner:has(.article-body) .left_block { display: none !important; }
/* article: тело в читаемой колонке, не край-в-край */
.article-body.detail_content_wrapper { max-width: 940px; }

/* ===== Blog: прижать фильтр по годам и контент вверх (закрыть разрыв под крошками) 2026-06-08 ===== */
body:has(.styleb-blog) .page-top { margin-bottom: 10px !important; padding-bottom: 0 !important; }
body:has(.styleb-blog) .text_before_items { margin: 0 !important; padding: 0 !important; }
body:has(.styleb-blog) .text_before_items:empty { display: none !important; }
body:has(.styleb-blog) .middle { padding-top: 0 !important; margin-top: 0 !important; }
body:has(.styleb-blog) .select_head_wrap { margin-top: 0 !important; margin-bottom: 14px !important; }

/* ===== Blog: прижать вверх сильнее (v3) — закрыть все верхние отступы 2026-06-08 ===== */
body:has(.styleb-blog) .page-top { padding-top: 14px !important; padding-bottom: 0 !important; margin-bottom: 0 !important; min-height: 0 !important; }
body:has(.styleb-blog) .wrapper_inner { padding-top: 0 !important; margin-top: 0 !important; }
body:has(.styleb-blog) .container_inner { padding-top: 0 !important; margin-top: 0 !important; }
body:has(.styleb-blog) .middle { padding-top: 0 !important; margin-top: 0 !important; }
body:has(.styleb-blog) .right_block { padding-top: 0 !important; margin-top: 0 !important; }
body:has(.styleb-blog) .text_before_items { margin: 0 !important; padding: 0 !important; min-height: 0 !important; }
body:has(.styleb-blog) .select_head_wrap { margin-top: 0 !important; padding-top: 0 !important; }

/* ===== Blog: максимально прижать верх (v4) — фильтр на уровень крошек 2026-06-08 ===== */
body:has(.styleb-blog) .page-top { padding-top: 10px !important; padding-bottom: 0 !important; margin: 0 !important; }
body:has(.styleb-blog) .page-top h1, body:has(.styleb-blog) .page-top #pagetitle { margin: 0 0 2px !important; }
body:has(.styleb-blog) .breadcrumbs, body:has(.styleb-blog) .page-top .breadcrumbs { margin: 0 !important; padding: 0 !important; }
body:has(.styleb-blog) .select_head_wrap { margin-top: -6px !important; margin-bottom: 12px !important; padding-top: 0 !important; }

/* ===== Blog: год-фильтр компактными пилюлями, вплотную к чипам категорий (v5) 2026-06-08 ===== */
body:has(.styleb-blog) .select_head_wrap { margin: 0 0 8px !important; padding: 0 !important; }
body:has(.styleb-blog) .select_head_wrap .head-block.top {
  border: 0 !important; padding: 0 !important; min-height: 0 !important; box-shadow: none !important;
  background: transparent !important; display: flex !important; flex-wrap: wrap !important; gap: 6px !important; overflow: visible !important;
}
body:has(.styleb-blog) .select_head_wrap .item-link { margin: 0 !important; padding: 0 !important; border: 0 !important; width: auto !important; float: none !important; }
body:has(.styleb-blog) .select_head_wrap .item-link .title { margin: 0 !important; padding: 0 !important; }
body:has(.styleb-blog) .select_head_wrap .item-link .btn-inline {
  display: inline-flex !important; align-items: center !important; height: 30px !important; padding: 0 12px !important;
  border: 1px solid var(--line, #e5e7eb) !important; border-radius: 999px !important; font-size: 13px !important; line-height: 1 !important;
  font-weight: 600 !important; text-transform: none !important; background: var(--surface, #fff) !important; color: var(--ink-2, #475467) !important; white-space: nowrap !important;
}
body:has(.styleb-blog) .select_head_wrap .item-link.active .btn-inline,
body:has(.styleb-blog) .select_head_wrap .item-link .btn-inline:hover {
  background: var(--accent, #2563eb) !important; color: #fff !important; border-color: var(--accent, #2563eb) !important;
}
/* подпись Гайды — теперь под фильтрами, мягкий отступ */
body:has(.styleb-blog) .content_wrapper_block.styleb-blog .ph-sub { margin: 4px 0 14px !important; }
/* чипы категорий вплотную к год-фильтру */
body:has(.styleb-blog) .content_wrapper_block.styleb-blog .tag-filter.chip-row { margin-top: 0 !important; margin-bottom: 8px !important; }

/* ===== Blog: фикс сдвоенных пилюль года (.title тоже имел .btn-inline) v6 2026-06-08 ===== */
body:has(.styleb-blog) .select_head_wrap .item-link .title,
body:has(.styleb-blog) .select_head_wrap .item-link .title.btn-inline {
  border: 0 !important; background: transparent !important; box-shadow: none !important;
  padding: 0 !important; border-radius: 0 !important; height: auto !important; display: block !important; min-height: 0 !important;
}
body:has(.styleb-blog) .select_head_wrap .item-link .title > .btn-inline {
  display: inline-flex !important; align-items: center !important; height: 30px !important; padding: 0 14px !important;
  border: 1px solid var(--line,#e5e7eb) !important; border-radius: 999px !important; font-size: 13px !important;
  font-weight: 600 !important; line-height: 1 !important; text-transform: none !important; white-space: nowrap !important;
  background: var(--surface,#fff) !important; color: var(--ink-2,#475467) !important;
}
body:has(.styleb-blog) .select_head_wrap .item-link.active .title > .btn-inline,
body:has(.styleb-blog) .select_head_wrap .item-link .title > .btn-inline:hover {
  background: var(--accent,#2563eb) !important; color: #fff !important; border-color: var(--accent,#2563eb) !important;
}

/* ===== Contacts: прижать вверх, убрать пустоты (2026-06-09) ===== */
body:has(.contacts-styleb-wrap) .page-top { padding-top:10px !important; padding-bottom:0 !important; margin:0 !important; min-height:0 !important; }
body:has(.contacts-styleb-wrap) .page-top h1, body:has(.contacts-styleb-wrap) .page-top #pagetitle { margin:0 0 2px !important; }
body:has(.contacts-styleb-wrap) .middle { padding-top:0 !important; margin-top:0 !important; }
body:has(.contacts-styleb-wrap) .contacts-styleb-wrap { padding-top:0 !important; margin-top:0 !important; }
body:has(.contacts-styleb-wrap) .contacts-styleb-wrap > .page-head { margin:0 0 6px !important; padding:0 !important; }
body:has(.contacts-styleb-wrap) .contacts-styleb-wrap .ph-sub { margin:0 0 4px !important; }
body:has(.contacts-styleb-wrap) .loc-section { margin-top:10px !important; }
body:has(.contacts-styleb-wrap) .loc-section > .sub-h { margin-top:0 !important; }

/* ===== Contacts: схлопнуть внутренние пустоты page-top (.topic pt=42, обёртка крошек pb=40) + плотный стек (v2) 2026-06-09 ===== */
body:has(.contacts-styleb-wrap) .page-top { padding-top:6px !important; padding-bottom:0 !important; }
body:has(.contacts-styleb-wrap) .page-top .topic { padding-top:2px !important; padding-bottom:0 !important; }
body:has(.contacts-styleb-wrap) .page-top > div:has(.breadcrumbs) { padding-top:2px !important; padding-bottom:2px !important; }
body:has(.contacts-styleb-wrap) .page-head { padding-top:6px !important; padding-bottom:6px !important; }
body:has(.contacts-styleb-wrap) .page-head .ph-sub { margin:0 !important; }
body:has(.contacts-styleb-wrap) .loc-section { margin-top:4px !important; }
body:has(.contacts-styleb-wrap) .loc-section .sub-h { margin-top:0 !important; margin-bottom:10px !important; }

/* ===================================================================
   ART-GSM 2026 · ПОИСК — правки по замечаниям Артака (2026-06-09)
   (1) убрать серый band + sticky вокруг строки; (2) поднять к крошкам;
   (3) лупа ровно в поле, инпут белый.
   =================================================================== */
/* (3+1) строка поиска без band */
body.ag-styleb .ag-search .search-bar-lg {
  position: static; background: transparent; border-bottom: none;
  padding: 0 0 var(--s-16);
}
body.ag-styleb .ag-search .search-bar-lg .wrap { gap: var(--s-12); }
body.ag-styleb .ag-search .search-bar-lg .sb-input { margin: 0; display: block; }
body.ag-styleb .ag-search .search-bar-lg .sb-input input {
  box-sizing: border-box; height: 52px; -webkit-appearance: none; appearance: none;
  background: var(--surface); border: 1px solid var(--line-2);
  padding: 0 44px 0 46px;
}
body.ag-styleb .ag-search .search-bar-lg .sb-input svg.ico {
  left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; margin: 0;
}
/* (2) поднять строку к крошкам — погасить пустой низ легаси .page-top на /search/ */
body.ag-styleb[data-cur="/search/"] .page-top .topic { padding-top: var(--s-8); padding-bottom: 0; }
body.ag-styleb[data-cur="/search/"] .page-top { padding-bottom: 0; margin-bottom: 0; }
body.ag-styleb[data-cur="/search/"] .page-top > div:has(.breadcrumbs) { padding-top: 2px; padding-bottom: 2px; }
body.ag-styleb[data-cur="/search/"] .ag-search { padding-top: var(--s-10); }
/* поиск — форма прозрачная + инпут на всю ширину + ряд flex на ВСЕХ ширинах
   (дизайн-правила .sb-input flex/width были только в @media ≥769px → мобайл показывал серую форму вокруг инпута) */
body.ag-styleb .ag-search .search-bar-lg .wrap { display: flex; align-items: center; gap: var(--s-12); }
body.ag-styleb .ag-search .search-bar-lg .sb-input { flex: 1; position: relative; background: transparent; padding: 0; margin: 0; }
body.ag-styleb .ag-search .search-bar-lg .sb-input input { width: 100%; margin: 0; }
body.ag-styleb .ag-search .search-bar-lg .sb-cancel { flex: none; }

/* ===================================================================
   ART-GSM 2026 · АВТОРИЗАЦИЯ / РЕГИСТРАЦИЯ — Style B рескин
   Формы system.auth.form / main.register не тронуты (хуки логина целы);
   здесь — центр-карточка + табы-ссылки + рестайл полей/кнопок.
   Scoped .ag-auth → прод и прочие страницы не затронуты.
   =================================================================== */
/* карточка под легаси h1 (не на всю высоту вьюпорта) */
body.ag-styleb .ag-auth { min-height: auto; display: block; padding: var(--s-12) var(--s-16) var(--s-48); }
body.ag-styleb .ag-auth .auth-card { margin: 0 auto; max-width: 440px; }
body.ag-styleb .ag-auth .auth-logo { display: flex; justify-content: center; margin-bottom: var(--s-18); }
body.ag-styleb .ag-auth .auth-logo img { height: 30px; width: auto; }
/* табы-ссылки (дизайн .auth-tabs button → у нас <a>) */
body.ag-styleb .ag-auth-tabs { display: flex; background: var(--surface-2); border-radius: var(--r-md); padding: 4px; margin-bottom: var(--s-20); }
body.ag-styleb .ag-auth-tabs a { flex: 1; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-sm); font-weight: 700; font-size: 14px; color: var(--ink-3); text-decoration: none; transition: background .15s, color .15s; }
body.ag-styleb .ag-auth-tabs a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
/* интро как подзаголовок */
body.ag-styleb .ag-auth .top-text { font-size: 13.5px; line-height: 1.5; color: var(--ink-3); text-align: center; margin: 0 0 var(--s-18); }
body.ag-styleb .ag-auth .top-text p { margin: 0; }
/* распрямить легаси-обёртки формы внутри карточки */
body.ag-styleb .ag-auth .auth-page,
body.ag-styleb .ag-auth .auth_wrapp,
body.ag-styleb .ag-auth .wrap_md1,
body.ag-styleb .ag-auth .form,
body.ag-styleb .ag-auth .form_body,
body.ag-styleb .ag-auth .register { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; border: none !important; background: transparent !important; box-shadow: none !important; float: none !important; }
/* поля → Style B */
body.ag-styleb .ag-auth .form-control { margin: 0 0 var(--s-14); position: relative; }
body.ag-styleb .ag-auth .form-control > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
body.ag-styleb .ag-auth .form-control input[type=text],
body.ag-styleb .ag-auth .form-control input[type=password],
body.ag-styleb .ag-auth .form-control input[type=email],
body.ag-styleb .ag-auth .form-control input[type=tel] {
  width: 100%; height: 48px; box-sizing: border-box; border-radius: var(--r-md);
  border: 1px solid var(--line-2); background: var(--surface-2); padding: 0 14px;
  font-size: 15px; color: var(--ink); -webkit-appearance: none; appearance: none;
}
body.ag-styleb .ag-auth .form-control input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 12%, transparent); }
body.ag-styleb .ag-auth .form-control.eye-password .eye, body.ag-styleb .ag-auth .show-password { right: 12px; }
/* footer: запомнить + забыли в ряд */
body.ag-styleb .ag-auth .form_footer { margin-top: var(--s-14); }
body.ag-styleb .ag-auth .form_footer .filter.block { display: flex; align-items: center; justify-content: space-between; gap: var(--s-12); margin-bottom: var(--s-16); }
body.ag-styleb .ag-auth .form_footer a.forgot { color: var(--accent); font-weight: 600; font-size: 13px; white-space: nowrap; }
/* кнопки → primary на всю ширину */
body.ag-styleb .ag-auth .buttons input[name=Login],
body.ag-styleb .ag-auth input[name=register_submit_button],
body.ag-styleb .ag-auth .register-submit input[type=submit] {
  display: block; width: 100% !important; height: 52px; border: none; border-radius: var(--r-md);
  background: var(--accent); color: #fff; font-weight: 700; font-size: 16px; cursor: pointer; transition: filter .15s;
}
body.ag-styleb .ag-auth .buttons input[name=Login]:hover,
body.ag-styleb .ag-auth input[name=register_submit_button]:hover { filter: brightness(1.06); }
body.ag-styleb .ag-auth .buttons.clearfix { display: block; }
/* required note */
body.ag-styleb .ag-auth .required-fields, body.ag-styleb .ag-auth .star-required { font-size: 12px; color: var(--ink-3); margin: 0 0 var(--s-12); }
/* авторизация — кнопки submit на всю ширину + убрать дубль-ссылку регистрации */
body.ag-styleb .ag-auth button[name=Login1],
body.ag-styleb .ag-auth button[name=register_submit_button],
body.ag-styleb .ag-auth input[name=register_submit_button],
body.ag-styleb .ag-auth .form button[type=submit],
body.ag-styleb .ag-auth .form input[type=submit] {
  display: block; width: 100% !important; max-width: none; height: 52px; margin: 0;
  border: none; border-radius: var(--r-md); background: var(--accent); color: #fff;
  font-weight: 700; font-size: 16px; cursor: pointer; box-shadow: none; float: none;
}
body.ag-styleb .ag-auth button[name=Login1] span,
body.ag-styleb .ag-auth button[type=submit] span { color: #fff; }
body.ag-styleb .ag-auth button[name=Login1]:hover,
body.ag-styleb .ag-auth button[name=register_submit_button]:hover { filter: brightness(1.06); }
/* дубль-ссылка «Регистрация» в футере входа (есть табы) */
body.ag-styleb .ag-auth a.register { display: none !important; }
/* строка кнопок на всю ширину, note под кнопкой */
body.ag-styleb .ag-auth .buttons .line-block__item.width100,
body.ag-styleb .ag-auth .buttons .line-block--justify-between { display: block; width: 100%; }
body.ag-styleb .ag-auth .required-fields-note { margin-top: var(--s-12); text-align: center; }
/* регистрация — кнопка submit на всю ширину (имя с суффиксом register_submit_button1; широкий селектор по type) */
body.ag-styleb .ag-auth button[type=submit],
body.ag-styleb .ag-auth input[type=submit] {
  display: block; width: 100% !important; max-width: none; height: 52px; margin: 0;
  border: none; border-radius: var(--r-md); background: var(--accent); color: #fff;
  font-weight: 700; font-size: 16px; cursor: pointer; box-shadow: none; float: none;
}
body.ag-styleb .ag-auth button[type=submit] span { color: #fff; }
/* строка кнопки регистрации (footer__bottom = justify-between row) → стек, note под кнопкой */
body.ag-styleb .ag-auth .form_footer__bottom { display: block !important; }
body.ag-styleb .ag-auth .form_footer__bottom > .line-block__item { width: 100%; max-width: none; }
body.ag-styleb .ag-auth .form_footer .required-fields-note { margin-top: var(--s-12); text-align: center; }

/* ===== ART-GSM 2026 · поиск — фильтры по категориям и моделям (2026-06-09) ===== */
body.ag-styleb .ag-search .search-filters { display: flex; flex-direction: column; gap: var(--s-10); margin: var(--s-4) 0 var(--s-20); }
body.ag-styleb .ag-search .sf-group { display: flex; align-items: flex-start; gap: var(--s-12); flex-wrap: wrap; }
body.ag-styleb .ag-search .sf-label { flex: none; min-width: 84px; padding-top: 7px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
body.ag-styleb .ag-search .sf-chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
body.ag-styleb .ag-search .sf-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
body.ag-styleb .ag-search .sf-chip:hover { border-color: var(--accent); color: var(--ink); }
body.ag-styleb .ag-search .sf-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
body.ag-styleb .ag-search .sf-chip i { font-style: normal; font-size: 11px; font-weight: 700; opacity: .6; }
body.ag-styleb .ag-search .sf-chip.on i { opacity: .85; }
body.ag-styleb .ag-search .sf-empty { margin: 0 0 var(--s-16); font-size: 14px; color: var(--ink-2); }
body.ag-styleb .ag-search .sf-reset-link { background: none; border: none; color: var(--accent); font-weight: 600; cursor: pointer; padding: 0; font-size: 14px; }
@media (max-width: 600px) { body.ag-styleb .ag-search .sf-group { flex-direction: column; gap: 6px; } body.ag-styleb .ag-search .sf-label { padding-top: 0; min-width: 0; } }

/* ===================================================================
   ART-GSM 2026 · ЛИЧНЫЙ КАБИНЕТ (/personal/) — Style B
   landing-грид разделов (template.php) + общий рестайл подстраниц.
   Scoped body.ag-styleb[data-cur^="/personal/"] → прод/прочее не затронуты.
   =================================================================== */
body.ag-styleb[data-cur^="/personal/"] .personal_wrapper { width: 100%; max-width: none; margin: 0; padding: 0; }

/* грид карточек-разделов */
body.ag-styleb .ag-lk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-14); margin: var(--s-8) 0 var(--s-24); }
body.ag-styleb .ag-lk-card { position: relative; display: flex; align-items: center; gap: var(--s-14); padding: var(--s-18) var(--s-20); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); text-decoration: none; transition: transform .18s ease, box-shadow .22s ease, border-color .2s; }
body.ag-styleb .ag-lk-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
body.ag-styleb .ag-lk-ico { flex: none; width: 48px; height: 48px; border-radius: var(--r-md); background: var(--blue-soft); color: var(--accent); display: grid; place-items: center; overflow: hidden; }
body.ag-styleb .ag-lk-ico > * { width: 24px !important; height: 24px !important; max-width: 24px; max-height: 24px; margin: 0 !important; background-size: contain !important; background-position: center !important; }
body.ag-styleb .ag-lk-ico svg { fill: currentColor; color: var(--accent); }
body.ag-styleb .ag-lk-ico i { font-size: 22px; color: var(--accent); }
body.ag-styleb .ag-lk-name { flex: 1; font-weight: 700; font-size: 15px; color: var(--ink); letter-spacing: -.01em; line-height: 1.2; }
body.ag-styleb .ag-lk-arrow { flex: none; width: 18px; height: 18px; color: var(--ink-3); transition: transform .15s, color .15s; }
body.ag-styleb .ag-lk-card:hover .ag-lk-arrow { color: var(--accent); transform: translateX(2px); }
@media (max-width: 900px) { body.ag-styleb .ag-lk-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { body.ag-styleb .ag-lk-grid { grid-template-columns: 1fr; } }

/* общий рестайл подстраниц раздела (формы/заголовки) */
body.ag-styleb[data-cur^="/personal/"] .personal_wrapper h2,
body.ag-styleb[data-cur^="/personal/"] .inner_border h2 { font-size: 19px; font-weight: 700; letter-spacing: -.02em; margin: var(--s-8) 0 var(--s-14); }
body.ag-styleb[data-cur^="/personal/"] .personal_wrapper input[type=text],
body.ag-styleb[data-cur^="/personal/"] .personal_wrapper input[type=email],
body.ag-styleb[data-cur^="/personal/"] .personal_wrapper input[type=tel],
body.ag-styleb[data-cur^="/personal/"] .personal_wrapper input[type=password],
body.ag-styleb[data-cur^="/personal/"] .personal_wrapper select {
  height: 46px; box-sizing: border-box; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--surface-2); padding: 0 14px; font-size: 15px; color: var(--ink);
}
/* ЛК — жёстко ограничить размер иконок (часть svg вложена глубже) */
body.ag-styleb .ag-lk-ico svg { width: 24px !important; height: 24px !important; max-width: 24px; max-height: 24px; }

/* ===== КАПЧА — починка раскладки (2026-06-09) =====
   База Aspro (template_styles.css) абсолютит/флоатит поля капчи (.captcha_input left:216px,
   фикс 217px картинка, label.error top:-12px nowrap) под десктоп-ряд 418px → на узкой карточке
   вход/регистрации ввод сминается, картинка флоатится вниз на кнопку, красная ошибка наезжает на лейбл.
   Делаем .captcha-row flex-колонкой с явным order — иммунно к остаточным float/absolute базы.
   Порядок: лейбл → картинка+обновить → поле ввода → ошибка. */
body.ag-styleb .ag-auth .captcha-row {
  position: static; max-width: none; height: auto; float: none;
  display: flex !important; flex-direction: column !important; align-items: stretch;
}
body.ag-styleb .ag-auth .captcha-row::before,
body.ag-styleb .ag-auth .captcha-row::after { display: none; content: none; } /* clearfix-псевдо не нужны во flex */
body.ag-styleb .ag-auth .captcha-row > label {
  order: 1; display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 0 0 6px;
}
body.ag-styleb .ag-auth .captcha-row > label .star { color: #e5484d; }
/* картинка + кнопка обновления — один ряд над полем.
   !important — т.к. css/media.css содержит `.pk-page .form-control.captcha-row .captcha_image{position:absolute!important}`
   (страница /personal/ имеет класс .pk-page), и без !important картинка вырывается из flex-потока и падает вниз на кнопку. */
body.ag-styleb .ag-auth .captcha-row .captcha_image {
  order: 2; position: static !important; float: none; clear: both; width: auto !important; height: auto;
  left: auto !important; right: auto !important; top: auto !important; bottom: auto !important; max-width: none !important;
  display: flex; align-items: center; gap: 10px; margin: 0 0 10px;
}
body.ag-styleb .ag-auth .captcha-row .captcha_image img {
  position: static; float: none; width: auto; height: 56px; max-width: 62%;
  border: 1px solid var(--line-2); border-radius: var(--r-sm); background: #fff;
}
/* кнопка перезагрузки капчи → аккуратный квадрат справа от картинки (иконка base ::after сохраняется) */
/* position:relative — чтобы абсолютные ::before/::after (иконка обновления) якорились к самой кнопке,
   а не к дальнему позиционированному предку (иначе иконка улетает в угол карточки). */
body.ag-styleb .ag-auth .captcha-row .captcha_image .captcha_reload {
  position: relative !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; flex: none;
  width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface-2); text-indent: -9999px; overflow: hidden;
}
body.ag-styleb .ag-auth .captcha-row .captcha_image .captcha_reload::before { left: 7px; top: 7px; }
body.ag-styleb .ag-auth .captcha-row .captcha_image .captcha_reload::after { left: 12px; top: 13px; }
/* поле ввода кода — на всю ширину под картинкой (снять абсолют/флоат) */
body.ag-styleb .ag-auth .captcha-row .captcha_input {
  order: 3; position: static !important; float: none; clear: both;
  left: auto !important; right: auto !important; top: auto !important; bottom: auto !important;
  height: auto; max-width: none !important; width: 100%; margin: 0;
}
body.ag-styleb .ag-auth .captcha-row .captcha_input input[name="captcha_word"] {
  position: static; width: 100%; height: 48px; box-sizing: border-box; border-radius: var(--r-md);
  border: 1px solid var(--line-2); background: var(--surface-2); padding: 0 14px; font-size: 15px; color: var(--ink);
  -webkit-appearance: none; appearance: none;
}
body.ag-styleb .ag-auth .captcha-row .captcha_input input[name="captcha_word"]:focus {
  outline: none; border-color: var(--accent); background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 12%, transparent);
}
/* ошибка валидации — под полем, не наезжает на лейбл */
body.ag-styleb .ag-auth .captcha-row .captcha_input label.error,
body.ag-styleb .ag-auth .captcha-row label.error {
  order: 4; position: static; top: auto; white-space: normal; display: block;
  margin: 6px 0 0; font-size: 12px; line-height: 1.3; color: #e5484d;
}

/* ============================================================
   ЛК — штатное меню Aspro в Style B (аудит 2026-06-12, lk-02).
   Глобальный скрыватель listing.css гасил .menu_top_block — на /personal/* возвращаем.
   ============================================================ */
body.ag-styleb[data-cur^="/personal/"] .left_block .menu_top_block { display: block !important; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 8px; }
body.ag-styleb[data-cur^="/personal/"] .left_menu { margin: 0; padding: 0; list-style: none; }
body.ag-styleb[data-cur^="/personal/"] .left_menu li.item { margin: 0; }
body.ag-styleb[data-cur^="/personal/"] .left_menu li.item > a { display: block; padding: 10px 12px; border-radius: var(--r-sm); font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; border: 0 !important; background: none; transition: background .15s; }
body.ag-styleb[data-cur^="/personal/"] .left_menu li.item > a:hover { background: var(--surface-2); color: var(--ink); }
body.ag-styleb[data-cur^="/personal/"] .left_menu li.current > a { background: var(--blue-soft); color: var(--accent); }
body.ag-styleb[data-cur^="/personal/"] .left_menu .toggle_block { display: none; }
body.ag-styleb[data-cur^="/personal/"] .left_menu li.exit { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 6px; }
body.ag-styleb[data-cur^="/personal/"] .left_menu li.exit > a { color: #b42318; }
body.ag-styleb[data-cur^="/personal/"] .left_menu li.exit .svg-inline-exit { display: none; }

/* ag content-contacts-01: модалка «Задать вопрос» (.jqmWindow.popup, form.result.new) — поля/радиусы в Style B,
   а не легаси Aspro (radius 3px / #f8f8f8). Скоуп body.ag-styleb — прод-шаблон не трогаем. */
body.ag-styleb .jqmWindow.popup,
body.ag-styleb .jqmWindow.popup.show { border-radius: var(--r-card, 18px); box-shadow: var(--shadow-lg, 0 24px 60px rgba(16,24,40,.18)); }
body.ag-styleb .jqmWindow .form input[type="text"],
body.ag-styleb .jqmWindow .form input[type="email"],
body.ag-styleb .jqmWindow .form input[type="tel"],
body.ag-styleb .jqmWindow .form textarea,
body.ag-styleb .jqmWindow .form select { border-radius: var(--r-sm, 10px) !important; background: var(--surface, #fff) !important; border: 1px solid var(--line, #e4e7ee) !important; }
body.ag-styleb .jqmWindow .form input:focus,
body.ag-styleb .jqmWindow .form textarea:focus { border-color: var(--accent, #2563eb) !important; }

/* ============================================================
   2026-07-17, замечания Татьяны (скрины 3/12/15): контентные
   страницы со Style B шапкой (.page-head) — опт, гарантия,
   доставка, о компании, контакты — рендерят пустой левый
   сайдбар Aspro. Скрываем его, контент на всю ширину.
   ============================================================ */
.wrapper_inner:has(.page-head) .left_block { display: none !important; }
.wrapper_inner:has(.page-head) .right_block {
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 100% !important;
  margin: 0 !important;
  float: none !important;
}
.wrapper_inner:has(.page-head) .right_block .middle {
  width: 100% !important;
  max-width: 100% !important;
}

/* ag search-compact (10.10.2026, просьба Артака «маленькие блоки карточек»): в выдаче поиска карточки
   мельче — колонка от 200 px: на 1440 шесть в ряд (было 4 по 326 px), на 1280 — пять, на 1024 — четыре,
   на планшете — три. Ниже 768 не трогаем: на телефоне остаются 2 в ряд (home.css, max-width:1023px).
   .prod-body — с лишним .prod: listing.css грузится позже и с той же специфичностью ставит 14/10. */
@media (min-width: 768px) {
  body.ag-styleb .ag-search .prod-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s-12); }
  body.ag-styleb .ag-search .prod .prod-body { padding: var(--s-12); gap: var(--s-8); }
  body.ag-styleb .ag-search .prod-price .pp-main { font-size: 17px; }
  body.ag-styleb .ag-search .prod-add { width: 40px; height: 40px; }
  body.ag-styleb .ag-search .prod-add svg { width: 19px; height: 19px; }
}

/* ag search-top (10.10.2026, Артак: «очень много места до карточек — виден один ряд, и то не полностью»).
   На /search/ до сетки было ~280 px над шапкой: заголовок «Поиск» с крошками (89 px), строка поиска (68),
   «Товары · найдено» и чипы отдельными строками (109). Заголовок с крошками прячем визуально (H1 остаётся
   для читалок экрана) — запрос и так виден в строке поиска; строка ниже; счётчик и чипы — в одну строку;
   на телефоне чипы — одной лентой с прокруткой вбок. */
body.ag-styleb[data-cur="/search/"] .top-block-wrapper {
  position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important;
  clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important;
  margin: -1px !important; padding: 0 !important; border: 0 !important;
}
/* крошки на поиске убираем совсем — иначе скрытая ссылка «Главная» ловит фокус по Tab (страница noindex) */
body.ag-styleb[data-cur="/search/"] .top-block-wrapper #navigation { display: none !important; }
/* счётчик фиксированной ширины — чипы в одной строке с ним не прыгают, когда фильтр меняет число */
body.ag-styleb .ag-search [data-found-count] { display: inline-block; min-width: 4ch; font-variant-numeric: tabular-nums; }
body.ag-styleb[data-cur="/search/"] .ag-search { padding-top: var(--s-14); }
body.ag-styleb .ag-search .search-bar-lg { padding-bottom: var(--s-10); }
body.ag-styleb .ag-search .search-bar-lg .sb-input input { height: 46px; }
body.ag-styleb .ag-search .search-sec:has(> .prod-grid) { margin-top: var(--s-4); }
@media (min-width: 768px) {
  body.ag-styleb .ag-search .search-sec:has(> .prod-grid) { display: flex; flex-wrap: wrap; align-items: flex-start; column-gap: var(--s-20); row-gap: var(--s-14); }
  body.ag-styleb .ag-search .search-sec:has(> .prod-grid) > h3 { margin: 0; flex: none; line-height: 32px; }
  body.ag-styleb .ag-search .search-sec:has(> .prod-grid) > .search-filters { flex: 1 1 0; min-width: 0; margin: 0; }
  body.ag-styleb .ag-search .search-sec:has(> .prod-grid) > .sf-empty,
  body.ag-styleb .ag-search .search-sec:has(> .prod-grid) > .prod-grid { flex: 0 0 100%; min-width: 0; }
  body.ag-styleb .ag-search .search-sec:has(> .prod-grid) .sf-label { min-width: 76px; }
}
/* подпись группы нужна, только когда групп две («Категория» и «Модель»); одна — прячем, чипы влезают в строку */
body.ag-styleb .ag-search .search-filters:not(:has(.sf-group + .sf-group)) .sf-label { display: none; }
@media (max-width: 767px) {
  body.ag-styleb .ag-search .search-filters { margin: var(--s-4) 0 var(--s-14); gap: var(--s-8); }
  body.ag-styleb .ag-search .sf-group { flex-direction: row; flex-wrap: nowrap; align-items: center; gap: var(--s-8); min-width: 0; }
  body.ag-styleb .ag-search .sf-label { min-width: 76px; padding-top: 0; }
  body.ag-styleb .ag-search .sf-chips { flex: 1 1 auto; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; min-width: 0;
    padding: 4px; margin: -4px; /* запас под рамку фокуса: overflow обрезает и по вертикали */
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
  body.ag-styleb .ag-search .sf-chips::-webkit-scrollbar { display: none; }
  body.ag-styleb .ag-search .sf-chips::after { content: ''; flex: 0 0 20px; } /* хвост под затухание — долистанный последний чип не бледнеет */
  body.ag-styleb .ag-search .sf-chip { flex: none; }
}
