/* ==========================================================================
   muzmagazin.ru — РЕДИЗАЙН (мобильный, тёмная тема)
   Единый стиль. Старые stylesheet.css/carousel.css/nivo отключены в header.php.
   ========================================================================== */

:root{
  /* СВЕТЛЫЙ контент */
  --bg:        #f4f5f7;   /* фон страницы */
  --surface:   #ffffff;   /* карточки/поля */
  --surface-2: #eef0f3;   /* лёгкий серый (чипы, hover) */
  --line:      #e4e7ec;   /* границы */
  --text:      #1b1e25;   /* основной текст */
  --muted:     #6b7280;
  --muted-2:   #9aa1ad;
  --red:       #e1251b;
  --red-2:     #c81e15;   /* hover темнее */
  --red-ink:   #e1251b;   /* цена/ссылки */

  /* ТЁМНЫЙ хром (шапка, таб-бар, меню, drawer) */
  --bg-2:          #14161c;
  --chrome-text:   #eceef2;
  --chrome-muted:  #9a9ea8;
  --chrome-line:   rgba(255,255,255,.10);
  --chrome-surface:#20242c;

  --radius:    14px;
  --radius-sm: 10px;
  --appbar-h:  160px;
  --tabbar-h:  62px;
  --maxw:      720px;
  --maxw-dt:   1240px;
  --sidebar:   222px;
  --font-body: "Manrope",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  --font-head: "Oswald","Manrope",-apple-system,sans-serif;
  --shadow:    0 4px 16px rgba(20,22,28,.08);
}

/* хром тёмный: переопределяем переменные на контейнерах — потомки наследуют */
.rd-appbar, .rd-tabbar, .rd-drawer, #menu{
  --surface:   var(--chrome-surface);
  --surface-2: #2a2f39;
  --text:      var(--chrome-text);
  --muted:     var(--chrome-muted);
  --muted-2:   #7e8490;
  --line:      var(--chrome-line);
}

*,*::before,*::after{ box-sizing:border-box; }

html{ -webkit-text-size-adjust:100%; }
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  font-size:15px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  padding-top:var(--appbar-h);
  padding-bottom:calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  min-width:0;
  overflow-x:hidden;
}

img{ max-width:100%; height:auto; border:0; }
a{ color:var(--red-ink); text-decoration:none; transition:color .15s; }
a:hover{ color:var(--red-2); }
h1,h2,h3,h4,h5{
  font-family:var(--font-head); color:var(--text); line-height:1.15;
  margin:.6em 0 .4em; font-weight:600; letter-spacing:.2px;
}
h1{ font-size:24px; } h2{ font-size:20px; } h3{ font-size:17px; }
p{ margin:.5em 0; }
hr{ border:0; border-top:1px solid var(--line); margin:14px 0; }

/* ---- скрываем легаси-хром --------------------------------------------- */
.vcard,
#menu,
#brend,
.dostavka,
.h1-header{ display:none !important; }

.pagecontent .vcard{ display:block !important; }

/* боковые колонки прячем на мобильном — заменены app-bar/таб-баром/контентом */
#left, #right{ display:none !important; }

/* ======================================================================== */
/*  ВЕРХНЯЯ ПАНЕЛЬ (app-bar)                                                 */
/* ======================================================================== */
.rd-appbar{
  position:fixed; top:0; left:0; right:0; z-index:50;
  background:var(--bg-2);
  border-bottom:1px solid var(--line);
  padding:8px 12px calc(8px + env(safe-area-inset-bottom,0)) ;
  padding-bottom:8px;
}
.rd-appbar__row{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
}
.rd-burger{
  flex:0 0 auto; order:1;
  display:inline-flex; align-items:center; justify-content:center;
  width:38px; height:38px; padding:0; margin:0;
  background:transparent; border:0; color:var(--text); cursor:pointer;
  border-radius:10px;
}
.rd-burger__label{ display:none; }
.rd-burger:active{ background:var(--surface); }

.rd-logo{
  flex:1 1 auto; display:flex; align-items:baseline; gap:4px; order:2;
  font-weight:800; letter-spacing:.2px; line-height:1; color:var(--text);
  font-size:19px;
}
.rd-logo__mark{
  background:var(--red); color:#fff; padding:4px 7px; border-radius:7px;
  font-size:16px; letter-spacing:.5px;
}
.rd-logo__rest{ color:var(--text); font-weight:700; }
.rd-logo__rest i{ color:var(--muted); font-style:normal; font-weight:600; }

