/* road8: шапка «Мастерская» — острые углы, линии 1px, чёрное и белое, без теней */
.r8h { --bg:#ffffff; --fg:#111214; --muted:#5d6167; --line:#dcdee1; --strong:#111214; --hover:#eceef0; --inv-bg:#111214; --inv-fg:#ffffff;
  --sans:system-ui,-apple-system,"Segoe UI",Arial,sans-serif; --mono:ui-monospace,Consolas,"SF Mono",Menlo,"Courier New",monospace;
  background:var(--bg); color:var(--fg); border-bottom:1px solid var(--strong); font:15px/1.4 var(--sans); position:relative; z-index:50; }
@media (prefers-color-scheme: dark) { html:not([data-r8theme="light"]) .r8h { --bg:#0c0d0f; --fg:#eef0f2; --muted:#9ba1a8; --line:#2a2d32; --strong:#eef0f2; --hover:#1c1f24; --inv-bg:#eef0f2; --inv-fg:#0c0d0f; } }
html[data-r8theme="dark"] .r8h { --bg:#0c0d0f; --fg:#eef0f2; --muted:#9ba1a8; --line:#2a2d32; --strong:#eef0f2; --hover:#1c1f24; --inv-bg:#eef0f2; --inv-fg:#0c0d0f; }
.r8h, .r8h * { box-sizing:border-box; border-radius:0 !important; box-shadow:none !important; }
.r8h-bar { display:flex; align-items:center; gap:12px 20px; flex-wrap:wrap; padding-top:12px; padding-bottom:12px; }
.r8h-logo { font:700 22px/1 var(--mono); letter-spacing:.04em; color:var(--fg) !important; text-decoration:none !important; }
.r8h-search { display:flex; flex:1 1 360px; min-width:0; border:1px solid var(--strong); background:var(--bg); margin:0; }
.r8h-search input { flex:1; min-width:0; border:0; background:transparent; color:var(--fg); padding:9px 12px; font:16px/20px var(--mono); outline:none; height:auto; }
.r8h-search input::placeholder { color:var(--muted); }
.r8h-search button { border:0; border-left:1px solid var(--strong); background:var(--inv-bg); color:var(--inv-fg); padding:0 20px; font-weight:600; font-family:var(--sans); }
.r8h-nav { display:flex; align-items:center; gap:0; flex-wrap:wrap; }
.r8h-link { display:inline-block; padding:8px 12px; color:var(--fg) !important; text-decoration:none !important; border-left:1px solid var(--line); cursor:pointer; }
.r8h-nav > .r8h-link:first-child { border-left:0; }
.r8h-link:hover { background:var(--hover); }
.r8h-count { font-family:var(--mono); color:var(--muted); }
.r8h-count:empty { display:none; }
/* полоса над шапкой: переключатель темы */
.r8h-top { border-bottom:1px solid var(--line); font-size:12.5px; color:var(--muted); }
.r8h-top-in { display:flex; justify-content:flex-end; align-items:center; min-height:30px; }
.r8h-switch { display:inline-flex; align-items:center; gap:8px; background:none; border:0; padding:4px 0; color:var(--muted); font:inherit; cursor:pointer; }
.r8h-switch:hover { color:var(--fg); }
.r8h-switch i { width:28px; height:14px; border:1px solid var(--strong); position:relative; display:inline-block; }
.r8h-switch i::after { content:""; position:absolute; top:2px; left:2px; width:8px; height:8px; background:var(--strong); transition:left .15s; }
.r8h-switch[aria-pressed="true"] i { background:var(--inv-bg); }
.r8h-switch[aria-pressed="true"] i::after { left:16px; background:var(--inv-fg); }

/* выпадающие панели: корзина и кабинет */
.r8h-drop { position:relative; }
.r8h-drop > .r8h-link { border-left:1px solid var(--line); }
.r8h-open > .r8h-link { background:var(--hover); }
.r8h-panel { display:none; position:absolute; right:0; top:calc(100% + 6px); z-index:70; background:var(--bg); color:var(--fg); border:1px solid var(--strong); text-align:left; font-size:14px; }
.r8h-panel::before { content:""; position:absolute; left:0; right:0; top:-7px; height:7px; } /* мостик для мыши */
.r8h-open > .r8h-panel { display:block; }
.r8h-mono { font-family:var(--mono); font-variant-numeric:tabular-nums; }
.r8h-empty { padding:22px 18px; color:var(--muted); line-height:1.5; }

.r8h-cart-panel { width:440px; max-width:calc(100vw - 24px); }
.r8h-cart-body.r8h-busy { opacity:.55; pointer-events:none; }
.r8h-cart-list { max-height:min(60vh, 420px); overflow-y:auto; }
.r8h-ci { display:grid; grid-template-columns:1fr auto 92px 26px; align-items:center; gap:10px; padding:10px 12px 10px 14px; border-bottom:1px solid var(--line); }
.r8h-ci-main { min-width:0; }
.r8h-ci-main b { font-size:14px; }
.r8h-ci-main span { font-size:13px; font-weight:600; }
.r8h-ci-main small { display:block; color:var(--muted); font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:2px; }
.r8h-qty { display:flex; align-items:center; border:1px solid var(--line); }
.r8h-qty button { width:24px; height:26px; border:0; background:none; color:var(--fg); font:16px/1 var(--sans); cursor:pointer; padding:0; }
.r8h-qty button:hover { background:var(--hover); }
.r8h-qty span { min-width:26px; text-align:center; font-size:13px; }
.r8h-ci-sum { text-align:right; font-size:14px; }
.r8h-del { width:26px; height:26px; border:0; background:none; color:var(--muted); font-size:18px; line-height:1; cursor:pointer; padding:0; }
.r8h-del:hover { color:var(--fg); background:var(--hover); }
.r8h-cart-foot { display:flex; justify-content:space-between; align-items:baseline; padding:12px 14px; border-bottom:1px solid var(--line); }
.r8h-cart-foot span { color:var(--muted); }
.r8h-cart-foot b { font-size:17px; }
.r8h-go { display:block; margin:12px 14px 14px; padding:10px 14px; text-align:center; background:var(--inv-bg); color:var(--inv-fg) !important; text-decoration:none !important; font-weight:600; border:1px solid var(--strong); }
.r8h-go:hover { background:var(--bg); color:var(--fg) !important; }

.r8h-user-panel { width:280px; padding:6px 0; }
.r8h-who { padding:10px 16px 12px; border-bottom:1px solid var(--line); margin-bottom:6px; display:flex; flex-direction:column; gap:3px; }
.r8h-who b { font-size:15px; }
.r8h-who .r8h-mono { color:var(--muted); font-size:12.5px; word-break:break-all; }
.r8h-tag { align-self:flex-start; margin-top:4px; border:1px solid var(--line); padding:1px 7px; font-size:12px; color:var(--muted); }
.r8h-row { display:flex; justify-content:space-between; align-items:baseline; width:100%; padding:7px 16px; color:var(--fg) !important; text-decoration:none !important; background:none; border:0; font:inherit; text-align:left; cursor:pointer; }
.r8h-row:hover { background:var(--hover); }
.r8h-neg { color:#d23b3b; }
.r8h-sep { border-top:1px solid var(--line); margin:6px 0; }
.r8h-out { margin:0; }
.r8h-out .r8h-row { color:var(--muted) !important; }

/* значок «Информация» */
.r8h-nav > .r8h-info > .r8h-link { border-left:0; }
.r8h-ico { padding:8px 10px; }
.r8h-ico i { display:inline-grid; place-items:center; width:20px; height:20px; border:1px solid var(--strong); font:italic 600 13px/1 Georgia,"Times New Roman",serif; }
.r8h-info-panel { width:220px; padding:6px 0; }
.r8h-head { padding:8px 16px 4px; font-size:12px; color:var(--muted); }

/* форма входа Docpart внутри панели: без цветных плашек темы */
.r8h-login-form { padding:6px 14px 12px; width:320px; max-width:calc(100vw - 24px); }
.r8h-user-panel:has(.r8h-login-form) { width:auto; }
.r8h-login-form .row { margin:0; }
.r8h-login-form [class*="col-"] { padding:0; float:none; width:auto; }
.r8h-login-form .panel-heading { background:none !important; color:var(--fg); font-weight:600; padding:6px 0 10px; border:0; }
.r8h-login-form .nav-tabs { background:none !important; border-bottom:1px solid var(--line); margin:0 0 10px !important; display:flex; }
.r8h-login-form .nav-tabs li, .r8h-login-form .nav-tabs li.active { float:none; margin:0; border:0 !important; background:none !important; } /* тема красит выбранную вкладку (li.active) в белый */
.r8h-login-form .nav-tabs li a { text-decoration:none !important; border:0 !important; color:var(--muted) !important; background:none !important; padding:4px 12px 6px 0 !important; }
.r8h-login-form .nav-tabs li.active a { color:var(--fg) !important; border-bottom:2px solid var(--strong) !important; }
.r8h-login-form .tab-content, .r8h-login-form .tab-content > .active, .r8h-login-form .panel-body { background:none !important; border:0 !important; padding:0 !important; }
.r8h-login-form input[type=text], .r8h-login-form input[type=password], .r8h-login-form input[type=email], .r8h-login-form input[type=tel], .r8h-login-form select, .r8h-login-form .form-control { background:var(--bg) !important; color:var(--fg) !important; border:1px solid var(--line) !important; height:auto; padding:8px 10px; }
.r8h-login-form .input-group, .r8h-login-form .input-group-addon { background:none !important; border-color:var(--line) !important; color:var(--muted) !important; }
.r8h-login-form .btn { background:var(--inv-bg) !important; color:var(--inv-fg) !important; border:1px solid var(--strong) !important; font-weight:600; }
.r8h-login-form .btn:hover { background:var(--bg) !important; color:var(--fg) !important; }
.r8h-login-form a:not(.btn) { color:var(--fg) !important; text-decoration:underline; }
.r8h-login-form hr { border-color:var(--line); }

.r8h :focus-visible { outline:2px solid var(--strong); outline-offset:2px; }
@media (max-width:760px) {
  .r8h-search { order:5; flex-basis:100%; }
  .r8h-bar { position:relative; }
  .r8h-drop { position:static; }
  .r8h-panel { left:12px; right:12px; top:100%; }
  .r8h-cart-panel, .r8h-user-panel { width:auto; }
  .r8h-link { padding:6px 9px; }
}
@media (prefers-reduced-motion: reduce) { .r8h * { transition:none !important; } }

/* road8: фото товаров в <picture> (WebP или JPG, 30.11) — те же размеры, что тема задаёт для img прямо в ссылке */
.product_div_tile>.product_div_image_wrap>a>picture>img { max-width:180px !important; max-height:180px !important; position:absolute; margin:auto; top:0; bottom:0; left:0; right:0; }
.product_div_list_photo>.product_div_image_wrap>a>picture>img { max-height:130px !important; max-width:130px; position:absolute; margin:auto; top:0; bottom:0; left:0; right:0; }
.div_product_img_big picture img { max-width:100%; height:auto; }
@media screen and (max-width:700px) { .product_div_list_photo>.product_div_image_wrap>a>picture>img { max-height:90px !important; max-width:90px; } }

/* road8 30.11: в разделах каталога фильтры слева дорисовывает скрипт через ~0,7 с (высотой до 1 800 px) и сталкивает
   меню разделов вниз — «прыжок». Пока блок фильтров пуст, меню не видно; если фильтров на странице нет — меню появится через 1,5 с. */
#left_col #side_properties_widgets_div:empty ~ #cssmenu { opacity:0; animation:r8menu-show 0s linear 1.5s forwards; }
@keyframes r8menu-show { to { opacity:1; } }

/* road8 30.11: тема (slidebars.css) ставит html, body { overflow-x:hidden } — из-за этого body становится отдельной областью прокрутки
   и «прилипание» (position:sticky, правая колонка карточки) не работает. clip так же обрезает лишнее вбок, но области прокрутки не создаёт.
   Браузеры без clip остаются на hidden. */
html, body { overflow-x:hidden; overflow-x:clip; }
