/* Сравнение «До / После» (Иван 16.11): главный баннер и разделы каталога.
   Две фотографии одного помещения лежат друг на друге в одной рамке; ползунок только открывает/закрывает
   «ДО» (слева) поверх «ПОСЛЕ» (справа) — без сдвига, масштаба и растворения. Пары и тексты — админка «Баннеры». */
.ba { --pos: 16%; --acc: #A42654; /* с самого начала видно готовый офис (Иван 16.11) */ position: relative; overflow: hidden; isolation: isolate; background: #e9e2dc;
  /* в brand-mo.css есть .ba слайдера design.html (aspect-ratio 16/10, тень, скругление) — здесь размер задаёт рамка, иначе низ фото уходил за край */
  aspect-ratio: auto; border-radius: 0; box-shadow: none;
  touch-action: pan-y; -webkit-user-select: none; user-select: none; cursor: ew-resize; -webkit-tap-highlight-color: transparent; }
.ba__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--fp, 50% 88%); /* Иван 16.11: мебель внизу кадра — режем потолок, а не пол */
  pointer-events: none; -webkit-user-drag: none; }
.ba__before { position: absolute; inset: 0; z-index: 1; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba__line { position: absolute; z-index: 3; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px;
  background: #fff; box-shadow: 0 0 10px rgba(0,0,0,.28); pointer-events: none; }
.ba__knob { position: absolute; z-index: 4; left: var(--pos); top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; padding: 0;
  display: grid; place-items: center; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.9); color: #fff; cursor: ew-resize;
  background: rgba(255,255,255,.22); -webkit-backdrop-filter: blur(10px) saturate(1.4); backdrop-filter: blur(10px) saturate(1.4);
  box-shadow: 0 6px 22px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.45); touch-action: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.ba__knob svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.ba:hover .ba__knob, .ba.is-drag .ba__knob { transform: scale(1.08); background: rgba(255,255,255,.3);
  box-shadow: 0 8px 26px rgba(0,0,0,.3), 0 0 0 6px rgba(164,38,84,.22), inset 0 1px 0 rgba(255,255,255,.5); }
.ba__knob:focus-visible { outline: none; box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--acc), 0 6px 22px rgba(0,0,0,.3); }
.ba__tag { position: absolute; z-index: 2; top: 16px; padding: 6px 12px; border-radius: 999px; pointer-events: none;
  font: 600 12px/1 Montserrat, system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #fff;
  background: rgba(30,24,26,.42); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: opacity .2s; }
.ba__tag--l { left: 16px; }
.ba__tag--r { right: 16px; background: var(--acc); }
.ba[data-side="after"] .ba__tag--l, .ba[data-side="before"] .ba__tag--r { opacity: 0; }
/* «в другую сторону» (data-dir="rtl", пробный ?ba=rtl): «ДО» — справа от линии, «ПОСЛЕ» — слева; таблички меняются местами */
.ba[data-dir="rtl"] .ba__before { clip-path: inset(0 0 0 var(--pos)); }
.ba[data-dir="rtl"] .ba__tag--l { left: auto; right: 16px; }
.ba[data-dir="rtl"] .ba__tag--r { right: auto; left: 16px; }
.cbn-ba__ph .ba[data-dir="rtl"] .ba__tag--r { left: 13%; }
/* показ «мебель появляется»: ползунок сам проезжает (длительность — --hd из ba-slider.js) */
.ba.is-hint .ba__before, .ba.is-hint .ba__line, .ba.is-hint .ba__knob { transition: clip-path var(--hd, .7s) cubic-bezier(.65,0,.25,1), left var(--hd, .7s) cubic-bezier(.65,0,.25,1), transform .2s; }
@media (prefers-reduced-motion: reduce) { .ba__knob { transition: none; } .ba.is-hint * { transition: none !important; } }