.rd-appbar__actions{ flex:0 0 auto; display:flex; gap:4px; order:3; }
.rd-iconbtn{
  display:inline-flex; align-items:center; justify-content:center;
  width:38px; height:38px; color:var(--text); border-radius:10px;
}
.rd-iconbtn:active{ background:var(--surface); }
.rd-cart-link{ position:relative; }
.rd-cart-count{
  position:absolute; top:-4px; right:-4px; min-width:18px; height:18px; padding:0 4px;
  display:inline-flex; align-items:center; justify-content:center; border-radius:999px;
  background:var(--red); color:#fff; border:2px solid var(--bg-2); font-size:10px; font-weight:800;
  line-height:1; font-variant-numeric:tabular-nums;
}
.rd-cart-count[hidden]{ display:none; }
.rd-tab .rd-cart-count{ top:2px; right:calc(50% - 22px); border-color:var(--bg-2); }
.rd-cart-link.is-updated{ animation:rd-cart-pulse .55s ease-out; }
.rd-buy.is-added, .td-cart a[href*="action=buy_now"].is-added{ background:#25834d; }
@keyframes rd-cart-pulse{ 50%{ transform:scale(1.13); color:var(--red); } }
.rd-cart-toast{
  position:fixed; z-index:80; left:16px; right:16px; bottom:calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom));
  display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px;
  border-radius:12px; background:#1b1d23; color:#fff; box-shadow:0 10px 28px rgba(0,0,0,.26);
  font-size:14px; font-weight:700; transform:translateY(12px); opacity:0; transition:opacity .2s ease, transform .2s ease;
}
.rd-cart-toast.is-visible{ opacity:1; transform:translateY(0); }
.rd-cart-toast a{ flex:0 0 auto; color:#fff; background:var(--red); padding:8px 10px; border-radius:8px; font-size:13px; }
@media (min-width:900px){ .rd-cart-toast{ left:auto; right:24px; bottom:24px; width:min(360px, calc(100vw - 48px)); } }

.rd-contact{
  display:flex; flex-direction:column; align-items:center; gap:0;
  margin:5px 0 7px; order:4; flex:0 0 100%;
}
.rd-phone{
  display:block; text-align:center; font-weight:800; font-size:19px; line-height:1.2;
  color:var(--text); letter-spacing:.4px; margin:0;
}
.rd-phone:hover{ color:var(--text); }
.rd-address{
  display:block; max-width:100%;
  color:#f3d36b; font-weight:800; font-size:14px; line-height:1.25;
  text-align:center; text-wrap:balance;
}
.rd-address:hover{ color:#ffe18a; }
.rd-phonebtn{ display:none; }

.rd-search{
  display:flex; align-items:center; gap:8px;
  background:#2d323d; border:1px solid rgba(255,255,255,.18);
  border-radius:12px; padding:0 12px; height:42px;
  order:5; flex:0 0 100%; min-width:0; max-width:100%;
}
.rd-search__ico{ color:#b8bec8; flex:0 0 auto; }
.rd-search__input{
  flex:1 1 auto; min-width:0; height:100%;
  background:transparent; border:0; outline:0;
  color:var(--text); font-size:15px;
}
.rd-search__input::placeholder{ color:#b8bec8; }
.rd-search__submit{
  flex:0 0 auto; height:32px; padding:0 12px; border:0; border-radius:8px;
  background:var(--red); color:#fff; font:700 12px var(--font-body); cursor:pointer;
}
.rd-search__submit:hover{ background:var(--red-2); }
.rd-search{ position:relative; }
.rd-search__suggestions{ position:absolute; z-index:80; top:calc(100% + 8px); left:0; right:0; overflow:hidden; background:#fff; border:1px solid #e1e5ea; border-radius:12px; box-shadow:0 12px 30px rgba(28,38,52,.16); }
.rd-search__suggestion{ display:flex; align-items:center; gap:10px; padding:9px 12px; color:#202632; text-decoration:none; }
.rd-search__suggestion:hover{ background:#f5f7fa; }.rd-search__suggestion-img{width:42px;height:42px;object-fit:contain;flex:0 0 42px}.rd-search__suggestion-name{display:block;font-size:14px;line-height:1.25}.rd-search__suggestion-meta{display:block;margin-top:3px;color:#69717d;font-size:12px}.rd-search__suggestion-price{margin-left:auto;color:var(--red);font-size:13px;font-weight:700;white-space:nowrap}.rd-search__suggestion-all{display:block;padding:11px 12px;border-top:1px solid #edf0f3;color:var(--red);font-size:13px;font-weight:700;text-decoration:none}

button:focus-visible, a:focus-visible, input:focus-visible{
  outline:3px solid rgba(243,211,107,.9); outline-offset:3px;
}
body.rd-drawer-open{ overflow:hidden; }

/* ======================================================================== */
/*  НИЖНИЙ ТАБ-БАР                                                           */
/* ======================================================================== */
.rd-tabbar{
  position:fixed; left:0; right:0; bottom:0; z-index:50;
  display:flex; height:var(--tabbar-h);
  padding-bottom:env(safe-area-inset-bottom,0);
  background:var(--bg-2); border-top:1px solid var(--line);
}
.rd-tab{
  flex:1 1 0; display:flex; flex-direction:column; align-items:center; justify-content:center;
  min-width:0; gap:3px; color:var(--muted); font-size:9px; font-weight:600;
  line-height:1.1; text-align:center;
}
.rd-tab > span:last-child{ max-width:100%; padding:0 2px; overflow-wrap:anywhere; }
button.rd-tab{ background:none; border:none; padding:0; font:inherit; cursor:pointer; }
.rd-tab svg{ width:23px; height:23px; }
.rd-tab.is-active{ color:var(--red-ink); }
.rd-tab:hover{ color:var(--text); }

/* боковое меню-шторка */
.rd-drawer-backdrop{
  position:fixed; inset:0; z-index:55; background:rgba(0,0,0,.55);
  opacity:0; visibility:hidden; transition:opacity .2s;
}
body.rd-drawer-open .rd-drawer-backdrop{ opacity:1; visibility:visible; }

.rd-drawer{
  position:fixed; top:0; bottom:0; left:0; z-index:60; width:82%; max-width:330px;
  background:var(--bg-2); border-right:1px solid var(--line);
  transform:translateX(-102%); transition:transform .25s ease;
  display:flex; flex-direction:column; overflow-x:hidden; overflow-y:auto;
  -webkit-overflow-scrolling:touch; scrollbar-gutter:stable; scrollbar-width:thin;
  scrollbar-color:var(--muted) transparent;
  padding-bottom:env(safe-area-inset-bottom,0);
}
.rd-drawer::-webkit-scrollbar{ width:8px; }
.rd-drawer::-webkit-scrollbar-thumb{ background:var(--muted); border:2px solid var(--bg-2); border-radius:999px; }
body.rd-drawer-open .rd-drawer{ transform:translateX(0); }
.rd-drawer__head{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px; border-bottom:1px solid var(--line);
}
.rd-drawer__title{ font-size:18px; font-weight:800; }
.rd-drawer__close{
  background:transparent; border:0; color:var(--muted); font-size:30px; line-height:1;
  width:36px; height:36px; cursor:pointer;
}
.rd-drawer__search{ display:block; padding:12px 16px 8px; }
.rd-drawer__search-label{ display:block; margin:0 0 6px; color:var(--muted); font-size:12px; font-weight:700; }
.rd-drawer__search-field{ position:relative; display:block; }
.rd-drawer__search-input{
  width:100%; box-sizing:border-box; padding:10px 38px 10px 12px; border:1px solid var(--line);
  border-radius:8px; background:var(--surface); color:var(--text); font:inherit;
}
.rd-drawer__search-input:focus{ outline:0; border-color:var(--red); }
.rd-drawer__search-input::-webkit-search-cancel-button{ display:none; -webkit-appearance:none; }
.rd-drawer__search-clear{
  position:absolute; top:50%; right:5px; transform:translateY(-50%);
  width:30px; height:30px; padding:0; border:0; border-radius:7px;
  background:transparent; color:var(--muted); font-size:22px; line-height:1; cursor:pointer;
}
.rd-drawer__search-clear:hover{ background:var(--surface-2); color:var(--text); }
.rd-drawer__search-clear[hidden]{ display:none; }
.rd-drawer__quick{ display:flex; gap:6px; flex-wrap:wrap; padding:0 16px 10px; }
.rd-drawer__quick button{
  padding:6px 9px; border:1px solid var(--line); border-radius:999px;
  background:transparent; color:var(--muted); font:700 11px var(--font-body); cursor:pointer;
}
.rd-drawer__quick button:hover{ border-color:var(--red); color:var(--text); }
.rd-drawer__results{ margin:0 16px 8px; border:1px solid var(--line); border-radius:10px; overflow:hidden; background:var(--surface); flex-shrink:0; }
.rd-drawer__results[hidden]{ display:none; }
.rd-drawer__results-head{ display:flex; align-items:center; justify-content:space-between; padding:10px 12px 7px; color:var(--muted); }
.rd-drawer__results-title{ font-size:12px; font-weight:700; }
.rd-drawer__results-count{ min-width:24px; padding:2px 7px; border-radius:999px; background:var(--surface-2); text-align:center; font-size:10px; font-weight:800; }
.rd-drawer__results-list{ display:flex; flex-direction:column; }
.rd-drawer__results-list a{ padding:10px 12px; color:var(--text); font-size:14px; font-weight:600; text-align:left; border-top:1px solid var(--line); }
.rd-drawer__results-list a:active{ background:var(--surface-2); }
.rd-drawer__results-list mark{ padding:0; background:transparent; color:var(--red); font-weight:800; }
.rd-drawer__results-list mark.rd-drawer__mark--word{ margin-right:.25em; }
.rd-drawer__nav{ display:flex; flex-direction:column; padding:6px 0; }
.rd-drawer__nav a{
  padding:13px 16px; color:var(--text); font-size:15px; font-weight:600;
  border-bottom:1px solid var(--line);
}
.rd-drawer__nav a:active{ background:var(--surface); }
.rd-drawer__catalog-data{ display:none; }
.rd-drawer__empty{ padding:14px 16px; color:var(--muted); font-size:14px; }
.rd-drawer__sub{ display:flex; flex-direction:column; padding:10px 0; }
.rd-drawer__sub a{ padding:10px 16px; color:var(--muted); font-size:13.5px; }

/* ======================================================================== */
/*  КОНТЕЙНЕР КОНТЕНТА                                                       */
/* ======================================================================== */
#middle, #wrapper, #content{
  width:auto !important; float:none !important;
  margin:0 !important; padding:0 !important; min-width:0 !important;
}
#content{ padding:0 12px 24px !important; max-width:var(--maxw); margin:0 auto !important; }

/* Статистика администратора на главной странице личного кабинета. */
.rd-account-admin-box{ margin:0 0 16px; }
.rd-account-admin-box #boxLogin{ max-width:420px; }

/* Та же статистика на странице «ЛК для своих». */
.rd-cabinet-admin{ margin:20px 0 0; max-width:560px; }
.rd-cabinet-admin #boxLogin{ margin:0; overflow:hidden; border:1px solid var(--line); border-radius:14px; background:var(--surface); box-shadow:var(--shadow); }
.rd-cabinet-admin #boxLogin .top,.rd-cabinet-admin #boxLogin .bottom{ display:none; }
.rd-cabinet-admin #boxLogin .boxheader{ padding:12px 16px; background:var(--chrome); color:#fff; }
.rd-cabinet-admin #boxLogin .boxheader p{ margin:0; font-weight:800; }
.rd-cabinet-admin #boxLogin .boxcontent{ padding:14px 16px 16px; line-height:1.5; }
.rd-cabinet-admin #boxLogin .boxcontent a{ color:var(--red); }

#navigation{
  padding:10px 12px; color:var(--muted); font-size:12px;
  max-width:var(--maxw); margin:0 auto;
}
#navigation a{ color:var(--muted); }

#footer{
  max-width:var(--maxw); margin:0 auto; padding:16px 12px;
  color:var(--muted); font-size:12px; border-top:1px solid var(--line);
}
.rd-footer-notice{
  clear:both; max-width:760px; margin:14px 0 12px; padding:12px 0;
  color:var(--muted); font-size:11px; line-height:1.5;
  border-top:1px solid var(--line);
}
.rd-footer-notice p{ margin:0 0 8px; }
.rd-footer-notice p:last-child{ margin-bottom:0; }

/* мусорные распорки из старого шаблона (в т.ч. между шапкой и меню) */
.clear{ clear:both; }
.clear[style]{ height:0 !important; }

/* ======================================================================== */
/*  БАЗОВЫЕ КОМПОНЕНТЫ (карточки/кнопки/цены) — общий старт                 */
/* ======================================================================== */
.rd-btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  background:var(--red); color:#fff; font-weight:700; font-size:15px;
  border:0; border-radius:12px; padding:12px 18px; cursor:pointer;
  width:100%;
}
.rd-btn:hover{ background:var(--red-2); color:#fff; }
.rd-btn--ghost{ background:var(--surface); color:var(--text); border:1px solid var(--line); }

.price, .productSpecialPrice, .moduleboxnewproductsprice{
  color:var(--red-ink) !important; font-weight:800;
}

/* секции на главной */
.rd-section{ margin:18px 0; }
.rd-section__head{
  display:flex; align-items:center; justify-content:space-between; margin:0 0 12px;
}
.rd-section__title{ font-size:19px; font-weight:800; margin:0; }
.rd-section__more{ font-size:13px; color:var(--red-ink); font-weight:600; }

/* ======================================================================== */
/*  ГЛАВНАЯ                                                                  */
/* ======================================================================== */

.rd-home-hero{
  position:relative; isolation:isolate; overflow:hidden;
  display:grid; grid-template-columns:1fr; min-height:410px;
  margin:4px 0 24px; padding:30px 24px;
  border-radius:22px; color:#fff;
  background:
    radial-gradient(circle at 92% 10%, rgba(225,37,27,.7), transparent 34%),
    linear-gradient(145deg, #181b22 0%, #0f1116 68%, #260b0b 100%);
  box-shadow:0 18px 45px rgba(20,22,28,.18);
}
.rd-home-hero::before{
  content:""; position:absolute; inset:0; z-index:-1; opacity:.17;
  background-image:linear-gradient(rgba(255,255,255,.13) 1px, transparent 1px),linear-gradient(90deg, rgba(255,255,255,.13) 1px, transparent 1px);
  background-size:36px 36px; mask-image:linear-gradient(90deg,#000,transparent 78%);
}
.rd-home-hero__copy{ position:relative; z-index:2; isolation:isolate; align-self:center; max-width:650px; }
.rd-home-hero__copy::before{
  content:""; position:absolute; z-index:-1; inset:-18px -20px;
  border:1px solid rgba(255,255,255,.09); border-radius:18px;
  background:rgba(11,13,18,.48);
  -webkit-backdrop-filter:blur(8px);
  backdrop-filter:blur(8px);
  box-shadow:0 12px 30px rgba(0,0,0,.14);
}
.rd-home-hero__eyebrow{
  display:inline-flex; align-items:center; gap:8px; margin-bottom:14px;
  color:#f3d36b; font-size:11px; font-weight:800; letter-spacing:1.2px; text-transform:uppercase;
}
.rd-home-hero__eyebrow::before{ content:""; width:24px; height:2px; background:var(--red); }
.rd-home-hero h1{
  max-width:620px; margin:0; color:#fff; font-size:42px; line-height:.98;
  letter-spacing:-.7px; text-wrap:balance;
}
.rd-home-hero p{ max-width:560px; margin:18px 0 0; color:#c9ced8; font-size:16px; line-height:1.55; }
.rd-home-hero__actions{ display:flex; flex-wrap:wrap; gap:10px; margin-top:24px; }
.rd-home-hero__primary, .rd-home-hero__secondary{
  min-height:46px; display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:0 18px; border-radius:11px; font:800 14px var(--font-body); cursor:pointer;
}
.rd-home-hero__primary{ border:0; background:var(--red); color:#fff; }
.rd-home-hero__primary:hover{ background:#f0392f; }
.rd-home-hero__secondary{ border:1px solid rgba(255,255,255,.22); color:#fff; background:rgba(255,255,255,.06); }
.rd-home-hero__secondary:hover{ border-color:rgba(255,255,255,.5); color:#fff; background:rgba(255,255,255,.1); }
.rd-home-hero__visual{
  position:absolute; right:-38px; bottom:-24px; height:62%; z-index:1;
  pointer-events:none; opacity:.85;
  -webkit-mask-image:linear-gradient(75deg,transparent,#000 42%);
  mask-image:linear-gradient(75deg,transparent,#000 42%);
}
.rd-home-hero__visual img{ height:100%; width:auto; display:block; }

/* На узком телефоне декоративная иллюстрация не должна ухудшать читаемость. */
@media (max-width:479px){
  .rd-search{ width:100%; }
  .rd-search__submit{ padding:0 10px; }
  .rd-home-hero__visual{ display:none; }
}

.rd-home-categories{ margin:0 0 22px; }
.rd-home-section-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:14px; margin-bottom:12px; }
.rd-home-section-head__kicker{ color:var(--red); font-size:11px; font-weight:800; letter-spacing:1px; text-transform:uppercase; }
.rd-home-section-head h2{ margin:3px 0 0; font-size:25px; }
.rd-home-section-head__all{
  flex:0 0 auto; padding:7px 0; border:0; background:transparent; color:var(--red);
  font:800 13px var(--font-body); cursor:pointer;
}
.rd-home-category-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.rd-home-category-grid a{
  position:relative; min-height:126px; display:flex; flex-direction:column; justify-content:flex-end;
  padding:14px; overflow:hidden; border:1px solid var(--line); border-radius:14px;
  background:var(--surface); color:var(--text); box-shadow:0 5px 16px rgba(20,22,28,.055);
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.rd-home-category-grid a::after{
  content:"→"; position:absolute; right:12px; top:10px; color:var(--muted-2); font-weight:800;
}
.rd-home-category-grid a:hover{ transform:translateY(-3px); border-color:rgba(225,37,27,.48); color:var(--text); box-shadow:0 12px 28px rgba(20,22,28,.1); }
.rd-home-category__icon{
  position:absolute; left:14px; top:8px; color:var(--red); font-family:var(--font-head);
  font-size:37px; line-height:1; opacity:.92;
}
.rd-home-category__icon svg{
  width:38px; height:38px; fill:none; stroke:currentColor; stroke-width:1.7;
  stroke-linecap:round; stroke-linejoin:round;
}
.rd-home-category-grid strong{ font-family:var(--font-head); font-size:17px; line-height:1.08; }
.rd-home-category-grid small{ margin-top:5px; color:var(--muted); font-size:10.5px; line-height:1.3; }

.rd-home-benefits{
  display:grid; grid-template-columns:1fr; margin:0 0 24px; overflow:hidden;
  border:1px solid var(--line); border-radius:16px; background:var(--surface);
}
.rd-home-benefits > *{
  position:relative; display:flex; flex-direction:column; padding:14px 16px 14px 45px;
  border-bottom:1px solid var(--line); color:var(--text);
}
.rd-home-benefits > *:last-child{ border-bottom:0; }
.rd-home-benefits > *::before{
  content:"✓"; position:absolute; left:16px; top:17px; display:grid; place-items:center;
  width:20px; height:20px; border-radius:50%; background:rgba(225,37,27,.1); color:var(--red); font-size:12px; font-weight:900;
}
.rd-home-benefits strong{ font-size:13px; }
.rd-home-benefits span{ color:var(--muted); font-size:11.5px; }

/* порядок колонок: контент (баннер+хиты) сверху, категории под ним */
#middle{ display:flex; flex-direction:column; }
#wrapper{ order:1; }
#left{ order:2; width:auto !important; float:none !important; margin:0 !important; padding:0 12px !important; max-width:var(--maxw); margin:0 auto !important; }

/* в левой колонке оставляем только каталог категорий */
#left #boxCart, #left #boxSearchContent, #left #boxManufacturers,
#left #boxSearch, #left .moduleboxsearch{ display:none !important; }

/* --- промо-баннер (слайдер) --- */
#slider, .nivoSlider{
  position:relative !important; width:100% !important;
  border-radius:var(--radius); overflow:hidden; margin:14px 0 4px;
  background:var(--surface) center/cover no-repeat;
}
#slider img, .nivoSlider img{ display:none !important; }
/* слайсы анимации NivoSlider — должны перекрывать контейнер */
.nivo-slice{ display:block; position:absolute; z-index:5; height:100%; }
.nivo-box{ display:block; position:absolute; z-index:5; }
.nivo-controlNav, .nivo-directionNav, .nivo-caption{ display:none !important; }
table.button-click{ display:none !important; }

/* --- заголовок секции --- */
.h2-cont, #boxPohogietovar > h2, #boxPohogietovar > h1{
  font-size:20px; font-weight:800; margin:20px 0 12px; color:var(--text); padding:0;
}

/* --- сетка карточек «хиты/спецпредложения» --- */
#boxPohogietovar{
  display:grid; grid-template-columns:1fr 1fr; gap:12px;
}
#boxPohogietovar > h1, #boxPohogietovar > h2, #boxPohogietovar > p:empty{ grid-column:1/-1; }

#boxSpecialsContent{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  padding:10px; display:flex; flex-direction:column; gap:6px; min-width:0;
  box-shadow:var(--shadow);
}
#boxSpecialsContent p{ margin:0; }
#boxSpecialsContent .product-img{
  display:flex; align-items:center; justify-content:center;
  background:#fff; border:1px solid var(--line); border-radius:var(--radius-sm);
  padding:8px; aspect-ratio:1/1; overflow:hidden;
}
#boxSpecialsContent .product-img img{ max-height:100%; width:auto; object-fit:contain; mix-blend-mode:normal; }
#boxSpecialsContent b{
  font-weight:600; font-size:13px; line-height:1.3; color:var(--text);
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
#boxSpecialsContent a{ color:var(--text); }
.itemDescriptionPrice{
  margin:0 !important; color:var(--red-ink); font-weight:800; font-size:16px;
}
.productOldPrice{
  color:var(--muted-2); font-weight:500; font-size:12px; text-decoration:line-through;
}

/* --- похожие товары на карточке товара --- */
.rd-related-products{ margin:24px 0 20px; }
.rd-related-products > .h2-cont{ margin:0 0 12px; font-size:22px; }
.rd-related-products__grid{
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px;
}
.rd-related-card{
  display:flex; flex-direction:column; min-width:0; padding:10px;
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  box-shadow:var(--shadow); transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.rd-related-card:hover{
  transform:translateY(-3px); border-color:rgba(225,37,27,.45);
  box-shadow:0 10px 26px rgba(20,22,28,.14);
}
.rd-related-card__media{
  display:flex; align-items:center; justify-content:center; min-height:150px; aspect-ratio:4/3;
  padding:10px; overflow:hidden; background:#fff; border:1px solid var(--line); border-radius:var(--radius-sm);
}
.rd-related-card__media img{ max-width:100%; max-height:170px; width:auto; height:auto; object-fit:contain; }
.rd-related-card__title{
  margin:10px 2px 6px; color:var(--text); font-weight:700; line-height:1.35;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.rd-related-card__price{ margin:0 2px 2px !important; font-family:var(--font-head); font-size:19px; }
.rd-related-card__meta{ margin:2px; color:var(--muted); font-size:12px; }
.rd-related-card--hidden{ display:none; }
.rd-related-more{
  display:flex; align-items:center; justify-content:center; width:100%; min-height:46px; margin:14px 0 0;
  border:1px solid var(--red); border-radius:12px; background:transparent; color:var(--red);
  font:700 14px var(--font-body); cursor:pointer;
}
.rd-related-more:hover{ background:var(--red); color:#fff; }

/* --- сетка категорий «Каталог» --- */
#boxCategories h5{
  font-size:20px; font-weight:800; margin:20px 0 12px; color:var(--text);
}
#categoriesBoxMenu ul#CatNavi{
  list-style:none; margin:0; padding:0;
  display:grid; grid-template-columns:1fr 1fr; gap:10px;
}
#CatNavi li{ margin:0; }
#CatNavi li a{
  display:flex; align-items:center; min-height:54px; height:100%;
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-sm);
  padding:10px 12px; color:var(--text); font-size:13px; font-weight:600; line-height:1.25;
}
#CatNavi li a:hover{ border-color:var(--red); color:var(--text); }
/* вложенные подкатегории в боксе каталога скрываем — только верхний уровень */
#CatNavi li ul{ display:none; }

/* на главной показываем ограниченное число хитов (остальное — в каталоге) */
#boxPohogietovar > div:nth-of-type(n+13){ display:none; }

/* ======================================================================== */
/*  СТРАНИЦА КАТЕГОРИИ / ЛИСТИНГ                                             */
/* ======================================================================== */

/* заголовок и описание категории */
.page{ margin:8px 0 4px; }
.pageItem{ color:var(--muted); font-size:13px; }
.pageItem h1, .page h1{ font-size:22px; font-weight:800; color:var(--text); margin:6px 0; }
/* строка «подпись: значения» (бренды / сортировка / на странице) */
p.manufacturer-sort{ margin:10px 0; }
.left_m{
  float:none !important; width:auto !important; display:block;
  color:var(--muted); font-size:12px; font-weight:700; text-transform:uppercase;
  letter-spacing:.4px; margin:0 0 6px;
}
.left_m_v{
  float:none !important; width:auto !important;
  display:flex; flex-wrap:wrap; gap:6px; align-items:center;
}
.left_m_v a{
  display:inline-flex; align-items:center; padding:6px 11px; border-radius:999px;
  background:var(--surface); border:1px solid var(--line); color:var(--text);
  font-size:12.5px; font-weight:600; line-height:1;
}
.left_m_v a:hover{ border-color:var(--red); }

/* подкатегории — выделенные чипы */
p.manufacturer-sort.parent_category{
  display:flex; flex-wrap:wrap; gap:8px; margin:14px 0;
}
p.parent_category br{ display:none; }
p.parent_category a{
  display:inline-flex; align-items:center; padding:8px 14px; border-radius:999px;
  background:var(--surface-2); border:1px solid var(--line); color:var(--text);
  font-size:13px; font-weight:600;
}
p.parent_category a:hover{ background:var(--red); border-color:var(--red); color:#fff; }

/* строка товара */
table.table-product{
  width:100% !important; border-collapse:collapse; margin:14px 0;
  background:transparent; border:0; display:block;
}
table.table-product tbody{ display:flex; flex-direction:column; gap:12px; }
table.table-product tr{
  display:flex; align-items:stretch; width:100%; height:150px;
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden;
  box-shadow:var(--shadow);
  transition:transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
table.table-product tr:hover{ transform:translateY(-3px); border-color:rgba(225,37,27,.45); box-shadow:0 10px 26px rgba(20,22,28,.14); }
table.table-product td{ border:0 !important; vertical-align:top; padding:10px; }

.td-img{
  flex:0 0 25%; width:25%; min-width:0; max-width:25%; height:130px;
  display:flex; align-items:center; justify-content:center; overflow:hidden;
  background:#fff; border:1px solid var(--line); border-radius:var(--radius-sm);
  margin:10px 0 10px 10px; padding:6px;
}
.td-img img{ max-width:100%; max-height:100%; width:auto; height:auto; object-fit:contain; font-size:0; color:transparent; position:static !important; z-index:auto !important; }
.td-img .zoom2{ display:none !important; }

.td-desc{ flex:1 1 auto; min-width:0; padding-left:12px !important; }
.td-desc > a b{ font-size:15px; font-weight:700; color:var(--text); line-height:1.25; }
.td-desc a{ color:var(--text); }
.td-desc p{
  color:var(--muted); font-size:12.5px; margin:4px 0 0;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.rd-product-listing-note{
  margin:0 0 14px;
  padding:0;
  color:var(--muted);
  font-size:14px;
}

.td-cart{
  flex:0 0 auto; display:flex; flex-direction:column; align-items:flex-end; justify-content:flex-start;
  gap:8px; text-align:right; min-width:120px; padding-top:10px !important;
}
.td-cart .itemDescriptionPrice{ font-size:17px; }
.td-cart .free{ color:var(--muted); font-weight:600; font-size:12.5px; }

/* gif-кнопку «Купить» прячем, делаем красную кнопку */
.td-cart a img{ display:none; }
.td-cart a[href*="action=buy_now"]{
  display:inline-flex; align-items:center; justify-content:center;
  background:var(--red); color:#fff; font-weight:700; font-size:13px; font-family:inherit;
  border-radius:10px; padding:9px 14px; white-space:nowrap; letter-spacing:0;
}
.td-cart a[href*="action=buy_now"]::after{ content:"В корзину"; }
.td-cart a[href*="action=buy_now"]:hover{ background:var(--red-2); }
.rd-product-in-cart{
  display:inline-flex; align-items:center; min-height:35px;
  color:var(--muted); font-size:13px; font-weight:700; white-space:nowrap;
}

@media (max-width:599px){
  table.table-product tbody{ gap:10px; }
  table.table-product tr{
    display:grid; grid-template-columns:104px minmax(0,1fr); grid-template-rows:auto auto;
    height:auto; min-height:154px; align-items:start;
  }
  table.table-product tr:hover{ transform:none; }
  table.table-product .td-img{
    grid-column:1; grid-row:1 / span 2;
    width:94px; max-width:94px; height:134px; margin:10px 0 10px 10px;
  }
  table.table-product .td-desc{
    grid-column:2; grid-row:1; padding:12px 10px 4px 12px !important;
  }
  table.table-product .td-desc > a b{ font-size:14px; }
  table.table-product .td-desc p{ -webkit-line-clamp:2; font-size:12px; }
  table.table-product .td-cart{
    grid-column:2; grid-row:2; min-width:0; width:100%;
    flex-direction:row; align-items:center; justify-content:space-between;
    padding:4px 10px 12px 12px !important; text-align:left;
  }
  table.table-product .td-cart .itemDescriptionPrice{ font-size:17px; }
  table.table-product .td-cart br{ display:none; }
  .td-cart a[href*="action=buy_now"]{ min-height:40px; padding:9px 12px; }
  .td-cart .rd-product-in-cart{ min-height:40px; }
}

/* пагинация */
.navigation, .navigation .right{
  display:flex; align-items:center; gap:6px; flex-wrap:wrap; justify-content:center;
  margin:16px 0; color:var(--muted); font-size:13px;
}
.navigation a{
  display:inline-flex; align-items:center; justify-content:center; min-width:34px; height:34px;
  padding:0 10px; background:var(--surface); border:1px solid var(--line); border-radius:9px;
  color:var(--text); font-weight:600;
}
.navigation a:hover{ border-color:var(--red); }

/* ======================================================================== */
/*  КАРТОЧКА ТОВАРА                                                          */
/* ======================================================================== */
form#cart_quantity{ margin:0; }
form#cart_quantity .page, form#cart_quantity .pagecontent{ width:auto !important; }
.pagecontent h1, #content h1[itemprop="name"]{
  font-size:21px; font-weight:800; line-height:1.25; margin:10px 0 12px; color:var(--text);
}

.pagecontent .rd-info-page{ max-width:760px; margin:0 auto; }
.pagecontent .rd-info-page p{ margin:0 0 16px; }
.rd-info-page__note{
  margin:22px 0 0; padding:16px; background:var(--surface-2);
  border-left:3px solid var(--red); border-radius:0 var(--radius) var(--radius) 0;
}
.rd-info-page__note p:last-child{ margin-bottom:0; }

/* Информационные страницы: одна спокойная композиция вместо legacy-рамок. */
body.rd-info-page #navigation{ display:none; }
body.rd-info-page #content > h1{ margin:0; }
body.rd-info-page .page > b,
body.rd-info-page .pagecontentfooter{ display:none; }
body.rd-info-page .pagecontent{ padding:0; }
body.rd-info-page .rd-info-page{ max-width:none; margin:0; }
body.rd-info-page .rd-info-page .pagecontent{
  padding:22px 18px 30px;
  max-width:760px;
  margin:0 auto;
}
.rd-info-layout{
  max-width:760px;
  margin:0 auto;
  padding:22px 18px 30px;
}
.rd-info-hero{
  padding:22px 20px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.rd-info-hero__eyebrow{
  display:block;
  color:var(--red-ink);
  font-size:12px;
  font-weight:800;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.rd-info-hero h1{ margin:5px 0 10px; font-size:29px; }
.rd-info-hero p{ margin:0; color:var(--muted); line-height:1.55; }
.rd-info-hero p + p{ margin-top:16px; }
.rd-info-grid{
  display:grid;
  gap:10px;
  margin-top:12px;
}
.rd-info-card{
  padding:17px 18px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
}
.rd-info-card h2{ margin:0 0 7px; font-size:20px; }
.rd-info-card p{ margin:0; color:var(--muted); line-height:1.55; }
@media (min-width:900px){
  body.rd-info-page #middle{ max-width:var(--maxw-dt); padding-top:30px !important; }
  .rd-info-layout{ padding-left:0; padding-right:0; }
  body.rd-info-page .rd-info-page .pagecontent{ padding-left:0; padding-right:0; }
  .rd-info-grid{ grid-template-columns:repeat(3, 1fr); align-items:stretch; }
  .rd-info-card{ padding:20px; }
}

/* контентная страница салона: гасим старые <font size> и приводим блок контактов к читаемой типографике */
.pagecontent{
  color:var(--text);
  font-size:15px;
  line-height:1.6;
}
.pagecontent:has(.vcard) > p{ margin:0; }
.pagecontent:has(.vcard) table{
  width:100% !important;
  max-width:100%;
  border-collapse:collapse;
}
.pagecontent:has(.vcard) td{
  display:block;
  width:auto !important;
  padding:0 !important;
}
.pagecontent:has(.vcard) font{
  font-size:inherit !important;
  line-height:inherit;
}
.pagecontent .vcard{
  font-family:var(--font-body);
  font-size:15px;
  line-height:1.55;
  max-width:680px;
  margin:0 auto 22px;
  padding:18px 16px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.pagecontent .vcard *{
  font-family:inherit;
  font-size:inherit !important;
  line-height:inherit;
}
.pagecontent .vcard .category{
  display:inline-block;
  margin:2px 0 4px;
  font-weight:700;
  color:var(--text);
}
.pagecontent .vcard .fn{
  font-weight:800;
}
.pagecontent .vcard .adr{
  font-family:var(--font-head);
  font-size:24px !important;
  line-height:1.12;
  margin:10px 0 0;
  color:var(--text);
}
.pagecontent .vcard h2{
  font-family:var(--font-head);
  font-size:20px !important;
  line-height:1.18;
  margin:14px 0 8px;
  color:var(--red-ink);
}
.pagecontent .vcard ul{
  margin:8px 0 10px;
  padding-left:20px;
}
.pagecontent .vcard li{ margin:3px 0; }
.pagecontent .vcard .workhours{
  display:inline-block;
  white-space:nowrap;
  font-weight:800;
  font-size:18px !important;
}
.pagecontent .vcard a[title*="карте"]{
  display:block;
  margin-top:4px;
  color:var(--red-ink);
  font-weight:800;
}
.pagecontent .vcard a[title*="карте"] img{
  display:block;
  margin-top:8px;
  border-radius:var(--radius-sm);
  border:1px solid var(--line);
}
.pagecontent:has(.vcard) h2{
  font-size:22px;
  margin:22px 0 12px;
}
.pagecontent:has(.vcard) img{
  border-radius:var(--radius-sm);
}

/* preview-страница салона: карта -> контакты -> описание -> скидки */
body.rd-salon-page #content > h1{
  display:none;
}
body.rd-salon-page #content{
  padding-left:0 !important;
  padding-right:0 !important;
}
body.rd-salon-page #navigation{
  display:none;
}
body.rd-salon-page .page{
  margin:0;
  background:transparent;
  border:0;
  box-shadow:none;
}
body.rd-salon-page .page > b,
body.rd-salon-page .pagecontentfooter{
  display:none;
}
body.rd-salon-page .pagecontent{
  padding:0 12px 30px;
}
body.rd-salon-page .pagecontent > p{
  margin:0;
}
body.rd-salon-page .pagecontent .vcard{
  display:none !important;
}
body.rd-salon-page .rd-salon-source{
  display:none !important;
}
.rd-salon-layout{
  display:flex;
  flex-direction:column;
  gap:16px;
  margin:0 0 22px;
  font-family:var(--font-body);
}
.rd-salon-map{
  border-radius:14px;
  overflow:hidden;
  background:#111318;
}
.rd-salon-map__link{
  position:relative;
  display:block;
  color:#fff;
  overflow:hidden;
}
.rd-salon-map__link::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:42%;
  background:linear-gradient(180deg, rgba(20,22,28,0), rgba(20,22,28,.55));
  pointer-events:none;
}
.rd-salon-map__link img{
  display:block;
  width:100%;
  min-height:120px;
  max-height:25vh;
  object-fit:cover;
  border:0 !important;
  border-radius:0 !important;
}
.rd-salon-map__caption{
  position:absolute;
  left:12px;
  bottom:12px;
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:9px 15px;
  border-radius:10px;
  background:rgba(20,22,28,.88);
  color:#fff;
  font-family:var(--font-head);
  font-size:18px;
  font-weight:800;
  letter-spacing:.2px;
  box-shadow:0 8px 26px rgba(0,0,0,.28);
  z-index:1;
}
.rd-salon-card{
  box-sizing:border-box;
  width:min(100%, 760px);
  margin:0 auto;
  padding:18px 16px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.rd-salon-card__kicker{
  margin:0 0 8px;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  line-height:1.2;
  text-transform:uppercase;
  letter-spacing:.45px;
}
.rd-salon-card h2{
  margin:0 0 10px;
  color:var(--text);
  font-family:var(--font-head);
  font-size:25px;
  font-weight:600;
  line-height:1.12;
  letter-spacing:.2px;
}
.rd-salon-contacts{
  border-top:3px solid var(--red);
  background:linear-gradient(135deg, var(--surface) 0%, color-mix(in srgb, var(--surface-2) 60%, var(--surface)) 100%);
  padding-top:14px !important;
  padding-bottom:14px !important;
}
.rd-salon-contacts__grid{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:14px;
}
.rd-salon-contacts__phone{
  display:inline-block;
  margin:0 0 8px;
  color:var(--red-ink);
  font-family:var(--font-head);
  font-size:32px;
  font-weight:600;
  line-height:1;
  letter-spacing:.2px;
  white-space:nowrap;
}
.rd-salon-contacts__address{
  max-width:430px;
  font-weight:700;
  font-size:16px;
  line-height:1.32;
  color:var(--text);
}
.rd-salon-contacts__hours{
  display:flex;
  flex-direction:column;
  flex-wrap:wrap;
  align-items:flex-start;
  justify-content:flex-start;
  gap:8px;
  min-width:0;
}
.rd-salon-contacts__hours span{
  display:inline-flex;
  align-items:center;
  gap:5px;
  flex:0 0 auto;
  max-width:100%;
  min-height:34px;
  padding:7px 10px;
  border-radius:10px;
  background:var(--surface-2);
  font-weight:700;
  white-space:nowrap;
}
.rd-salon-contacts__hours b{
  color:var(--text);
  font-weight:900;
}
.rd-salon-contacts__note{
  margin-top:12px;
  color:var(--muted);
  font-weight:600;
}
.rd-salon-about p{
  max-width:650px;
  margin:0 0 13px;
  color:var(--text);
  font-size:16px;
  line-height:1.55;
}
.rd-salon-about__tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.rd-salon-about__tags span{
  display:inline-flex;
  align-items:center;
  min-height:33px;
  padding:7px 10px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
  color:var(--text);
  font-weight:700;
  white-space:nowrap;
}
.rd-salon-discounts{
  background:linear-gradient(180deg, #fff, #fff7f6);
}
.rd-salon-discounts h2{
  color:var(--red-ink);
}
.rd-salon-discounts ul{
  margin:0 0 12px;
  padding:0;
  list-style:none;
  display:grid;
  gap:8px;
}
.rd-salon-discounts li{
  position:relative;
  padding:10px 12px 10px 34px;
  border-radius:10px;
  background:var(--surface-2);
  font-weight:700;
  line-height:1.35;
}
.rd-salon-discounts li::before{
  content:"";
  position:absolute;
  left:13px;
  top:16px;
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--red);
}
.rd-salon-discounts p{
  margin:0;
  color:var(--text);
  font-weight:600;
}
.rd-salon-gifts{
  background:var(--surface);
}
.rd-salon-gifts__grid{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:14px;
}
.rd-salon-gift{
  display:flex;
  flex-direction:column;
  padding:16px;
  color:var(--text);
  background:var(--surface-2);
  border:1px solid var(--line);
  border-radius:16px;
  transition:border-color .15s, box-shadow .15s;
}
.rd-salon-gift:hover{
  border-color:rgba(225,37,27,.4);
  box-shadow:0 10px 26px rgba(20,22,28,.08);
}
.rd-salon-gift__head{
  display:grid;
  grid-template-columns:auto 1fr;
  grid-template-areas:"ico title" "badge badge";
  align-items:center;
  column-gap:12px;
  row-gap:10px;
}
.rd-salon-gift__ico{
  grid-area:ico;
  flex:0 0 auto;
  display:grid;
  place-items:center;
  width:52px;
  height:52px;
  border-radius:13px;
  color:var(--red);
  background:rgba(225,37,27,.09);
}
.rd-salon-gift__ico svg{
  width:34px; height:34px;
  fill:none; stroke:currentColor; stroke-width:1.9;
  stroke-linecap:round; stroke-linejoin:round;
}
.rd-salon-gift__title{
  grid-area:title;
  flex:1 1 auto;
  min-width:0;
  font-family:var(--font-head);
  font-size:19px;
  font-weight:600;
  line-height:1.12;
  color:var(--text);
}
.rd-salon-gift__badge{
  grid-area:badge;
  justify-self:start;
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:6px;
  height:28px;
  padding:0 11px;
  border-radius:999px;
  background:var(--red);
  color:#fff;
  font-size:11px;
  font-weight:800;
  letter-spacing:.4px;
  text-transform:uppercase;
  white-space:nowrap;
}
.rd-salon-gift__badge svg{
  width:15px; height:15px;
  fill:none; stroke:currentColor; stroke-width:2.4;
  stroke-linecap:round; stroke-linejoin:round;
}
.rd-salon-gift__sub{
  margin:12px 0 14px;
  color:var(--muted);
  font-size:14px;
  line-height:1.4;
}
.rd-salon-gift__tiles{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
.rd-salon-gift__tile{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:16px 8px;
  min-height:96px;
  text-align:center;
  color:var(--text);
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:12px;
  font-size:13px;
  font-weight:600;
  line-height:1.15;
}
.rd-salon-gift__tileico{
  display:grid;
  place-items:center;
  color:var(--red);
}
.rd-salon-gift__tileico svg{
  width:38px; height:38px;
  fill:none; stroke:currentColor; stroke-width:1.9;
  stroke-linecap:round; stroke-linejoin:round;
}
.rd-salon-gift__tile--more{
  color:var(--muted);
  border-style:dashed;
}
.rd-salon-gift__tile--more .rd-salon-gift__tileico{
  color:var(--muted);
}
.rd-salon-gift__more{
  align-self:stretch;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  margin-top:14px;
  min-height:46px;
  padding:0 22px;
  border-radius:11px;
  background:var(--red);
  color:#fff;
  font-family:var(--font-body);
  font-size:14px;
  font-weight:800;
}
.rd-salon-gift:hover .rd-salon-gift__more{
  background:#f0392f;
}
@media (min-width:900px){
  .rd-salon-gift{ padding:22px 24px; }
  .rd-salon-gift__head{ display:flex; align-items:center; gap:12px; }
  .rd-salon-gift__badge{ justify-self:auto; }
  .rd-salon-gift__title{ font-size:22px; }
  .rd-salon-gift__sub{ margin:14px 0 16px; font-size:15px; }
  .rd-salon-gift__tiles{ grid-template-columns:repeat(auto-fit,minmax(112px,1fr)); gap:10px; }
  .rd-salon-gift__tileico svg{ width:42px; height:42px; }
  .rd-salon-gift__more{ align-self:flex-end; margin-top:18px; }
}
.rd-salon-story{
  background:linear-gradient(180deg, #fff, #f7f8fa);
}
.rd-salon-story > h2{
  max-width:640px;
}
.rd-salon-story__grid{
  display:grid;
  gap:12px;
}
.rd-salon-story__item{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:12px;
  padding:12px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
}
.rd-salon-story__item img{
  width:100%;
  aspect-ratio:16/9;
  object-fit:cover;
  border-radius:10px;
}
.rd-salon-story__item h3{
  margin:0 0 6px;
  font-family:var(--font-head);
  font-size:21px;
  font-weight:600;
  line-height:1.12;
  color:var(--text);
}
.rd-salon-story__item p{
  margin:0;
  color:var(--text);
  font-size:15px;
  line-height:1.55;
}

/* раскладываем layout-таблицу карточки в колонку и переупорядочиваем ячейки */
#new_tbl{ display:flex !important; flex-direction:column; width:100% !important; gap:0; }
#new_tbl tbody, #new_tbl tr{ display:contents; }
#new_tbl td{ display:block; width:auto !important; padding:0 !important; }
#new_tbl td[width="220"]{ order:1; }   /* фото */
#new_tbl td.padding-b{ order:2; }      /* краткое описание */
#new_tbl td[width="200"]{ order:3; }   /* цена + корзина */
#new_tbl td.nop{ order:4; }            /* бейджи/баннер */

/* главное фото */
#new_tbl td[width="220"] a.zoom,
#new_tbl td[width="220"]{ }
#new_tbl td[width="220"]{
  background:#fff; border:1px solid var(--line); border-radius:var(--radius);
  padding:16px; margin:0 0 14px; box-shadow:var(--shadow);
  display:flex; align-items:center; justify-content:center;
}
#new_tbl td[width="220"] img{ max-width:100%; height:auto; }

/* цена */
.product-info{ margin:0 0 12px; }
.product-info .itemDescriptionPrice{ display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; }
.product-info .price{ color:var(--red-ink); font-weight:800; font-size:26px; }
.product-info .price .productOldPrice{
  color:var(--muted-2); font-weight:500; font-size:15px; text-decoration:line-through; display:inline;
}
.product-info font{ color:var(--muted) !important; }

/* блок «в корзину» */
.to-cart{
  display:flex; align-items:center; flex-wrap:wrap; gap:10px 12px;
  margin:0 0 16px; padding:16px; color:var(--muted); font-size:13px;
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.to-cart input[type="image"]{ display:none !important; }   /* прячем старую gif-кнопку */
#add-qty{ display:inline-flex; align-items:center; margin:0; flex:0 0 auto; }
#add-qty input[type="text"]{
  width:64px; height:46px; text-align:center; font-size:16px; font-weight:700;
  background:var(--surface); border:1px solid var(--line); border-radius:12px;
  color:var(--text); margin:0;
}
.rd-buy{
  display:block; flex:1 1 180px; width:auto; min-width:0; background:var(--red); color:#fff; border:0;
  font-size:16px; font-weight:700; border-radius:12px; padding:14px; cursor:pointer;
  margin:0;
}
.rd-buy:hover{ background:var(--red-2); }
.rd-product-delivery{
  flex:0 0 100%; display:flex; align-items:center; gap:6px; color:var(--muted); line-height:1.3;
}
.rd-product-delivery > span:first-child{ color:var(--red); font-size:18px; font-weight:800; }
.rd-product-delivery strong{ color:var(--text); font-weight:700; }

#new_tbl td[width="200"] .product-info{
  padding:16px 16px 0; margin:0;
  background:var(--surface); border:1px solid var(--line); border-bottom:0;
  border-radius:var(--radius) var(--radius) 0 0;
}
#new_tbl td[width="200"] .to-cart{
  border-top:0; border-radius:0 0 var(--radius) var(--radius);
  box-shadow:0 4px 16px rgba(20,22,28,.08);
}
.short-description, .short-description .description{
  color:var(--text); font-size:14px; line-height:1.6;
}
.padding-b{
  margin:0 0 12px !important; padding:14px 16px !important;
  background:var(--surface-2); border-radius:var(--radius-sm);
}

/* бейджи доверия / промо-картинка */
#new_tbl td.nop{ margin:6px 0 0; }
#new_tbl td.nop > div[style], #new_tbl td.nop font{
  width:auto !important; float:none !important; margin:0 !important;
}
#new_tbl td.nop font[size="1"]{ display:flex; flex-direction:column; gap:2px; }
#new_tbl td.nop font[size="1"] div{
  display:flex !important; align-items:center; gap:8px;
  padding:10px 12px; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--radius-sm); font-size:13px; color:var(--text); width:auto !important;
}
#new_tbl td.nop font[size="1"] > div:last-of-type{
  max-width:100%; min-width:0; flex-wrap:wrap; overflow-wrap:anywhere; white-space:normal;
}
#new_tbl td.nop a{ color:var(--text); }
#new_tbl td.nop hr{ display:none; }

/* вкладки описания (section-tabs) */
#section-tabs{ margin:18px 0; }
ul.tabs{
  list-style:none; display:flex; gap:8px; padding:0; margin:0 0 12px; flex-wrap:wrap;
}
ul.tabs li a{
  display:inline-block; padding:8px 14px; border-radius:999px;
  background:var(--surface); border:1px solid var(--line); color:var(--text);
  font-size:13px; font-weight:600;
}
ul.tabs li.active a, ul.tabs li a.active, ul.tabs li.tab-current a{ background:var(--red); border-color:var(--red); color:#fff; }
#section-tabs > div.t2, #section-tabs > div.t3, #section-tabs > div.t4{ display:none; }
#section-tabs > div.t1, #section-tabs > div.t2, #section-tabs > div.t3, #section-tabs > div.t4{
  color:var(--text); background:var(--surface); border:1px solid var(--line);
  border-radius:var(--radius); padding:16px; margin-top:0;
}
.catalog-intro{ font-size:13px; }

/* ======================================================================== */
/*  ТИПОГРАФИКА: акценты заголовочным шрифтом                                */
/* ======================================================================== */
.rd-logo, .rd-section__title,
.h2-cont, #boxPohogietovar > h2, #boxPohogietovar > h1,
#boxCategories h5, .pageItem h1, .page h1,
.pagecontent h1, #content h1[itemprop="name"],
.price, .itemDescriptionPrice, .rd-drawer__title{
  font-family:var(--font-head);
}
.price, .itemDescriptionPrice{ letter-spacing:.3px; }

/* подъём карточек при наведении */
#boxSpecialsContent{ transition:transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
#boxSpecialsContent:hover{
  transform:translateY(-3px); border-color:rgba(225,37,27,.45);
  box-shadow:0 10px 26px rgba(20,22,28,.14);
}
.rd-btn, .rd-buy, .td-cart a[href*="action=buy_now"]{ transition:background .15s ease, transform .1s ease; }
.rd-btn:active, .rd-buy:active, .td-cart a[href*="action=buy_now"]:active{ transform:scale(.98); }
#CatNavi li a, p.parent_category a, .left_m_v a{ transition:all .15s ease; }

/* ======================================================================== */
/*  ДЕСКТОП  (≥900px)                                                        */
/* ======================================================================== */
@media (min-width:900px){
  :root{ --appbar-h:128px; }
  body{ padding-top:var(--appbar-h); padding-bottom:0; font-size:15px; }

  /* --- шапка: прилипает к верху при скролле --- */
  .rd-appbar{
    position:fixed; top:0; left:0; right:0; z-index:50;
    display:flex; flex-direction:column; align-items:stretch; gap:0;
    width:100%; margin:0; padding:0;
    background:var(--bg-2);
  }
  .rd-appbar__row{
    display:flex; align-items:center; gap:26px; flex-wrap:nowrap;
    padding:15px max(24px, calc((100% - var(--maxw-dt)) / 2));
  }
  .rd-burger{ display:inline-flex; order:unset; width:44px; height:44px; border:1px solid var(--chrome-line); border-radius:11px; }
  .rd-burger{ width:auto; padding:0 13px; gap:8px; }
  .rd-burger__label{ display:inline; color:var(--chrome-text); font:700 13px var(--font-body); }
  .rd-logo{ order:unset; flex:0 0 auto; font-size:27px; }
  .rd-logo__mark{ font-size:22px; padding:6px 10px; }
  .rd-search{ order:unset; flex:1 1 auto; height:48px; margin:0; max-width:none; }
  .rd-contact{
    order:unset; flex:0 0 auto; display:flex; flex-direction:column; align-items:flex-end;
    margin:0; line-height:1.1; text-align:right;
  }
  .rd-phone{
    font-family:var(--font-head); font-size:21px; font-weight:600; letter-spacing:.4px;
    white-space:nowrap;
  }
  .rd-address{
    font-family:var(--font-body); font-size:14px; font-weight:600; letter-spacing:0;
    color:#f3d36b; margin-top:2px;
    white-space:normal; max-width:280px; text-align:right;
  }
  .rd-appbar__actions{ order:unset; flex:0 0 auto; gap:8px; }
  .rd-phonebtn{ display:none; }
  .rd-iconbtn{ width:44px; height:44px; border:1px solid var(--chrome-line); border-radius:11px; }
  .rd-iconbtn:hover{ background:rgba(255,255,255,.07); color:var(--chrome-text); }

  /* горизонтальное меню-навбар (используем легаси #menu) */
  #menu{
    position:fixed; top:74px; left:0; right:0; z-index:49;
    display:block !important; background:var(--bg-2);
    border-top:1px solid rgba(255,255,255,.06);
  }
  #menu ul{
    list-style:none; display:flex; gap:4px; flex-wrap:wrap; align-items:center;
    margin:0; padding:7px max(24px, calc((100% - var(--maxw-dt)) / 2));
  }
  #menu li{ margin:0; }
  #menu li a{ display:inline-block; padding:9px 15px; border-radius:9px; color:var(--chrome-text); font-weight:600; font-size:14px; letter-spacing:.2px; }
  #menu li a:hover{ background:rgba(255,255,255,.08); color:#fff; }

  /* на desktop нижняя панель не нужна; каталог открывается кнопкой в шапке */
  .rd-tabbar{ display:none !important; }

  /* На широком экране каталог раскрывается как полноценная панель, а не узкий мобильный список. */
  .rd-drawer{ width:min(92vw, 1080px); max-width:none; box-shadow:14px 0 40px rgba(0,0,0,.24); }
  .rd-drawer__nav{
    display:grid; grid-template-columns:repeat(3, minmax(0, 1fr));
    align-content:start; padding:12px 16px 24px;
  }
  .rd-drawer__nav a{ min-height:54px; display:flex; align-items:center; padding:12px 16px; border:1px solid var(--line); margin:-1px 0 0 -1px; }
  .rd-drawer__results-list{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); }
  .rd-drawer__results-list a{ min-height:48px; display:flex; align-items:center; border-top:1px solid var(--line); border-left:1px solid var(--line); }
  .rd-drawer__results-list a:nth-child(3n + 1){ border-left:0; }

  /* --- контейнер: сайдбар + контент --- */
  #middle{
    flex-direction:row; align-items:flex-start; gap:24px;
    max-width:var(--maxw-dt); margin:0 auto !important; padding:20px 16px !important; box-sizing:border-box;
  }
  #wrapper{ order:2; flex:1 1 auto; min-width:0; }
  #content{ padding:0 !important; max-width:none; margin:0 !important; }
  body.rd-salon-page #middle{
    display:block;
    max-width:none;
    padding:24px 0;
  }
  body.rd-salon-page #wrapper{
    width:100% !important;
  }
  body.rd-salon-page .pagecontent{
    padding-left:24px;
    padding-right:24px;
  }
  body.rd-salon-page #left{
    display:block !important;
    width:min(100%, 760px) !important;
    max-width:760px;
    margin:28px auto 0 !important;
    padding:0 24px !important;
    position:static;
  }
  .rd-salon-layout{
    gap:18px;
  }
  .rd-salon-map__link img{
    min-height:320px;
  }
  .rd-salon-map__caption{
    left:18px;
    bottom:18px;
  }
  .rd-salon-card{
    padding:22px 24px;
  }
  .rd-salon-contacts__grid{
    grid-template-columns:minmax(0,1fr) auto;
    align-items:start;
  }
  .rd-salon-contacts__hours{
    overflow:visible;
  }
  .rd-salon-discounts ul{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }
  body:not(.rd-salon-page) #left{
    order:1; flex:0 0 var(--sidebar); width:var(--sidebar) !important; max-width:none;
    margin:0 !important; padding:0 !important; position:sticky; top:150px;
  }
  body.rd-home-page #middle{ display:block; max-width:var(--maxw-dt); padding-top:28px !important; }
  body.rd-home-page #wrapper{ width:100%; }
  body.rd-home-page #left{ display:none !important; }

  .rd-home-hero{ min-height:390px; grid-template-columns:minmax(0,1fr) 360px; padding:48px 54px; border-radius:24px; }
  .rd-home-hero h1{ font-size:64px; }
  .rd-home-hero p{ font-size:17px; }
  .rd-home-hero__visual{
    right:-24px; bottom:auto; top:50%; transform:translateY(-50%);
    height:168%; opacity:1;
    -webkit-mask-image:linear-gradient(90deg,transparent,#000 30%);
    mask-image:linear-gradient(90deg,transparent,#000 30%);
  }
  .rd-home-section-head h2{ font-size:30px; }
  .rd-home-category-grid{ grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
  .rd-home-category-grid a{ min-height:150px; padding:18px; }
  .rd-home-category__icon{ left:18px; top:14px; font-size:43px; }
  .rd-home-category__icon svg{ width:44px; height:44px; }
  .rd-home-category-grid strong{ font-size:20px; }
  .rd-home-category-grid small{ font-size:12px; }
  .rd-home-benefits{ grid-template-columns:repeat(3,1fr); }
  .rd-home-benefits > *{ border-bottom:0; border-right:1px solid var(--line); padding:18px 20px 18px 54px; }
  .rd-home-benefits > *:last-child{ border-right:0; }
  .rd-home-benefits > *::before{ left:20px; top:21px; }
  .rd-home-benefits strong{ font-size:14px; }
  #navigation, #footer{ max-width:var(--maxw-dt); padding-left:24px; padding-right:24px; }

  /* категории в сайдбаре — один столбец-список */
  #boxCategories{ background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:14px 8px; margin-top:0 !important; }
  #boxCategories h5{ margin:0 8px 8px; font-size:18px; }
  #categoriesBoxMenu ul#CatNavi{ display:block; }
  #CatNavi li a{ min-height:0; background:transparent; border:0; border-radius:8px; padding:9px 12px; font-size:14px; }
  #CatNavi li a:hover{ background:var(--surface-2); border:0; }

  /* сетки контента шире */
  #boxPohogietovar{ grid-template-columns:repeat(4,1fr); gap:16px; }
  #boxPohogietovar > div:nth-of-type(n+13){ display:flex; }

  /* промо-баннер крупнее */
  #slider, .nivoSlider{ margin:0 0 8px; }

  /* Главная: карта, заголовок распродажи и товары идут без пустых строк. */
  .rd-main-banner{ margin:0 0 16px; }
  #boxPohogietovar > p:empty{ display:none; }
  .h2-cont, #boxPohogietovar > h2, #boxPohogietovar > h1{ margin:16px 0 12px; }

  /* --- страница товара: фото и единый блок покупки --- */
  #new_tbl{ display:grid !important; grid-template-columns:minmax(0,1.1fr) minmax(340px,.9fr); gap:12px 28px; align-items:start; }
  #new_tbl tbody, #new_tbl tr{ display:contents; }
  #new_tbl td[width="220"]{ order:1; grid-column:1; grid-row:1 / span 2; position:static; min-height:360px; margin:0; }
  #new_tbl td.padding-b{ order:2; grid-column:2; grid-row:1; margin:0 !important; }
  #new_tbl td[width="200"]{ order:3; grid-column:2; grid-row:2; }
  #new_tbl td.nop{ order:4; grid-column:1 / -1; grid-row:3; margin-top:12px; }
  #new_tbl td.nop > div:first-child{ max-width:100%; }
  #new_tbl td.nop font[size="1"]{
    display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px;
  }
  #new_tbl td.nop font[size="1"] > br,
  #new_tbl td.nop font[size="1"] > hr{ display:none; }
  #new_tbl td.nop font[size="1"] > div{ min-height:46px; margin:0 !important; }
  #new_tbl td.nop font[size="1"] > div:last-of-type{ grid-column:1 / -1; }
  .product-info .price{ font-size:30px; }

  /* карточки товара в категориях и подкатегориях — три колонки */
  table.table-product tbody{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
  .rd-related-products__grid{ grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
}

/* широкий десктоп — больше колонок в каталоге */
@media (min-width:1200px){
  #boxPohogietovar{ grid-template-columns:repeat(5,1fr); }
}

/* ======================================================================== */
/*  ФОРМЫ (регистрация / вход / оформление / аккаунт)                        */
/* ======================================================================== */
#content input[type="text"], #content input[type="password"], #content input[type="email"],
#content input[type="tel"], #content input[type="number"], #content input[type="search"],
#content select, #content textarea{
  width:100%; max-width:440px; height:46px; padding:10px 12px;
  background:var(--surface); border:1px solid var(--line); border-radius:12px;
  color:var(--text); font-size:15px; font-family:var(--font-body); outline:none;
  transition:border-color .15s ease, box-shadow .15s ease;
}
#content textarea{ height:auto; min-height:120px; line-height:1.5; }
#content input:focus, #content select:focus, #content textarea:focus{
  border-color:var(--red); box-shadow:0 0 0 3px rgba(225,37,27,.18);
}
#content input::placeholder, #content textarea::placeholder{ color:var(--muted-2); }
#content select{
  appearance:none; -webkit-appearance:none; cursor:pointer; padding-right:38px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239a9ea8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 14px center;
}
/* кол-во на карточке оставляем узким */
#content #add-qty input[type="text"]{ width:64px; max-width:64px; }

