/* Визуальная доводка (локально, 29.10.2026). Подключается из чанка head после остальных CSS. */

/* Мобильная шапка: иконки (в т.ч. корзина с цифрой) не должны вылезать за экран */
@media (max-width: 480px) {
  .top-menu.top-menu--new .menu-line .items-menu > .item { padding: 0 10px; }
  body { overflow-x: clip; }
}

/* Счётчики сравнения и корзины: круглый бейдж у правого верхнего угла иконки (раньше залезал на тёмное меню) */
.top-menu .menu-line .items-menu .item .count {
  top: 10px; bottom: auto; left: calc(50% + 4px); right: auto;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  font-size: 12px; line-height: 18px; text-align: center; box-sizing: border-box;
}
.top-menu .menu-line .items-menu .item .count .triangle { display: none; }
@media (max-width: 960px) {
  .top-menu .menu-line .items-menu .item .count { top: 6px; left: calc(50% + 2px); }
}

/* Слайдеры на главной: убраны фиксированные высоты и отрицательные отступы (давали огромные пустоты) */
.new-product .owl-stage-outer { height: auto; padding: 0 10px 300px; margin-bottom: -300px; } /* запас снизу — для всплывающих параметров карточки */
.new-product.solutions .owl-stage-outer { height: auto; }
.new-product.solutions { margin: 0; }
.new-product .owl-dots, .new-product.solutions .owl-dots { position: static; margin: 12px 0 0; padding: 0; width: 100%; text-align: center; }
.new-product .owl-nav, .new-product.solutions .owl-nav { top: 110px; }
.new-product.slider { padding-bottom: 20px; }
.new-product .owl-nav .owl-prev, .new-product .owl-nav .owl-next {
  width: 44px; height: 44px; border-radius: 50%; background-color: #fff; background-size: 14px; opacity: 1;
  box-shadow: 0 2px 10px rgba(0,0,0,.18); transition: background-color .15s;
}
.new-product .owl-nav .owl-prev:hover, .new-product .owl-nav .owl-next:hover { background-color: #fad500; }
.new-product .owl-nav .owl-prev { left: 4px; }
.new-product .owl-nav .owl-next { right: 4px; }

/* Мини-корзина: показывать только одно состояние (раньше обе иконки лежали друг на друге) */
#msMiniCart .not_empty { display: none; }
#msMiniCart.full .not_empty { display: flex; }
#msMiniCart.full .empty { display: none; }

/* Вкладка «Cookie Policy» убрана: настройки открываются ссылкой «Настройки cookie» в подвале */
.cc-revoke { display: none !important; }
.cc-settings-link { white-space: nowrap; }

/* Cookie-плашка: компактная, на мобильном не закрывает четверть экрана */
.cc-window.cc-banner { align-items: center; gap: 8px; }
@media (max-width: 680px) {
  .cc-window.cc-banner { flex-direction: column; padding: 10px 12px !important; font-size: 13px; line-height: 1.35; }
  .cc-window.cc-banner .cc-message { margin: 0 0 6px; flex: none; }
  .cc-window.cc-banner .cc-compliance { width: 100%; display: flex; gap: 8px; }
  .cc-window.cc-banner .cc-btn { flex: 1 1 0; padding: 8px 10px !important; font-size: 14px; }
}

/* ===== Главная: плитки-разделы настоящими блоками (было 5 картинок с текстом внутри) ===== */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 30px; }
.tiles__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.tile {
  --bg: #fff; display: flex; align-items: stretch; background: var(--bg); color: #3b3e4a; text-decoration: none;
  overflow: hidden; border-radius: 16px; transition: box-shadow .2s, transform .2s;
}
.tile:hover { color: #3b3e4a; box-shadow: 0 8px 24px rgba(9, 28, 44, .12); transform: translateY(-4px); }   /* тень при наведении как у карточек товаров (HTML2) */
.tile:hover .tile__title { text-decoration: underline; }
.tile--yellow { --bg: #ffe75f; } .tile--white { --bg: #fff; } .tile--mint { --bg: #aaf6ac; } .tile--blue { --bg: #aae3f7; }
.tile--rev { flex-direction: row-reverse; }
.tile--lg { min-height: 300px; } .tile--sm { min-height: 140px; }
.tile__img { flex: 0 0 auto; display: block; height: auto; max-width: 54%; object-fit: cover; align-self: stretch; width: auto; }
.tile--sm .tile__img { max-width: 62%; }
.tile--lg .tile__img { height: 100%; }
.tile__body { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; padding: 20px 24px; min-width: 0; }
.tile__label { font-size: 15px; color: #6b7384; opacity: .85; margin-bottom: 4px; }
.tile__title { font-size: 24px; line-height: 1.2; font-weight: 700; margin-bottom: 12px; }
.tile--sm .tile__title { font-size: 22px; margin-bottom: 0; }
.tile--blue .tile__title { margin-bottom: 8px; }
.tile__li { position: relative; padding-left: 26px; margin-top: 8px; font-size: 16px; line-height: 1.3; }
.tile__li::before { content: ""; position: absolute; left: 0; top: .65em; width: 14px; height: 1.5px; background: currentColor; }
.tile--sm .tile__body { padding: 14px 16px; }
@media (max-width: 1290px) { .tile__title { font-size: 21px; } .tile--sm .tile__title { font-size: 19px; } .tile__li { font-size: 15px; } }
@media (max-width: 960px) {
  .tiles { grid-template-columns: 1fr; gap: 14px; }
  .tiles__pair { gap: 14px; }
  .tile--lg { min-height: 0; } .tile--lg .tile__img { height: auto; max-width: 46%; align-self: center; }
  .tile--lg .tile__body { padding: 16px 18px; }
}
@media (max-width: 480px) {
  .tiles__pair { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile--sm { flex-direction: column; min-height: 0; }
  .tile--sm .tile__img { max-width: 100%; width: 100%; height: 96px; }
  .tile--sm .tile__body { padding: 10px 12px 12px; }
  .tile--sm.tile--rev { flex-direction: row-reverse; } /* длинная плитка «диваны» остаётся горизонтальной */
  .tile--blue .tile__img { max-width: 48%; width: auto; height: auto; }
  .tile--blue { min-height: 110px; }
  .tile__title { font-size: 19px; } .tile--sm .tile__title { font-size: 17px; } .tile__label { font-size: 13px; } .tile__li { font-size: 14px; padding-left: 22px; }
}
/* ===== Шапка: иконки 24×24 одной толщины, область наведения/клика — вся ячейка, бейдж в правом верхнем углу ячейки ===== */
.top-menu .menu-line .items-menu .item svg,
.top-menu .menu-line .items-menu > .item svg,
.top-menu.top-menu--new .menu-line .items-menu > .item svg,
.top-menu .burger svg { width: 24px !important; height: 24px !important; fill: none !important; stroke: #3a3d49; stroke-width: 2; vertical-align: middle; }
@media (max-width: 960px) {
  .top-menu.top-menu--new .menu-line .items-menu .item svg { stroke: #fff; }
  .top-menu.top-menu--new .menu-line .items-menu .item.logo-mob svg { stroke: none; fill: #fff !important; width: auto !important; }
}
.top-menu .burger svg { stroke: #fff; }
.top-menu .burger.active svg { stroke: #2877bc; background: none; }
.top-menu .menu-line .items-menu .item > img { width: 24px; height: 24px; vertical-align: middle; }
/* ссылка занимает всю ячейку (раньше кликалась только сама иконка) */
.top-menu .menu-line .items-menu > .item > a,
.top-menu .menu-line .items-menu > .item > a.cart { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 0; line-height: 1; }
.top-menu .menu-line .items-menu > a.item:not(.logo-mob):not(.top-menu__contacts) { display: flex; align-items: center; justify-content: center; line-height: 1; }
@media (min-width: 961px) { .top-menu .menu-line .items-menu > a.item.top-menu__contacts { display: flex; align-items: center; justify-content: center; line-height: 1; } }
/* бейдж: правый верхний угол ячейки */
.top-menu .menu-line .items-menu .item .count,
.top-menu.top-menu--new .menu-line .items-menu .item .count {
  top: 8px; right: 10px; left: auto; bottom: auto; transform: none; margin: 0;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; box-sizing: border-box;
  font-size: 12px; line-height: 18px; text-align: center;
}
@media (max-width: 960px) {
  .top-menu .menu-line .items-menu .item .count, .top-menu.top-menu--new .menu-line .items-menu .item .count { top: 2px; right: 0; }
}

/* ===== Корзина: крестик по центру, SVG; «Очистить корзину» — одна понятная кнопка ===== */
#msCart .basket-products .product .remove form { height: 100%; margin: 0; }
#msCart .remove .btn.cart-remove-btn {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 56px; padding: 0;
  border: 0; border-radius: 0; background: none; color: #7b8494; cursor: pointer; transition: color .15s, background-color .15s;
}
#msCart .remove .btn.cart-remove-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
#msCart .remove .btn.cart-remove-btn:hover { color: #d9534f; background: #fdf1f0; }
#msCart .basket-products .itog form.remove { max-width: none; width: auto; border: 0; align-self: center; }
#msCart .btn.cart-clean-btn {
  display: inline-flex; align-items: center; gap: 8px; width: auto; height: auto; padding: 10px 14px; border: 1px solid #d5dbe3; border-radius: 4px;
  background: #fff; color: #5b6475; font-size: 14px; line-height: 1; cursor: pointer; transition: color .15s, border-color .15s;
}
#msCart .btn.cart-clean-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
#msCart .btn.cart-clean-btn:hover { color: #d9534f; border-color: #d9534f; }
/* корзина: пустое обязательное поле после попытки отправить заказ */
#msOrder .ss-invalid { border-color: #e5484d !important; box-shadow: 0 0 0 2px rgba(229,72,77,.18); }
#msOrder input.ss-invalid:focus, #msOrder textarea.ss-invalid:focus { border-color: #2d78bd !important; }

/* корзина на телефоне: картинка товара не на всю ширину */
@media (max-width: 680px) {
  .basket-products .product .image { text-align: center; }
  .basket-products .product .image img { width: 160px; max-width: 60%; height: auto; margin: 0 auto; }
}

/* сравнение: кнопка «Перейти в каталог» на пустой странице - как остальные жёлтые кнопки сайта */
.cmp-empty .btn { background: #fad500; color: #2b2e3a; display: inline-block; padding: 14px 28px; border-radius: 4px; font-weight: 700; text-decoration: none; }
.cmp-empty .btn:hover { background: #ffe14d; color: #2b2e3a; }

/* тексты городских разделов (tools/city-texts.php): подзаголовок не размером с H1 */
.info-catalog .text h3 { font-size: 24px; line-height: 1.3; font-weight: 500; margin: 28px 0 12px; text-align: left; }
@media (max-width: 560px) { .info-catalog .text h3 { font-size: 19px; margin-top: 22px; } }

/* десктоп: текст раздела - колонка удобной для чтения ширины (≈75 знаков в строке), заголовок поменьше */
@media (min-width: 992px) {
	.info-catalog h2 { max-width: 820px; margin-left: auto; margin-right: auto; font-size: 32px; line-height: 1.25; }
	.info-catalog .text { max-width: 820px; margin: 32px auto 0; }
	.info-catalog .text p { font-size: 17px; line-height: 1.7; margin-bottom: 20px; }
}

/* карточки каталога: цена на 4px ниже строки с производителем (старая цена налезала на неё) */
.new-product .item .cost { margin-top: 14px; }

/* фильтры: жёлтая кнопка «Сбросить» не нужна (на неё нажимает мобильная ссылка из темы, display:none этому не мешает); «Сбросить фильтры» - на всю ширину блока */
#mse2_filters button.btn.reset { display: none; }
#mse2_filters .cf-reset { display: block; width: 100%; max-width: none; box-sizing: border-box; height: auto; line-height: 1.3; }

/* скругления 16px как в блоке фильтров (вёрстка HTML2): карточки товаров и левые блоки «Каталог мебели» / «Готовые решения» */
.new-product .item .in { border-radius: 16px; overflow: hidden; background: #fff; }
.new-product .item.hover:hover .in { border-radius: 16px 16px 0 0; }
.new-product .item .params { border-radius: 0 0 16px 16px; }
@media (min-width: 961px) {
  .filters .dropitem { border-radius: 16px; overflow: hidden; }
}

/* всплывающие сообщения (корзина, сравнение): фирменный синий, белые текст и значки, жёлтая полоска времени */
body .iziToast.iziToast-color-green, body .iziToast.iziToast-color-blue { background: #2877bc; border-color: #2877bc; box-shadow: 0 8px 24px rgba(9, 28, 44, .25); }
body .iziToast.iziToast-color-green .iziToast-message, body .iziToast.iziToast-color-blue .iziToast-message,
body .iziToast.iziToast-color-green .iziToast-title, body .iziToast.iziToast-color-blue .iziToast-title { color: #fff; }
body .iziToast.iziToast-color-green .iziToast-icon, body .iziToast.iziToast-color-blue .iziToast-icon,
body .iziToast.iziToast-color-green > .iziToast-close, body .iziToast.iziToast-color-blue > .iziToast-close { filter: brightness(0) invert(1); opacity: 1; }
body .iziToast.iziToast-color-green .iziToast-progressbar > div, body .iziToast.iziToast-color-blue .iziToast-progressbar > div { height: 3px; background: #fcd500; }

/* логотип из вёрстки HTML2 (svg: белый текст, жёлтая линия) на фирменном синем */
.top-menu .logo { background: #2877bc; display: flex; align-items: center; justify-content: center; box-sizing: border-box; padding: 0 48px; }
.top-menu .logo .big { width: 100%; height: auto; max-width: none; }   /* слева и справа от логотипа по 48px */
.top-menu .logo .small { width: 144px; height: auto; max-width: none; }

/* левые блоки «Каталог мебели» / «Готовые решения»: без серых линий под белым фоном */
.filters .dropitem .dropitem-title, .filters .dropitem ul.info { border-bottom: 0; }
/* раскрытый блок: линия между заголовком и списком, линии между пунктами */
.filters .dropitem.open .dropitem-title { border-bottom: 1px solid #efefef; }
.filters .dropitem .info a { border-bottom-color: #efefef; }
.filters .dropitem > .info > li + li { margin-top: 12px; padding-top: 12px; border-top: 1px solid #efefef; }
.tile .tile__img, .tile:hover .tile__img { box-shadow: none; filter: none; }

/* главная: блок преимуществ на синеватом фоне, 32px под плитками */
.main_banner { padding-top: 32px; padding-bottom: 32px; }   /* отступы синеватого фона сверху и снизу */
@media (min-width: 961px) {   /* на телефоне блок преимуществ скрыт темой */
  .main_banner { padding-bottom: 0; }
  .pluses { background: #dde9f3; padding: 32px 0 22px; border: 0; }
}
/* тень нижних плиток не должна обрезаться следующим блоком (преимущества на том же фоне) */
.main_banner { position: relative; z-index: 1; }
/* плитки «Кухни» и «Модульные диваны» (картинка справа): отступ текста слева 32px */
@media (min-width: 561px) { .tile--rev .tile__body { padding-left: 32px; } }
/* плитки «Спальни» и «Детские» (картинка слева): отступ текста от картинки 32px */
@media (min-width: 561px) { .tile--sm:not(.tile--rev) .tile__body { padding-left: 32px; } }
@media (min-width: 561px) { .tile--sm:not(.tile--rev) .tile__img { max-width: 52%; object-position: left center; } }   /* чтобы «Спальни» помещались при отступе 32px */
@media (min-width: 561px) { .tile--sm:not(.tile--rev) .tile__img { max-width: 140px; } .tile--sm:not(.tile--rev) .tile__body { padding-right: 32px; } }   /* справа от текста тоже 32px */

/* «Популярные разделы каталога»: 64px от синеватого фона до заголовка, карточки со скруглением 16px и подъёмом при наведении */
.populars { padding-top: 64px; }
.populars .h1 { margin-top: 0; }
.populars .items .item { border-radius: 16px; transition: box-shadow .2s, transform .2s; }
.populars .items .item:hover { background-color: #fff; box-shadow: 0 8px 24px rgba(9, 28, 44, .12); transform: translateY(-4px); text-decoration: none; }
.populars .items .item:hover .name { text-decoration: underline; }
/* «Популярные разделы»: между белыми карточками по 8px */
@media (min-width: 961px) {
  .populars .items { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .populars .items .item { width: auto; margin: 0; }
}
/* кнопки под «Популярными разделами»: скругление 8px, одинаковая ширина, «Готовые решения» фирменным графитовым */
.populars .more { border-radius: 8px; width: 280px; text-align: center; box-sizing: border-box; }
.populars .more:last-of-type { background-color: #3a3d49; }
.populars .more:last-of-type:hover { background-color: #4a4e5c; }
.populars .more, .populars .more:hover { color: #fff; }
.populars .more:after { filter: brightness(0) invert(1); }   /* стрелка жёлтая в png, красим в белый */
/* карточка при наведении (z-index 9999) не должна перекрывать стрелки слайдера «Новинки» */
.new-product .owl-nav, .new-product .owl-nav.no { z-index: 10000 !important; }   /* тема при наведении на карточку ставит nav.no с z-index:-1 !important */

/* главная, нижние блоки: скругление 16px (как у карточек и фильтров) */
.info-index, .plus-info .item, .news .item { border-radius: 16px; }
.news .item { overflow: hidden; }

/* карточки товаров при наведении (слайдеры, каталог): подъём на 4px, тень как в HTML2 без рамки; запас сверху у слайдера, чтобы тень не обрезалась */
.new-product .item { transition: box-shadow .2s, transform .2s; }
.new-product .item.hover { box-shadow: 0 8px 24px rgba(9, 28, 44, .12); outline: 0; transform: translateY(-4px); }
.new-product .owl-stage-outer { padding-top: 30px; margin-top: -30px; }

/* ===== фото товара на телефоне: окно с листанием и увеличением (assets/js/gallery-lightbox.js) ===== */
#msGallery { position: relative; }
.ssl-zoom { display: block; position: absolute; z-index: 25; cursor: pointer; border: 0; }
@media (max-width: 960px) {
  .ssl-zoom {
    display: block; position: absolute; top: 0; right: 0; z-index: 25; width: 42px; height: 42px; padding: 0; border: 0; cursor: pointer;
    background: #2877bc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='9' cy='9' r='6.5'/%3E%3Cpath d='M14 14l6 6'/%3E%3C/svg%3E") center / 22px no-repeat;
    opacity: .9;
  }
  #msGallery .fotorama__fullscreen-icon { display: none !important; }
}
.ssl { position: fixed; inset: 0; z-index: 100000; background: #0c0c0c; display: flex; flex-direction: column; touch-action: none; user-select: none; -webkit-user-select: none; }
.ssl__bar { position: absolute; top: 0; left: 0; right: 0; z-index: 3; height: 56px; padding: 0 8px 0 16px; display: flex; align-items: center; justify-content: space-between; color: #fff; font-size: 15px; background: linear-gradient(rgba(0, 0, 0, .55), transparent); pointer-events: none; }
.ssl__close { pointer-events: auto; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M2 2l12 12M14 2L2 14'/%3E%3C/svg%3E") center / 16px no-repeat; cursor: pointer; }
.ssl__view { position: relative; flex: 1; overflow: hidden; touch-action: none; }
.ssl__track { display: flex; height: 100%; will-change: transform; }
.ssl__slide { flex: 0 0 100%; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ssl__slide img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; will-change: transform; pointer-events: none; -webkit-user-drag: none; }
.ssl__nav { position: absolute; top: 50%; z-index: 3; width: 44px; height: 64px; margin-top: -32px; border: 0; background: rgba(255, 255, 255, .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='20' viewBox='0 0 12 20' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 2L2 10l8 8'/%3E%3C/svg%3E") center / 12px no-repeat; cursor: pointer; }
.ssl__prev { left: 0; border-radius: 0 8px 8px 0; }
.ssl__next { right: 0; border-radius: 8px 0 0 8px; transform: scaleX(-1); }
.ssl--first .ssl__prev, .ssl--last .ssl__next, .ssl--single .ssl__nav { display: none; }
@media (hover: none) and (pointer: coarse) { .ssl__nav { display: none; } }   /* на телефоне листаем свайпом */
/* превью других фото внизу окна */
.ssl__thumbs { flex: 0 0 auto; display: flex; gap: 6px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); overflow-x: auto; overflow-y: hidden; background: rgba(0, 0, 0, .55); touch-action: pan-x; scrollbar-width: none; z-index: 3; }
.ssl__thumbs::-webkit-scrollbar { display: none; }
.ssl__thumb { flex: 0 0 auto; width: 64px; height: 48px; padding: 0; border: 2px solid transparent; border-radius: 6px; background: #222; overflow: hidden; opacity: .6; cursor: pointer; }
.ssl__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ssl__thumb.is-active { border-color: #fcd500; opacity: 1; }
.ssl--single .ssl__thumbs { display: none; }

/* телефон: всплывающие сообщения (корзина, сравнение) внизу экрана */
@media (max-width: 960px) {
  body .iziToast-wrapper { box-sizing: border-box; width: 100% !important; max-width: 100vw; top: auto !important; bottom: 0 !important; left: 0 !important; right: 0 !important; padding: 0 12px calc(12px + env(safe-area-inset-bottom)); }   /* border-box: иначе 100% + 24px отступов выходит за экран */
  body .iziToast-wrapper .iziToast { margin: 8px 0 0; width: 100%; max-width: 100%; box-sizing: border-box; }
  body .iziToast-wrapper .iziToast .iziToast-body, body .iziToast-wrapper .iziToast .iziToast-message { max-width: 100%; word-wrap: break-word; overflow-wrap: anywhere; }
}

/* Широкие экраны: в слайдере «Новые готовые решения» карточки идут во всю ширину экрана, а стрелки стоят по ширине блока, как у верхних слайдеров */
@media (min-width: 1700px) {
  .new-product.solutions .owl-nav { left: 50%; width: 1260px; margin-left: -630px; }
}

/* Телефон: мобильная прокрутка — слайдеры карточек листаются пальцем по горизонтали, без стрелок и точек (JS: mobile-scroll.js) */
@media (max-width: 960px) {
  .new-product.slider .h-scroll {
    display: flex; flex-wrap: nowrap; gap: 12px;
    overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
    padding: 8px 20px 20px; margin: 0 -20px; box-sizing: border-box;
    scrollbar-width: none;
  }
  .new-product.slider .h-scroll::-webkit-scrollbar { display: none; }
  .new-product.slider .h-scroll > .item {
    flex: 0 0 82%; max-width: 340px; margin: 4px 0 0; scroll-snap-align: center;
  }
  .new-product.slider .owl-nav, .new-product.slider .owl-dots { display: none !important; }
}
@media (max-width: 960px) {
  .new-product.slider.solutions .h-scroll { margin: 0; }
}
@media (max-width: 960px) {
  .new-product.slider.catalog .h-scroll { width: calc(100% + 40px); max-width: none; }
}
@media (max-width: 960px) {
  .new-product.slider .h-scroll { gap: 8px; padding: 14px 20px 26px; margin-top: -10px; margin-bottom: -10px; scroll-padding: 0 20px; }
  .new-product.slider .h-scroll::after { content: ''; flex: 0 0 12px; }   /* правый отступ в конце прокрутки: 12 + gap 8 = 20 */
  .new-product.slider .h-scroll > .item { flex: 0 0 calc(100% - 52px); max-width: 360px; margin: 0; }
}

/* При zoom:0.7 (экраны до 1290px) последняя карточка из-за округления ширины переносилась на вторую строку и растягивала блок на ~280px — держим карточки в одну строку */
.new-product .owl-stage { display: flex; flex-wrap: nowrap; }
.new-product .owl-stage .owl-item { float: none; flex: 0 0 auto; }

/* Телефон/планшет: отступ текста от краёв плиток главной не меньше 24px; картинки подрезаются сбоку и растягиваются на высоту плитки */
@media (max-width: 960px) {
  .tile { position: relative; }
  .tile--lg .tile__img, .tile--blue .tile__img {
    position: absolute; top: 0; bottom: 0; left: 0; width: 40%; max-width: none; height: 100%;
    object-fit: cover; object-position: right center;          /* «Модульные гостиные»: подрезаем слева */
  }
  .tile--lg.tile--rev .tile__img, .tile--blue.tile--rev .tile__img { left: auto; right: 0; object-position: left center; }   /* «Кухни», «Диваны»: подрезаем справа */
  .tile--lg .tile__body, .tile--blue .tile__body { margin-left: 40%; padding: 24px; }
  .tile--lg.tile--rev .tile__body, .tile--blue.tile--rev .tile__body { margin-left: 0; margin-right: 40%; }
}
@media (max-width: 560px) {
  .tile--sm:not(.tile--blue) .tile__body { padding: 14px 24px 18px; }
}
@media (max-width: 560px) {
  .tile__label, .tile__li { font-size: 12px; }
  .tile--yellow .tile__img { width: 56%; }
  .tile--yellow .tile__body { margin-left: 56%; padding-left: 16px; padding-right: 24px; }
}

/* Телефон: «Популярные разделы каталога» — горизонтальная прокрутка в два ряда */
@media (max-width: 960px) {
  .populars .items {
    display: grid; grid-template-rows: repeat(2, auto); grid-auto-flow: column; grid-auto-columns: calc(100% - 52px); gap: 8px;
    overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
    margin: 0 -20px; padding: 8px 20px 20px; box-sizing: border-box; scrollbar-width: none; justify-content: flex-start;
  }
  .populars .items::-webkit-scrollbar { display: none; }
  .populars .items .item { width: auto; max-width: none; margin: 0; scroll-snap-align: center; box-sizing: border-box; }
}
@media (max-width: 960px) {
  .populars .items { grid-template-rows: auto; grid-auto-columns: calc(50% - 24px); }
  .populars .items .item { flex-direction: column; align-items: flex-start; justify-content: flex-start; padding: 16px 16px 18px; }
  .populars .items .item img { display: block; height: 72px; width: auto; max-width: 100%; margin: 0 0 12px; object-fit: contain; object-position: left center; }
  .populars .items .item .info { width: 100%; margin: 0; padding: 0; }
  .populars .items .item .name { font-size: 15px; line-height: 1.25; }
}
@media (max-width: 960px) {
  .populars .items .item { height: auto; }
  .populars .items .item .info { margin-top: 0; }
  .populars .items .item img { margin: 0 0 12px; }
}
@media (max-width: 960px) {
  .populars .items .item .name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }   /* название — не больше 2 строк */
}
@media (max-width: 960px) {
  .populars .items .item .info { flex: 1 1 auto; display: flex; flex-direction: column; align-items: flex-start; }
  .populars .items .item .info .cost { margin-top: auto; padding-top: 6px; }   /* цена внизу карточки у всех на одной линии */
}
@media (max-width: 960px) {
  .populars .items { grid-auto-columns: calc(50% - 4px); padding-bottom: 6px; }
  .populars .items .item { padding: 24px; }
  .populars .all { margin: 4px 0 20px; }
}

/* Телефон/планшет: заголовки h1/h2 и т.п., а также заголовки и ссылки подвала — по левому краю */
@media (max-width: 960px) {
  h1, h2, h3, h4, .h1, .h2, .h3, .h4, .populars, .name-catalog h1, .name-catalog h2 { text-align: left; }
  footer, footer .menu .item, footer .menu .item .title, footer .menu .item nav, footer .menu .item a { text-align: left; }
}
@media (max-width: 560px) {
  footer .menu .item { text-align: left; }
}
@media (max-width: 960px) {
  .info-index h1, .info-index h2, .catalog h1, .catalog h2, .page h1, .page h2, .content h1, .content h2, .content h3, .wrapper h1, .wrapper h2, .wrapper h3 { text-align: left; }
}

/* Телефон: «Обзоры и новинки» — плитки в 2 колонки, заголовки с отступом 24px */
@media (max-width: 960px) {
  .news .wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: auto; }
  .news .item { width: auto; max-width: none; margin: 0; box-sizing: border-box; display: flex; flex-direction: column; }
  .news .item img { display: block; width: 100%; height: auto; }
  .news .item .text { padding: 16px 24px 20px; flex: 1 1 auto; }
  .news .item .title { font-size: 16px; line-height: 1.3; margin: 0; text-align: left; }
}
@media (max-width: 960px) {
  .news .wrapper { align-items: stretch; }
  .populars .h1, .new-product .h1, .news .h1 { margin-left: 0; margin-right: 0; width: auto; }   /* заголовок разделов — вровень с краем карточек */
}
@media (max-width: 960px) {
  .new-product.solutions .h1 { margin-left: 20px; }   /* вровень с карточками (у «Новинок каталога» 20px даёт обёртка) */
}

/* Телефон: кнопки «Весь каталог»/«Готовые решения» на всю ширину; в блоке «Интернет-магазин мебели» убраны лишние отступы сверху/снизу */
@media (max-width: 960px) {
  .populars .more { width: 100%; box-sizing: border-box; }
  .info-index.wrapper { padding-top: 24px; padding-bottom: 24px; }
  .info-index h1 { margin-bottom: 16px; }
  .info-index .text { margin-top: 0; }
  .info-index .text .left { margin-bottom: 0; margin-top: 24px; margin-left: 0; max-width: none; }
}
@media (max-width: 960px) {
  .new-product.slider.solutions { padding-bottom: 0; }
  .new-product.slider.solutions .h-scroll { padding-bottom: 8px; margin-bottom: 0; }   /* до блока «Интернет-магазин…» ≈ 32px */
}
@media (max-width: 960px) {
  .new-product.slider .h1 { margin-bottom: 20px; }   /* заголовок → карточки = 24px (4px даёт запас слайдера под тень) */
}
@media (max-width: 960px) {
  .new-product.slider.solutions .h1 { margin-bottom: 10px; }
}
@media (max-width: 960px) {
  .populars .h1 { margin-bottom: 16px; }   /* заголовок → карточки = 24px (8px — запас сверху у прокрутки) */
}

/* Телефон/планшет: единый боковой отступ 24px от края экрана у всех блоков главной */
@media (max-width: 960px) {
  .main_banner { padding-left: 24px; padding-right: 24px; }
  .main_banner .wrapper { padding-left: 0; padding-right: 0; }
  .populars { padding-left: 24px; padding-right: 24px; }
  .populars .wrapper { margin-left: 0; margin-right: 0; }
  .populars .h1 { margin-left: 0; }
  .populars .items { margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; scroll-padding: 0 24px; }
  .new-product.slider.catalog { padding-left: 24px; padding-right: 24px; }
  .new-product.slider .h-scroll { padding-left: 24px; padding-right: 24px; scroll-padding: 0 24px; margin-left: -24px; margin-right: -24px; }
  .new-product.slider.catalog .h-scroll { width: calc(100% + 48px); }
  .new-product.slider.solutions .h-scroll { margin-left: 0; margin-right: 0; width: auto; }
  .new-product.slider.solutions .h1 { margin-left: 24px; margin-right: 24px; }
  .new-product.slider .h-scroll::after { flex-basis: 16px; }   /* 16 + gap 8 = 24 в конце прокрутки */
  .news { padding-left: 24px; padding-right: 24px; }
  .info-index.wrapper { padding-left: 24px; padding-right: 24px; }
  .info-index .text { margin-left: 0; margin-right: 0; }
  footer { margin-left: 0; margin-right: 0; }
  footer .wrapper { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 960px) {
  .plus-info.wrapper { padding-left: 24px; padding-right: 24px; box-sizing: border-box; }
  .plus-info.wrapper .item { padding-left: 24px; padding-right: 24px; }
}

/* Карточка товара на телефоне: слайдер фото на всю ширину, вплотную к белому блоку заголовка; превью сразу под фото */
@media (max-width: 960px) {
  .product-in.wrapper { margin-top: 0; }
  .product-in .banners { margin-bottom: 0; }
  .product-in .full-info #msGallery, .product-in #msGallery { margin-left: -20px; margin-right: -20px; background: #fff; }
  #msGallery .fotorama__nav-wrap, #msGallery .fotorama__nav { margin-top: 0; }
}
@media (max-width: 960px) {
  .product-in.wrapper .banners { margin-bottom: 0; }
}

/* Карточка товара на телефоне: теги (best, new…) — слева на 24px от края экрана (контейнер сдвинут на 20px), ссылка «Перейти в корзину» и «Купить в 1 клик» во втором (мобильном) блоке покупки */
@media (max-width: 960px) {
  .product-in .options { left: 4px; top: 24px; }
}

/* Карточка товара на телефоне: блок покупки — кнопки 8px, зазор 8px, текст слева/иконка справа; рамка и белые блоки со скруглением 16px */
@media (max-width: 960px) {
  .in-basket-double { border-radius: 16px; overflow: hidden; }
  .in-basket-double .btn-in-basket, .in-basket-double .btn-one-click {
    display: flex; align-items: center; justify-content: space-between; text-align: left;
    box-sizing: border-box; width: 100%; border-radius: 8px; padding: 10px 24px; margin: 0 0 8px;
  }
  .in-basket-double .btn-one-click { margin-top: 0; }
  .in-basket-double .btn-in-basket { margin-top: 0; margin-bottom: 8px; }
  .in-basket-double .btn img { margin: 0; }
  .content-product, .product-in .banners > *, .sale_banner a { border-radius: 16px; }
  .content-product { overflow: hidden; }
}
@media (max-width: 960px) {
  .in-basket-double .basket-price { margin-bottom: 14px; }   /* желтая линия под ценой → кнопки = 24px */
}

/* Карточка товара на компьютере: те же скругления — рамка блока покупки 16px, кнопки 8px, белые блоки 16px */
@media (min-width: 961px) {
  .in-basket-main { border-radius: 16px; overflow: hidden; }
  .in-basket-main .btn-in-basket, .in-basket-main .btn-one-click { border-radius: 8px; }
  .content-product, .product-in .banners > a { border-radius: 16px; }
  .content-product { overflow: hidden; }
}

/* ===== «Купить в 1 клик»: окно по HTML2/product.html (.modal--mod) ===== */
.modal--mod .modal-dialog {
  padding: 0; border: 0; max-width: 480px; width: calc(100% - 32px); border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 24px 64px rgba(9, 28, 44, .3); display: flex; flex-direction: column; max-height: 90vh;
  top: 50%; transform: translate(-50%, -300%);
}
.modal--mod .modal-open:checked ~ .modal-wrap .modal-dialog { top: 50%; transform: translate(-50%, -50%); }
.modal--mod .modal-overlay { cursor: pointer; }
.modal--mod .mod__bar { position: relative; display: flex; align-items: center; gap: 12px; height: 60px; min-height: 60px; padding: 0 0 0 24px; border-bottom: 1px solid #dadddf; background: #fff; }
.modal--mod .mod__bar img { flex: 0 0 24px; width: 24px; height: 24px; }
.modal--mod .mod__bar h4 { flex: 1; margin: 0; font-size: 16px; line-height: 1.5; font-weight: 700; color: #091c2c; }
.modal--mod .btn-close {
  position: static; display: block; width: 60px; height: 60px; margin: 0; border-left: 1px solid #dadddf; cursor: pointer; font-size: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' stroke='%23091c2c' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M1 1l10 10M11 1L1 11'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.modal--mod .btn-close:hover { background-color: #f4f6f8; }
.modal--mod .mod__prod { display: flex; align-items: flex-start; gap: 16px; padding: 24px 24px 0; }
.modal--mod .mod__prod img { flex: 0 0 120px; width: 120px; height: 80px; object-fit: cover; border-radius: 8px; }
.modal--mod .mod__name { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.4; color: #091c2c; }
.modal--mod .mod__price { margin: 4px 0 0; color: #6e7279; }
.modal--mod .mod__price b { font-size: 28px; line-height: 1.2; color: #091c2c; }
.modal--mod .modal-body { padding: 0; overflow: auto; flex: 1; display: flex; flex-direction: column; }
.modal--mod form.oneclick { display: flex; flex-direction: column; gap: 12px; padding: 24px 24px 0; flex: 1; }
.modal--mod .mod__hint { margin: 0 0 4px; color: #6e7279; font-size: 12px; line-height: 1.4; }
.modal--mod .input { position: relative; display: block; margin: 0; }
.modal--mod .input label {
  position: absolute; left: 12px; top: -8px; z-index: 1; margin: 0; padding: 0 4px; background: #fff; color: #6e7279;
  font-size: 12px; line-height: 1; opacity: 0; pointer-events: none; transition: opacity .15s;
}
.modal--mod .input:focus-within label, .modal--mod .input:has(input:not(:placeholder-shown)) label { opacity: 1; }
.modal--mod .input:focus-within label { color: #19a955; }
.modal--mod .input input.textbox {
  width: 100%; max-width: none; height: 48px; padding: 0 16px; box-sizing: border-box; border: 1px solid #dadddf; border-radius: 8px; background: #fff; font-size: 14px;
}
.modal--mod .input input.textbox::placeholder { color: #6e7279; opacity: 1; }
.modal--mod .input input.textbox:focus { outline: 0; border-color: #19a955; box-shadow: 0 0 0 1px #19a955; }
.modal--mod .input:focus-within input::placeholder { color: transparent; }
.modal--mod .mod__foot { margin: 12px -24px 0; padding-top: 12px; background: #fff; }
.modal--mod .modal button.zayavka, .modal--mod button.zayavka {
  display: block; width: 100%; min-height: 56px; margin: 0; padding: 0; border: 0; border-radius: 0; line-height: 56px;
  background: #19a955; color: #fff; font-size: 14px; font-weight: 700; text-transform: none; cursor: pointer;
}
.modal--mod button.zayavka:hover { opacity: 1; filter: brightness(.94); background: #19a955; color: #fff; }
@media (max-width: 480px) {
  .modal--mod .modal-dialog, .modal--mod .modal-open:checked ~ .modal-wrap .modal-dialog { top: 0; left: 0; width: 100%; max-width: none; height: 100%; max-height: none; border-radius: 0; }
  .modal--mod .modal-dialog { transform: translate(0, 110%); }
  .modal--mod .modal-open:checked ~ .modal-wrap .modal-dialog { transform: translate(0, 0); }
  .modal--mod .mod__foot { margin-top: auto; }
}
.modal--mod button.zayavka { max-width: none; }
.modal--mod .input--error input.textbox { border-color: #e30613; }
.modal--mod .input--error input.textbox:focus { border-color: #e30613; box-shadow: 0 0 0 1px #e30613; }
.modal--mod .input--error label { color: #e30613; }
.modal--mod .input__err { margin: 4px 0 0 4px; color: #e30613; font-size: 12px; line-height: 1.3; }
.modal--mod .input--error:focus-within label { color: #e30613; }

/* Карточка товара: стрелки слайдера фото — как у каруселей на главной (белый круг), лупа — как кнопка увеличения на телефоне */
.fotorama__arr.fotorama__arr--prev, .fotorama__arr.fotorama__arr--next {
  top: 50%; margin-top: -22px; width: 44px; height: 44px; border-radius: 50%; background-color: #fff; background-size: 14px; opacity: 1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18); transition: background-color .15s;
}
.fotorama__arr.fotorama__arr--prev { left: 12px; }
.fotorama__arr.fotorama__arr--next { right: 12px; }
.fotorama__arr.fotorama__arr--prev:hover, .fotorama__arr.fotorama__arr--next:hover { background-color: #fad500; }
.fotorama:not(.fotorama--fullscreen) .fotorama__fullscreen-icon {
  width: 42px; height: 42px; padding: 0; top: 0; right: 0 !important; opacity: .9;
  background: #2877bc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='9' cy='9' r='6.5'/%3E%3Cpath d='M14 14l6 6'/%3E%3C/svg%3E") center / 22px no-repeat !important;
}
.fotorama:not(.fotorama--fullscreen) .fotorama__fullscreen-icon:hover { opacity: 1; }

/* Лупа на фото товара: круглая кнопка на графитовом фоне, отступ от краёв 24px (десктоп и телефон) */
.fotorama:not(.fotorama--fullscreen) .fotorama__fullscreen-icon, .ssl-zoom {
  width: 44px; height: 44px; padding: 0; border-radius: 50%; top: 24px !important; right: 24px !important; opacity: 1;
  background: rgba(58, 61, 73, .85) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='9' cy='9' r='6.5'/%3E%3Cpath d='M14 14l6 6'/%3E%3C/svg%3E") center / 20px no-repeat !important;
  transition: background-color .15s;
}
.fotorama:not(.fotorama--fullscreen) .fotorama__fullscreen-icon:hover, .ssl-zoom:hover { background-color: #3a3d49 !important; opacity: 1; }
@media (max-width: 960px) {
  .ssl-zoom { display: none !important; }   /* на телефоне фото открывается тапом, лупа не нужна */
}
#msGallery .fotorama__fullscreen-icon { display: none !important; }   /* вместо встроенного полноэкранного режима Fotorama — своё окно (кнопка .ssl-zoom) */
/* Крестик окна фото: графитовый фон, без обводки (в т.ч. фокусной) */
.ssl__close, .ssl__close:hover, .ssl__close:focus, .ssl__close:focus-visible, .ssl__close:active { background-color: #3a3d49; outline: 0; box-shadow: none; border: 0; -webkit-tap-highlight-color: transparent; }
.ssl__close:hover { background-color: #4a4e5c; }

/* ===== Корзина на телефоне: карточки как в каталоге, итог отдельной карточкой ===== */
@media (max-width: 960px) {
  #msCart { padding-left: 24px; padding-right: 24px; }
  #msCart > h4 { padding-left: 24px; padding-right: 24px; }
  #msCart .basket-products { padding: 0; }
  #msCart .basket-products .header { display: none; }
  #msCart .basket-products .product {
    position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 16px;
    background: #fff; border-radius: 16px; overflow: hidden; margin: 0 0 8px; padding: 0 0 24px; text-align: left;
  }
  #msCart .basket-products .product > div { width: auto; max-width: none; margin: 0; padding: 0; text-align: left; }
  #msCart .basket-products .product .image { grid-column: 1 / -1; }
  #msCart .basket-products .product .image img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
  #msCart .basket-products .product .title { grid-column: 1 / -1; padding: 20px 24px 16px; }
  #msCart .basket-products .product .title a { font-size: 18px; line-height: 1.3; font-weight: 400; color: #2877bc; }
  #msCart .basket-products .product .count { padding-left: 24px; }
  #msCart .basket-products .product .price { padding-right: 24px; text-align: right; }
  #msCart .basket-products .product .price .cost { margin: 0; }
  #msCart .basket-products .product .price .money { font-size: 24px; }
  #msCart .basket-products .product .remove { position: absolute; top: 12px; right: 12px; width: auto; padding: 0; margin: 0; }
  #msCart .basket-products .product .remove form { margin: 0; }
  #msCart .remove .btn.cart-remove-btn {
    width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: rgba(58, 61, 73, .85); color: #fff;
  }
  #msCart .remove .btn.cart-remove-btn:hover { background: #3a3d49; color: #fff; }
  #msCart .remove .btn.cart-remove-btn svg { width: 18px; height: 18px; }
  /* итог */
  #msCart .basket-products .itog {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin: 16px 0 0; padding: 24px;
    background: #fff; border-radius: 16px; text-align: left;
  }
  #msCart .basket-products .itog > div { width: auto; max-width: none; margin: 0; padding: 0; font-size: 16px; }
  #msCart .basket-products .itog .itog-clearable { display: none; }
  #msCart .basket-products .itog .total { font-weight: 700; }
  #msCart .basket-products .itog .total_cost { margin-left: auto; }
  #msCart .basket-products .itog form.remove { flex: 0 0 100%; width: 100%; margin: 16px 0 0; }
  #msCart .btn.cart-clean-btn { width: 100%; min-height: 48px; border-radius: 8px; justify-content: center; }
}
@media (max-width: 960px) {
  #msCart .basket-products .product > div { max-width: none !important; width: auto !important; text-align: left !important; }
  #msCart .basket-products .product > .image { width: 100% !important; justify-self: stretch; }
  #msCart .basket-products .product > .image img { width: 100% !important; max-width: none !important; }
  #msCart .basket-products .product > .title { text-align: left !important; }
  #msCart .basket-products .product > .title a { text-align: left; display: block; }
  #msCart .basket-products .product > .remove { position: absolute !important; top: 12px !important; right: 12px !important; left: auto !important; bottom: auto !important; width: auto !important; z-index: 2; }
  #msCart .title { text-align: left !important; }
}
@media (max-width: 960px) {
  #msCart .basket-products .product > .image img { object-fit: contain; background: #fff; }
  #msCart .basket-products .itog > div { padding: 0 !important; margin-left: 0; }
  #msCart .basket-products .itog .total_cost { margin-left: auto; }
  #msCart .basket-products .itog .total { margin: 0 !important; }
}

/* ===== Корзина на телефоне, доработка: карточки на всю ширину, счётчик по центру, крестик, форма заказа в стиле фильтров каталога ===== */
@media (max-width: 960px) {
  #msCart .basket-products > div, #msCart .basket-products .product, #msCart .basket-products .itog { max-width: none !important; width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; box-sizing: border-box; }
  #msCart .basket-products .product .count .number { display: flex; width: 100%; max-width: 160px; }
  #msCart .basket-products .product .count .number input { flex: 1 1 auto; width: auto !important; min-width: 0; padding: 0 !important; text-align: center; }
  #msCart .remove .btn.cart-remove-btn { background: #3a3d49; opacity: 1; }
  #msCart .remove .btn.cart-remove-btn svg { width: 16px; height: 16px; stroke: #fff; stroke-width: 2.2; shape-rendering: geometricPrecision; }
  #msCart .remove .btn.cart-remove-btn:hover { background: #4a4e5c; }

  /* форма заказа — карточка, поля/чекбоксы/кнопка как в фильтрах */
  #msOrder { box-sizing: border-box; margin: 8px 24px 0; padding: 24px; background: #fff; border-radius: 16px; }
  #msOrder h4 { margin: 0 0 16px; font-size: 16px; line-height: 1.5; font-weight: 700; text-align: left; color: #091c2c; }
  #msOrder hr { margin: 24px 0; border: 0; border-top: 1px solid #efefef; }
  #msOrder > .flex-sb { display: block; }
  #msOrder .left, #msOrder .right { width: 100% !important; max-width: none !important; }
  #msOrder .form-group.input-parent { display: flex; flex-direction: column; align-items: stretch; margin: 0 0 12px; width: 100%; }
  #msOrder .form-group.input-parent label { display: block; width: auto; margin: 0 0 6px; font-size: 12px; font-weight: 400; line-height: 1.3; color: #6e7279; text-align: left; }
  #msOrder .required-star { color: #e30613; }
  #msOrder .form-control, #msOrder input.form-control, #msOrder textarea.form-control {
    display: block; width: 100%; max-width: none !important; height: 48px; padding: 0 16px; box-sizing: border-box; border: 1px solid #dadddf; border-radius: 4px; background: #fff; font-size: 14px; color: #091c2c; box-shadow: none;
  }
  #msOrder textarea.form-control { height: 96px; padding: 12px 16px; resize: vertical; }
  #msOrder .form-control::placeholder { color: #6e7279; opacity: 1; }
  #msOrder .form-control:focus { outline: 0; border-color: #19a955; box-shadow: 0 0 0 1px #19a955; }
  /* способы оплаты и доставки: чекбокс как в фильтрах (квадрат 20px, зелёная галочка) */
  #msOrder #payments div > div, #msOrder #deliveries div > div { display: block; max-width: none; margin: 0 0 16px; }
  #msOrder .radio { display: block !important; position: absolute; opacity: 0; width: 1px; height: 1px; }
  #msOrder .radio + label { position: relative; display: block; max-width: none; margin: 0; padding: 0 0 0 32px; font-size: 14px; font-weight: 700; line-height: 1.4; color: #091c2c; cursor: pointer; }
  #msOrder .radio + label::before { content: ""; position: absolute; top: 0; left: 0; width: 20px; height: 20px; box-sizing: border-box; border: 1px solid #dadddf; border-radius: 4px; background: #fff; transition: border-color .12s; }
  #msOrder .radio + label::after { content: ""; position: absolute; top: 4px; left: 4px; width: 12px; height: 12px; border-radius: 2px; background: #19a955; opacity: 0; transition: opacity .12s; }
  #msOrder .radio:checked + label::before { border-color: #19a955; }
  #msOrder .radio:checked + label::after { opacity: 1; }
  #msOrder .radio:focus-visible + label::before { outline: 2px solid #2877bc; outline-offset: 2px; }
  #msOrder .radio + label .small { display: block; margin-top: 6px; font-size: 12px; font-weight: 400; line-height: 1.4; color: #6e7279; }
  #msOrder .radio + label .small a { color: #2877bc; }
  /* итог и кнопка */
  #msOrder .well { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
  #msOrder .well .col-md-offset-2 { margin: 0; padding: 0; }
  #msOrder .well h3 { margin: 0 0 16px; font-size: 20px; line-height: 1.3; font-weight: 700; text-align: left; color: #091c2c; }
  #msOrder #btn-order {
    display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: none; height: 56px; margin: 0; padding: 0 24px; box-sizing: border-box;
    border: 0; border-radius: 8px; background: #19a955; color: #fff; font-size: 14px; font-weight: 700; line-height: 1; text-transform: none; cursor: pointer;
  }
  #msOrder #btn-order:hover { filter: brightness(.94); background: #19a955; }
  #msOrder #btn-order img { filter: brightness(0) invert(1); }
}
@media (max-width: 960px) {
  #msOrder #payments .form-group, #msOrder #deliveries .form-group, #msOrder #payments div > div, #msOrder #deliveries div > div { width: 100% !important; max-width: none !important; box-sizing: border-box; }
  #msOrder .radio + label { width: 100%; box-sizing: border-box; overflow-wrap: anywhere; }
}
@media (max-width: 960px) {
  #msCart .basket-products .product > .remove, #msCart .basket-products .product > .remove form { width: 40px !important; height: 40px !important; min-height: 0 !important; }
  #msCart .remove .btn.cart-remove-btn { width: 40px !important; height: 40px !important; min-width: 40px; min-height: 40px !important; max-width: 40px; border-radius: 50% !important; aspect-ratio: 1 / 1; }
}

/* ===== Форма заказа на компьютере: поля, чекбоксы и кнопка — как в фильтрах каталога ===== */
@media (min-width: 961px) {
  #msOrder h4 { margin: 0 0 20px; font-size: 20px; line-height: 1.4; font-weight: 700; color: #091c2c; }
  #msOrder hr { margin: 32px 0; border: 0; border-top: 1px solid #efefef; }
  #msOrder .form-group.input-parent { display: flex; flex-direction: column; align-items: stretch; margin: 0 0 16px; }
  #msOrder .form-group.input-parent label { display: block; width: auto; max-width: none; margin: 0 0 6px; font-size: 12px; font-weight: 400; line-height: 1.3; color: #6e7279; text-align: left; }
  #msOrder .required-star { color: #e30613; }
  #msOrder .form-control, #msOrder input.form-control, #msOrder textarea.form-control {
    display: block; width: 100%; max-width: none !important; height: 48px; padding: 0 16px; box-sizing: border-box; border: 1px solid #dadddf; border-radius: 4px; background: #fff; font-size: 14px; color: #091c2c; box-shadow: none;
  }
  #msOrder textarea.form-control { height: 96px; padding: 12px 16px; resize: vertical; }
  #msOrder .form-control::placeholder { color: #6e7279; opacity: 1; }
  #msOrder .form-control:focus { outline: 0; border-color: #19a955; box-shadow: 0 0 0 1px #19a955; }
  #msOrder .radio { display: block !important; position: absolute; opacity: 0; width: 1px; height: 1px; }
  #msOrder .radio + label { position: relative; display: block; max-width: none; margin: 0; padding: 0 0 0 32px; font-size: 14px; font-weight: 700; line-height: 1.4; color: #091c2c; cursor: pointer; }
  #msOrder .radio + label::before { content: ""; position: absolute; top: 0; left: 0; width: 20px; height: 20px; box-sizing: border-box; border: 1px solid #dadddf; border-radius: 4px; background: #fff; transition: border-color .12s; }
  #msOrder .radio + label::after { content: ""; position: absolute; top: 4px; left: 4px; width: 12px; height: 12px; border-radius: 2px; background: #19a955; opacity: 0; transition: opacity .12s; }
  #msOrder .radio + label:hover::before, #msOrder .radio:checked + label::before { border-color: #19a955; }
  #msOrder .radio:checked + label::after { opacity: 1; }
  #msOrder .radio:focus-visible + label::before { outline: 2px solid #2877bc; outline-offset: 2px; }
  #msOrder .radio + label .small { display: block; margin-top: 6px; font-size: 12px; font-weight: 400; line-height: 1.5; color: #6e7279; }
  #msOrder .radio + label .small a { color: #2877bc; }
  #msOrder .well h3 { margin: 0 0 20px; font-size: 28px; line-height: 1.3; font-weight: 700; color: #091c2c; }
  #msOrder #btn-order {
    display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 360px; height: 56px; margin: 0; padding: 0 24px; box-sizing: border-box;
    border: 0; border-radius: 8px; background: #19a955; color: #fff; font-size: 14px; font-weight: 700; line-height: 1; text-transform: none; cursor: pointer;
  }
  #msOrder #btn-order:hover { filter: brightness(.94); background: #19a955; }
  #msOrder #btn-order img { filter: brightness(0) invert(1); }
}
@media (min-width: 961px) {
  #msOrder #payments .form-group, #msOrder #deliveries .form-group { margin-left: 0; padding-left: 0; }
  #msOrder #payments .form-group > div, #msOrder #deliveries .form-group > div { margin-left: 0; }
}

/* Кнопка «Купить» в карточках каталога — как «В корзину» на странице товара: радиус 8px, жёлтый текст слева, значок корзины справа */
.new-product .item .count-item .btn-in-basket {
  display: flex; align-items: center; justify-content: space-between; flex: 1 1 auto; width: auto; min-width: 0; height: 50px; margin: 0 0 0 12px; padding: 0 16px;
  border-radius: 8px; font-size: 16px; font-weight: 700; line-height: 1; text-align: left;
}
.new-product .item .count-item .btn-in-basket::after {
  content: ""; flex: 0 0 24px; width: 24px; height: 24px; margin-left: 8px;
  background: url("../img/icons/cart-y.svg?v=2") center / 22px no-repeat;
}
.new-product .item .count-item .number { flex: 0 0 108px; width: 108px; }
.new-product .item .count-item .number input.count { min-width: 0; width: auto; flex: 1 1 auto; }
.new-product .item .count-item .btn-in-basket { margin-left: 8px; padding: 0 14px; }
.new-product .item .count-item .number { display: flex; flex-wrap: nowrap; align-items: stretch; }
.new-product .item .count-item .number p.minus, .new-product .item .count-item .number p.plus { flex: 0 0 30px; width: 30px; }
.new-product .item .count-item .number input.count { flex: 1 1 auto; width: 0; min-width: 0; padding: 0; text-align: center; }

/* Карточки товаров: без счётчика количества (добавляется 1 шт.), кнопка на всю ширину; иконка корзины — только из ::after (лишняя <img> в «Готовых решениях» скрыта) */
.new-product .item .count-item .number { display: none; }
.new-product .item .count-item .btn-in-basket { margin-left: 0; width: 100%; }
.new-product .item .count-item .btn-in-basket img { display: none; }
.new-product .item .count-item .btn-in-basket.in-cart { background: #fff; color: #2877bc; box-shadow: inset 0 0 0 1px #2877bc; }
.new-product .item .count-item .btn-in-basket.in-cart::after { background-image: url("../img/icons/cart-blue.svg"); }

/* Кнопки покупки: иконка 24px, внутренние отступы как на странице товара (28px), «Перейти в корзину» на странице товара вместо отдельной ссылки */
.new-product .item .count-item .btn-in-basket { padding: 0 28px; }
.new-product .item .count-item .btn-in-basket::after { flex-basis: 24px; width: 24px; height: 24px; background-size: 24px; }
.new-product .item .count-item { margin-bottom: 12px; }
.product-in .in-basket .btn-in-basket img { width: 24px; height: 24px; }
.product-in .in-basket .go-to-basket { display: none !important; }
.product-in .in-basket .btn-in-basket.in-cart { background: #fff; color: #2877bc; box-shadow: inset 0 0 0 1px #2877bc; }
.product-in .in-basket .btn-in-basket { display: flex; align-items: center; justify-content: space-between; padding: 0 28px; text-align: left; line-height: 1; }
.product-in .in-basket .btn-in-basket img { margin: 0; flex: 0 0 24px; }

/* Страницы категорий: блок «Новые готовые решения» больше не заходит на текстовый блок под ним (там стоял margin-top:-140px под старую высоту слайдера) */
.catalog-slider + .info-catalog { margin-top: 32px; }

/* Корзина: на телефоне крупнее «Итого» и сумма, компактнее поле количества и крупнее кнопки «−»/«+» (удобно попадать); на компьютере «Очистить корзину» вровень с колонкой «Удалить», без синего фона при наведении */
#msCart .btn.cart-clean-btn:hover, #msCart .btn.cart-clean-btn:focus { background: #fff; }
@media (min-width: 961px) {
  #msCart .basket-products .itog form.remove { margin-right: 24px; }
}
@media (max-width: 960px) {
  #msCart .basket-products .itog > div { font-size: 20px; }
  #msCart .basket-products .itog .total, #msCart .basket-products .itog .total_count { font-size: 20px; font-weight: 700; }
  #msCart .basket-products .itog .total_cost .money, #msCart .basket-products .itog .ms3_total_cost { font-size: 30px; line-height: 1.1; font-weight: 700; }
  #msCart .basket-products .itog .total_cost .rub { font-size: 12px; }
  #msCart .basket-products .product .count .number { max-width: 160px; width: 160px; }
  #msCart .basket-products .product .count .number p.minus, #msCart .basket-products .product .count .number p.plus { flex: 0 0 56px; width: 56px; height: 56px; min-height: 56px; margin: 0; }
  #msCart .basket-products .product .count .number input { flex: 0 0 48px; width: 48px !important; height: 56px; }
}
@media (max-width: 960px) {
  #msCart .basket-products .itog .total, #msCart .basket-products .itog .total_count, #msCart .basket-products .itog .total_count span { font-size: 22px !important; font-weight: 700; line-height: 1.2; }
  #msCart .basket-products .itog .total_cost .cost .money, #msCart .basket-products .itog .total_cost .ms3_total_cost { font-size: 32px !important; font-weight: 700; line-height: 1.1; }
  #msCart .basket-products .itog .total_cost .cost .rub { font-size: 13px !important; }
  #msCart .basket-products .itog { row-gap: 12px; }
}

/* «Купить в 1 клик»: состояния отправки — загрузка, ошибка, «Заявка отправлена» */
.modal--mod .mod__error { margin: 0; padding: 12px 16px; border-radius: 8px; background: #fdecee; color: #b3101c; font-size: 14px; line-height: 1.4; }
.modal--mod .mod__error a { color: inherit; font-weight: 700; text-decoration: underline; }
.modal--mod button.zayavka.is-loading { opacity: .7; cursor: progress; }
.modal--mod .mod__bar--ok { background: #fff; }
.modal--mod .mod__bar--ok h4 { color: #19a955; }
.modal--mod .mod__done { display: flex; flex-direction: column; flex: 1; padding: 32px 24px 0; }
.modal--mod .mod__done-lead { margin: 0 0 8px; font-size: 24px; line-height: 1.25; font-weight: 700; color: #091c2c; }
.modal--mod .mod__done .mod__hint { margin: 0 0 32px; font-size: 14px; line-height: 1.5; color: #6e7279; }
.modal--mod .mod__done .mod__hint a { color: #2877bc; white-space: nowrap; }
.modal--mod .mod__done .mod__foot { margin: auto -24px 0; padding-top: 0; }
.modal--mod .mod__close { display: block; width: 100%; min-height: 56px; line-height: 56px; text-align: center; background: #19a955; color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; }
.modal--mod .mod__close:hover { filter: brightness(.94); }
@media (min-width: 481px) { .modal--mod .mod__done { padding-bottom: 0; } .modal--mod .mod__done .mod__hint { margin-bottom: 40px; } }
.modal--mod form.oneclick[hidden], .modal--mod [hidden] { display: none !important; }