/* ---------- карточка с текстом и вкладками ---------- */
.ba-card { --acc: #A42654; color: #fff; font-family: Montserrat, system-ui, sans-serif; }
.ba-card__t { margin: 0; font-size: clamp(20px, 2.1vw, 32px); line-height: 1.12; font-weight: 700; color: #fff; text-wrap: balance; }
.ba-card__s { margin: 8px 0 0; font-size: clamp(13px, 1vw, 15px); line-height: 1.45; color: rgba(255,255,255,.86); max-width: 46ch; }
.ba-card__btn { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; padding: 13px 20px; border-radius: 12px;
  background: var(--acc); color: #fff; font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none;
  box-shadow: 0 8px 22px -8px rgba(164,38,84,.7); transition: background .2s, transform .2s; }
.ba-card__btn:hover { background: #8a1f46; transform: translateY(-1px); color: #fff; }
.ba-card__btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.ba-card__btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ba-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.ba-tabs:empty { display: none; }
.ba-tabs button { padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08);
  color: #fff; font: 500 12.5px/1.1 Montserrat, system-ui, sans-serif; cursor: pointer; white-space: nowrap; transition: background .2s, border-color .2s; }
.ba-tabs button:hover { background: rgba(255,255,255,.18); }
.ba-tabs button[aria-selected="true"] { background: #fff; border-color: #fff; color: #2b2226; font-weight: 600; }
.ba-tabs button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- главный баннер: слайд слайдера ---------- */
.bn--ba { background: #e9e2dc; }
.bn--ba .ba { position: absolute; inset: 0; }
.bn--ba .ba-card { position: absolute; z-index: 5; left: 18px; bottom: 18px; width: min(380px, 42%); padding: 16px 18px 18px;
  border-radius: 16px; background: rgba(28,22,25,.55); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.55); }
.bn--ba .ba-card__t { font-size: clamp(18px, 1.55vw, 25px); }
.bn--ba .ba-card__s { font-size: 13px; margin-top: 6px; max-width: none; } /* у .bn p свой узкий max-width в cqw */
.bn--ba .ba-card__btn { margin-top: 12px; padding: 11px 16px; font-size: 14px; }
.bn--ba .ba-tabs { margin-bottom: 10px; }
.bn--ba .ba-tabs button { padding: 6px 10px; font-size: 12px; }
.bn--ba .ba__knob { top: 34%; } /* выше карточки с текстом — у левого края не прячется под неё */ /* выше карточки с текстом — у левого края не прячется под неё */
.slider:has(.bn--ba) { border-radius: 18px; }
@media (max-width: 1100px) and (min-width: 701px) {
  .bn--ba .ba-card { padding: 16px 18px 18px; width: min(400px, calc(100% - 32px)); left: 16px; bottom: 16px; }
  .bn--ba .ba-card__s { display: none; }
}
/* Телефон: только сравнение (остальные баннеры дублируют ролики ниже), фото 4:3 сверху, текст под ним — ничего не закрывает мебель */
@media (max-width: 700px) {
  .slider:has(.bn--ba) { aspect-ratio: auto; height: auto; min-height: 0; background: #2a2226; border-radius: 16px; }
  .slider:has(.bn--ba) .slide:not(.bn--ba), .slider:has(.bn--ba) .slider__dots { display: none; }
  .slider .bn--ba { position: relative; opacity: 1; visibility: visible; display: flex; flex-direction: column; transition: none; }
  .bn--ba .ba { position: relative; inset: auto; aspect-ratio: 4 / 3; }
  .bn--ba .ba__knob { top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; }
  .bn--ba .ba-card { position: static; width: auto; border-radius: 0; padding: 14px 16px 18px; background: #2a2226;
    -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
  .bn--ba .ba-card__s { display: block; font-size: 13px; max-width: none; width: auto; }
  .bn--ba .ba-card__btn { display: flex; justify-content: center; width: 100%; box-sizing: border-box; font-size: 14px; padding: 13px 12px; white-space: nowrap; }
  .ba-tabs { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; margin: -2px -16px 12px; padding: 2px 16px; }
  .ba-tabs::-webkit-scrollbar { display: none; }
  .ba__tag { top: 10px; font-size: 11px; padding: 5px 10px; } .ba__tag--l { left: 10px; } .ba__tag--r { right: 10px; }
}

/* ---------- полоса «Дизайн-проект 0 ₽» с ползунком между рядами товаров (Иван 16.11) ---------- */
.cbn-ba { grid-column: 1 / -1; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 50%; min-height: 250px;
  border-radius: 14px; overflow: hidden; color: #fff; font-family: Montserrat, system-ui, sans-serif;
  background: radial-gradient(60% 140% at 72% 100%, rgba(164, 38, 84, .35), transparent 60%), linear-gradient(100deg, #120c0d 0%, #24191a 45%, #3a2a2b 100%); /* как у .cbn в brand-mo.css */ box-shadow: 0 14px 30px -22px rgba(0,0,0,.6); }
.cbn-ba__txt { position: relative; z-index: 6; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 12px;
  padding: 24px 28px 24px clamp(24px, 3.4vw, 52px); color: #fff; text-decoration: none; }
.cbn-ba__pill { padding: 7px 18px; border-radius: 999px; background: #A42654; font-size: 15px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  box-shadow: 0 6px 18px -6px rgba(164,38,84,.8); }
.cbn-ba__txt strong { font-size: clamp(26px, 2.6vw, 40px); line-height: 1.05; font-weight: 800; letter-spacing: -.01em; }
.cbn-ba__txt em { font-style: normal; color: #A42654; white-space: nowrap; }
.cbn-ba__txt small { font-size: clamp(13px, 1.1vw, 17px); line-height: 1.4; color: rgba(255,255,255,.86); }
.cbn-ba__go { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14px;
  border: 1px solid rgba(255,255,255,.35); transition: background .2s, border-color .2s; }
.cbn-ba__go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cbn-ba__txt:hover .cbn-ba__go { background: #A42654; border-color: #A42654; }
.cbn-ba__ph { position: relative; min-height: 100%; }
.cbn-ba__ph .ba { position: absolute; inset: 0; }
.cbn-ba__ph .ba__tag--l { left: 13%; }
.cbn-ba__ph .ba__knob { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
.cbn-ba__fade { position: absolute; z-index: 5; left: 0; top: 0; bottom: 0; width: 11%; pointer-events: none;
  background: linear-gradient(90deg, #2a1e1f, rgba(42,30,31,0)); }
/* как слайд внутри полосы .cbn (рядом со слайдом «низкие цены»): размер задаёт полоса */
.cbn .cbn-ba { min-height: 0; border-radius: 0; box-shadow: none; background: none; } /* фон даёт сама полоса — как у слайда «низкие цены» */
.cbn .cbn-ba__txt strong { font-size: clamp(24px, 2.4vw, 38px); }
.cbn:has(.cbn-ba.is-on) .cbn__dots { z-index: 7; }
@media (max-width: 760px) {
  .cbn:has(.cbn-ba) { aspect-ratio: 1.9 / 1; }
  .cbn .cbn-ba { grid-template-columns: 1fr; }
  .cbn .cbn-ba__ph { position: absolute; inset: 0 0 0 34%; }
  .cbn .cbn-ba__fade { display: block; width: 22%; }
  .cbn .cbn-ba__txt { padding: 12px 14px; gap: 6px; max-width: 46%; text-shadow: 0 1px 8px rgba(0,0,0,.8); }
  .cbn .cbn-ba__txt strong { font-size: 20px; } .cbn .cbn-ba__txt small, .cbn .cbn-ba__go { display: none; }
  .cbn .cbn-ba__pill { font-size: 11px; padding: 5px 11px; }
  .cbn .cbn-ba__ph .ba__tag--l { left: 24%; } .cbn .ba__tag { font-size: 10px; padding: 4px 8px; top: 8px; }
  .cbn .cbn-ba__ph .ba__knob { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
}

/* ---------- блок в разделе каталога (под товарами, не перекрывает их) ---------- */
.ba-sec { margin: 28px 0 8px; display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(260px, 1fr); border-radius: 18px; overflow: hidden;
  background: #2a2226; box-shadow: 0 14px 34px -22px rgba(0,0,0,.6); }
.ba-sec .ba { aspect-ratio: 16 / 10; }
.ba-sec .ba-card { padding: clamp(18px, 2.4vw, 32px); align-self: center; }
.ba-sec .ba-card__k { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #e7a3bd; }
@media (max-width: 900px) {
  .ba-sec { grid-template-columns: 1fr; }
  .ba-sec .ba { aspect-ratio: 4 / 3; }
  .ba-sec .ba-card__btn { display: flex; justify-content: center; }
}