#content fieldset{
  border:1px solid var(--line); border-radius:var(--radius);
  padding:16px; margin:0 0 16px; background:var(--surface); box-shadow:var(--shadow);
}
#content legend{
  color:var(--text); font-size:14px; font-weight:700; padding:0 8px;
  font-family:var(--font-head); letter-spacing:.3px;
}
#content label{ color:var(--text); font-size:14px; }
#content .inputRequirement, #content .markProductOutOfStock{ color:var(--muted); font-size:12px; }

/* кнопки-submit и обычные кнопки */
#content input[type="submit"], #content button:not(.rd-buy):not(.rd-drawer__close):not(.rd-del-btn):not(.rd-delivery-btn):not(.rd-btn-checkout):not(.rd-modal-box__close):not(.rd-pickup-btn){
  display:inline-flex; align-items:center; justify-content:center;
  background:var(--red); color:#fff; border:0; border-radius:12px;
  padding:12px 22px; font-size:15px; font-weight:700; font-family:var(--font-body);
  cursor:pointer; transition:background .15s ease, transform .1s ease;
}
#content input[type="submit"]:hover, #content button:not(.rd-buy):not(.rd-drawer__close):not(.rd-del-btn):not(.rd-delivery-btn):not(.rd-btn-checkout):not(.rd-modal-box__close):not(.rd-pickup-btn):hover{ background:var(--red-2); }
#content input[type="submit"]:active{ transform:scale(.98); }

