/* ============================================================================
   Rozetkarus — редизайн (вариант A). Тема rozetkarus-new.
   Один файл для десктопа и мобильной версии (адаптив через media queries).
   Цвета: тёмно-синий #102a3e, оранжевый #e95930, текст #1c2530.
   Шрифты: Manrope (заголовки), Public Sans (текст) — подключены в index.tpl.
   ========================================================================== */

:root {
  --navy: #102a3e;
  --navy2: #1d3951;
  --navy3: #264a63;
  --orange: #e95930;
  --orange-dark: #d64a22;
  --peach: #ffd9c9;
  --text: #1c2530;
  --text2: #39424c;
  --muted: #6a7580;
  --muted2: #9aa2ab;
  --line: #ececed;
  --line2: #f0f1f2;
  --bg: #f5f6f7;
  --bg2: #f8f9fa;
  --warn-bg: #fff3ea;
  --warn-line: #f3c9ab;
  --radius: 12px;
  --font-h: 'Manrope', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --font-t: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

/* ---------- базовое (только для страниц, где старый CSS не грузится; :where() = нулевая специфичность,
   чтобы компонентные правила ниже всегда побеждали) ---------- */
html.rd-clean { box-sizing: border-box; -webkit-text-size-adjust: 100%; }
html.rd-clean *, html.rd-clean *::before, html.rd-clean *::after { box-sizing: inherit; }
:where(html.rd-clean) body { margin: 0; background: #fff; color: var(--text); font: 14px/1.5 var(--font-t); }
:where(html.rd-clean) img { max-width: 100%; }
:where(html.rd-clean) a { color: var(--orange); text-decoration: none; }
:where(html.rd-clean) a:hover { color: var(--orange-dark); }
:where(html.rd-clean) h1, :where(html.rd-clean) h2, :where(html.rd-clean) h3, :where(html.rd-clean) h4 { font-family: var(--font-h); color: var(--navy); margin: 0 0 14px; line-height: 1.25; font-weight: 800; }
:where(html.rd-clean) h1 { font-size: 26px; }
:where(html.rd-clean) h2 { font-size: 20px; }
:where(html.rd-clean) h3 { font-size: 17px; }
:where(html.rd-clean) p { margin: 0 0 12px; }
:where(html.rd-clean) input, :where(html.rd-clean) textarea, :where(html.rd-clean) select, :where(html.rd-clean) button { font-family: inherit; font-size: inherit; }
:where(html.rd-clean) table { border-collapse: collapse; }
.mfp-hide { display: none !important; }

/* на страницах со старым CSS (карточка товара и т.д.) — только шрифты и цвет ссылок в общем контенте */
body { font-family: var(--font-t); }
h1, h2, h3, h4, .h { font-family: var(--font-h); }

/* ---------- общая обёртка ---------- */
.rd-wrap { max-width: 1440px; margin: 0 auto; padding: 0 48px; }
.rd-site { display: flex; flex-direction: column; min-height: 100vh; }
.rd-main { flex: 1 0 auto; background: #fff; }
.rd-hide-mobile { }
.rd-only-mobile { display: none !important; }

/* ---------- кнопки ---------- */
.rd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 9px; padding: 0 22px; height: 44px; font: 600 14px/1 var(--font-t); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.rd-btn--orange { background: var(--orange); color: #fff; }
.rd-btn--orange:hover { background: var(--orange-dark); color: #fff; }
.rd-btn--navy { background: var(--navy); color: #fff; }
.rd-btn--navy:hover { background: var(--navy2); color: #fff; }
.rd-btn--ghost { background: #fff; color: var(--navy); border: 1px solid var(--navy); }
.rd-btn--ghost:hover { background: var(--navy); color: #fff; }
.rd-btn--light { background: #fff; color: var(--text2); border: 1px solid var(--line); }
.rd-btn--light:hover { border-color: var(--navy); color: var(--navy); }
.rd-btn--lg { height: 50px; font-size: 15px; font-weight: 700; padding: 0 28px; }
.rd-btn--block { width: 100%; }

/* ---------- иконки-svg ---------- */
.rd-ico { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ============================================================================
   ШАПКА
   ========================================================================== */
.rd-topbar { background: var(--navy); color: #c9d3dc; font-size: 13px; }
.rd-topbar .rd-wrap { display: flex; align-items: center; justify-content: space-between; height: 38px; }
.rd-topbar__l, .rd-topbar__r { display: flex; gap: 24px; align-items: center; }
.rd-topbar a { color: #c9d3dc; text-decoration: none; }
.rd-topbar a:hover { color: #fff; }
.rd-topbar__phone { color: #fff !important; font-weight: 600; }

.rd-header { background: #fff; border-bottom: 1px solid var(--line); }
.rd-header .rd-wrap { display: flex; align-items: center; gap: 32px; height: 84px; }
.rd-logo { display: block; flex-shrink: 0; line-height: 0; }
.rd-logo img { height: 44px; width: auto; display: block; }
.rd-search { flex: 1; display: flex; align-items: center; background: var(--bg); border-radius: 10px; height: 48px; padding: 0 6px 0 16px; position: relative; }
.rd-search .rd-ico { color: #8e97a1; }
.rd-search input { flex: 1; border: 0; background: transparent; height: 46px; padding: 0 12px; font: 14px var(--font-t); color: var(--text); outline: none; min-width: 0; margin: 0; box-shadow: none; }
.rd-search input::placeholder { color: #9aa2ab; }
.rd-search button { border: 0; background: var(--navy); color: #fff; border-radius: 8px; height: 36px; padding: 0 16px; font: 600 13px var(--font-t); cursor: pointer; }
.rd-search button:hover { background: var(--navy2); }
.rd-actions { display: flex; align-items: center; gap: 26px; flex-shrink: 0; }
.rd-cartlink { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text2); font-size: 12px; text-decoration: none; position: relative; line-height: 1; }
.rd-cartlink:hover { color: var(--orange); }
.rd-cartlink .rd-ico { width: 24px; height: 24px; }
.rd-cartlink i, .rd-cartlink .cart_num, .rd-mcart i { position: absolute; top: -6px; right: -10px; background: var(--orange); color: #fff; border-radius: 10px; font: 700 10px/1 var(--font-t); padding: 3px 6px; font-style: normal; min-width: 18px; width: auto !important; height: auto !important; text-align: center; box-sizing: border-box; }

.rd-nav { background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 40; }
.rd-nav .rd-wrap { display: flex; align-items: center; gap: 36px; height: 62px; }
.rd-catbtn { display: inline-flex; align-items: center; gap: 10px; background: var(--navy); color: #fff; height: 44px; padding: 0 18px; border-radius: 9px; font: 600 14px var(--font-t); border: 0; cursor: pointer; width: 280px; flex-shrink: 0; text-align: left; }
.rd-catbtn:hover { background: var(--navy2); }
.rd-catbtn .rd-ico { width: 18px; height: 18px; stroke-width: 2.2; }
.rd-catbtn__x { display: none; }
.rd-catbtn.is-open .rd-catbtn__burger { display: none; }
.rd-catbtn.is-open .rd-catbtn__x { display: block; }
.rd-navlinks { display: flex; gap: 32px; margin: 0; padding: 0; list-style: none; }
.rd-navlinks a { color: var(--text2); font-size: 14px; text-decoration: none; }
.rd-navlinks a:hover { color: var(--orange); }

/* выпадающий каталог (на всех страницах, кроме главной) */
.rd-catdrop { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 60; }
.rd-catdrop.is-open { display: block; }
.rd-catdrop__inner { max-width: 1440px; margin: 0 auto; padding: 0 48px; }
.rd-catdrop__panel { width: 280px; background: #fff; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; box-shadow: 0 20px 50px rgba(16,42,62,.18); position: relative; }

/* ============================================================================
   МЕНЮ КАТЕГОРИЙ (сайдбар главной, выпадашка, сайдбар каталога, мобильная шторка)
   ========================================================================== */
.rd-catmenu { list-style: none; margin: 0; padding: 0; position: relative; }
.rd-catmenu > li { border-bottom: 1px solid var(--line2); }
.rd-catmenu > li:last-child { border-bottom: 0; }
.rd-catmenu__link { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: var(--text); text-decoration: none; font-size: 13.5px; font-weight: 500; line-height: 1.3; }
.rd-catmenu__link .rd-ico { width: 22px; height: 22px; color: var(--orange); }
.rd-catmenu__link span { flex: 1; }
.rd-catmenu__link .rd-chev { width: 12px; height: 12px; color: var(--muted2); stroke-width: 2.4; }
.rd-catmenu > li:hover > .rd-catmenu__link, .rd-catmenu > li.is-active > .rd-catmenu__link { background: var(--bg); color: var(--navy); font-weight: 700; }
.rd-catmenu > li:hover > .rd-catmenu__link .rd-chev, .rd-catmenu > li.is-active > .rd-catmenu__link .rd-chev { color: var(--orange); }

/* flyout справа от меню */
.rd-flyout { display: none; position: absolute; left: 100%; top: 0; z-index: 70; background: #fff; border: 1px solid var(--line); border-radius: 0 12px 12px 12px; box-shadow: 0 20px 50px rgba(16,42,62,.16); padding: 22px 26px 24px; min-width: 520px; }
.rd-catmenu > li:hover > .rd-flyout { display: flex; flex-wrap: wrap; gap: 0 32px; }
.rd-flyout__cols { display: flex; gap: 32px; }
.rd-flyout__col { width: 230px; display: flex; flex-direction: column; gap: 7px; }
.rd-flyout__col a { color: var(--text); font-size: 13.5px; font-weight: 600; text-decoration: none; line-height: 1.3; margin-top: 6px; }
.rd-flyout__col a.lvl3 { color: var(--muted); font-size: 12.5px; font-weight: 400; padding-left: 14px; margin-top: 0; }
.rd-flyout__col a:hover { color: var(--orange); }
.rd-flyout__brands { width: 210px; border-left: 1px solid var(--line); padding-left: 28px; }
.rd-flyout__brands p { margin: 6px 0 12px; font: 700 11px var(--font-t); letter-spacing: .06em; text-transform: uppercase; color: var(--muted2); }
.rd-flyout__brands ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.rd-flyout__brands a { display: flex; align-items: center; gap: 9px; color: var(--text2); font-size: 13px; text-decoration: none; }
.rd-flyout__brands a:hover { color: var(--orange); }
.rd-flyout__brands img { height: 20px; width: 26px; object-fit: contain; flex-shrink: 0; }
.rd-flyout__brands .rd-brandini { width: 22px; height: 22px; border-radius: 5px; background: var(--navy); color: #fff; font: 800 9px/22px var(--font-h); text-align: center; flex-shrink: 0; }
.rd-flyout__brands .rd-more { color: var(--orange); font-weight: 700; font-size: 12.5px; }
.rd-flyout__all { flex-basis: 100%; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); font: 700 13px var(--font-t); color: var(--orange); text-decoration: none; }

/* ============================================================================
   ГЛАВНАЯ
   ========================================================================== */
.rd-home { display: flex; align-items: stretch; }
.rd-home__side { width: 280px; flex-shrink: 0; border-right: 1px solid var(--line); padding-bottom: 20px; }
.rd-home__side .rd-catmenu { padding: 8px 0 0; }
.rd-cta-tile { margin: 18px 16px 0; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.rd-cta-tile__t { font: 800 14px/1.3 var(--font-h); color: var(--navy); margin-bottom: 6px; }
.rd-cta-tile p { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 0 0 10px; }
.rd-cta-tile .rd-btn { width: 100%; height: 40px; font-size: 13px; }
.rd-home__content { flex: 1; min-width: 0; padding: 24px 0 40px 32px; }

/* слайдер (owl carousel) */
.rd-slider { border-radius: 18px; overflow: hidden; position: relative; }
.rd-slide { position: relative; min-height: 320px; display: flex; align-items: center; padding: 44px 48px; color: #fff; background: linear-gradient(120deg, #102a3e 0%, #1d3951 60%, #264a63 100%); overflow: hidden; }
.rd-slide__bg { position: absolute; inset: 0; z-index: 0; }
.rd-slide__bg img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .28; }
.rd-slide__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(16,42,62,.96) 0%, rgba(16,42,62,.75) 55%, rgba(16,42,62,.35) 100%); }
.rd-slide__body { position: relative; z-index: 1; max-width: 560px; }
.rd-slide__badge { display: inline-block; background: rgba(255,255,255,.12); color: var(--peach); font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 100px; margin-bottom: 16px; }
.rd-slide__title { font: 800 30px/1.18 var(--font-h); color: #fff; margin: 0 0 10px; }
.rd-slide__text { color: #b9c4cf; font-size: 14.5px; line-height: 1.55; margin: 0 0 20px; }
.rd-slide__btns { display: flex; gap: 12px; flex-wrap: wrap; }
.rd-slide__btns .rd-btn--outline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); }
.rd-slide__btns .rd-btn--outline:hover { background: rgba(255,255,255,.12); color: #fff; }
.rd-slider .owl-dots { position: absolute; left: 48px; bottom: 18px; display: flex; gap: 6px; z-index: 2; }
.rd-slider .owl-dot { width: 7px; height: 7px; border-radius: 4px; background: rgba(255,255,255,.35); border: 0; padding: 0; transition: width .2s; cursor: pointer; }
.rd-slider .owl-dot.active { width: 18px; background: var(--orange); }
.rd-slider .owl-nav { display: none; }
/* все слайды одной высоты (по самому высокому) — иначе под коротким слайдом остаётся белая полоса */
.rd-slider .owl-stage { display: flex; }
.rd-slider .owl-item { display: flex; float: none; }
.rd-slider .owl-item .rd-slide { width: 100%; }
/* до инициализации owl показываем только первый слайд, чтобы не было «простыни» */
.rd-slider:not(.owl-loaded) .rd-slide:not(:first-child) { display: none; }

/* блок о компании */
.rd-intro { margin-top: 20px; background: var(--bg2); border-radius: 16px; padding: 28px 32px; display: flex; gap: 32px; align-items: flex-start; }
.rd-intro__text { flex: 1; min-width: 0; }
.rd-intro__text h1 { font: 800 18px/1.3 var(--font-h); color: var(--navy); margin: 0 0 10px; }
.rd-intro__text p, .rd-intro__text div { font-size: 13.5px; color: var(--text2); line-height: 1.65; }
.rd-intro__text p { margin: 0 0 10px; }
.rd-intro__stats { display: flex; flex-direction: column; gap: 14px; flex-shrink: 0; min-width: 190px; padding-top: 4px; }
.rd-intro__stat { display: flex; align-items: center; gap: 10px; }
.rd-intro__stat b { font: 800 18px var(--font-h); color: var(--orange); white-space: nowrap; }
.rd-intro__stat span { font-size: 12.5px; color: var(--muted); line-height: 1.3; }

.rd-h2 { font: 800 19px/1.25 var(--font-h); color: var(--navy); margin: 0 0 16px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.rd-h2 small { font: 500 12px var(--font-t); color: var(--muted2); }
.rd-h2 a { font: 700 13.5px var(--font-t); color: var(--orange); text-decoration: none; }
.rd-section { margin-top: 30px; }

/* популярные категории */
.rd-catgrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.rd-cattile { border: 1px solid var(--line); border-radius: 14px; padding: 20px 16px; display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.rd-cattile:hover { border-color: var(--orange); box-shadow: 0 8px 24px rgba(16,42,62,.08); color: var(--text); }
.rd-cattile .rd-ico { width: 28px; height: 28px; color: var(--orange); }
.rd-cattile span { font-size: 13px; font-weight: 600; line-height: 1.3; }

/* официальный дилер */
.rd-dealer { margin-top: 30px; background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 28px; display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; }
.rd-dealer__head { display: contents; }
.rd-dealer__list { display: contents; }
.rd-dealer__label { flex-basis: 100%; font: 700 11px var(--font-t); color: #8e97a1; text-transform: uppercase; letter-spacing: .06em; }
.rd-dealer a.rd-dealer__brand { font: 800 14px var(--font-h); color: var(--text2); text-decoration: none; }
.rd-dealer a.rd-dealer__brand:hover { color: var(--orange); }
.rd-dealer__all { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--orange); font-weight: 700; font-size: 13.5px; text-decoration: none; }
.rd-dealer__all .rd-ico { width: 14px; height: 14px; stroke-width: 2.2; }

/* рекомендуем — баннеры брендов */
.rd-promo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rd-promo__item { background: var(--navy); border-radius: 16px; padding: 26px 28px; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: #fff; text-decoration: none; transition: transform .15s; }
.rd-promo__item:hover { transform: translateY(-2px); color: #fff; }
.rd-promo__item:nth-child(2) { background: var(--navy2); }
.rd-promo__item:nth-child(3) { background: #0b1e2d; }
.rd-promo__item:nth-child(4) { background: #16324a; }
.rd-promo__item:nth-child(5) { background: #123049; }
.rd-promo__item:last-child:nth-child(odd) { grid-column: 1 / -1; }
.rd-promo__brand { font: 800 20px var(--font-h); color: #fff; }
.rd-promo__text { color: #c9d3dc; font-size: 12.5px; margin-top: 6px; max-width: 320px; line-height: 1.5; }
.rd-promo__btn { margin-top: 14px; display: inline-block; background: var(--peach); color: var(--navy); padding: 9px 18px; border-radius: 8px; font-weight: 700; font-size: 12.5px; }
.rd-promo__item:nth-child(odd) .rd-promo__btn { background: var(--orange); color: #fff; }
.rd-promo__logo { width: 110px; height: 76px; background: #fff; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 10px; }
.rd-promo__logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.rd-promo__logo span { font: 800 13px var(--font-h); color: var(--navy); text-align: center; overflow-wrap: anywhere; }

/* ============================================================================
   КАРТОЧКИ ТОВАРОВ (те же классы, что отдаёт ajax/filter_products.php)
   ========================================================================== */
.products-tile { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.rd-home__content .products-tile { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.products-tile > h1 { grid-column: 1 / -1; font-size: 16px; color: var(--muted); font-weight: 600; }
.product-tile { position: relative; border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: #fff; transition: border-color .15s, box-shadow .15s; min-width: 0; }
.product-tile:hover { border-color: #d5d9de; box-shadow: 0 10px 28px rgba(16,42,62,.08); }
.product-label { position: absolute; top: 12px; left: 12px; z-index: 2; border-radius: 6px; padding: 4px 8px; font: 700 11px var(--font-t); color: #fff; background: var(--orange); }
.product-label.label-info { background: var(--navy); }
.product-tile_img { display: block; height: 170px; border-radius: 10px; background: var(--bg); overflow: hidden; text-align: center; }
.product-tile_img img { width: 100%; height: 100%; object-fit: contain; display: block; mix-blend-mode: multiply; }
.product-tile_content { flex: 1; }
.product-tile_name { font-size: 13px; line-height: 1.4; min-height: 54px; }
.product-tile_name a { color: var(--text); text-decoration: none; }
.product-tile_name a:hover { color: var(--orange); }
.product-tile_sku { font-size: 11px; color: #b3b9c0; margin-top: 4px; }
.product-tile_bottom { margin-top: auto; }
.product-tile_prices-cart { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.product-tile_prices .price { font: 800 16px var(--font-h); color: var(--text); white-space: nowrap; }
.product-tile_prices .old-price { font-size: 12px; color: var(--muted2); text-decoration: line-through; }
.product-tile_prices .ruble { font-weight: 700; }
.product-tile_cart { display: flex; align-items: center; gap: 6px; margin: 0; }
.cart-qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; height: 34px; }
.cart-qty_act { width: 26px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text2); user-select: none; font-size: 15px; }
.cart-qty_act:hover { background: var(--bg); }
.cart-qty input { width: 34px; height: 32px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font: 13px var(--font-t); padding: 0; margin: 0; outline: none; color: var(--text); background: #fff; }
.button.addtocart { width: 34px; height: 34px; border-radius: 8px; background: var(--orange) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='9' cy='21' r='1'/><circle cx='20' cy='21' r='1'/><path d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/></svg>") center/16px no-repeat; display: inline-block; cursor: pointer; flex-shrink: 0; }
.button.addtocart:hover { background-color: var(--orange-dark); }
.button.addtocart::before { display: none; }

/* список (вид «списком», cookie view=list) */
.row-wrap.type-list, .rd-list { display: flex; flex-direction: column; gap: 12px; }
.products-list_item { border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; background: #fff; }
.products-list_item-row { display: flex; gap: 20px; align-items: center; }
.products-list_item-left { width: 110px; flex-shrink: 0; position: relative; }
.products-list_item-img img { width: 100px; height: 100px; object-fit: contain; display: block; background: var(--bg); border-radius: 8px; }
.products-list_item-center { flex: 1; min-width: 0; }
.products-list_item-name a { color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none; }
.products-list_item-name a:hover { color: var(--orange); }
.products-list-features { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.products-list-features td { padding: 2px 10px 2px 0; }
.products-list_item-right { width: 220px; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.products-list_item-price .price { font: 800 17px var(--font-h); color: var(--text); }
.products-list_item-price .old-price { font-size: 12px; color: var(--muted2); text-decoration: line-through; margin-right: 6px; }
.products-list_item-cart { display: flex; gap: 6px; align-items: center; margin: 0; }
.clear { clear: both; }

/* ============================================================================
   КАТАЛОГ (страница категории / бренда / поиска)
   ========================================================================== */
.rd-catalog { display: flex; align-items: stretch; }
.rd-catalog__side { width: 280px; flex-shrink: 0; border-right: 1px solid var(--line); padding-bottom: 30px; }
.rd-catalog__side .rd-catmenu { padding: 8px 0 12px; border-bottom: 8px solid var(--bg); }
.rd-catalog__content { flex: 1; min-width: 0; padding: 24px 0 40px 32px; }

/* хлебные крошки */
ul.breadcrumb { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: 12.5px; color: var(--muted2); background: none; border-radius: 0; }
ul.breadcrumb li { display: flex; align-items: center; gap: 6px; padding: 0; }
ul.breadcrumb li + li::before { content: "/"; color: #c8ccd1; padding: 0; }
ul.breadcrumb a { color: var(--muted2); text-decoration: none; }
ul.breadcrumb a:hover { color: var(--orange); }
ul.breadcrumb li:last-child span, ul.breadcrumb li.active span { color: var(--text2); font-weight: 600; }
ul.breadcrumb .fa-home::before { content: "Главная"; font-family: var(--font-t); font-style: normal; }

.rd-cathead h1 { font: 800 24px/1.25 var(--font-h); color: var(--navy); margin: 0 0 18px; }
.rd-cathead h1 small { font: 500 13px var(--font-t); color: var(--muted2); white-space: nowrap; margin-left: 8px; }
.rd-catdesc { margin-bottom: 20px; font-size: 13.5px; color: var(--text2); line-height: 1.6; }

/* плитки подкатегорий */
.rd-subcats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.rd-subcat { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--text); min-width: 0; transition: border-color .15s; }
.rd-subcat:hover { border-color: var(--orange); color: var(--text); }
.rd-subcat .rd-ico { width: 26px; height: 26px; color: var(--text2); }
.rd-subcat span { font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.rd-subcat.is-active { border-color: var(--orange); background: #fff7f2; }
.rd-subcat.is-active .rd-ico, .rd-subcat.is-active span { color: var(--orange); }
.rd-subcat.is-active span { font-weight: 700; }

/* панель сортировки */
.rd-sortbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 20px; flex-wrap: wrap; }
.rd-sortbar__sort { display: flex; align-items: center; gap: 18px; font-size: 13px; color: var(--muted); }
.rd-sortbar__sort ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; }
.rd-sortbar__sort a { color: var(--muted); text-decoration: none; padding-bottom: 2px; border-bottom: 2px solid transparent; }
.rd-sortbar__sort li.selected a { color: var(--orange); font-weight: 700; border-bottom-color: var(--orange); }
.rd-sortbar__sort a.pricedown::after { content: " ↓"; }
.rd-sortbar__sort a.priceup::after { content: " ↑"; }
.rd-sortbar__right { display: flex; align-items: center; gap: 14px; }
.rd-sortbar__count { font-size: 12.5px; color: var(--muted2); }
.product-view { display: flex; gap: 6px; }
.product-view a { width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--muted2); text-decoration: none; }
.product-view a.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.product-view .rd-ico { width: 15px; height: 15px; }

/* загрузка ajax-фильтра */
.for_ajax_sort { position: relative; }
body.loading .for_ajax_sort::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.6); z-index: 5; }
body.loading .for_ajax_sort::before { content: ""; position: absolute; left: 50%; top: 120px; width: 36px; height: 36px; margin-left: -18px; border: 3px solid var(--line); border-top-color: var(--orange); border-radius: 50%; animation: rdspin .8s linear infinite; z-index: 6; }
@keyframes rdspin { to { transform: rotate(360deg); } }

/* пагинация */
ul.pagination { list-style: none; margin: 28px 0 0; padding: 0; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.for_ajax_sort > ul.pagination:first-child { display: none; }
ul.pagination li a { display: flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); color: var(--text2); font-size: 13px; text-decoration: none; }
ul.pagination li a:hover { border-color: var(--navy); color: var(--navy); }
ul.pagination li.active a { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 700; }
ul.pagination li.prev a::before { content: "‹"; font-size: 18px; line-height: 1; }
ul.pagination li.next a::before { content: "›"; font-size: 18px; line-height: 1; }
ul.pagination li.disabled { display: none; }

/* сайдбар: бренды / серии / фильтр */
.rd-sbox { padding: 16px 20px; border-bottom: 8px solid var(--bg); }
.rd-sbox__title { font: 700 13px var(--font-t); color: var(--text); margin: 0 0 12px; display: flex; align-items: center; justify-content: space-between; }
.sidebar-box__content-list { list-style: none; margin: 0; padding: 0; }
.sidebar-box__content-list li { margin-bottom: 9px; font-size: 13px; }
.sidebar-box__content-list li a { color: var(--text2); text-decoration: none; }
.sidebar-box__content-list li a:hover, .sidebar-box__content-list li.active a { color: var(--orange); font-weight: 700; }
.sidebar-box__content-list li.show-all { color: var(--orange); font-weight: 700; font-size: 12.5px; cursor: pointer; }
.sidebar-box__content-list li.show-all .fa::before { content: " ▾"; font-family: var(--font-t); font-style: normal; }

.sidebar-box_filter form { margin: 0; }
.filter_items { display: block; }
.filter_item { border-bottom: 1px solid var(--line); padding: 14px 0; }
.filter_item p.ftr { margin: 0; font: 700 13px var(--font-t); color: var(--text); display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.filter_item p.ftr::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted2); border-bottom: 2px solid var(--muted2); transform: rotate(45deg); margin: -4px 4px 0 0; transition: transform .15s; }
.filter_item.active p.ftr::after { transform: rotate(-135deg); margin-top: 4px; border-color: var(--orange); }
.filter_item ul { display: none; list-style: none; margin: 12px 0 0; padding: 0; }
.filter_item.active ul { display: block; }
.filter_item li { margin-bottom: 8px; }
.filter_item label { display: flex; align-items: center; gap: 9px; font: 400 13px var(--font-t); color: var(--text2); cursor: pointer; margin: 0; }
.filter_item input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--orange); margin: 0; flex-shrink: 0; }
#ccl { display: inline-block; margin-top: 12px; font: 700 12.5px var(--font-t); color: var(--orange); text-decoration: none; }

.rd-sbox--widget .thumb-list { list-style: none; margin: 0; padding: 0; }
.rd-sbox--widget .thumb-list li { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.rd-sbox--widget .thumb-list img { width: 56px; height: 56px; object-fit: contain; border-radius: 8px; background: var(--bg); flex-shrink: 0; }
.rd-sbox--widget .thumb-list p { margin: 0; font-size: 12.5px; line-height: 1.35; }
.rd-sbox--widget .thumb-list-item-title a { color: var(--text2); text-decoration: none; }
.rd-sbox--widget .thumb-list-item-price { font-weight: 700; color: var(--text); margin-top: 3px !important; }

/* описание категории / бренда под товарами */
.rd-seotext { margin-top: 32px; font-size: 13.5px; color: var(--text2); line-height: 1.65; }
.rd-seotext h2, .rd-seotext h3 { font-family: var(--font-h); color: var(--navy); }

/* ============================================================================
   БРЕНДЫ
   ========================================================================== */
.rd-page { padding-top: 28px; padding-bottom: 48px; }
.rd-pagehead { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 12px; }
.rd-pagehead h1 { font: 800 24px/1.25 var(--font-h); color: var(--navy); margin: 0; }
.rd-pagehead small { font: 500 13px var(--font-t); color: var(--muted2); }
.rd-brands { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 14px; }
.rd-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 18px 12px; text-align: center; text-decoration: none; color: var(--text); min-width: 0; transition: border-color .15s, box-shadow .15s; }
.rd-brand:hover { border-color: var(--orange); box-shadow: 0 8px 24px rgba(16,42,62,.08); color: var(--text); }
.rd-brand__logo { width: 100%; height: 56px; display: flex; align-items: center; justify-content: center; }
.rd-brand__logo img { max-width: 100%; max-height: 56px; object-fit: contain; }
.rd-brand__ini { width: 48px; height: 48px; border-radius: 10px; background: var(--navy); color: #fff; font: 800 15px/48px var(--font-h); text-align: center; }
.rd-brand span.rd-brand__name { font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.rd-brandsearch { display: flex; align-items: center; background: var(--bg); border-radius: 9px; padding: 0 14px; height: 40px; width: 260px; gap: 8px; }
.rd-brandsearch input { flex: 1; min-width: 0; border: 0; background: transparent; font: 13px var(--font-t); outline: none; color: var(--text); margin: 0; box-shadow: none; }
.rd-brandsearch .rd-ico { width: 16px; height: 16px; color: #8e97a1; }
.rd-brand.is-hidden { display: none; }

/* ============================================================================
   КОРЗИНА
   ========================================================================== */
.rd-cart h1 { font: 800 24px/1.25 var(--font-h); color: var(--navy); margin: 0 0 22px; }
.rd-cart form { margin: 0; }
.rd-cart__grid { display: flex; gap: 32px; align-items: flex-start; }
.rd-cart__items { flex: 1; min-width: 0; }
.rd-cart__totals { width: 300px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 14px; padding: 22px; position: sticky; top: 20px; }
.rd-cart__totals .t { font: 800 15px var(--font-h); color: var(--navy); margin-bottom: 16px; }
.rd-cart__totals .row-l { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.rd-cart__totals .sum { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 6px; display: flex; justify-content: space-between; align-items: baseline; }
.rd-cart__totals .sum span { font: 700 14px var(--font-h); color: var(--navy); white-space: nowrap; }
.rd-cart__totals .sum b { font: 800 20px var(--font-h); color: var(--navy); white-space: nowrap; }
table.cart-table { width: 100%; border-collapse: collapse; }
table.cart-table th { text-align: left; padding: 0 12px 10px; font: 700 11px var(--font-t); color: var(--muted2); text-transform: uppercase; letter-spacing: .04em; border-bottom: 2px solid var(--line); }
table.cart-table th:first-child, table.cart-table td:first-child { padding-left: 0; }
table.cart-table th.r, table.cart-table td.r { text-align: right; }
table.cart-table td { padding: 16px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 13.5px; }
.cart-item-image { width: 80px; }
.cart-item-image a, .cart-item-image span { display: flex; width: 64px; height: 64px; border-radius: 8px; background: var(--bg); align-items: center; justify-content: center; overflow: hidden; }
.cart-item-image img { max-width: 60px; max-height: 60px; object-fit: contain; }
.cart-item-name a { color: var(--text); text-decoration: none; font-size: 13.5px; line-height: 1.4; }
.cart-item-name a:hover { color: var(--orange); }
.cart-item-name small { display: block; color: #b3b9c0; font-size: 11px; margin-top: 4px; }
.cart-item-quantity .fixwi { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; height: 34px; width: auto; }
.cart-item-quantity .prod_list_minus, .cart-item-quantity .prod_list_plus { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text2); user-select: none; font-size: 16px; font-style: normal; }
.cart-item-quantity .prod_list_minus::before { content: "−"; }
.cart-item-quantity .prod_list_plus::before { content: "+"; }
.cart-item-quantity input.product_list_kolich { width: 44px; height: 32px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font: 13px var(--font-t); padding: 0; margin: 0; outline: none; border-radius: 0; box-shadow: none; }
.cart-item-sum b { font: 800 15px var(--font-h); color: var(--text); white-space: nowrap; }
.cart-item-sum small { display: block; font-size: 11.5px; color: var(--muted2); white-space: nowrap; }
.cart-item-remove { width: 40px; text-align: right; }
.cart-item-remove i { display: inline-block; width: 18px; height: 18px; cursor: pointer; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b3b9c0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><polyline points='3 6 5 6 21 6'/><path d='M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6'/><path d='M10 11v6'/><path d='M14 11v6'/></svg>") center/contain no-repeat; }
.cart-item-remove i::before { display: none; }
.cart-item-remove i:hover { filter: brightness(.6); }

.rd-notice { margin-top: 26px; background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 12px; padding: 18px 22px; }
.rd-notice b { display: block; font: 800 14.5px var(--font-h); color: var(--navy); margin-bottom: 4px; }
.rd-notice span { font-size: 12.5px; color: var(--muted); }
.rd-warn { margin: 20px 0; background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 12px; padding: 16px 20px; font-size: 14px; color: var(--navy); }

.rd-cart__form { margin-top: 26px; max-width: 760px; }
.rd-cart__form h3 { font: 800 15px var(--font-h); color: var(--navy); margin: 0 0 12px; }
.rd-deliv { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.rd-deliv label { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; cursor: pointer; margin: 0; font-weight: 400; }
.rd-deliv label:has(input:checked) { border-color: var(--orange); background: #fff7f2; }
.rd-deliv input { width: 17px; height: 17px; accent-color: var(--orange); margin: 0; flex-shrink: 0; }
.rd-deliv .n { flex: 1; font-size: 13.5px; color: var(--text); }
.rd-deliv .n small { display: block; color: var(--muted2); font-size: 11.5px; margin-top: 2px; }
.rd-deliv .p { font-size: 13px; color: var(--text); font-weight: 700; white-space: nowrap; }
.rd-fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rd-fgrid .full { grid-column: 1 / -1; }
.rd-field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 400; }
.rd-field input, .rd-field textarea { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 9px; padding: 0 14px; font: 14px var(--font-t); color: var(--text); background: #fff; outline: none; margin: 0; box-shadow: none; }
.rd-field textarea { height: 84px; padding: 10px 14px; resize: vertical; }
.rd-field input:focus, .rd-field textarea:focus { border-color: var(--navy); }
.rd-checks { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.rd-checks label { display: flex; align-items: flex-start; gap: 10px; font-size: 12.5px; color: var(--muted); line-height: 1.45; margin: 0; font-weight: 400; cursor: pointer; }
.rd-checks input { width: 17px; height: 17px; accent-color: var(--orange); margin: 1px 0 0; flex-shrink: 0; }
.rd-cart__submit { margin-top: 20px; }
.rd-cart__submit .rd-btn { min-width: 280px; }
.message_error { margin: 0 0 14px; color: #c0392b; font-weight: 700; font-size: 14px; }
.rd-cart-empty { padding: 40px 0 60px; text-align: center; color: var(--muted); }
.rd-cart-empty .rd-btn { margin-top: 18px; }

/* ============================================================================
   ФУТЕР
   ========================================================================== */
.rd-footer { background: var(--navy); color: #b9c4cf; margin-top: 0; }
.rd-footer .rd-wrap { padding-top: 40px; }
.rd-footer__top { display: flex; align-items: center; gap: 18px; padding-bottom: 28px; border-bottom: 1px solid rgba(255,255,255,.12); }
.rd-footer__top img { height: 40px; width: auto; display: block; }
.rd-footer__tag { font-size: 12.5px; color: #8fa2b3; margin-left: 18px; }
.rd-footer__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; padding: 30px 0; }
.rd-footer__h { font: 700 13.5px var(--font-h); color: #fff; margin: 0 0 14px; }
.rd-footer p { font-size: 13px; color: #b9c4cf; line-height: 1.7; margin: 0; }
.rd-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.rd-footer ul li { margin: 0; padding: 0; line-height: 1.5; }
.rd-footer a { color: #b9c4cf; text-decoration: none; }
.rd-footer a:hover { color: #fff; }
.rd-footer__phones { margin-top: 12px; font-size: 13.5px; }
.rd-footer__phones a.main { color: #fff; font-weight: 700; }
.rd-footer__phones div + div { margin-top: 4px; }
.rd-pay { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rd-pay img { height: 38px; width: auto; border-radius: 5px; display: block; }
.rd-pay__beznal { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 6px; padding: 6px 10px 6px 6px; height: 26px; }
.rd-pay__beznal img { height: 26px; border-radius: 0; }
.rd-pay__beznal span { font: 700 11px/1.2 var(--font-t); color: var(--text); white-space: nowrap; }
.rd-footer__copy { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; font-size: 12px; color: #7e91a2; }

/* ============================================================================
   ПОПАП «ОТПРАВИТЬ ЗАЯВКУ» (#fast_order_ff — существующий попап, только стиль)
   ========================================================================== */
#fast_order_ff { display: none; position: fixed; inset: 0; z-index: 9999999; background: rgba(16,42,62,.55) !important; overflow-x: hidden; overflow-y: auto; opacity: 1 !important; }
#fast_order_ff.show { display: block; }
#fast_order_ff .close_modal { position: absolute; inset: 0; cursor: pointer; }
#fast_order_ff .product-info { position: relative; z-index: 1; padding: 60px 20px; pointer-events: none; }
#fast_order_ff .modal-dialog { width: 520px; max-width: 100%; margin: 0 auto; pointer-events: auto; transform: none; }
#fast_order_ff .modal-content { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.35); border: 0; }
#fast_order_ff .modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 28px; border-bottom: 3px solid var(--orange); }
#fast_order_ff .modal-title h3 { margin: 0; font: 800 19px var(--font-h); color: var(--navy); }
#fast_order_ff .modal-header .close { width: 30px; height: 30px; border-radius: 50%; background: var(--bg); border: 0; cursor: pointer; opacity: 1; position: relative; font-size: 0; padding: 0; margin: 0; float: none; text-shadow: none; }
#fast_order_ff .modal-header .close::before, #fast_order_ff .modal-header .close::after { content: ""; position: absolute; left: 50%; top: 50%; width: 13px; height: 2px; background: var(--muted); transform: translate(-50%,-50%) rotate(45deg); }
#fast_order_ff .modal-header .close::after { transform: translate(-50%,-50%) rotate(-45deg); }
#fast_order_ff .modal-body { padding: 24px 28px 28px; margin: 0; font-size: 13.5px; }
#fast_order_ff .modal-body > p { color: var(--text2); line-height: 1.55; margin: 0 0 14px; font-size: 13.5px; }
#fast_order_ff .modal-body > h3 { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 10px; padding: 12px 16px; font: 400 13px var(--font-t); color: var(--navy); margin: 0 0 20px; }
#fast_order_ff .modal-body > h3 b { font-weight: 700; }
#fast_order_ff .form-row { display: flex; flex-direction: column; gap: 0; margin: 0; }
#fast_order_ff .form-row > div { padding: 0; margin: 0; }
#fast_order_ff input.form-control, #fast_order_ff textarea.form-control { width: 100%; height: 44px; border: 1px solid var(--line); background: var(--bg2); border-radius: 8px; padding: 0 14px; font: 13.5px var(--font-t); color: var(--text); outline: none; box-shadow: none; margin: 0 0 12px !important; }
#fast_order_ff textarea.form-control { height: 90px; min-height: 90px !important; padding: 12px 14px; resize: vertical; }
#fast_order_ff input.form-control:focus, #fast_order_ff textarea.form-control:focus { border-color: var(--navy); }
#fast_order_ff .modal__btn { width: 100%; margin: 4px 0 16px !important; float: none !important; height: 46px; border: 0; border-radius: 9px; background: var(--orange); color: #fff; font: 700 14px var(--font-t); cursor: pointer; }
#fast_order_ff .modal__btn:hover { background: var(--orange-dark); }
#fast_order_ff .custom-control { display: flex; align-items: flex-start; gap: 9px; padding: 0; margin: 0 0 9px; }
#fast_order_ff .custom-control-input { width: 15px; height: 15px; accent-color: var(--orange); margin: 2px 0 0; flex-shrink: 0; position: static; opacity: 1; }
#fast_order_ff .custom-control-label { font-size: 11.5px !important; color: #8e97a1; line-height: 1.4; padding: 0 !important; margin: 0; font-weight: 400; }
#fast_order_ff .custom-control-label::before, #fast_order_ff .custom-control-label::after { display: none; }
#fast_order_ff .custom-control-label a { color: var(--orange); }
body.modal-open { overflow: hidden; }

/* уведомление «товар добавлен» */
.success_add_cart { display: none; position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 14px 22px; border-radius: 10px; font-size: 14px; z-index: 99999; box-shadow: 0 10px 30px rgba(0,0,0,.25); }

/* автодополнение поиска (jquery.autocomplete) */
.autocomplete-suggestions { background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 40px rgba(16,42,62,.16); overflow: auto; max-height: 360px; z-index: 9999; margin-top: 4px; }
.autocomplete-suggestion { padding: 9px 14px; font-size: 13px; color: var(--text2); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.autocomplete-suggestion img { width: 28px; height: 28px; object-fit: contain; margin-right: 8px; vertical-align: middle; }
.autocomplete-selected { background: var(--bg); }
.autocomplete-suggestion strong { color: var(--orange); font-weight: 700; }

/* baloon (валидация форм) — не даём ему ломать раскладку */
.baloon { z-index: 99999; }

/* страницы со старой вёрсткой внутри (карточка товара, текстовые) */
.rd-oldpage { padding-top: 24px; padding-bottom: 40px; overflow-x: clip; }
.rd-oldpage > .breadcrumb { margin-bottom: 14px; }
.rd-oldpage h1 { font-family: var(--font-h); color: var(--navy); font-weight: 800; }

/* ============================================================================
   МОБИЛЬНЫЕ ЭЛЕМЕНТЫ (скрыты на десктопе)
   ========================================================================== */
.rd-mhead, .rd-mbtns, .rd-drawer, .rd-tabbar, .rd-msheet, .rd-mfilterbtn, .rd-msort { display: none; }

/* ============================================================================
   АДАПТИВ
   ========================================================================== */
@media (max-width: 1280px) {
  .rd-wrap, .rd-catdrop__inner { padding: 0 24px; }
  .products-tile, .rd-home__content .products-tile { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rd-brands { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .rd-subcats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rd-catgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rd-header .rd-wrap { gap: 20px; }
  .rd-navlinks { gap: 20px; }
}

@media (max-width: 1023px) {
  /* --- общее --- */
  .rd-wrap, .rd-catdrop__inner { padding: 0 16px; }
  .rd-only-mobile { display: block !important; }
  .rd-hide-mobile { display: none !important; }
  body { padding-bottom: 64px; }

  /* --- шапка: свёрнутый топбар, бургер/лого/корзина, поиск, две кнопки --- */
  .rd-topbar .rd-wrap { height: 30px; font-size: 11.5px; }
  .rd-topbar__addr, .rd-topbar__mail { display: none; }
  .rd-header .rd-wrap { height: auto; flex-wrap: wrap; gap: 10px 12px; padding-top: 10px; padding-bottom: 12px; }
  .rd-mhead { display: flex; align-items: center; gap: 12px; width: 100%; }
  .rd-burger { width: 40px; height: 40px; border-radius: 10px; background: var(--navy); border: 0; display: flex; align-items: center; justify-content: center; color: #fff; cursor: pointer; flex-shrink: 0; padding: 0; }
  .rd-burger .rd-ico { width: 20px; height: 20px; stroke-width: 2.2; }
  .rd-mhead .rd-logo { flex: 1; display: flex; justify-content: center; }
  .rd-mhead .rd-logo img { height: 34px; }
  .rd-mcart { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; position: relative; color: var(--text2); flex-shrink: 0; text-decoration: none; }
  .rd-mcart .rd-ico { width: 20px; height: 20px; }
  .rd-mcart { overflow: visible; }
  .rd-mcart i { display: block; line-height: 1; position: absolute; top: -6px; right: -6px; background: var(--orange); color: #fff; border-radius: 9px; font: 700 10px/1 var(--font-t); padding: 3px 6px; font-style: normal; }
  .rd-header > .rd-wrap > .rd-logo, .rd-header > .rd-wrap > .rd-actions { display: none; }
  .rd-search { width: 100%; height: 44px; }
  .rd-search button { display: none; }
  .rd-mbtns { display: flex; gap: 8px; width: 100%; }
  .rd-mbtns .rd-btn { flex: 1; height: 42px; font-size: 13px; padding: 0 10px; }
  .rd-nav { display: none; }

  /* --- мобильная шторка меню --- */
  .rd-drawer { position: fixed; inset: 0; z-index: 100000; }
  .rd-drawer.is-open { display: block; }
  .rd-drawer__bg { position: absolute; inset: 0; background: rgba(16,42,62,.55); }
  .rd-drawer__panel { position: absolute; left: 0; top: 0; bottom: 0; width: 88%; max-width: 360px; background: #fff; display: flex; flex-direction: column; box-shadow: 20px 0 60px rgba(0,0,0,.3); }
  .rd-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .rd-drawer__head b { font: 800 17px var(--font-h); color: var(--navy); }
  .rd-drawer__close { width: 32px; height: 32px; border-radius: 50%; background: var(--bg); border: 0; position: relative; cursor: pointer; padding: 0; }
  .rd-drawer__close::before, .rd-drawer__close::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2px; background: var(--muted); transform: translate(-50%,-50%) rotate(45deg); }
  .rd-drawer__close::after { transform: translate(-50%,-50%) rotate(-45deg); }
  .rd-drawer__body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .rd-drawer .rd-catmenu > li:hover > .rd-flyout { display: none; }
  .rd-drawer .rd-catmenu__link { padding: 11px 16px; }
  .rd-drawer .rd-catmenu > li:hover > .rd-catmenu__link { background: none; color: var(--text); font-weight: 500; }
  .rd-drawer .rd-catmenu > li.is-open > .rd-catmenu__link { background: var(--bg); color: var(--navy); font-weight: 700; }
  .rd-drawer .rd-catmenu > li.is-open > .rd-catmenu__link .rd-chev { transform: rotate(90deg); color: var(--orange); }
  .rd-drawer .rd-flyout { position: static; display: none; box-shadow: none; border: 0; border-radius: 0; padding: 0; min-width: 0; flex-direction: column; gap: 0; }
  .rd-drawer .rd-catmenu > li.is-open > .rd-flyout { display: block; }
  .rd-drawer .rd-flyout__cols { flex-direction: column; gap: 0; }
  .rd-drawer .rd-flyout__col { width: auto; gap: 0; }
  .rd-drawer .rd-flyout__col a { display: block; padding: 10px 16px 10px 52px; margin: 0; border-bottom: 1px solid #f4f5f6; font-size: 13px; }
  .rd-drawer .rd-flyout__col a.lvl3 { padding-left: 66px; font-size: 12.5px; border-bottom-color: #f7f8f9; }
  .rd-drawer .rd-flyout__brands { display: none; }
  .rd-drawer .rd-flyout__all { display: block; padding: 12px 16px 12px 52px; font: 700 12.5px var(--font-t); color: var(--orange); text-decoration: none; }
  .rd-drawer__links { border-top: 8px solid var(--bg); padding: 8px 0; }
  .rd-drawer__links a { display: block; padding: 11px 16px; color: var(--text2); font-size: 13.5px; text-decoration: none; border-bottom: 1px solid var(--line2); }
  .rd-drawer__contacts { padding: 16px; font-size: 12.5px; color: var(--muted); line-height: 1.6; border-top: 8px solid var(--bg); }
  .rd-drawer__contacts a { color: var(--navy); font-weight: 700; }
  .rd-flyout__all { display: none; }

  /* --- нижняя панель --- */
  .rd-tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 99990; background: #fff; border-top: 1px solid var(--line); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
  .rd-tabbar a, .rd-tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font: 500 10.5px var(--font-t); color: #8e97a1; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; position: relative; }
  .rd-tabbar .rd-ico { width: 22px; height: 22px; stroke-width: 1.9; }
  .rd-tabbar .is-active { color: var(--orange); font-weight: 700; }
  .rd-tabbar .cart_num { position: absolute; top: -4px; left: 50%; margin-left: 4px; background: var(--orange); color: #fff; border-radius: 9px; font: 700 10px/1 var(--font-t); padding: 3px 5px; font-style: normal; }
  .rd-tabbar .cart_num:empty, .rd-tabbar .cart_num.is-zero { display: none; }
  #cookie-notice { bottom: 64px !important; }

  /* --- главная --- */
  .rd-home { display: block; }
  .rd-home__side { display: none; }
  .rd-home__content { padding: 14px 0 30px; }
  .rd-slide { min-height: 0; padding: 22px 20px 30px; }
  .rd-slide__title { font-size: 21px; }
  .rd-slide__text { font-size: 12.5px; }
  .rd-slide__btns .rd-btn { height: 38px; padding: 0 16px; font-size: 12.5px; }
  .rd-slider .owl-dots { left: 20px; bottom: 12px; }
  .rd-intro { padding: 16px; flex-direction: column; gap: 12px; margin-top: 14px; border-radius: 14px; }
  .rd-intro__text h1 { font-size: 15px; }
  .rd-intro__stats { flex-direction: row; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; min-width: 0; order: -1; padding: 0; }
  .rd-intro__stat { flex-direction: column; align-items: flex-start; gap: 2px; }
  .rd-intro__stat b { font-size: 15px; }
  .rd-intro__stat span { font-size: 11px; }
  .rd-intro__text p, .rd-intro__text div { font-size: 12.5px; }
  .rd-intro__body.is-collapsed { max-height: 96px; overflow: hidden; position: relative; }
  .rd-intro__body.is-collapsed::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40px; background: linear-gradient(rgba(248,249,250,0), #f8f9fa); }
  .rd-intro__more { display: inline-block !important; margin-top: 8px; font-size: 12.5px; color: var(--orange); font-weight: 700; cursor: pointer; }
  .rd-section { margin-top: 22px; }
  .rd-h2 { font-size: 17px; margin-bottom: 12px; }
  .rd-catgrid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .rd-cattile { padding: 14px 12px; gap: 9px; border-radius: 12px; }
  .rd-cattile .rd-ico { width: 24px; height: 24px; }
  .rd-cattile span { font-size: 12px; }
  .rd-catgrid .rd-cattile:nth-child(n+7) { display: none; }
  .rd-dealer { margin: 22px -16px 0; padding: 0; background: none; border: 0; display: block; }
  .rd-dealer__head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 16px; margin-bottom: 10px; }
  .rd-dealer__label { flex-basis: auto; }
  .rd-dealer__all { margin: 0; font-size: 12.5px; }
  .rd-dealer__list { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 0 16px 2px; }
  .rd-dealer__list::-webkit-scrollbar { display: none; }
  .rd-dealer a.rd-dealer__brand { flex-shrink: 0; font-size: 13px; background: #fff; border: 1px solid var(--line); border-radius: 100px; padding: 8px 14px; }
  .rd-promo { grid-template-columns: 1fr; gap: 10px; }
  .rd-promo__item { padding: 18px; border-radius: 14px; }
  .rd-promo__item:last-child:nth-child(odd) { grid-column: auto; }
  .rd-promo__brand { font-size: 17px; }
  .rd-promo__text { font-size: 12px; margin-top: 4px; }
  .rd-promo__btn { margin-top: 10px; padding: 8px 14px; font-size: 12px; }
  .rd-promo__logo { width: 72px; height: 58px; padding: 8px; border-radius: 10px; }
  .products-tile, .rd-home__content .products-tile { grid-template-columns: 1fr 1fr; gap: 10px; }
  .product-tile { padding: 12px; border-radius: 12px; gap: 7px; }
  .product-tile_img { height: 110px; }
  .product-tile_name { font-size: 12px; min-height: 50px; }
  .product-tile_prices .price { font-size: 14px; }
  .cart-qty { display: none; }
  .button.addtocart { width: 30px; height: 30px; background-size: 14px; }

  /* --- каталог --- */
  .rd-catalog { display: block; }
  .rd-catalog__side { display: none; }
  .rd-catalog__content { padding: 14px 0 30px; }
  .rd-cathead h1 { font-size: 20px; margin-bottom: 12px; }
  .rd-cathead h1 small { font-size: 12px; margin-left: 6px; }
  ul.breadcrumb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; margin-bottom: 8px; }
  ul.breadcrumb li { display: inline; }
  ul.breadcrumb li + li::before { content: " / "; }
  .rd-subcats { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
  .rd-subcat { flex-direction: row; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 10px; }
  .rd-subcat .rd-ico { width: 16px; height: 16px; }
  .rd-subcat span { font-size: 11.5px; line-height: 1.25; }
  .rd-sortbar { padding: 10px 0; margin-bottom: 12px; gap: 8px; }
  .rd-sortbar__sort { display: none; }
  .rd-mfilterbtn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; flex: 1; border: 1px solid var(--navy); border-radius: 9px; font: 700 13px var(--font-t); color: var(--navy); background: #fff; cursor: pointer; padding: 0 10px; }
  .rd-mfilterbtn .rd-ico { width: 16px; height: 16px; stroke-width: 2; }
  .rd-mfilterbtn .cnt { background: var(--orange); color: #fff; border-radius: 9px; font-size: 10.5px; padding: 2px 6px; }
  .rd-mfilterbtn .cnt:empty { display: none; }
  .rd-msort { display: block; flex: 1; position: relative; }
  .rd-msort select { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 9px; padding: 0 30px 0 12px; font: 13px var(--font-t); color: var(--text2); background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa2ab' stroke-width='2.4'><polyline points='6 9 12 15 18 9'/></svg>") right 10px center/12px no-repeat; -webkit-appearance: none; appearance: none; }
  .rd-sortbar__right { width: 100%; gap: 8px; }
  .rd-sortbar__count { display: none; }
  .product-view { display: none; }
  .rd-catalog__content .rd-sortbar__right { display: flex; }

  /* шторка фильтров (перенос сайдбара) */
  .rd-msheet { position: fixed; inset: 0; z-index: 100000; }
  .rd-msheet.is-open { display: block; }
  .rd-msheet__bg { position: absolute; inset: 0; background: rgba(16,42,62,.55); }
  .rd-msheet__panel { position: absolute; left: 0; right: 0; bottom: 0; top: 40px; background: #fff; border-radius: 22px 22px 0 0; display: flex; flex-direction: column; box-shadow: 0 -20px 60px rgba(0,0,0,.3); }
  .rd-msheet__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .rd-msheet__head b { font: 800 17px var(--font-h); color: var(--navy); }
  .rd-msheet__body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 16px; }
  .rd-msheet__body .rd-catmenu { display: none; }
  .rd-msheet__body .rd-catalog__side { display: block !important; width: auto; border: 0; padding: 0; }
  .rd-msheet__body .rd-sbox { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .rd-msheet__body .rd-sbox--widget { display: none; }
  .rd-msheet__body .filter_item label { font-size: 13.5px; padding: 3px 0; }
  .rd-msheet__body .filter_item input[type=checkbox] { width: 18px; height: 18px; }
  .rd-msheet__foot { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 8px; }
  .rd-msheet__foot .rd-btn { height: 46px; }
  .rd-msheet__foot .rd-btn--light { width: 42%; }
  .rd-msheet__foot .rd-btn--orange { flex: 1; }
  .rd-msheet .sidebar-box__content-list li { display: block !important; }
  .rd-msheet .sidebar-box__content-list li.show-all { display: none !important; }
  ul.pagination { gap: 6px; }
  ul.pagination li a { min-width: 32px; height: 32px; font-size: 12.5px; }
  .products-list_item-row { flex-wrap: wrap; }
  .products-list_item-right { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; }

  /* --- бренды --- */
  .rd-page { padding-top: 14px; padding-bottom: 30px; }
  .rd-pagehead { margin-bottom: 14px; }
  .rd-pagehead h1 { font-size: 20px; }
  .rd-brandsearch { width: 100%; }
  .rd-brands { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .rd-brand { padding: 14px 4px; gap: 8px; }
  .rd-brand__logo { height: 44px; }
  .rd-brand__logo img { max-height: 44px; }
  .rd-brand span.rd-brand__name { font-size: 10.5px; letter-spacing: -.01em; overflow-wrap: anywhere; }

  /* --- корзина --- */
  .rd-cart h1 { font-size: 20px; margin-bottom: 14px; }
  .rd-cart__grid { flex-direction: column; gap: 14px; }
  .rd-cart__totals { width: 100%; position: static; padding: 16px; }
  table.cart-table, table.cart-table tbody, table.cart-table tr, table.cart-table td { display: block; }
  table.cart-table thead { display: none; }
  table.cart-table tr { border: 1px solid var(--line); border-radius: 12px; padding: 12px 12px 12px 88px; position: relative; margin-bottom: 10px; min-height: 88px; }
  table.cart-table td { padding: 0; border: 0; }
  .cart-item-image { position: absolute; left: 12px; top: 12px; width: 64px; }
  .cart-item-name a { font-size: 12.5px; }
  .cart-item-remove { position: absolute; right: 12px; top: 12px; width: auto; }
  .cart-item-quantity { display: inline-block !important; margin-top: 10px; }
  .cart-item-sum { display: inline-block !important; float: right; margin-top: 10px; text-align: right; }
  .cart-item-sum small { display: none; }
  .rd-notice { margin-top: 14px; padding: 14px 16px; }
  .rd-cart__form { margin-top: 22px; max-width: none; }
  .rd-fgrid { grid-template-columns: 1fr; gap: 12px; }
  .rd-cart__submit .rd-btn { width: 100%; min-width: 0; }

  /* --- футер --- */
  .rd-footer .rd-wrap { padding-top: 26px; }
  .rd-footer__top { flex-direction: column; align-items: flex-start; gap: 10px; padding-bottom: 22px; }
  .rd-footer__top img { height: 30px; }
  .rd-footer__tag { margin: 0; font-size: 12px; }
  .rd-footer__cols { grid-template-columns: 1fr 1fr; gap: 22px 16px; padding: 22px 0; }
  .rd-footer__col--info, .rd-footer__col--pay { grid-column: 1 / -1; }
  .rd-footer__col--info ul { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  .rd-footer__h { font-size: 13px; margin-bottom: 10px; }
  .rd-footer p { font-size: 12.5px; }
  .rd-pay img { height: 34px; }
  .rd-footer__copy { font-size: 11px; padding: 16px 0 20px; }

  /* --- попап заявки: шторка снизу --- */
  #fast_order_ff .product-info { padding: 0; position: absolute; inset: 0; display: flex; align-items: flex-end; }
  #fast_order_ff .modal-dialog { width: 100%; max-height: 92vh; overflow-y: auto; }
  #fast_order_ff .modal-content { border-radius: 22px 22px 0 0; }
  #fast_order_ff .modal-header { padding: 16px 20px 14px; }
  #fast_order_ff .modal-body { padding: 16px 20px 24px; }
  #fast_order_ff input.form-control { height: 46px; }
  .success_add_cart { bottom: 80px; width: calc(100% - 32px); text-align: center; }
}

@media (max-width: 640px) {
  .rd-catgrid { grid-template-columns: 1fr 1fr; }
}
