/*
 * road8 02.12.2026 (Андрей: «минимум смещений, везде отступы и размеры одинаковые и чуть больше пространства»).
 * Одна шкала для своих страниц (шапка, главная, подбор, проценка, карточка, страницы темы, подвал).
 *   Шрифт: 13 мелкий (подписи, путь, заголовки таблиц), 15 основной, 16 чтение (условия, карточка), 17 подзаголовок, 22 раздел, 28 заголовок страницы (телефон 22).
 *   Отступы: 8, 16, 24, 32, 48. От шапки до заголовка страницы 32 (телефон 24); если есть строка пути — она в 24 (16) от шапки, заголовок в 8 под ней;
 *   от заголовка до содержимого 24 (16). Левый край у шапки, заголовков, содержимого и подвала один.
 *   Строки деревьев (главная, подбор) 38 px вместо 34, строки таблиц деталей просторнее.
 * Селекторы с id (#sb-site, #r8home…): правила страниц стоят в самих страницах и в theme.css с длинными селекторами.
 */
:root { --sp-top:32px; --sp-crumb:24px; --sp-after:24px; --sp-h1:28px; }
@media (max-width:767px) { :root { --sp-top:24px; --sp-crumb:16px; --sp-after:16px; --sp-h1:22px; } }

/* шапка: у Bootstrap .container есть ::before/::after (очистка потока); во flex-строке шапки это лишние элементы с промежутком 20 px — логотип стоял правее края текста */
.r8h-bar::before, .r8h-bar::after, .r8h-top-in::before, .r8h-top-in::after { content:none !important; display:none !important; }

/* заголовок страницы: один размер везде */
html body :is(#sb-site .main-header .page-title, #r8p h1, #r8s .r8-summary h1, #r8top .t-h1, #r8card h1) { font-size:var(--sp-h1) !important; line-height:1.2 !important; font-weight:600 !important; letter-spacing:-.01em !important; margin:0 !important; }

/* страницы темы (разделы, условия, корзина, кабинет): путь в 24 от шапки, заголовок в 8 под ним, содержимое в 24 */
html body #sb-site .main-header { padding:var(--sp-crumb) 0 0 !important; margin:0 0 var(--sp-after) !important; border:0 !important; }
html body #sb-site .main-header .breadcrumb { margin:0 0 8px !important; padding:0 !important; font-size:13px !important; line-height:20px !important; }

/* карточка товара: путь и заголовок так же */
html body #r8card { padding-top:var(--sp-crumb) !important; }
html body #r8card .crumbs { padding:0 0 8px !important; font-size:13px !important; line-height:20px !important; }
html body #r8card h1 { margin-bottom:var(--sp-after) !important; }

/* главная, подбор, проценка (без строки пути): заголовок в 32 от шапки */
html body #r8top { padding-top:var(--sp-top) !important; }
html body #r8top .t-h1 { margin-bottom:12px !important; }
html body #r8p { padding-top:0 !important; }
html body #r8p .p-head { padding:var(--sp-top) 0 0 !important; }
html body #r8p .p-tools { margin:var(--sp-after) 0 16px !important; }
html body #r8s { padding-top:0 !important; }
html body #r8s .r8-summary { padding:var(--sp-top) 0 12px !important; }
/* телефон: край страницы 8 px вместо 15 (Андрей 02.12: больше информации на экране). Ряды и колонки бутстрапа поле друг друга
   компенсируют, край задаёт только поле контейнера: меняется здесь одним правилом для шапки, страниц и подвала */
@media (max-width:767px) { html body .container, html body .container-fluid { padding-left:8px !important; padding-right:8px !important; } }
/* телефон: у подбора и проценки край как у остальных страниц (было 12 px вместо 15) */
@media (max-width:767px) { html body :is(#r8p, #r8s) { padding-left:15px !important; padding-right:15px !important; } }

/* деревья (главная и подбор): строка 38 px; пунктир пересчитан под неё (середина строки 19, низ квадрата родителя на 13/15 выше) */
html body :is(#r8home .hm-row, #r8p .n) { padding-top:9px !important; padding-bottom:9px !important; }
html body :is(#r8home .hm-wait, #r8p .p-wait) { padding-top:9px !important; padding-bottom:9px !important; }
html body :is(#r8home .hm-kids > .hm-node, #r8p .kids > .nd)::after { top:19px !important; }
html body :is(#r8home .hm-kids > .hm-node:last-child, #r8home .hm-kids > .hm-node.hm-last, #r8p .kids > .nd:last-child)::before { height:19px !important; }
html body :is(#r8home .hm-kids > .hm-node:first-child, #r8home .hm-kids > .hm-node.hm-first, #r8p .kids > .nd:first-child)::before { top:-13px !important; }
html body :is(#r8home .hm-kids > .hm-node:first-child:last-child, #r8home .hm-kids > .hm-node.hm-first.hm-last, #r8p .kids > .nd:first-child:last-child)::before { height:32px !important; }
html body :is(#r8home .hm-list > .hm-node > .hm-kids > .hm-node:first-child, #r8home .hm-list > .hm-node > .hm-kids > .hm-node.hm-first, #r8p .tree > .nd > .kids > .nd:first-child)::before { top:-15px !important; }
html body :is(#r8home .hm-list > .hm-node > .hm-kids > .hm-node:first-child:last-child, #r8home .hm-list > .hm-node > .hm-kids > .hm-node.hm-first.hm-last, #r8p .tree > .nd > .kids > .nd:first-child:last-child)::before { height:34px !important; }
/* строки моторов и разделов деталей — основным размером */
html body :is(#r8home .hm-modb, #r8home .hm-mod, #r8home .hm-l2, #r8p .md) { font-size:15px !important; }
html body :is(#r8home .hm-mod .hm-e, #r8p .md .mono) { font-size:14px !important; }
html body #r8home .hm-mod .hm-cd { font-size:13px !important; }

/* таблица деталей (главная и подбор) и проценка: строки просторнее, подписи столбцов 13 */
html body .r8t-pr { padding-top:10px !important; padding-bottom:10px !important; font-size:15px !important; }
html body .r8t-pr.r8t-h { font-size:13px !important; padding-top:6px !important; padding-bottom:6px !important; }
html body #r8s .r8-head { font-size:13px !important; }

/* «Условия покупки»: разделы 22 */
html body .r8-terms h2 { font-size:22px !important; }