/* старые gif-кнопки делаем читабельными на тёмном фоне */
#content input[type="image"]{
  background:#fff; border-radius:10px; padding:5px 8px; max-width:100%; height:auto;
}
.to-cart input[type="image"], .td-cart input[type="image"]{ display:none !important; }

/* таблицы (корзина, история заказов, сравнение) */
#content table.table-cart, #content #shopping-cart, #content .table-data{ width:100%; border-collapse:collapse; }

/* ======================================================================== */
/*  СТРАНИЦА КАТАЛОГА ИНСТРУМЕНТОВ (rd-cat-page)                             */
/* ======================================================================== */
body.rd-cat-page #navigation{ display:none; }
body.rd-cat-page #left{ display:none !important; }
body.rd-cat-page .page{ margin:0; background:transparent; border:0; box-shadow:none; }
body.rd-cat-page .pagecontentfooter{ display:none; }
body.rd-cat-page #content{ padding-left:0 !important; padding-right:0 !important; }
body.rd-cat-page #content > h1{
  font-family:var(--font-head); font-size:22px; font-weight:700;
  margin:16px 16px 4px; color:var(--text);
}
body.rd-cat-page .pagecontent{ padding:0 0 30px; }
body.rd-cat-page .pagecontent > p:empty,
body.rd-cat-page .pagecontent > br{ display:none; }
body.rd-cat-page .pagecontent > hr{ display:none; }

/* Строка поиска по категориям */
.rd-cat-search{
  position:relative; margin:12px 16px 14px;
}
.rd-cat-search__ico{
  position:absolute; left:14px; top:50%; transform:translateY(-50%);
  color:var(--muted); pointer-events:none;
}
.rd-cat-search__input{
  width:100%; height:46px; padding:0 16px 0 44px;
  background:var(--surface); border:1.5px solid var(--line);
  border-radius:14px; font-size:15px; color:var(--text);
  font-family:var(--font-body); outline:none;
  transition:border-color .15s;
  -webkit-appearance:none;
}
.rd-cat-search__input:focus{ border-color:var(--red); }
.rd-cat-search__input::placeholder{ color:var(--muted-2); }

/* Счётчик результатов поиска */
.rd-cat-empty{
  text-align:center; padding:32px 16px;
  color:var(--muted); font-size:14px; display:none;
}

/* Аккордеон */
.rd-cat-accordion{
  display:flex; flex-direction:column;
  gap:8px; margin:0 16px 16px;
  overflow:visible;
}

.rd-cat-item{
  background:var(--surface);
  border-radius:var(--radius);
  border:1.5px solid var(--line);
  box-shadow:0 2px 8px rgba(20,22,28,.06);
  overflow:hidden;
  transition:border-color .2s, box-shadow .2s;
}
.rd-cat-item.open{
  border-color:var(--red);
  box-shadow:0 4px 18px rgba(225,37,27,.12);
}
.rd-cat-item[hidden]{ display:none; }

/* Заголовок категории */
.rd-cat-toggle{
  display:grid;
  grid-template-columns:44px 1fr auto auto;
  align-items:center; gap:10px;
  padding:13px 14px 13px 12px;
  min-height:62px;
  cursor:pointer; user-select:none;
  background:transparent;
  transition:background .15s;
}
.rd-cat-toggle:active{ background:var(--surface-2); }

.rd-cat-icon{
  width:44px; height:44px;
  background:var(--surface-2); border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  font-size:22px; line-height:1; flex-shrink:0;
  transition:background .2s;
}
.rd-cat-item.open .rd-cat-icon{ background:#fdecea; }

.rd-cat-name{
  font-family:var(--font-head); font-size:16px; font-weight:600;
  color:var(--text); line-height:1.2;
  transition:color .15s;
}
.rd-cat-item.open .rd-cat-name{ color:var(--red-ink); }

.rd-cat-count{
  font-size:11px; font-weight:700;
  color:var(--muted); background:var(--surface-2);
  padding:3px 8px; border-radius:20px;
  white-space:nowrap; flex-shrink:0;
}
.rd-cat-item.open .rd-cat-count{
  background:#fdecea; color:var(--red-ink);
}

.rd-cat-arrow{
  flex-shrink:0; color:var(--muted-2);
  transition:transform .25s ease, color .2s;
}
.rd-cat-item.open .rd-cat-arrow{
  transform:rotate(180deg); color:var(--red-ink);
}

/* Тело аккордеона — подкатегории */
.rd-cat-body{
  max-height:0; overflow:hidden;
  transition:max-height .35s ease;
  border-top:0 solid var(--line);
}
.rd-cat-item.open .rd-cat-body{
  max-height:3000px;
  border-top-width:1px;
}

.rd-cat-body ul{ margin:0; padding:0; list-style:none; }
.rd-cat-body li{ border-bottom:1px solid var(--line); }
.rd-cat-body li:last-child{ border-bottom:0; }

.rd-cat-body li a{
  display:flex; align-items:center; justify-content:space-between;
  padding:13px 16px; gap:8px;
  color:var(--text); font-size:14.5px; font-weight:500;
  text-decoration:none; transition:background .12s, color .12s;
  min-height:48px;
}
.rd-cat-body li a::after{
  content:'›'; font-size:20px; color:var(--muted-2);
  flex-shrink:0; line-height:1;
}
.rd-cat-body li a:hover{ background:var(--surface-2); color:var(--red-ink); }
.rd-cat-body li a:hover::after{ color:var(--red-ink); }

/* Подподкатегории (blockquote / вложенные) */
.rd-cat-body blockquote{
  margin:0; padding:0 16px 0 28px;
  border-left:2px solid var(--line);
}
.rd-cat-body blockquote a{
  font-size:13.5px; color:var(--muted); font-weight:400;
  padding:10px 16px 10px 0;
  min-height:40px;
}
.rd-cat-body blockquote a::after{ font-size:17px; }

.rd-cat-body h3{
  font-family:var(--font-head); font-size:13px; font-weight:700; text-transform:uppercase;
  letter-spacing:.6px; color:var(--muted); margin:0; padding:10px 16px 4px;
  line-height:1.2;
}
.rd-cat-body font{ color:inherit !important; }
.rd-cat-body p:empty{ display:none; }
.rd-cat-body br{ display:none; }

body.rd-cat-page .pagecontent > p:last-of-type,
body.rd-cat-page .pagecontent > ul:last-of-type{ margin:0; padding:0; }
body.rd-cat-page .pagecontent > h4{
  font-family:var(--font-head); font-size:17px; margin:16px 16px 8px;
}
body.rd-cat-page .pagecontent > p > font{ color:var(--muted) !important; font-size:12px !important; }
body.rd-cat-page .pagecontent > p:not(.rd-cat-empty),
body.rd-cat-page .pagecontent > hr,
body.rd-cat-page .pagecontent > h4,
body.rd-cat-page .pagecontent > ul,
body.rd-cat-page .pagecontent > .page > .pageItem > p,
body.rd-cat-page .pagecontent > .page > .pageItem > hr{ display:none; }

@media (min-width:600px){
  .rd-cat-accordion{
    display:grid; grid-template-columns:1fr 1fr;
    align-items:start;
  }
  .rd-cat-item.open{ grid-column:1/-1; }
}

@media (min-width:900px){
  body.rd-cat-page #middle{ max-width:var(--maxw-dt); margin:0 auto; padding:24px; }
  body.rd-cat-page .pagecontent{ padding-left:0; padding-right:0; }
  body.rd-cat-page #content > h1{ margin-left:0; margin-right:0; }
  .rd-cat-accordion{ margin-left:0; margin-right:0; }
  .rd-cat-search{ margin-left:0; margin-right:0; }
}

/* Страницы категорий с товарами: скрыть рекламный текст под заголовком */
#content > h1 + font{ display:none; }

/* Страницы с листингом товаров */
body.rd-product-page p:not(.manufacturer-sort) .left_m{
  font-size:11px; margin-bottom:3px;
}
body.rd-product-page p:not(.manufacturer-sort) .left_m_v{
  gap:6px; margin-bottom:10px;
}
body.rd-product-page p:not(.manufacturer-sort) .left_m_v a{
  padding:5px 12px; font-size:12px; font-weight:600;
  background:transparent; border-radius:6px;
}
body.rd-product-page p:not(.manufacturer-sort) .left_m_v a:hover{
  background:var(--red); border-color:var(--red); color:#fff;
}

/* Фильтр-бар: выпадающие меню брендов и цены */
.rd-filter-bar{
  display:flex; gap:8px; align-items:center; margin:10px 0 14px; flex-wrap:wrap;
}
.rd-dropdown{ position:relative; }
.rd-dropdown-btn{
  display:inline-flex; align-items:center; gap:6px;
  padding:9px 14px; border-radius:10px;
  background:var(--surface); border:1px solid var(--line);
  color:var(--text); font-family:inherit; font-size:13px; font-weight:700;
  cursor:pointer; transition:border-color .15s, color .15s;
}
.rd-dropdown-btn:hover,
.rd-dropdown.open .rd-dropdown-btn{ border-color:var(--red); color:var(--red); }

@media (max-width:599px){
  /* Не полагаемся на flex-gap: в части мобильных Opera он не даёт отступы. */
  body .rd-filter-bar{ display:block; margin-bottom:6px; }
  body .rd-filter-bar .rd-dropdown{
    display:inline-block; min-width:0; margin:0 8px 8px 0;
  }
  body .rd-filter-bar .rd-dropdown-btn{
    width:auto; justify-content:center; padding-left:8px; padding-right:8px;
  }
}
.rd-dd-arrow{ transition:transform .2s; flex-shrink:0; vertical-align:middle; }
.rd-dropdown.open .rd-dd-arrow{ transform:rotate(180deg); }
.rd-dropdown-menu{
  display:none; position:absolute; top:calc(100% + 6px); left:0; z-index:200;
  background:var(--surface); border:1px solid var(--line); border-radius:10px;
  box-shadow:0 8px 24px rgba(20,22,28,.14); padding:6px;
  min-width:300px; max-width:calc(100vw - 16px); box-sizing:border-box;
  max-height:360px; overflow-y:auto;
}
.rd-dropdown.open .rd-dropdown-menu{ display:block; }
.rd-dropdown-menu-grid{
  display:grid; grid-template-columns:1fr 1fr; gap:0;
}
.rd-dd-sort-grid{ grid-template-columns:1fr; }
.rd-dd-category-grid{ grid-template-columns:1fr; }
.rd-dropdown-empty{ padding:9px 12px; color:var(--muted); font-size:13px; }
.rd-dropdown-menu-grid a{
  display:block; padding:9px 12px; border-radius:6px;
  color:var(--text); font-size:13px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  transition:background .12s, color .12s;
}
.rd-dropdown-menu-grid a:hover{ background:var(--red); color:#fff; }
.rd-cat-all{
  grid-column:1/-1;
  border-bottom:1px solid var(--line);
  margin-bottom:4px; padding-bottom:4px;
}
.rd-cat-all a{
  font-weight:700 !important; color:var(--red) !important;
}
.rd-cat-all a:hover{ background:var(--red) !important; color:#fff !important; }
.rd-brand-item{
  display:flex; align-items:center; gap:7px;
  padding:8px 10px; border-radius:6px;
  font-size:13px; font-weight:600; cursor:pointer;
  transition:background .12s; user-select:none;
}
.rd-brand-item:hover{ background:rgba(192,57,43,.08); }
.rd-brand-item input[type="checkbox"]{
  accent-color:var(--red); cursor:pointer; flex-shrink:0;
  width:15px; height:15px;
}
/* Блок диапазона цен */
.rd-price-range{
  padding:10px 8px 4px; border-top:1px solid var(--line); margin-top:4px;
}
/* Dual-range slider */
.rd-range-wrap{
  position:relative; height:22px; margin:4px 0 14px;
  --rd-pf:0%; --rd-pt:100%;
}
.rd-range-wrap::before{
  content:''; position:absolute; top:50%; transform:translateY(-50%);
  left:0; right:0; height:4px; background:var(--line); border-radius:2px;
  pointer-events:none; z-index:1;
}
.rd-range-wrap::after{
  content:''; position:absolute; top:50%; transform:translateY(-50%);
  left:var(--rd-pf); right:calc(100% - var(--rd-pt));
  height:4px; background:var(--red); border-radius:2px;
  pointer-events:none; z-index:2;
}
.rd-range-wrap input[type=range]{
  position:absolute; width:100%; height:100%;
  background:none; -webkit-appearance:none; appearance:none;
  pointer-events:none; top:0; left:0; margin:0; padding:0; z-index:3; border:0;
}
.rd-range-wrap input[type=range]::-webkit-slider-thumb{
  -webkit-appearance:none;
  width:18px; height:18px; border-radius:50%;
  background:var(--red); border:2px solid #fff;
  box-shadow:0 1px 4px rgba(0,0,0,.25); pointer-events:all; cursor:pointer;
}
.rd-range-wrap input[type=range]::-moz-range-thumb{
  width:18px; height:18px; border-radius:50%;
  background:var(--red); border:2px solid #fff;
  box-shadow:0 1px 4px rgba(0,0,0,.25); pointer-events:all; cursor:pointer;
}
.rd-range-wrap input[type=range]::-webkit-slider-runnable-track{ background:none; }
.rd-range-wrap input[type=range]::-moz-range-track{ background:none; }
/* Текстовые поля цены */
.rd-price-range-row{
  display:flex; align-items:center; gap:6px; margin-bottom:8px;
}
.rd-price-range-row input{
  flex:1; min-width:0; padding:7px 8px; border:1px solid var(--line); border-radius:7px;
  font-size:12px; font-family:inherit; background:var(--bg); color:var(--text);
}
.rd-price-range-row span{ color:var(--muted); font-size:12px; flex-shrink:0; }
.rd-price-range-apply{
  display:block; width:100%; padding:8px; background:var(--red); color:#fff;
  border:0; border-radius:7px; font-size:12px; font-weight:700; font-family:inherit;
  cursor:pointer; text-align:center; transition:background .12s;
}
.rd-price-range-apply:hover{ background:var(--red-2); }

.rd-show-more{
  display:block; width:100%; margin:20px 0;
  padding:15px; background:var(--surface);
  border:1px solid var(--line); border-radius:10px;
  font-family:inherit; font-size:14px; font-weight:700;
  color:var(--text); cursor:pointer; text-align:center;
  transition:border-color .15s, color .15s;
}
.rd-show-more:hover{ border-color:var(--red); color:var(--red); }

.rd-main-banner{ margin:0 0 20px; text-align:center; }
.rd-main-banner img{ display:block; width:100%; height:auto; border-radius:8px; }
.rd-discount-access{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;max-width:560px;margin:24px 0 10px;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}
.rd-discount-access .rd-btn{margin:0;text-decoration:none}
@media(max-width:560px){.rd-discount-access{grid-template-columns:1fr}}
.rd-discount-choice{max-width:680px;margin:24px 0;padding:20px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}
.rd-discount-choice h2{margin:0 0 8px;font-size:20px}.rd-discount-choice__item{display:block;padding:11px 0;border-top:1px solid var(--line);cursor:pointer}.rd-discount-choice .rd-btn{margin-top:16px}

.rd-auth{max-width:680px;margin:0 auto;padding:8px 0 28px}.rd-auth__intro{margin-bottom:18px}.rd-auth__intro h1{margin:0 0 10px}.rd-auth__intro p{margin:0;color:var(--muted)}.rd-auth__card,.rd-discount-register{max-width:460px;padding:24px;border:1px solid var(--line);border-radius:16px;background:var(--surface);box-shadow:0 8px 24px rgba(25,31,40,.06)}.rd-auth__field{display:block;margin:0 0 16px;font-weight:700}.rd-auth__field input,.rd-discount-register input{display:block;width:100%;box-sizing:border-box;margin-top:7px;padding:12px 13px;border:1px solid var(--line);border-radius:10px;font:inherit;background:#fff}.rd-auth__field input:focus,.rd-discount-register input:focus{outline:2px solid rgba(226,39,31,.25);border-color:var(--red)}.rd-auth__hint{margin:18px 0 0}.rd-discount-choice .rd-btn--ghost{display:inline-flex;justify-content:center;min-width:130px}.rd-discount-register{margin:22px 0}.rd-discount-register p{margin:0 0 16px}.rd-discount-register .rd-btn{width:100%}
.rd-cabinet-head{display:flex;align-items:baseline;justify-content:space-between;gap:16px}.rd-cabinet-head h1{margin:0}.rd-cabinet-head>a{color:var(--muted);font-size:14px;text-decoration:underline;text-underline-offset:3px}.rd-cabinet-head>a:hover{color:var(--red)}
.rd-service-placeholder{max-width:680px;margin:18px 0;padding:24px;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--muted);font-weight:600}
.rd-service-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:18px}.rd-service-grid .rd-service-placeholder{max-width:none;margin:0;min-height:120px;box-sizing:border-box}@media(max-width:760px){.rd-service-grid{grid-template-columns:1fr}}
.rd-service-grid .rd-discount-choice,.rd-service-grid .rd-service-placeholder{max-width:none;margin:0;min-height:164px;box-sizing:border-box;border:2px solid #cfd4dc;box-shadow:0 2px 8px rgba(25,31,40,.04)}
.rd-service-grid .rd-discount-choice{display:flex;flex-direction:column;align-items:flex-start}
.rd-service-grid .rd-service-placeholder{display:flex;align-items:center}

.rd-service-grid .rd-discount-choice,.rd-service-grid .rd-service-placeholder{border-color:var(--red)}
.rd-discount-choice__active-title{color:var(--red)}
.rd-drawer__nav .rd-drawer__discount-category{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 10px;padding:12px 13px;border:2px solid var(--red);border-radius:10px;background:#fff0ef;color:var(--red);font-weight:800}
.rd-drawer__nav .rd-drawer__discount-category strong{flex:0 0 auto;padding:4px 7px;border-radius:999px;background:var(--red);color:#fff;font-size:12px;line-height:1.2;white-space:nowrap}
@media(max-width:420px){.rd-drawer__nav .rd-drawer__discount-category{align-items:flex-start;flex-direction:column}.rd-drawer__nav .rd-drawer__discount-category strong{align-self:flex-start}}
.rd-discount-access__note{max-width:560px;margin:14px 0 0;color:var(--muted)}
.rd-discount-access__note h2{margin:0 0 6px;font-size:17px;color:var(--text)}
.rd-discount-access__note p{margin:0}

.rd-material-edit{ margin:18px 0 0; }
.rd-material-edit a{ color:var(--red); font-weight:700; text-decoration:underline; }
.rd-material-editor{ max-width:900px; margin:0 auto; }
.rd-material-editor form{ display:grid; gap:16px; }
.rd-material-editor label{ display:grid; gap:6px; font-weight:700; }
.rd-material-editor input, .rd-material-editor textarea{ width:100%; box-sizing:border-box; padding:10px; border:1px solid var(--line); border-radius:8px; font:inherit; font-weight:400; }
.rd-material-editor textarea{ resize:vertical; min-height:280px; }
.rd-material-editor__error{ color:#b42318; font-weight:700; }
.rd-material-editor__cancel{ margin-left:12px; }
.rd-about-menu{ display:flex; align-items:center; }
.rd-about-menu__button{ display:inline-block; padding:9px 15px; border:0; border-radius:9px; background:transparent; color:var(--chrome-text); font:inherit; font-weight:600; font-size:14px; letter-spacing:.2px; cursor:pointer; }
.rd-about-menu__button:hover{ background:rgba(255,255,255,.08); color:#fff; }
.rd-about-popover[hidden]{ display:none; }
.rd-about-popover{ position:fixed; inset:0; z-index:10050; display:flex; justify-content:center; align-items:flex-start; padding:94px 16px 16px; background:rgba(0,0,0,.28); }
.rd-about-popover__panel{ position:relative; width:min(420px,100%); padding:26px 22px 16px; border-radius:12px; background:#fff; box-shadow:0 14px 42px rgba(0,0,0,.26); }
.rd-about-popover__panel a{ display:block; padding:12px 34px 12px 0; border-bottom:1px solid #e9e9e9; color:#252525; font-weight:700; text-decoration:none; }
.rd-about-popover__panel a:last-child{ border-bottom:0; }
.rd-about-popover__panel a:hover{ color:#d42420; }
.rd-about-popover__close{ position:absolute; top:6px; right:10px; border:0; background:transparent; color:#555; font-size:28px; line-height:1; cursor:pointer; }
@media (max-width:767px){ .rd-about-popover{ padding-top:66px; } }
