/* ME-SALES — оформление витрины поверх Bootstrap 5 и stylesheet.css.
   Палитра (редизайн 12.11.2026, только эти цвета): чёрный #16171B, оранжевый #FFB000, фон #F4F3EF, белые карточки,
   рамки #E2E0DA, серый текст #5C5E66. Красный #B42318 — только для ошибок. Синего нет нигде.
   Лесенка шрифтов: 40 — заголовок страницы, 32 — заголовок раздела, 22 — подзаголовок, 17 — крупный текст,
   15 — основной текст, 13 — мелкие подписи. Других размеров нет. Onest — текст, Unbounded — крупные заголовки и цены. */
:root {
  --ms-ink: #16171b;
  --ms-ink-2: #5c5e66;
  --ms-wall: #f4f3ef;
  --ms-paper: #ffffff;
  --ms-line: #e2e0da;
  --ms-amber: #ffb000;
  --ms-amber-hover: #f2a600; /* та же оранжевая на тон темнее — только наведение и нажатие */
  --ms-ink-hover: #2c2d33; /* чёрная кнопка при наведении */
  --ms-error: #b42318; /* только ошибки */
  --ms-price: var(--ms-ink); /* цена везде чёрная, Unbounded */
  --ms-buy: var(--ms-amber); /* «В корзину» — оранжевая с чёрным текстом */
  --ms-buy-hover: var(--ms-amber-hover);
  --ms-buy-text: var(--ms-ink);
  --ms-display: "Unbounded", "Onest", system-ui, sans-serif;
  --ms-text: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ms-fs-page: 40px; --ms-fs-section: 32px; --ms-fs-sub: 22px; --ms-fs-lg: 17px; --ms-fs: 15px; --ms-fs-sm: 13px;
  --ms-radius: 12px;

  /* Bootstrap темы собран с синим #229ac8 — переопределяем всё, где он зашит */
  --bs-blue: var(--ms-ink);
  --bs-primary: var(--ms-amber); --bs-primary-rgb: 255, 176, 0;
  --bs-primary-text-emphasis: var(--ms-ink); --bs-primary-bg-subtle: var(--ms-wall); --bs-primary-border-subtle: var(--ms-line);
  --bs-body-font-family: var(--ms-text);
  --bs-body-font-size: 15px;
  --bs-body-color: var(--ms-ink); --bs-body-color-rgb: 22, 23, 27;
  --bs-emphasis-color: var(--ms-ink); --bs-emphasis-color-rgb: 22, 23, 27;
  --bs-heading-color: var(--ms-ink);
  --bs-secondary-color: var(--ms-ink-2); --bs-secondary-color-rgb: 92, 94, 102;
  --bs-tertiary-color: var(--ms-ink-2); --bs-tertiary-color-rgb: 92, 94, 102;
  --bs-secondary-bg: var(--ms-wall); --bs-tertiary-bg: var(--ms-wall);
  --bs-link-color: var(--ms-ink); --bs-link-color-rgb: 22, 23, 27;
  --bs-link-hover-color: var(--ms-ink); --bs-link-hover-color-rgb: 22, 23, 27;
  --bs-border-color: var(--ms-line); --bs-border-color-translucent: var(--ms-line);
  --bs-focus-ring-color: rgba(255, 176, 0, .45);
  --bs-border-radius: 12px; --bs-border-radius-lg: 14px; --bs-border-radius-sm: 8px;
  --bs-gray-600: var(--ms-ink-2);
}

body {
  font-family: var(--ms-text);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ms-ink);
  background: var(--ms-wall);
}
/* поля, кнопки и подписи форм не наследуют шрифт сами — иначе вылезает системный */
button, input, select, textarea, optgroup, legend, label { font-family: inherit; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--ms-ink); font-family: var(--ms-text); font-weight: 700; line-height: 1.25; }
h1, .h1 { font-family: var(--ms-display); font-weight: 600; font-size: 40px; line-height: 1.15; letter-spacing: -0.01em; margin: 8px 0 24px; }
h2, .h2 { font-family: var(--ms-display); font-weight: 600; font-size: 32px; line-height: 1.2; letter-spacing: -0.01em; }
h3, .h3 { font-size: 22px; }
h4, .h4, h5, .h5, h6, .h6 { font-size: 17px; }
small, .small { font-size: 13px; }
legend { font-size: 22px; font-weight: 700; border-bottom-color: var(--ms-line); }
label, .form-label, .col-form-label { font-size: 15px; }
.form-text, .invalid-feedback, .valid-feedback { font-size: 13px; }
.lead { font-size: 17px; }
.fs-1, .fs-2 { font-size: 32px !important; } .fs-3 { font-size: 22px !important; } .fs-4, .fs-5 { font-size: 17px !important; } .fs-6 { font-size: 15px !important; }
div.required .col-form-label:before, div.required .form-label:before { color: var(--ms-ink-2); }
@media (max-width: 767.98px) {
  h1, .h1 { font-size: 32px; }
  h2, .h2 { font-size: 22px; }
  h3, .h3 { font-size: 17px; }
}
a { color: var(--ms-ink); text-underline-offset: 3px; }
a:hover { color: var(--ms-ink); }
:focus-visible { outline: 3px solid var(--ms-amber); outline-offset: 2px; }
.text-primary, .link-primary { color: var(--ms-ink) !important; }
.text-muted, .text-secondary, .text-body-secondary { color: var(--ms-ink-2) !important; }
.text-success { color: var(--ms-ink) !important; }
.text-danger { color: var(--ms-error) !important; }
.badge { font-size: 13px; font-weight: 600; }
.badge.bg-primary, .bg-primary { color: var(--ms-ink); }
/* stylesheet.css прибивает подвал position:absolute и резервирует под него padding-bottom: 400px — отключаем */
#container { position: static; min-height: 100vh; margin: 0; display: flex; flex-direction: column; }
#container > main { flex: 1 0 auto; }
#content, #column-left, #column-right { padding-bottom: 48px; }

/* ---------- кнопки и поля ---------- */
/* главная — оранжевая с чёрным текстом; второстепенные — чёрная с белым текстом или белая с рамкой; не ниже 44 px, скругление 12 */
.btn { --bs-btn-font-size: 15px; --bs-btn-font-weight: 600; --bs-btn-border-radius: 12px; --bs-btn-padding-y: 10px; --bs-btn-padding-x: 18px; --bs-btn-focus-box-shadow: 0 0 0 3px rgba(255, 176, 0, .45); min-height: 44px; border-radius: 12px; font-weight: 600; }
.btn-lg { --bs-btn-font-size: 17px; --bs-btn-padding-y: 12px; --bs-btn-padding-x: 24px; --bs-btn-border-radius: 14px; min-height: 48px; border-radius: 14px; }
.btn-sm { --bs-btn-font-size: 13px; --bs-btn-padding-y: 6px; --bs-btn-padding-x: 12px; min-height: 44px; }
.btn-link { --bs-btn-color: var(--ms-ink); --bs-btn-hover-color: var(--ms-ink); --bs-btn-active-color: var(--ms-ink); --bs-btn-disabled-color: var(--ms-ink-2); min-height: 0; }
.btn-primary {
  --bs-btn-bg: var(--ms-amber); --bs-btn-border-color: var(--ms-amber); --bs-btn-color: var(--ms-ink);
  --bs-btn-hover-bg: var(--ms-amber-hover); --bs-btn-hover-border-color: var(--ms-amber-hover); --bs-btn-hover-color: var(--ms-ink);
  --bs-btn-active-bg: var(--ms-amber-hover); --bs-btn-active-border-color: var(--ms-amber-hover); --bs-btn-active-color: var(--ms-ink);
  --bs-btn-disabled-bg: var(--ms-amber); --bs-btn-disabled-border-color: var(--ms-amber); --bs-btn-disabled-color: var(--ms-ink);
}
.btn-dark, .btn-secondary, .btn-info {
  --bs-btn-bg: var(--ms-ink); --bs-btn-border-color: var(--ms-ink); --bs-btn-color: #fff;
  --bs-btn-hover-bg: var(--ms-ink-hover); --bs-btn-hover-border-color: var(--ms-ink-hover); --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--ms-ink-hover); --bs-btn-active-border-color: var(--ms-ink-hover); --bs-btn-active-color: #fff;
  --bs-btn-disabled-bg: var(--ms-ink); --bs-btn-disabled-border-color: var(--ms-ink); --bs-btn-disabled-color: #fff;
}
.btn-light, .btn-outline-primary, .btn-outline-secondary, .btn-outline-dark, .btn-danger, .btn-outline-danger {
  --bs-btn-bg: var(--ms-paper); --bs-btn-border-color: var(--ms-line); --bs-btn-color: var(--ms-ink);
  --bs-btn-hover-bg: var(--ms-paper); --bs-btn-hover-border-color: var(--ms-ink); --bs-btn-hover-color: var(--ms-ink);
  --bs-btn-active-bg: var(--ms-wall); --bs-btn-active-border-color: var(--ms-ink); --bs-btn-active-color: var(--ms-ink);
  --bs-btn-disabled-bg: var(--ms-paper); --bs-btn-disabled-border-color: var(--ms-line); --bs-btn-disabled-color: var(--ms-ink-2);
}
.btn-danger:hover, .btn-outline-danger:hover { --bs-btn-hover-color: var(--ms-error); --bs-btn-hover-border-color: var(--ms-error); }
.btn-close { --bs-btn-close-focus-shadow: 0 0 0 3px rgba(255, 176, 0, .45); }
.form-control, .form-select { border-color: var(--ms-line); border-radius: 12px; font-size: 15px; min-height: 44px; }
.form-control-lg, .form-select-lg { font-size: 17px; }
.form-control-sm, .form-select-sm { font-size: 13px; }
textarea.form-control { min-height: 88px; }
.form-control:focus, .form-select:focus { border-color: var(--ms-ink); box-shadow: 0 0 0 3px rgba(255, 176, 0, .35); }
.form-check-input { border-color: var(--ms-ink-2); color: var(--ms-ink); }
/* галочки и переключатели — 20 px, а не 15: удобнее попадать пальцем */
.form-check:not(.form-switch) { min-height: 24px; padding-left: 28px; }
.form-check:not(.form-switch) > .form-check-input { width: 20px; height: 20px; margin-top: 1px; margin-left: -28px; }
.form-check-label { line-height: 22px; }
.form-check-input:focus { border-color: var(--ms-ink); box-shadow: 0 0 0 3px rgba(255, 176, 0, .45); }
.form-check-input:checked, .form-check-input[type="checkbox"]:indeterminate { background-color: var(--ms-ink); border-color: var(--ms-ink); }
.form-switch .form-check-input:focus { --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%235c5e66'/%3e%3c/svg%3e"); }
.form-switch .form-check-input:checked { --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e"); }
.form-range::-webkit-slider-thumb { background-color: var(--ms-ink); }
.form-range::-moz-range-thumb { background-color: var(--ms-ink); }
.form-range:focus::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(255, 176, 0, .45); }
.input-group-text { background: var(--ms-paper); border-color: var(--ms-line); border-radius: 12px; color: var(--ms-ink-2); font-size: 15px; }
.input-group > :not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group > :not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
/* компоненты Bootstrap: активные пункты — чёрные, не синие */
.dropdown-menu { --bs-dropdown-link-active-bg: var(--ms-ink); --bs-dropdown-link-active-color: #fff; --bs-dropdown-font-size: 15px; --bs-dropdown-border-color: var(--ms-line); --bs-dropdown-border-radius: 12px; }
.nav-pills { --bs-nav-pills-link-active-bg: var(--ms-ink); --bs-nav-pills-link-active-color: #fff; }
.nav-link { --bs-nav-link-color: var(--ms-ink); --bs-nav-link-hover-color: var(--ms-ink); font-size: 15px; }
.list-group { --bs-list-group-active-bg: var(--ms-ink); --bs-list-group-active-border-color: var(--ms-ink); --bs-list-group-active-color: #fff; --bs-list-group-border-color: var(--ms-line); }
.progress, .progress-stacked { --bs-progress-bar-bg: var(--ms-amber); }
.accordion { --bs-accordion-border-color: var(--ms-line); --bs-accordion-active-bg: var(--ms-wall); --bs-accordion-active-color: var(--ms-ink); --bs-accordion-btn-focus-box-shadow: 0 0 0 3px rgba(255, 176, 0, .45);
  --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2316171b' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
.accordion-button { font-size: 15px; }
.table { --bs-table-color: var(--ms-ink); --bs-table-border-color: var(--ms-line); --bs-table-striped-color: var(--ms-ink); --bs-table-hover-color: var(--ms-ink); }
.table > :not(caption) > * > * { color: var(--ms-ink); }
.modal { --bs-modal-border-radius: 14px; --bs-modal-border-color: var(--ms-line); }
.modal-title { font-size: 22px; }
.tooltip { --bs-tooltip-font-size: 13px; --bs-tooltip-bg: var(--ms-ink); }
.popover { --bs-popover-font-size: 13px; }
/* сообщения: успех — чёрная плашка, ошибка — красная; без голубых и зелёных подложек */
.alert { --bs-alert-border-radius: 12px; font-size: 15px; }
.alert-success, .alert-info, .alert-primary, .alert-secondary, .alert-dark {
  --bs-alert-color: #fff; --bs-alert-bg: var(--ms-ink); --bs-alert-border-color: var(--ms-ink); --bs-alert-link-color: var(--ms-amber);
}
.alert-light, .alert-warning { --bs-alert-color: var(--ms-ink); --bs-alert-bg: var(--ms-paper); --bs-alert-border-color: var(--ms-amber); --bs-alert-link-color: var(--ms-ink); }
.alert-danger { --bs-alert-color: #fff; --bs-alert-bg: var(--ms-error); --bs-alert-border-color: var(--ms-error); --bs-alert-link-color: #fff; }
.alert-success .btn-close, .alert-info .btn-close, .alert-primary .btn-close, .alert-secondary .btn-close, .alert-dark .btn-close, .alert-danger .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
.alert a { color: var(--bs-alert-link-color); font-weight: 600; }
.pagination { flex-wrap: wrap; row-gap: 8px; --bs-pagination-font-size: 15px; --bs-pagination-color: var(--ms-ink); --bs-pagination-bg: var(--ms-paper); --bs-pagination-active-color: #fff; --bs-pagination-active-bg: var(--ms-ink); --bs-pagination-active-border-color: var(--ms-ink); --bs-pagination-border-color: var(--ms-line); --bs-pagination-hover-color: var(--ms-ink); --bs-pagination-hover-bg: var(--ms-wall); --bs-pagination-focus-color: var(--ms-ink); --bs-pagination-focus-bg: var(--ms-paper); --bs-pagination-focus-box-shadow: 0 0 0 3px rgba(255, 176, 0, .45); --bs-pagination-disabled-color: var(--ms-ink-2); }
@media (max-width: 767.98px) {
  /* поле меньше 16 px iPhone увеличивает при касании — на телефоне поля 17 px (ступень лесенки) */
  .form-control, .form-select, .input-group-text { font-size: 17px; }
}

/* ---------- шапка ---------- */
#top { display: none; }
/* чёрная полоса над шапкой: самовывоз слева, баллы справа оранжевым */
.ms-topbar { background: var(--ms-ink); color: rgba(255, 255, 255, .78); font-size: 13px; }
.ms-topbar .container { position: relative; }
.ms-topbar__row { display: flex; align-items: center; gap: 4px 24px; min-height: 36px; }
.ms-topbar__text { flex: 1 1 auto; min-width: 0; margin: 0; }
.ms-topbar__short { display: none; }
.ms-topbar__bonus { flex: none; color: var(--ms-amber); font-weight: 600; text-decoration: none; white-space: nowrap; }
.ms-topbar__bonus:hover, .ms-topbar__bonus:focus-visible { color: var(--ms-amber); text-decoration: underline; }
.ms-topbar__right { display: inline-flex; flex: none; align-items: center; gap: 10px; }
/* баланс баллов: оранжевая рамка, рядом с «+5% баллами» */
.ms-topbar__points { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 10px; border: 1px solid var(--ms-amber); border-radius: 999px; color: #fff; font-weight: 600; text-decoration: none; white-space: nowrap; }
.ms-topbar__points:hover, .ms-topbar__points:focus-visible { background: var(--ms-amber); color: var(--ms-ink); }
@media (max-width: 575.98px) {
  /* на телефоне у вошедшего — только баланс, «+5%» уже знает */
  .ms-topbar__bonus.has-points { display: none; }
}
.ms-header { background: var(--ms-paper); border-bottom: 1px solid var(--ms-line); }
.ms-header__row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto auto; gap: 16px; align-items: center; padding: 16px 0; }
.ms-logo { display: inline-flex; flex-direction: column; margin-right: 8px; text-decoration: none; line-height: 1; }
.ms-logo__word { font-family: var(--ms-display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.ms-logo__led { width: 9px; height: 9px; border-radius: 50%; background: var(--ms-amber); box-shadow: 0 0 0 3px rgba(255, 176, 0, .25); }
.ms-logo__tag { font-size: 13px; color: var(--ms-ink-2); margin-top: 6px; }
/* «☰ Каталог» — чёрная кнопка, разделы в панели */
.ms-catalog { position: relative; }
.ms-catalog__btn {
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px; border: 0; border-radius: 12px;
  background: var(--ms-ink); color: #fff; font-size: 15px; font-weight: 600; white-space: nowrap; transition: background-color .15s ease;
}
.ms-catalog__btn:hover, .ms-catalog__btn[aria-expanded="true"] { background: var(--ms-ink-hover); }
.ms-catalog__btn .fa-bars { font-size: 17px; }
.ms-catalog__panel { --bs-dropdown-min-width: 0; width: 420px; max-width: calc(100vw - 32px); margin-top: 8px !important; padding: 8px; border: 1px solid var(--ms-line); border-radius: 14px; box-shadow: 0 16px 40px -20px rgba(22, 23, 27, .45); max-height: min(70vh, 520px); overflow-y: auto; }
/* раскрывающиеся разделы: строки плотнее, подразделы прячутся под своим разделом */
.ms-catalog__link { min-height: 34px; padding: 5px 10px; font-size: 14px; }
.ms-catalog__toggle { width: 100%; border: 0; background: transparent; text-align: left; justify-content: space-between; gap: 10px; cursor: pointer; }
.ms-catalog__toggle .fa-chevron-down { font-size: 11px; color: var(--ms-ink-2); transition: transform .18s ease; }
.ms-catalog__toggle[aria-expanded="true"] .fa-chevron-down { transform: rotate(180deg); color: var(--ms-ink); }
.ms-catalog__toggle[aria-expanded="true"] { background: var(--ms-wall); }
.ms-catalog__sub-all { color: var(--ms-ink) !important; font-weight: 600; }
.ms-catalog__sub { margin: 0 0 2px; padding: 0 0 0 10px; }
.ms-catalog__sub a { min-height: 26px; padding: 2px 10px; }
.ms-catalog__list { columns: 1; margin: 0; padding: 0; list-style: none; }
.ms-catalog__item { break-inside: avoid; padding-bottom: 4px; }
.ms-catalog__link { display: flex; align-items: center; border-radius: 10px; color: var(--ms-ink); font-size: 15px; font-weight: 600; text-decoration: none; }
.ms-catalog__link:hover, .ms-catalog__link:focus-visible { background: var(--ms-wall); color: var(--ms-ink); }
.ms-catalog__sub { margin: -4px 0 6px; padding: 0 0 0 12px; list-style: none; }
.ms-catalog__sub a { display: flex; align-items: center; border-radius: 8px; color: var(--ms-ink-2); font-size: 13px; text-decoration: none; }
.ms-catalog__sub a:hover, .ms-catalog__sub a:focus-visible { background: var(--ms-wall); color: var(--ms-ink); }
/* поиск — с чёрной рамкой, кнопка внутри рамки */
.ms-header #search { margin: 0; flex-wrap: nowrap; }
.ms-header #search .form-control-lg { height: 48px; padding: 0 16px; font-size: 15px; border: 2px solid var(--ms-ink); border-right: 0; border-radius: 12px 0 0 12px; background: var(--ms-paper); }
.ms-header #search .form-control-lg:focus { box-shadow: none; }
.ms-header #search:focus-within { border-radius: 12px; box-shadow: 0 0 0 3px rgba(255, 176, 0, .45); }
.ms-header #search .btn-lg { min-height: 0; height: 48px; border: 2px solid var(--ms-ink); border-radius: 0 12px 12px 0; background: var(--ms-ink); color: #fff; padding: 0 18px; font-size: 17px; }
.ms-header #search .btn-lg:hover { background: var(--ms-ink-hover); border-color: var(--ms-ink-hover); }
/* «♡ Избранное» со счётчиком — как «Войти»: белая кнопка с рамкой; число — чёрной плашкой рядом со значком, не на нём */
.ms-favlink {
  display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; border: 1px solid var(--ms-line); border-radius: 12px;
  background: var(--ms-paper); color: var(--ms-ink); font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.ms-favlink:hover, .ms-favlink:focus-visible { border-color: var(--ms-ink); color: var(--ms-ink); }
.ms-favlink__icon { display: inline-flex; align-items: center; gap: 6px; font-size: 17px; }
.ms-favlink__count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: var(--ms-ink); color: #fff; font-size: 13px; font-weight: 700; line-height: 22px; text-align: center; font-variant-numeric: tabular-nums;
}
.ms-favlink__count[hidden] { display: none; }
.ms-favlink.is-bump .ms-favlink__icon { animation: ms-bump .45s cubic-bezier(.3, 1.6, .5, 1); }
/* корзина: оранжевая, число товаров — чёрной плашкой рядом со значком, сумма */
.ms-header #cart { margin: 0; padding: 0; width: auto; }
.ms-header #cart .btn-lg { min-height: 0; height: 48px; border-radius: 12px; background: var(--ms-amber); border-color: var(--ms-amber); color: var(--ms-ink); font-size: 15px; font-weight: 600; padding: 0 18px; }
.ms-header #cart .btn-lg:hover { background: var(--ms-amber-hover); border-color: var(--ms-amber-hover); }
.ms-header #cart .dropdown-menu { border-radius: 12px; border-color: var(--ms-line); min-width: 360px; }
.ms-cart { display: inline-flex !important; align-items: center; gap: 8px; white-space: nowrap; }
.ms-cart::after { display: none; }
.ms-cart__icon { display: inline-flex; font-size: 17px; }
.ms-cart__count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: var(--ms-ink); color: #fff; font-size: 13px; font-weight: 700; line-height: 22px; text-align: center; font-variant-numeric: tabular-nums;
}
#cart.is-bump .ms-cart__icon { animation: ms-bump .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes ms-bump { 0%, 100% { transform: none; } 40% { transform: translateY(-5px) scale(1.15); } }

/* ---------- хлебные крошки и боковые блоки ---------- */
.breadcrumb { background: transparent; border: 0; padding: 18px 0 4px; margin: 0; font-size: 13px; }
.breadcrumb > li.breadcrumb-item { text-shadow: none; padding: 0; white-space: normal; min-width: 0; }
.breadcrumb > li.breadcrumb-item:last-child { color: var(--ms-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.breadcrumb > li.breadcrumb-item > a { color: var(--ms-ink-2); text-decoration: none; }
.breadcrumb > li.breadcrumb-item > a:hover { color: var(--ms-ink); text-decoration: underline; }
.breadcrumb > li.breadcrumb-item:after { display: none; }
.breadcrumb > li.breadcrumb-item + li:before { content: "/"; color: var(--ms-line); padding: 0 8px; }
#column-left .list-group, #column-right .list-group { border-radius: 12px; overflow: hidden; }
#column-left .list-group-item { border-color: var(--ms-line); padding: 10px 14px; }
#column-left .list-group-item.active { background: var(--ms-ink); border-color: var(--ms-ink); color: #fff; }
#column-left .list-group-item.ms-list-child { padding-left: 30px; font-size: 13px; }
#column-left .list-group-item.ms-list-child.active { background: var(--ms-wall); border-color: var(--ms-line); color: var(--ms-ink); font-weight: 700; }
#column-left .card { border-radius: 12px; border-color: var(--ms-line); overflow: hidden; }
#column-left .card-header { background: var(--ms-paper); font-weight: 700; border-color: var(--ms-line); }
.ms-filter__group { font-size: 13px; font-weight: 700; color: var(--ms-ink-2); margin-bottom: 6px; float: none; }
.ms-filter .form-check { margin-bottom: 4px; }
.ms-filter .form-check-label { cursor: pointer; }

/* ---------- карточка товара в списке ---------- */
/* плитка: без рамки, фото со скруглением, сверху цена, ниже название, внизу кнопка «В корзину» */
.product-thumb {
  height: 100%; display: flex; flex-direction: column; margin: 0; padding: 0 0 12px;
  background: var(--ms-paper); border: 0; border-radius: 16px; overflow: hidden;
  transition: box-shadow .2s ease;
}
.product-thumb:hover { box-shadow: 0 8px 28px -14px rgba(30, 32, 36, .4); }
/* фото 3:4 во всю ширину карточки — без белых полей вокруг; размер — настройка config_image_product 360×480 */
/* серая заглушка, пока фото не загрузилось: место под фото 3:4 занято сразу, белых пустых карточек нет */
.product-thumb .image { position: relative; padding: 0; text-align: center; border-radius: 12px; overflow: hidden; background: var(--ms-line); }
.product-thumb .image img { display: block; aspect-ratio: 3 / 4; width: 100%; height: auto; object-fit: contain; }
.product-thumb .content { flex: 1; display: flex; flex-direction: column; padding: 10px 12px 0; }
.product-thumb .description { flex: 1; display: flex; flex-direction: column; padding: 0; margin: 0 0 10px; }
.product-thumb .price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; margin: 0 0 2px; font-family: var(--ms-display); font-size: 22px; font-weight: 600; line-height: 1.2; color: var(--ms-price); }
.product-thumb .price .price-new { color: var(--ms-price); }
.product-thumb .price-old { font-family: var(--ms-text); font-size: 13px; font-weight: 400; color: var(--ms-ink-2); text-decoration: line-through; }
.product-thumb .price-off { font-family: var(--ms-text); font-size: 13px; font-weight: 700; color: var(--ms-ink); }
.product-thumb .price-tax { display: none; }
.product-thumb .name {
  margin-top: 4px; font-size: 15px; font-weight: 400; line-height: 1.35; color: var(--ms-ink); text-decoration: none;
  /* три строки, а не две: в конце названия цвет рамки — без него не выбрать */
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.product-thumb .name:hover { color: var(--ms-ink); text-decoration: underline; }
/* «В корзину» → «удалить | N | +» (catalog/view/javascript/me-cart.js); кнопка и переключатель одной высоты — плитка не прыгает */
.ms-buy__add {
  display: block; width: 100%; height: 44px; border: 0; border-radius: 12px; padding: 0 12px; font-weight: 600; font-size: 15px;
  background: var(--ms-buy); color: var(--ms-buy-text); line-height: 1.2; text-align: center; transition: background-color .15s ease;
}
.ms-buy__add:hover { background: var(--ms-buy-hover); color: var(--ms-buy-text); }
.ms-buy__add:disabled { background: var(--ms-wall); color: var(--ms-ink-2); cursor: default; }
.ms-buy__qty {
  display: none; grid-template-columns: 46px minmax(0, 1fr) 46px; height: 44px; border-radius: 12px; overflow: hidden;
  background: var(--ms-buy); color: var(--ms-buy-text);
}
.ms-buy.is-in-cart .ms-buy__add { display: none; }
.ms-buy.is-in-cart .ms-buy__qty { display: grid; }
.ms-buy__qty button { border: 0; padding: 0; background: transparent; color: var(--ms-buy-text); font-size: 15px; transition: background-color .15s ease; }
.ms-buy__qty button:hover { background: var(--ms-amber-hover); }
.ms-buy__qty button:disabled { color: var(--ms-ink-2); background: transparent; cursor: default; }
.ms-buy__qty button:focus-visible, .ms-buy__input:focus-visible { outline-offset: -3px; }
.ms-buy__minus { border-right: 1px solid rgba(22, 23, 27, .12) !important; }
.ms-buy__plus { border-left: 1px solid rgba(22, 23, 27, .12) !important; }
.ms-buy__input {
  width: 100%; min-width: 0; border: 0; padding: 0; background: transparent; color: var(--ms-buy-text);
  font: 700 17px/1 var(--ms-text); text-align: center; font-variant-numeric: tabular-nums;
}
.ms-buy__input:focus { background: var(--ms-amber-hover); }
.ms-buy__go { display: none; font-weight: 600; }
.ms-buy.is-in-cart .ms-buy__go { display: inline-block; }
.ms-buy__note { margin-top: 6px; font-size: 13px; line-height: 1.3; color: var(--ms-error); }
.ms-buy__note:empty { display: none; }
/* страница товара: крупнее, «В корзину» янтарная, рядом «Перейти в корзину» */
.ms-buy--lg { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.ms-buy--lg .ms-buy__add, .ms-buy--lg .ms-buy__qty { width: 260px; max-width: 100%; height: 56px; border-radius: 14px; }
.ms-buy--lg .ms-buy__add { font-size: 17px; }
.ms-buy--lg .ms-buy__add:disabled { background: var(--ms-wall); color: var(--ms-ink-2); }
.ms-buy--lg .ms-buy__qty { grid-template-columns: 56px minmax(0, 1fr) 56px; }
.ms-buy--lg .ms-buy__qty button { font-size: 17px; }
.ms-buy--lg .ms-buy__input { font-size: 17px; }
.ms-buy--lg .ms-buy__note { flex-basis: 100%; margin-top: 0; }
#product-list.product-list .product-thumb { flex-direction: row; }

/* ---------- страница раздела ---------- */
.ms-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.ms-toolbar .input-group { width: auto; }
.ms-subcats { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 20px; }
.ms-subcats a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px; background: var(--ms-paper); border: 1px solid var(--ms-line); text-decoration: none; font-weight: 500; }
.ms-subcats a:hover { border-color: var(--ms-ink); }

/* ---------- подбор в разделе: строка фильтров, выбранное таблетками, «Показать ещё» ---------- */
.ms-filterbar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.ms-filters { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ms-fdrop { position: relative; }
.ms-fdrop__btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px 8px 16px; border: 1px solid var(--ms-line); border-radius: 12px;
  background: var(--ms-paper); color: var(--ms-ink); font-size: 15px; font-weight: 600; cursor: pointer; list-style: none; user-select: none; transition: border-color .15s ease;
}
.ms-fdrop__btn::-webkit-details-marker { display: none; }
.ms-fdrop__btn::after { content: ""; width: 7px; height: 7px; margin: -3px 2px 0; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s ease; }
.ms-fdrop[open] > .ms-fdrop__btn::after { margin-top: 3px; transform: rotate(-135deg); }
.ms-fdrop__btn:hover, .ms-fdrop[open] > .ms-fdrop__btn, .ms-fdrop__btn.is-active { border-color: var(--ms-ink); }
.ms-fdrop__n { min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--ms-ink); color: #fff; font-size: 13px; line-height: 20px; text-align: center; }
.ms-fdrop__panel {
  position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; min-width: 240px; padding: 12px; background: var(--ms-paper);
  border: 1px solid var(--ms-line); border-radius: 14px; box-shadow: 0 16px 40px -20px rgba(22, 23, 27, .45);
}
.ms-fdrop__panel fieldset { display: grid; gap: 2px; max-height: 320px; margin: 0 0 10px; overflow-y: auto; }
.ms-fdrop__option { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 8px; border-radius: 8px; font-size: 15px; cursor: pointer; white-space: nowrap; }
.ms-fdrop__option:hover { background: var(--ms-wall); }
.ms-fdrop__option .form-check-input { flex: none; width: 20px; height: 20px; margin: 0; }
.ms-fdrop__apply { width: 100%; }
.ms-fdrop__panel--price { width: 280px; }
.ms-fdrop__price { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.ms-fdrop__price label { display: grid; gap: 4px; }
.ms-fdrop__price span { font-size: 13px; color: var(--ms-ink-2); }
.ms-fstock {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 16px; border: 1px solid var(--ms-line); border-radius: 12px;
  background: var(--ms-paper); font-size: 15px; font-weight: 600; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.ms-fstock:hover { border-color: var(--ms-ink); }
.ms-fstock .form-check-input { flex: none; width: 20px; height: 20px; margin: 0; }
.ms-fstock:has(input:checked) { background: var(--ms-ink); border-color: var(--ms-ink); color: #fff; }
.ms-fstock:has(input:checked) .form-check-input { border-color: #fff; }
.ms-sort .form-select { width: auto; min-height: 44px; font-weight: 600; }
.ms-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 16px; }
.ms-chip {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 14px 6px 16px; border-radius: 999px; background: var(--ms-ink);
  color: #fff; font-size: 15px; font-weight: 600; text-decoration: none; transition: background-color .15s ease;
}
.ms-chip span { font-size: 22px; line-height: 1; font-weight: 400; }
.ms-chip:hover, .ms-chip:focus-visible { background: var(--ms-ink-hover); color: #fff; }
.ms-chips__reset { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: var(--ms-ink-2); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.ms-chips__reset:hover { color: var(--ms-ink); }
.ms-more-wrap { margin: 32px 0 48px; text-align: center; }
.ms-more {
  display: inline-flex; align-items: center; justify-content: center; width: 100%; max-width: 420px; min-height: 56px; padding: 12px 24px;
  border-radius: 14px; background: var(--ms-ink); color: #fff; font-size: 17px; font-weight: 600; text-decoration: none; transition: background-color .15s ease;
}
.ms-more:hover, .ms-more:focus-visible { background: var(--ms-ink-hover); color: #fff; }
.ms-more.is-loading { opacity: .7; cursor: progress; }
/* номера страниц — мелко, для поисковиков и тех, кто привык */
.ms-pages { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 16px; }
.ms-pages .pagination { --bs-pagination-font-size: 13px; --bs-pagination-padding-x: 10px; --bs-pagination-padding-y: 4px; margin: 0; }
.ms-pages__results { margin: 0; font-size: 13px; color: var(--ms-ink-2); }
.ms-empty { margin: 8px 0 48px; padding: 32px 24px; background: var(--ms-paper); border: 1px solid var(--ms-line); border-radius: 16px; text-align: center; }
.ms-empty p { margin: 0 0 16px; font-size: 17px; }
@media (max-width: 575.98px) {
  .ms-filters { width: 100%; }
  .ms-fdrop { position: static; }
  .ms-fdrop__panel, .ms-fdrop__panel--price { left: 0; right: 0; width: auto; min-width: 0; }
  .ms-sort { flex: 1 1 100%; }
  .ms-sort .form-select { width: 100%; max-width: none; }
}

/* ---------- карточка товара ---------- */
/* название товара длинное — подзаголовок 22 px; заголовок 40 px растянулся бы на четыре строки */
#product-info h1.ms-product-title { font-family: var(--ms-text); font-weight: 700; font-size: 22px; line-height: 1.3; letter-spacing: 0; margin: 4px 0 16px; }
.ms-product-meta { color: var(--ms-ink-2); font-size: 13px; margin-bottom: 16px; }
#product-info h2:has(.price-new) { margin: 0; }
#product-info .price-new { font-family: var(--ms-display); font-size: 32px; font-weight: 600; color: var(--ms-price); }
#product-info .image .img-thumbnail { border-color: var(--ms-line); border-radius: 12px; background: var(--ms-paper); }
#product-info .ms-gallery__main .img-thumbnail { border: 0; border-radius: 16px; }
#product-info .image > a > .img-thumbnail { width: 100%; }
#product-info #button-cart { padding-left: 28px; padding-right: 28px; }
.ms-reward {
  display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--ms-paper); border: 1px solid var(--ms-line); color: var(--ms-ink); font-size: 13px; font-weight: 600; text-decoration: none;
}
.ms-reward::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ms-amber); }
.ms-reward:hover { text-decoration: underline; color: var(--ms-ink); }
.ms-desc-lead { margin: 0 0 8px; font-weight: 700; }
.ms-desc-list { margin: 0 0 16px; padding-left: 0; list-style: none; max-width: 75ch; }
.ms-desc-list li { position: relative; padding-left: 22px; margin-bottom: 6px; }
.ms-desc-list li::before { content: ""; position: absolute; left: 4px; top: .6em; width: 8px; height: 8px; border-radius: 50%; background: var(--ms-amber); }

/* галерея: большое фото + лента миниатюр */
.ms-gallery__main { display: block; cursor: zoom-in; }
/* главное фото товара 3:4 без полей — настройка config_image_thumb 600×800 */
.ms-gallery__main .img-thumbnail { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: contain; padding: 0; }
/* на широком экране фото 3:4 во всю колонку выше экрана — держим около 500×670 */
@media (min-width: 768px) {
  .ms-gallery__main, .ms-gallery__thumbs { max-width: 500px; margin-left: auto; margin-right: auto; }
}
.ms-gallery__thumbs { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--ms-line) transparent; }
/* миниатюры 3:4, как главное фото — настройка config_image_additional 75×100 */
.ms-gallery__thumb { flex: 0 0 60px; height: 80px; padding: 0; overflow: hidden; border: 1px solid var(--ms-line); border-radius: 10px; background: var(--ms-paper); scroll-snap-align: start; transition: border-color .15s ease; }
.ms-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.ms-gallery__thumb:hover { border-color: var(--ms-ink-2); }
.ms-gallery__thumb.is-active { border-color: var(--ms-ink); box-shadow: inset 0 0 0 1px var(--ms-ink); }

/* условия под кнопкой «В корзину» */
.ms-buy-info { display: grid; gap: 14px; margin: 8px 0 0; padding: 18px 20px; background: var(--ms-paper); border: 1px solid var(--ms-line); border-radius: 12px; }
.ms-buy-info li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 13px; color: var(--ms-ink-2); line-height: 1.4; }
.ms-buy-info i { color: var(--ms-ink); font-size: 17px; margin-top: 2px; text-align: center; }
.ms-buy-info b { display: block; color: var(--ms-ink); font-size: 15px; margin-bottom: 2px; }
.ms-buy-info a { color: var(--ms-ink); font-weight: 600; }

/* цены: блок с ценой, под ним баллы */
.ms-prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; max-width: 460px; margin: 4px 0 10px; }
.ms-prices__here { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 84px; padding: 12px 18px; border-radius: 14px; }
.ms-prices__here { background: var(--ms-ink); color: #fff; }
#product-info .ms-prices__here .price-new { color: #fff; font-size: 32px; line-height: 1.15; }
.ms-prices__save { margin: 0 0 2px; font-size: 15px; }
.ms-prices__save a { font-weight: 600; color: var(--ms-ink); }
.ms-prices__date { margin: 0 0 12px; font-size: 13px; color: var(--ms-ink-2); }
/* цвета серии кружками: выбранный — с оранжевой обводкой, щелчок открывает товар этого цвета */
.ms-colors { margin: 16px 0 4px; }
.ms-colors__title { margin: 0 0 8px; font-size: 15px; color: var(--ms-ink-2); }
.ms-colors__title b { color: var(--ms-ink); font-weight: 600; }
.ms-colors__list { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 4px; list-style: none; }
.ms-swatch {
  position: relative; display: block; width: 48px; height: 48px; overflow: hidden; border-radius: 50%; background: var(--ms-swatch, var(--ms-wall));
  box-shadow: inset 0 0 0 1px rgba(22, 23, 27, .14); transition: box-shadow .15s ease, transform .15s ease;
}
.ms-swatch img { width: 100%; height: 100%; object-fit: cover; }
.ms-swatch.is-light { box-shadow: inset 0 0 0 1px var(--ms-line); }
a.ms-swatch:hover { transform: scale(1.06); box-shadow: inset 0 0 0 1px rgba(22, 23, 27, .14), 0 0 0 2px var(--ms-paper), 0 0 0 4px var(--ms-ink); }
.ms-swatch.is-current { box-shadow: inset 0 0 0 1px rgba(22, 23, 27, .14), 0 0 0 3px var(--ms-paper), 0 0 0 6px var(--ms-amber); }
.ms-swatch.is-out { opacity: .55; }
.ms-swatch.is-out::after { content: ""; position: absolute; left: 50%; top: -4px; bottom: -4px; width: 2px; background: var(--ms-ink); transform: rotate(45deg); }
/* «В корзину — 300 ₽» на всю ширину, рядом «В избранное» */
.ms-buy-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; max-width: 560px; margin: 20px 0 16px; }
.ms-buy-row .ms-buy--lg { flex: 1 1 260px; min-width: 0; }
.ms-buy-row .ms-buy--lg .ms-buy__add, .ms-buy-row .ms-buy--lg .ms-buy__qty { width: 100%; }
.ms-buy-row .ms-buy--lg .ms-buy__go { margin-top: 2px; }
.ms-wish {
  display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 8px; height: 56px; padding: 0 20px; border: 1px solid var(--ms-line);
  border-radius: 14px; background: var(--ms-paper); color: var(--ms-ink); font-size: 15px; font-weight: 600; text-decoration: none; transition: border-color .15s ease;
}
.ms-wish:hover, .ms-wish:focus-visible { border-color: var(--ms-ink); color: var(--ms-ink); }
.ms-wish i { font-size: 17px; }
.ms-wish.is-on { border-color: var(--ms-ink); }
.ms-wish.is-on i { color: var(--ms-ink); }
.ms-wish[aria-busy="true"] { opacity: .7; }
.ms-wish:disabled { opacity: .6; }
/* описание и характеристики — блоками, без вкладок */
.ms-about { display: grid; gap: 40px; max-width: 900px; margin: 40px 0 0; }
.ms-about__block > h2 { margin: 0 0 16px; }
.ms-about__text { font-size: 15px; line-height: 1.6; }
.ms-about__text p { max-width: 75ch; }
.ms-specs { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--ms-paper); border: 1px solid var(--ms-line); border-radius: 16px; overflow: hidden; }
.ms-specs th, .ms-specs td { padding: 12px 20px; border-top: 1px solid var(--ms-line); font-size: 15px; text-align: left; vertical-align: top; }
.ms-specs tbody:first-of-type tr:first-child > * { border-top: 0; }
.ms-specs th { width: 45%; color: var(--ms-ink-2); font-weight: 400; }
.ms-specs td { color: var(--ms-ink); }
.ms-specs .ms-specs__group th { width: auto; padding-top: 18px; color: var(--ms-ink); font-size: 17px; font-weight: 700; background: var(--ms-wall); }
/* «Соберите комплект» */
.ms-kit__head h2 { margin: 0 0 8px; }
.ms-kit__lead { margin: 0 0 20px; color: var(--ms-ink-2); font-size: 15px; }
.ms-kit__item { display: flex; flex-direction: column; gap: 8px; }
.ms-kit__item .product-thumb { flex: 1; height: auto; }
.ms-kit__check {
  display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; padding: 8px 12px; border: 1px solid var(--ms-line); border-radius: 12px;
  background: var(--ms-paper); font-size: 15px; font-weight: 600; cursor: pointer; transition: border-color .15s ease;
}
.ms-kit__check .form-check-input { flex: none; width: 22px; height: 22px; margin: 0; }
.ms-kit__item.is-picked .ms-kit__check { border-color: var(--ms-ink); }
.ms-kit__check.is-off { color: var(--ms-ink-2); cursor: default; }
.ms-kit__bar {
  position: sticky; bottom: 12px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px; padding: 10px 10px 10px 20px; background: var(--ms-ink); color: #fff; border-radius: 16px;
}
.ms-kit__sum { margin: 0; font-size: 15px; font-weight: 600; }
.ms-kit__add { min-height: 56px; }
/* плашка «Добавлено» внизу экрана и летящее фото */
.ms-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 1090; width: max-content; max-width: min(560px, calc(100vw - 32px)); padding: 14px 20px;
  border-radius: 14px; background: var(--ms-ink); color: #fff; font-size: 15px; font-weight: 600; line-height: 1.4;
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .55); transform: translate(-50%, 16px); opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .2s ease, transform .25s cubic-bezier(.16, 1, .3, 1), visibility 0s linear .25s;
}
.ms-toast.is-on { opacity: 1; visibility: visible; transform: translate(-50%, 0); pointer-events: auto; transition: opacity .2s ease, transform .25s cubic-bezier(.16, 1, .3, 1); }
.ms-toast a { color: var(--ms-amber); text-decoration: underline; text-underline-offset: 3px; }
.ms-toast a:hover { color: var(--ms-amber); }
.ms-toast--error { background: var(--ms-error); }
.ms-toast--error a, .ms-toast--error a:hover { color: #fff; }
.ms-fly { position: fixed; z-index: 1095; object-fit: cover; border-radius: 10px; pointer-events: none; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5); }

.ms-sticky-buy { display: none; }
@media (max-width: 767.98px) {
  .ms-sticky-buy {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--ms-ink); color: #fff;
    box-shadow: 0 -8px 24px -16px rgba(0, 0, 0, .5);
    transform: translateY(110%); transition: transform .25s cubic-bezier(.16, 1, .3, 1); visibility: hidden;
  }
  .ms-sticky-buy.is-visible { transform: none; visibility: visible; }
  body:has(.ms-sticky-buy) footer { padding-bottom: 96px; }
  .ms-sticky-buy__price { font-family: var(--ms-display); font-size: 22px; font-weight: 600; color: #fff; }
  .ms-sticky-buy .btn { flex: 0 0 auto; padding: 12px 28px; border-radius: 12px; font-weight: 600; }
  .ms-sticky-buy .ms-buy { flex: 0 0 auto; display: block; }
  .ms-sticky-buy .ms-buy__add, .ms-sticky-buy .ms-buy__qty { width: 184px; height: 48px; border-radius: 12px; }
  .ms-kit__bar { position: static; }
  #product-info .ms-prices__here .price-new { font-size: 22px; }
  .ms-prices__here { min-height: 72px; padding: 10px 14px; }
  .ms-wish { flex: 1 1 100%; }
  .ms-specs th, .ms-specs td { padding: 10px 14px; }
  .ms-specs th { width: 48%; }
  .ms-sticky-buy .ms-buy__go { display: none !important; }
  .ms-sticky-buy .ms-buy__note { position: absolute; right: 0; bottom: calc(100% + 8px); max-width: 240px; padding: 6px 10px; border-radius: 8px; background: var(--ms-paper); box-shadow: 0 4px 16px -6px rgba(30, 32, 36, .4); }
}
.ms-related { margin-top: 40px; }
.ms-related > h2 { margin: 0 0 20px; }

/* ---------- главная ---------- */
#common-home { padding-top: 0; }
/* первый экран: слева чёрный блок, справа оранжевый пример сравнения */
.ms-hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; margin: 24px 0 56px; }
.ms-hero--solo { grid-template-columns: 1fr; }
.ms-hero__main { display: flex; flex-direction: column; justify-content: center; padding: 48px; background: var(--ms-ink); color: #fff; border-radius: 24px; }
.ms-hero h1 { color: #fff; font-size: 40px; line-height: 1.12; letter-spacing: -0.02em; font-weight: 700; margin: 0 0 20px; max-width: 18ch; text-wrap: balance; }
.ms-hero__lead { font-size: 17px; color: rgba(255, 255, 255, .78); max-width: 46ch; margin: 0 0 28px; }
/* магазин над заголовком: название оранжевым */
.ms-hero__shop { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; align-self: flex-start; margin: 0 0 18px; color: rgba(255, 255, 255, .78); font-size: 15px; text-decoration: none; }
.ms-hero__shop b { font-family: var(--ms-display); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; color: var(--ms-amber); }
.ms-hero__shop i { font-size: 13px; }
.ms-hero__shop:hover, .ms-hero__shop:focus-visible { color: #fff; }
.ms-hero__shop:hover span, .ms-hero__shop:focus-visible span { text-decoration: underline; text-underline-offset: 3px; }
/* три пункта под заголовком: оранжевая галочка */
.ms-hero__points { display: grid; gap: 10px; margin: 0 0 28px; padding: 0; list-style: none; }
.ms-hero__points li { position: relative; padding-left: 30px; font-size: 17px; line-height: 1.4; color: #fff; }
.ms-hero__points li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--ms-amber);
  -webkit-mask: none; mask: none;
}
.ms-hero__points li::after { content: ""; position: absolute; left: 6px; top: 7px; width: 8px; height: 5px; border-left: 2px solid var(--ms-ink); border-bottom: 2px solid var(--ms-ink); transform: rotate(-45deg); }
.ms-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ms-example { display: grid; grid-template-rows: auto 1fr auto; gap: 16px; min-width: 0; padding: 28px; background: var(--ms-amber); color: var(--ms-ink); border-radius: 24px; }
.ms-example__label { justify-self: start; padding: 4px 10px; border-radius: 999px; background: var(--ms-ink); color: #fff; font-size: 13px; font-weight: 600; }
/* слайды лежат друг на друге в одной клетке — высота блока не прыгает */
.ms-example__slides { display: grid; min-width: 0; }
.ms-slide {
  grid-area: 1 / 1; display: grid; align-content: space-between; gap: 16px; min-width: 0; color: var(--ms-ink); text-decoration: none;
  opacity: 0; visibility: hidden; transform: translateX(16px);
  transition: opacity .45s ease, transform .45s cubic-bezier(.16, 1, .3, 1), visibility 0s linear .45s;
}
.ms-slide.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .45s ease, transform .45s cubic-bezier(.16, 1, .3, 1); }
.ms-slide:hover, .ms-slide:focus-visible { color: var(--ms-ink); }
.ms-slide:hover .ms-example__name, .ms-slide:focus-visible .ms-example__name { text-decoration: underline; text-underline-offset: 3px; }
.ms-example__body { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 20px; align-items: center; }
.ms-example__img { width: 140px; height: 187px; object-fit: cover; border-radius: 14px; background: var(--ms-paper); }
.ms-example__name { font-size: 17px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.ms-example__rows { display: grid; gap: 6px; }
.ms-example__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 15px; }
.ms-example__row s { font-family: var(--ms-display); font-size: 22px; font-weight: 600; text-decoration-thickness: 2px; }
.ms-example__row--our { padding-top: 6px; border-top: 1px solid rgba(22, 23, 27, .2); }
.ms-example__row b { font-family: var(--ms-display); font-size: 32px; font-weight: 600; line-height: 1.1; }
.ms-example__save { justify-self: start; margin-top: 4px; padding: 6px 12px; border-radius: 10px; background: var(--ms-ink); color: #fff; font-size: 15px; font-weight: 700; }
.ms-example__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.ms-example__note { font-size: 13px; color: rgba(22, 23, 27, .72); }
.ms-example__nav { display: flex; align-items: center; gap: 2px; }
.ms-example__dot { position: relative; width: 24px; height: 32px; padding: 0; border: 0; background: none; color: var(--ms-ink); }
.ms-example__dot::before { content: ""; position: absolute; inset: 0; margin: auto; width: 8px; height: 8px; border-radius: 4px; background: rgba(22, 23, 27, .3); transition: width .2s ease, background-color .2s ease; }
.ms-example__dot:hover::before { background: rgba(22, 23, 27, .55); }
.ms-example__dot.is-active::before { width: 20px; background: var(--ms-ink); }
.ms-example__pause { color: var(--ms-ink); position: relative; flex: none; width: 32px; height: 32px; margin-left: 6px; padding: 0; border: 0; border-radius: 50%; background: rgba(22, 23, 27, .12); }
.ms-example__pause:hover { background: rgba(22, 23, 27, .2); }
/* «пауза» — две полоски, «показывать» — треугольник */
.ms-example__pause::before, .ms-example__pause::after { content: ""; position: absolute; top: 10px; width: 3px; height: 12px; border-radius: 1px; background: var(--ms-ink); }
.ms-example__pause::before { left: 11px; }
.ms-example__pause::after { right: 11px; }
.ms-example.is-paused .ms-example__pause::before { left: 12px; top: 9px; width: 0; height: 0; border-radius: 0; background: none; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent var(--ms-ink); }
.ms-example.is-paused .ms-example__pause::after { display: none; }

/* «живая» кнопка-ссылка: текст и кружок со стрелкой; при наведении кружок чернеет и отъезжает вправо */
.ms-go {
  --ms-go-bg: var(--ms-amber); --ms-go-fg: var(--ms-ink); --ms-go-dot: var(--ms-paper); --ms-go-arrow: var(--ms-ink); --ms-go-line: var(--ms-amber);
  display: inline-flex; align-items: center; gap: 14px; min-height: 52px; padding: 6px 6px 6px 22px; border: 2px solid var(--ms-go-line); border-radius: 14px;
  background: var(--ms-go-bg); color: var(--ms-go-fg); font-size: 17px; font-weight: 600; text-decoration: none;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.ms-go__arrow {
  position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--ms-go-dot);
  transition: background-color .2s ease, transform .25s cubic-bezier(.16, 1, .3, 1);
}
.ms-go__arrow::before { content: ""; position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; background: var(--ms-go-arrow);
  -webkit-mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath d='M2 8h11M9 3.5 13.5 8 9 12.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath d='M2 8h11M9 3.5 13.5 8 9 12.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e") center / contain no-repeat;
  transition: background-color .2s ease; }
.ms-go:hover, .ms-go:focus-visible { --ms-go-bg: var(--ms-amber); --ms-go-fg: var(--ms-ink); --ms-go-dot: var(--ms-ink); --ms-go-arrow: #fff; --ms-go-line: var(--ms-amber); color: var(--ms-ink); }
.ms-go:hover .ms-go__arrow, .ms-go:focus-visible .ms-go__arrow { transform: translateX(4px); }
/* с рамкой на чёрном: белая рамка и текст, при наведении заливается оранжевым */
.ms-go--ghost { --ms-go-bg: transparent; --ms-go-fg: #fff; --ms-go-dot: rgba(255, 255, 255, .16); --ms-go-arrow: #fff; --ms-go-line: rgba(255, 255, 255, .55); }
/* с рамкой на светлом */
.ms-go--line { --ms-go-bg: var(--ms-paper); --ms-go-fg: var(--ms-ink); --ms-go-dot: var(--ms-wall); --ms-go-arrow: var(--ms-ink); --ms-go-line: var(--ms-line); }

.ms-section { padding: 0 0 56px; }
.ms-section > h2 { margin: 0 0 24px; }

/* разделы каталога плитками */
.ms-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 16px; margin: 0; padding: 0 0 6px; list-style: none; }
.ms-tile {
  --ms-edge: var(--ms-line);
  position: relative; display: flex; flex-direction: column; gap: 6px; height: 100%; min-height: 136px; padding: 20px 22px 18px;
  background: var(--ms-paper); border: 1px solid var(--ms-line); border-radius: 16px; color: var(--ms-ink); text-decoration: none;
  box-shadow: 0 5px 0 var(--ms-edge), 0 14px 24px -18px rgba(22, 23, 27, .45);
  transition: transform .18s cubic-bezier(.16, 1, .3, 1), box-shadow .18s cubic-bezier(.16, 1, .3, 1), border-color .18s ease;
}
.ms-tile:hover, .ms-tile:focus-visible {
  --ms-edge: var(--ms-amber); color: var(--ms-ink); border-color: var(--ms-amber); transform: translateY(-3px);
  box-shadow: 0 8px 0 var(--ms-edge), 0 22px 30px -18px rgba(22, 23, 27, .5);
}
.ms-tile:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ms-edge), 0 6px 12px -10px rgba(22, 23, 27, .45); }
/* длинные названия разделов («Электроустановка», «Автоматические выключатели и предохранители») переносятся
   внутри плитки, а не вылезают за неё — иначе на телефоне вся страница едет вбок */
.ms-tile__name { font-family: var(--ms-display); font-size: 22px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; overflow-wrap: break-word; }
.ms-tile__sub { font-size: 13px; color: var(--ms-ink-2); line-height: 1.35; }
.ms-tile__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 10px; }
.ms-tile__count { font-size: 13px; color: var(--ms-ink-2); }
.ms-tile__arrow {
  position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--ms-wall);
  transition: background-color .18s ease, transform .25s cubic-bezier(.16, 1, .3, 1);
}
.ms-tile__arrow::before {
  content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; background: var(--ms-ink); transition: background-color .18s ease;
  -webkit-mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath d='M2 8h11M9 3.5 13.5 8 9 12.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath d='M2 8h11M9 3.5 13.5 8 9 12.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e") center / contain no-repeat;
}
.ms-tile:hover .ms-tile__arrow, .ms-tile:focus-visible .ms-tile__arrow { background: var(--ms-ink); transform: translateX(4px); }
.ms-tile:hover .ms-tile__arrow::before, .ms-tile:focus-visible .ms-tile__arrow::before { background: #fff; }

/* «Сейчас в наличии»: таблетки разделов */
.ms-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 20px; }
.ms-pill {
  min-height: 44px; padding: 8px 18px; border: 1px solid var(--ms-line); border-radius: 999px; background: var(--ms-paper);
  color: var(--ms-ink); font-size: 15px; font-weight: 600; transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.ms-pill:hover { border-color: var(--ms-ink); }
.ms-pill[aria-pressed="true"] { background: var(--ms-ink); border-color: var(--ms-ink); color: #fff; }
.ms-pills__more { margin: 24px 0 0; }

/* блок доверия: четыре карточки с крупной цифрой */
.ms-trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; padding: 0 0 64px; }
.ms-trust__card {
  display: flex; flex-direction: column; gap: 8px; padding: 24px; background: var(--ms-paper); border: 1px solid var(--ms-line); border-radius: 16px;
  color: var(--ms-ink); text-decoration: none; transition: border-color .15s ease;
}
a.ms-trust__card:hover, a.ms-trust__card:focus-visible { border-color: var(--ms-ink); color: var(--ms-ink); }
.ms-trust__num { font-family: var(--ms-display); font-size: 32px; font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; }
.ms-trust__text { font-size: 15px; color: var(--ms-ink-2); line-height: 1.4; }

/* ---------- подвал ---------- */
footer { position: static; bottom: auto; background: var(--ms-ink); color: rgba(255, 255, 255, .78); padding: 48px 0 32px; margin-top: 0; border: 0; }
footer h5 { color: #fff; font-family: var(--ms-display); font-weight: 600; font-size: 15px; margin-bottom: 14px; }
footer a { color: #fff; text-decoration: none; }
footer a:hover { color: var(--ms-amber); text-decoration: underline; }
footer li { margin-bottom: 8px; }
.ms-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 32px; }
.ms-footer__brand .ms-logo__word { color: #fff; }
.ms-footer__brand p { margin: 12px 0 0; max-width: 30ch; font-size: 13px; }
.ms-footer__phone { font-size: 17px; font-weight: 700; color: #fff !important; }
.ms-footer__legal { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 32px; padding-top: 20px; font-size: 13px; color: rgba(255, 255, 255, .62); }

/* ---------- адаптив ---------- */
/* до 1400 px подпись под логотипом и ссылки под телефоном отнимают место у поиска */
@media (max-width: 1399.98px) {
  .ms-logo__tag { display: none; }
}
@media (max-width: 1199.98px) {
  /* планшет и телефон: логотип, вход и корзина сверху; «Каталог» и поиск — второй строкой, поиск на всю оставшуюся ширину */
  .ms-header__row { grid-template-columns: auto minmax(0, 1fr) auto auto auto; gap: 12px; }
  .ms-logo { grid-column: 1 / 3; grid-row: 1; }
  .ms-favlink { grid-column: 3; grid-row: 1; }
  .ms-account { grid-column: 4; grid-row: 1; }
  .ms-header__cart { grid-column: 5; grid-row: 1; }
  .ms-catalog { grid-column: 1; grid-row: 2; }
  .ms-header__search { grid-column: 2 / 6; grid-row: 2; min-width: 0; }
}
@media (max-width: 991.98px) {
  .ms-topbar__long { display: none; }
  .ms-topbar__short { display: inline; }
  .ms-hero { grid-template-columns: 1fr; margin: 16px 0 40px; }
  .ms-hero__main { padding: 36px 28px; border-radius: 20px; }
  .ms-hero h1 { font-size: 32px; }
  .ms-example { border-radius: 20px; }
  .ms-footer__grid { grid-template-columns: 1fr 1fr; }
  /* плитки разделов в три колонки: в узкой плитке заголовочный шрифт мельче, чтобы слова не рвались */
  .ms-tile__name { font-size: 16px; }
  /* пять товаров в ряд на планшете: карточка уже, поэтому цена и кнопка мельче и в одну строку */
  .product-thumb .price { font-size: 18px; }
  .product-thumb .name { font-size: 14px; }
  .ms-buy__add { font-size: 13px; padding: 0 8px; white-space: nowrap; }
  .ms-buy__add .fa-solid { display: none; }
}
@media (max-width: 767.98px) {
  .ms-section { padding-bottom: 40px; }
  /* таблетки разделов на телефоне — одна строка с прокруткой вбок, а не десять строк во всю ширину */
  .ms-pills { flex-wrap: nowrap; overflow-x: auto; margin: 0 0 20px; padding: 0 0 6px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .ms-pills::-webkit-scrollbar { display: none; }
  .ms-pill { flex: 0 0 auto; white-space: nowrap; scroll-snap-align: start; }
  .ms-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
  .ms-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-bottom: 40px; }
  .ms-trust__card { padding: 18px 16px; }
  .ms-trust__num { font-size: 22px; }
  .ms-trust__text { font-size: 13px; }
  .ms-header #cart .btn-lg .ms-cart__total { display: none; }
  /* шапка на телефоне: меньше отступов, чтобы товар начинался выше */
  .ms-header__row { padding: 10px 0 12px; gap: 10px 12px; }
  .ms-logo__word { font-size: 22px; }
  .ms-header #search .form-control-lg, .ms-header #search .btn-lg, .ms-header #cart .btn-lg, .ms-catalog__btn { height: 44px; }
  .ms-header #search .form-control-lg { font-size: 17px; }
  .ms-catalog__panel { position: absolute; left: 0; top: 100%; width: calc(100vw - 32px); max-height: 70vh; overflow-y: auto; }
  .ms-catalog__list { columns: 1; }
  .product-thumb .price { font-size: 17px; }

  .ms-header #cart .dropdown-menu { min-width: 300px; }
}
@media (max-width: 575.98px) {
  .ms-catalog__btn { width: 44px; padding: 0; justify-content: center; }
  .ms-topbar__more { display: none; }
  .ms-catalog__btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ms-footer__grid { grid-template-columns: 1fr; }
  .ms-logo__tag { display: none; }
  .ms-hero { margin: 12px 0 32px; gap: 12px; }
  .ms-hero__main { padding: 28px 20px; border-radius: 18px; }
  .ms-hero__actions .ms-go { flex: 1 1 100%; justify-content: space-between; }
  .ms-example { padding: 20px; border-radius: 18px; }
  .ms-example__row b { font-size: 22px; }
  .ms-example__row s { font-size: 17px; }
  .ms-example__body { grid-template-columns: 110px minmax(0, 1fr); gap: 14px; }
  .ms-example__img { width: 110px; height: 147px; }
  .ms-example__name { -webkit-line-clamp: 4; }
  .ms-tile { min-height: 112px; padding: 14px 14px 12px; border-radius: 14px; }
  /* в узкой плитке название раздела — обычным шрифтом: широкий заголовочный не влезает и рвётся по буквам */
  .ms-tile__name { font-family: var(--ms-text); font-size: 15px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
  .ms-tile__sub { display: none; }
  .ms-tile__arrow { width: 32px; height: 32px; }
  .ms-tile__arrow::before { width: 14px; height: 14px; }
  .ms-pill { padding: 8px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* вводный текст раздела под заголовком */
.ms-cat-intro { max-width: 72ch; margin: -8px 0 24px; color: var(--ms-ink-2); font-size: 16px; line-height: 1.55; }
.ms-cat-intro p { margin: 0; }

/* текстовые страницы: доставка, оплата, возврат, документы — удобная ширина строки */
#information-information #content { max-width: 780px; padding-bottom: 56px; font-size: 17px; line-height: 1.6; }
#information-information #content h2 { font-family: var(--ms-display); font-weight: 600; font-size: 22px; letter-spacing: -0.01em; margin: 36px 0 12px; }
#information-information #content h3 { font-size: 17px; margin: 24px 0 8px; }
#information-information #content p { margin: 0 0 12px; }
#information-information #content ul, #information-information #content ol { margin: 0 0 16px; padding-left: 22px; }
#information-information #content li { margin-bottom: 6px; }
#information-information #content li::marker { color: var(--ms-ink-2); }
#information-information #content a { font-weight: 600; }

/* «В корзину» — значок и подпись одной строкой */
.ms-buy__add { display: flex; align-items: center; justify-content: center; gap: 8px; }
.ms-buy__add i { font-size: 15px; }
.ms-buy__add:disabled i { display: none; }

/* вход и личный кабинет в шапке */
.ms-account__link {
  display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; border: 1px solid var(--ms-line); border-radius: 12px;
  background: var(--ms-paper); color: var(--ms-ink); font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.ms-account__link:hover { border-color: var(--ms-ink); color: var(--ms-ink); }
.ms-account .dropdown-menu { border-radius: 12px; border-color: var(--ms-line); }
@media (max-width: 767.98px) {
  .ms-account__link { height: 44px; padding: 0 12px; }
}
@media (max-width: 575.98px) {
  .ms-account__link span { display: none; }
}

/* личный кабинет: карточки вместо списка ссылок */
.ms-cabinet { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 8px 0 24px; }
.ms-cabinet__card {
  display: flex; flex-direction: column; gap: 4px; padding: 20px; background: var(--ms-paper); border: 1px solid var(--ms-line); border-radius: 12px;
  color: var(--ms-ink); text-decoration: none; transition: border-color .15s ease;
}
.ms-cabinet__card:hover { border-color: var(--ms-ink); color: var(--ms-ink); }
.ms-cabinet__label { font-size: 13px; color: var(--ms-ink-2); }
.ms-cabinet__card b { font-size: 22px; }
.ms-cabinet__hint { font-size: 13px; color: var(--ms-ink-2); }
.ms-cabinet__links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; list-style: none; }
.ms-cabinet__links a { color: var(--ms-ink-2); }
.ms-cabinet__links a:hover { color: var(--ms-ink); }
@media (max-width: 767.98px) {
  .ms-cabinet { grid-template-columns: 1fr; }
}

/* оплата онлайн (Ozon Pay): подсказка у кнопки и страницы результата */
.ms-pay__note { margin: 0 0 12px; color: var(--ms-ink-2); font-size: 13px; text-align: right; }
.ms-pay-result { max-width: 64ch; margin: 8px 0 32px; }
.ms-pay-result p { font-size: 15px; }
.ms-pay-result__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.ms-pay-result__lead { font-size: 17px !important; font-weight: 600; }
.ms-pay-result__steps { margin: 0 0 20px; padding-left: 22px; font-size: 15px; }
.ms-pay-result__steps li { margin-bottom: 6px; }
.ms-pay-result__check { padding: 16px 18px; border: 2px solid var(--ms-amber); border-radius: 12px; background: var(--ms-paper); }
.ms-pay-result__check p { margin: 0; }
.ms-pay-result__check .ms-pay-result__check-title { margin-bottom: 6px; font-size: 17px; font-weight: 700; }
@media (max-width: 575.98px) {
  .ms-pay__note { text-align: left; }
  .ms-pay-result__actions .btn { flex: 1 1 100%; }
}

/* листание фото в плитке товара (me-gallery.js) */
.product-thumb .image.ms-gallery { position: relative; }
.ms-gallery__dots {
  position: absolute; left: 12px; right: 12px; bottom: 8px; display: flex; justify-content: center; gap: 4px; pointer-events: none;
}
.ms-gallery__dots i { flex: 0 0 5px; height: 5px; border-radius: 50%; background: var(--ms-line); transition: background-color .15s ease, flex-basis .15s ease; }
.ms-gallery__dots i.is-active { flex-basis: 14px; border-radius: 3px; background: var(--ms-ink); }

/* способы оплаты списком (checkout/payment_method.twig) — как варианты доставки */
.ms-pay-methods__wait { margin: 0; padding: 12px 14px; border: 1px dashed var(--ms-line); border-radius: 10px; color: var(--ms-ink-2); font-size: 15px; }
#ms-pay-list .ms-delivery__option { background: var(--ms-paper); }
#ms-pay-list .ms-delivery__option .form-check { display: flex; gap: 10px; align-items: flex-start; padding-left: 0; }
#ms-pay-list .ms-delivery__option .form-check-input { float: none; margin: 3px 0 0; flex: none; }
.ms-comment { margin-top: 16px; }
.ms-comment__toggle { color: var(--ms-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.ms-comment__toggle:hover { color: var(--ms-ink); }

/* количество в корзине: «−  2  +» и «Удалить» (checkout/cart_list.twig) */
.ms-qty { display: inline-flex; align-items: center; height: 44px; border: 1px solid var(--ms-line); border-radius: 12px; background: var(--ms-paper); overflow: hidden; }
.ms-qty__btn { width: 44px; height: 100%; border: 0; background: none; color: var(--ms-ink); font-size: 22px; line-height: 1; cursor: pointer; }
.ms-qty__btn:hover:not(:disabled) { background: var(--ms-wall); }
.ms-qty__btn:disabled { color: var(--ms-line); cursor: default; }
.ms-qty__input { width: 46px; height: 100%; border: 0; border-left: 1px solid var(--ms-line); border-right: 1px solid var(--ms-line); text-align: center; font-size: 17px; font-weight: 600; color: var(--ms-ink); background: none; }
.ms-qty__input:focus { outline: 2px solid var(--ms-ink); outline-offset: -2px; }
.ms-qty__input.is-invalid { color: var(--ms-error); }
.ms-qty__remove { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--ms-ink-2); text-decoration: underline; text-underline-offset: 3px; }
.ms-qty__remove:hover { color: var(--ms-error); }
/* ---------- корзина: товары карточками, «Ваш заказ» справа ---------- */
.ms-basket { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; margin-bottom: 56px; }
.ms-lines { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ms-line {
  position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr) auto 150px; gap: 12px 20px; align-items: start;
  padding: 16px 56px 16px 16px; background: var(--ms-paper); border: 1px solid var(--ms-line); border-radius: 16px;
}
.ms-line__img { display: block; border-radius: 12px; overflow: hidden; background: var(--ms-line); }
.ms-line__img img { display: block; width: 112px; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }
.ms-line__info { min-width: 0; }
.ms-line__name {
  color: var(--ms-ink); font-size: 15px; font-weight: 600; line-height: 1.35; text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ms-line__name:hover { color: var(--ms-ink); text-decoration: underline; }
.ms-line__meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 6px 0 0; font-size: 13px; color: var(--ms-ink-2); }
.ms-line__warn { color: var(--ms-error); font-weight: 600; }
.ms-line__points { display: inline-flex; margin: 8px 0 0; padding: 2px 10px; border-radius: 999px; background: var(--ms-wall); font-size: 13px; font-weight: 600; }
.ms-line__each { margin: 6px 0 0; font-size: 13px; color: var(--ms-ink-2); text-align: center; white-space: nowrap; }
.ms-line__sum { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.ms-line__sum b { font-family: var(--ms-display); font-size: 17px; font-weight: 600; white-space: nowrap; }
.ms-line__remove {
  position: absolute; top: 8px; right: 8px; display: inline-flex !important; align-items: center; justify-content: center; width: 44px; height: 44px;
  margin: 0 !important; border-radius: 12px; color: var(--ms-ink-2); font-size: 17px; text-decoration: none !important;
}
.ms-line__remove:hover, .ms-line__remove:focus-visible { background: var(--ms-wall); color: var(--ms-error); }
.ms-basket__back { display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px; font-weight: 600; text-decoration: none; }
.ms-basket__back:hover { text-decoration: underline; }
.ms-order-box { position: sticky; top: 16px; padding: 20px; background: var(--ms-paper); border: 1px solid var(--ms-line); border-radius: 16px; }
.ms-order-box__title { margin: 0 0 16px; font-family: var(--ms-text); font-size: 22px; font-weight: 700; letter-spacing: 0; }
.ms-order-box__rows { display: grid; gap: 10px; margin: 0; }
.ms-order-box__rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; }
.ms-order-box__rows dt { font-weight: 400; color: var(--ms-ink-2); }
.ms-order-box__rows dd { margin: 0; text-align: right; font-weight: 600; white-space: nowrap; }
.ms-order-box__muted { font-weight: 400 !important; color: var(--ms-ink-2); }
/* оранжевая строка выгоды */
.ms-order-box__total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 16px 0 6px; padding-top: 16px; border-top: 1px solid var(--ms-line); }
.ms-order-box__total span { font-size: 17px; font-weight: 700; }
.ms-order-box__total b { font-family: var(--ms-display); font-size: 32px; font-weight: 600; line-height: 1.1; white-space: nowrap; }
.ms-order-box__points { margin: 0 0 16px; font-size: 13px; color: var(--ms-ink-2); }
.ms-order-box__points a { color: var(--ms-ink); font-weight: 600; }
.ms-order-box__go { width: 100%; min-height: 56px; font-size: 17px; border-radius: 14px; }
/* «Баллы» в «Ваш заказ» */
.ms-bonus { margin: 0 0 16px; padding: 14px 16px; border-radius: 12px; background: var(--ms-wall); }
.ms-bonus__title { margin: 0 0 6px; font-family: var(--ms-text); font-size: 15px; font-weight: 700; letter-spacing: 0; }
.ms-bonus__balance { margin: 0 0 8px; font-size: 15px; }
.ms-bonus__balance b { font-family: var(--ms-display); font-size: 17px; font-weight: 600; }
.ms-bonus__text { margin: 0 0 6px; font-size: 13px; }
.ms-bonus__text a, .ms-bonus__rules a { color: var(--ms-ink); font-weight: 600; }
.ms-bonus__rules { margin: 6px 0 0; font-size: 13px; color: var(--ms-ink-2); }
.ms-bonus .ms-points { padding: 4px 0 0; background: none; border: 0; }
.ms-bonus .ms-points__note { display: none; }
.ms-bonus__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ms-bonus__head .ms-bonus__title { margin: 0; }
.ms-bonus__head .ms-bonus__balance { margin: 0; font-size: 13px; }
.ms-bonus__login { font-size: 13px; font-weight: 600; color: var(--ms-ink); }
.ms-promo-box { margin-top: 16px; padding-top: 4px; border-top: 1px solid var(--ms-line); }
.ms-promo-box > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; font-size: 15px; font-weight: 600; cursor: pointer; list-style: none; }
.ms-promo-box > summary::-webkit-details-marker { display: none; }
.ms-promo-box > summary::after { content: ""; width: 8px; height: 8px; margin-right: 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s ease; }
.ms-promo-box[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.ms-promo-box__body .accordion-item { border: 0; background: none; }
.ms-promo-box__body .ms-points { padding: 4px 0 8px; }
.ms-promo-box__body .ms-promo__row { max-width: none; }
@media (max-width: 991.98px) {
  .ms-basket { grid-template-columns: 1fr; }
  .ms-order-box { position: static; }
}
@media (max-width: 575.98px) {
  .ms-line { grid-template-columns: 88px minmax(0, 1fr); gap: 10px 12px; padding: 12px 48px 12px 12px; }
  .ms-line__img { grid-row: span 3; }
  .ms-line__img img { width: 88px; }
  .ms-line__qty, .ms-line__sum { grid-column: 2; }
  .ms-line__sum { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; text-align: left; }
  .ms-line__each { text-align: left; }
  .ms-line__remove { top: 4px; right: 4px; }
  .ms-order-box { padding: 16px; }
  .ms-order-box__total b { font-size: 22px; }
}

/* состав заказа в оформлении (checkout/confirm.twig) */
.ms-confirm-table td, .ms-confirm-table th { vertical-align: top; }
.ms-confirm-table__meta { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; font-size: 13px; color: var(--ms-ink-2); }
.ms-confirm-table__qty { width: 1%; }
@media (max-width: 575.98px) {
  .ms-confirm-table { font-size: 15px; }
  .ms-confirm-table th, .ms-confirm-table td { padding: 8px; }
}

/* контакты: телефон, почта, адрес, реквизиты (information/contact.twig) */
.ms-contact-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 24px; margin: 8px 0 32px; padding: 20px; background: var(--ms-paper); border: 1px solid var(--ms-line); border-radius: 12px; }
.ms-contact-card dt { font-size: 13px; font-weight: 400; color: var(--ms-ink-2); }
.ms-contact-card dd { margin: 2px 0 0; font-size: 17px; }

/* прайс-лист и покупка оптом (information/price.twig) */
.ms-price__lead { max-width: 70ch; color: var(--ms-ink-2); font-size: 15px; }
.ms-price__terms { margin: 16px 0 20px; max-width: 900px; }
.ms-price__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 28px; }
.ms-price__actions .btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 12px; font-weight: 600; }
.ms-price__date { color: var(--ms-ink-2); font-size: 13px; }
.ms-price__section { margin-bottom: 28px; }
.ms-price__section h2 { font-size: 22px; margin: 0 0 10px; }
.ms-price__table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--ms-paper); border: 1px solid var(--ms-line); border-radius: 12px; overflow: hidden; font-size: 15px; }
.ms-price__table th { padding: 10px 12px; background: var(--ms-wall); color: var(--ms-ink-2); font-weight: 600; text-align: left; }
.ms-price__table td { padding: 9px 12px; border-top: 1px solid var(--ms-line); vertical-align: top; }
.ms-price__table td a { color: var(--ms-ink); text-decoration: none; }
.ms-price__table td a:hover { color: var(--ms-ink); text-decoration: underline; }
.ms-price__table .ms-price__num { text-align: right; white-space: nowrap; }
.ms-price__table td.ms-price__num:nth-child(3) { font-weight: 700; }
.ms-price__model { color: var(--ms-ink-2); white-space: nowrap; }
.ms-price__model-inline { display: none; color: var(--ms-ink-2); }
.ms-price__out { color: var(--ms-ink-2); }
@media (max-width: 575.98px) {
  .ms-price__table { font-size: 13px; }
  .ms-price__table th, .ms-price__table td { padding: 8px; }
  .ms-price__table .ms-price__model { display: none; }
  .ms-price__model-inline { display: block; margin-top: 2px; font-size: 13px; }
}

/* ME-SALES: списание баллов в корзине — галочка видна сразу (extension/opencart/checkout/reward.twig) */
.ms-points { padding: 16px 20px; }
.ms-points__check { display: flex; align-items: center; gap: 10px; margin: 0; padding-left: 0; min-height: 28px; }
.ms-points__check .form-check-input { float: none; flex: none; width: 22px; height: 22px; margin: 0; cursor: pointer; }
.ms-points__check .form-check-input:checked { background-color: var(--ms-ink); border-color: var(--ms-ink); }
.ms-points__check .form-check-label { font-size: 15px; font-weight: 600; cursor: pointer; }
.ms-points__note { margin: 6px 0 0 32px; font-size: 13px; color: var(--ms-ink-2); }
.ms-points__custom { margin: 8px 0 0 32px; font-size: 13px; }
.ms-points__custom summary { cursor: pointer; color: var(--ms-ink); text-decoration: underline; text-underline-offset: 3px; width: fit-content; }
.ms-points__row { display: flex; gap: 8px; margin-top: 10px; }
.ms-points__row .form-control { flex: 1 1 auto; min-width: 0; }
.ms-points__row .btn { flex: none; }
/* промокод: поле и кнопка в одну строку, без раскрывающейся плашки */
.ms-promo__row { max-width: 28rem; margin-top: 0; }
.ms-promo__remove { margin-top: 6px; padding: 0; font-size: 13px; }

/* Поля форм — по длине того, что в них пишут, а не на всю колонку: на широком экране поле в 1000 px выглядит пустым.
   Только ограничение сверху — на телефоне поля по-прежнему во всю ширину. Поиск в шапке, карта пунктов и строки баллов — свои правила. */
#content form .form-control:not(textarea), #content form .form-select, #content .ms-delivery .form-control { max-width: 22.5rem; }
#content form input[type="tel"], #content form input[name$="telephone"], #content form input[name="postcode"] { max-width: 15rem; }
#content form input[type="password"] { max-width: 20rem; }
#content form textarea.form-control { max-width: 40rem; }
#content form .input-group { max-width: 30rem; }
#content form .input-group .form-control, .ms-points__row .form-control { max-width: none; }
#content #input-search, #content select[name="category_id"] { max-width: 22.5rem; }

/* Оформление заказа: согласие с офертой — между таблицей и кнопкой, кнопка подтверждения — главная на странице */
.ms-agree { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin: 24px 0 16px; padding-right: 0; text-align: right; font-size: 17px; line-height: 1.4; }
.ms-agree .form-check-input { flex: none; width: 26px; height: 26px; margin: 0 !important; float: none; cursor: pointer; }
.ms-agree .form-check-label { font-size: 17px; line-height: 1.4; color: var(--ms-ink); }
.ms-checkout-pay .btn { min-width: 300px; min-height: 56px; padding: 16px 36px; font-size: 17px; font-weight: 700; border-radius: 14px; }
@media (max-width: 575.98px) { .ms-checkout-pay .btn { width: 100%; min-width: 0; } }
/* Способы оплаты — карточки по ширине текста, а не на всю колонку */
.ms-pay-methods { max-width: 30rem; }
/* один способ оплаты — без переключателя: плашки «Картой» и «СБП» */
.ms-pay-one { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.ms-pay-one__chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 8px; background: var(--ms-paper); font-size: 15px; font-weight: 600; cursor: default; }
.ms-pay-one__chip svg { width: 22px; height: 22px; flex: none; }
.ms-pay-one__note { flex: 1 1 100%; margin: 2px 0 0; color: var(--ms-ink-2); font-size: 13px; }
/* Личный кабинет: неоплаченный заказ — блок «Оплатить заказ» над данными заказа */
.ms-order-pay { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin: 0 0 20px; padding: 16px 20px; background: var(--ms-paper); border: 2px solid var(--ms-amber); border-radius: 12px; }
.ms-order-pay__text { flex: 1 1 320px; margin: 0; font-size: 15px; }
.ms-order-pay__btn { min-width: 240px; font-weight: 700; }
.ms-order-pay .alert { flex: 1 1 100%; }
@media (max-width: 575.98px) { .ms-order-pay__btn { width: 100%; min-width: 0; } }

/* ---------- оформление: три шага-карточки и «Ваш заказ» справа ---------- */
.ms-checkout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; margin-bottom: 56px; }
.ms-checkout__steps { display: grid; gap: 16px; min-width: 0; }
.ms-step { padding: 24px; background: var(--ms-paper); border: 1px solid var(--ms-line); border-radius: 16px; }
.ms-step__title { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; font-family: var(--ms-text); font-size: 22px; font-weight: 700; letter-spacing: 0; }
.ms-step__n { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ms-ink); color: #fff; font-family: var(--ms-display); font-size: 15px; font-weight: 600; }
.ms-step__done { margin: 0; color: var(--ms-ink-2); }
.ms-step .btn { min-height: 48px; }
.ms-step fieldset > legend, .ms-step .ms-delivery__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ms-step .ms-delivery { padding: 0; border: 0; border-radius: 0; background: none; }
.ms-step .ms-delivery__option { border: 0; padding: 0; }
.ms-step .ms-pay-methods { max-width: none; }
.ms-step .ms-comment { margin-top: 12px; }
.ms-checkout__side .ms-order-box { position: sticky; top: 16px; }
/* «Ваш заказ»: товары списком */
.ms-confirm-lines { display: grid; gap: 12px; margin: 0 0 16px; padding: 0 0 16px; list-style: none; border-bottom: 1px solid var(--ms-line); }
.ms-confirm-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; font-size: 15px; }
.ms-confirm-line__name { grid-column: 1; color: var(--ms-ink); font-weight: 600; line-height: 1.35; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ms-confirm-line__name:hover { color: var(--ms-ink); text-decoration: underline; }
.ms-confirm-line__sum { grid-column: 2; grid-row: 1; font-weight: 600; white-space: nowrap; }
.ms-confirm-line__qty, .ms-confirm-line__meta { grid-column: 1; font-size: 13px; color: var(--ms-ink-2); }
.ms-confirm-note { margin: 4px 0 0; font-size: 13px; color: var(--ms-ink-2); }
.ms-checkout .ms-agree { justify-content: flex-start; align-items: flex-start; gap: 12px; margin: 16px 0; padding-left: 0; text-align: left; }
.ms-checkout .ms-agree .form-check-input { width: 24px; height: 24px; }
.ms-checkout .ms-agree .form-check-label { font-size: 13px; color: var(--ms-ink); }
.ms-checkout .ms-checkout-pay .btn { width: 100%; min-width: 0; min-height: 56px; padding: 14px 20px; }
.ms-checkout .ms-pay__note { text-align: left; }
/* оплата: СБП, карта и Ozon Карта крупными плитками */
.ms-step .ms-pay-one { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ms-step .ms-pay-one__chip {
  flex-direction: column; justify-content: center; gap: 8px; min-height: 96px; padding: 14px 10px; border: 1px solid var(--ms-line);
  border-radius: 14px; background: var(--ms-paper); font-size: 15px; font-weight: 600; text-align: center; line-height: 1.25;
}
.ms-step .ms-pay-one__chip svg { width: 28px; height: 28px; }
.ms-step .ms-pay-one__note { grid-column: 1 / -1; margin: 4px 0 0; }
@media (max-width: 991.98px) {
  .ms-checkout { grid-template-columns: 1fr; }
  .ms-checkout__side .ms-order-box { position: static; }
}
@media (max-width: 575.98px) {
  .ms-step { padding: 18px 16px; }
  .ms-step__title { font-size: 17px; margin-bottom: 16px; }
  .ms-step__n { width: 32px; height: 32px; font-size: 13px; }
  .ms-step .ms-pay-one { gap: 8px; }
  .ms-step .ms-pay-one__chip { min-height: 88px; padding: 12px 6px; font-size: 13px; }
}

/* оформление: чего не хватает — шаг подсвечивается оранжевой рамкой и коротко пульсирует (me-ui.js) */
@keyframes ms-attention { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 176, 0, 0); } 35%, 65% { box-shadow: 0 0 0 6px rgba(255, 176, 0, .55); } }
.ms-step.is-attention, .ms-agree.is-attention { border-color: var(--ms-amber) !important; outline: 2px solid var(--ms-amber); outline-offset: -1px; animation: ms-attention .9s ease 2; }
.ms-agree.is-attention { border-radius: 10px; outline-offset: 4px; }
.ms-confirm-blocked { opacity: .6; }
.ms-confirm-blocked:hover, .ms-confirm-blocked:focus-visible { opacity: .75; }
.ms-confirm-need { margin: 10px 0 0; font-size: 13px; color: var(--ms-ink-2); }
/* способ получения: самовывоз */
.ms-ways { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 16px; }
.ms-way {
  display: flex; align-items: flex-start; gap: 12px; min-height: 64px; margin: 0; padding: 12px 14px; border: 1px solid var(--ms-line); border-radius: 12px;
  background: var(--ms-paper); cursor: pointer; transition: border-color .15s ease;
}
.ms-way:hover { border-color: var(--ms-ink); }
.ms-way.is-active { border-color: var(--ms-ink); box-shadow: inset 0 0 0 1px var(--ms-ink); }
.ms-way .form-check-input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; float: none; }
.ms-way > span { display: flex; flex-direction: column; gap: 2px; }
.ms-way b { font-size: 15px; }
.ms-way > span > span { font-size: 13px; color: var(--ms-ink-2); }
.ms-pickup { padding: 14px 16px; border-radius: 12px; background: var(--ms-wall); }
.ms-pickup p { margin: 0; font-size: 15px; }
.ms-pickup[hidden] { display: none !important; }
@media (max-width: 575.98px) {
  .ms-ways { grid-template-columns: 1fr; }
}
/* длинные слова в заголовках на телефоне («Политика конфиденциальности») — перенос по слогам вместо прокрутки вбок */
@media (max-width: 575.98px) {
  #content h1 { hyphens: auto; overflow-wrap: break-word; }
}

/* баллы: бегунок списания (корзина и итог оформления) */
.ms-points { padding: 12px 16px; border: 1px solid var(--ms-line); border-radius: 12px; }
.ms-points.is-busy { opacity: .6; pointer-events: none; }
.ms-points__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ms-points__label { margin: 0; font-size: 15px; font-weight: 600; }
.ms-points__value { font-size: 15px; white-space: nowrap; }
.ms-points__value b { font-family: var(--ms-display); font-size: 17px; font-weight: 600; }
.ms-points__range { display: block; width: 100%; height: 32px; margin: 4px 0 0; padding: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; touch-action: pan-y; }
.ms-points__range:focus { outline: none; }
.ms-points__range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--ms-amber) var(--ms-fill, 0%), var(--ms-line) var(--ms-fill, 0%)); }
.ms-points__range::-webkit-slider-thumb { width: 24px; height: 24px; margin-top: -9px; border: 2px solid var(--ms-ink); border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(22, 23, 27, .25); -webkit-appearance: none; appearance: none; }
.ms-points__range::-moz-range-track { height: 6px; border-radius: 3px; background: var(--ms-line); }
.ms-points__range::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--ms-amber); }
.ms-points__range::-moz-range-thumb { width: 20px; height: 20px; border: 2px solid var(--ms-ink); border-radius: 50%; background: #fff; }
.ms-points__range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(255, 176, 0, .45); }
.ms-points__range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px rgba(255, 176, 0, .45); }
.ms-points__scale { display: flex; justify-content: space-between; font-size: 13px; color: var(--ms-ink-2); }
.ms-points__note { margin: 6px 0 0; font-size: 13px; color: var(--ms-ink-2); }
.ms-points__error { margin: 6px 0 0; }
.ms-points__error[hidden] { display: none !important; }
.ms-points__note a { color: var(--ms-ink); font-weight: 600; }
/* шаг 1 у вошедшего: фамилия, если её нет в кабинете */
.ms-lastname { margin-top: 12px; }
.ms-lastname__row { display: flex; gap: 8px; max-width: 420px; }
.ms-lastname__row .form-control { flex: 1 1 auto; min-width: 0; }
.ms-lastname__row .btn { flex: none; }

/* ---------- «Избранное» ---------- */
/* сердечко на фото карточки: белый круг 44 px в правом верхнем углу; в избранном — закрашено чёрным */
.ms-fav {
  position: absolute; top: 8px; right: 8px; z-index: 2; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 1px solid var(--ms-line); border-radius: 50%; background: var(--ms-paper);
  color: var(--ms-ink); font-size: 17px; line-height: 1; cursor: pointer; transition: border-color .15s ease, transform .15s ease;
}
.ms-fav:hover, .ms-fav:focus-visible { border-color: var(--ms-ink); }
.ms-fav.is-on { border-color: var(--ms-ink); }
.ms-fav:active { transform: scale(.92); }
.ms-fav[aria-busy="true"] { opacity: .7; }
@media (max-width: 575.98px) {
  .ms-fav { top: 6px; right: 6px; }
}
/* страница «Избранное»: заголовок с количеством и «Добавить всё в корзину», дальше сетка как в каталоге */
.ms-favs__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin: 8px 0 24px; }
.ms-favs__title { margin: 0; }
.ms-favs__count { font-family: var(--ms-text); font-size: 17px; font-weight: 400; color: var(--ms-ink-2); letter-spacing: 0; white-space: nowrap; }
.ms-favs__all { min-height: 48px; }
.ms-favs__grid { margin-bottom: 56px; }
.ms-favs__empty { max-width: 520px; margin: 24px 0 64px; padding: 32px; background: var(--ms-paper); border: 1px solid var(--ms-line); border-radius: 14px; }
.ms-favs__empty-text { margin: 0 0 20px; font-size: 17px; }
.ms-favs__go { min-height: 48px; }
@media (max-width: 575.98px) {
  .ms-favlink { height: 44px; padding: 0 12px; }
  .ms-favlink__text { display: none; }
  .ms-favs__all { width: 100%; }
  .ms-favs__empty { padding: 24px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .ms-fav { transition: none; }
}
@media (max-width: 374.98px) {
  /* самые узкие телефоны: логотип в одну строку рядом с тремя кнопками; длинное название товара
     в примере на первом экране переносится, а не вылезает за экран */
  .ms-example__name { overflow-wrap: anywhere; hyphens: auto; }
  .ms-header__row { gap: 10px 8px; }
}
@media (max-width: 429.98px) {
  /* «Строй ремонт» длиннее «ME-SALES»: на телефонах логотип мельче и без точки, чтобы не упираться в кнопки */
  .ms-logo__word { font-size: 17px; gap: 6px; }
  .ms-logo__led { display: none; }
}

/* ---------- вход и регистрация: одна белая карточка по центру ---------- */
.ms-auth { max-width: 440px; margin: 8px auto 64px; }
.ms-auth__card { padding: 32px 28px 24px; background: var(--ms-paper); border: 1px solid var(--ms-line); border-radius: 14px; }
.ms-auth__title { margin: 0 0 8px; font-size: 32px; }
.ms-auth__lead { margin: 0 0 20px; font-size: 15px; color: var(--ms-ink-2); }
.ms-auth .alert { margin-bottom: 16px; }
.ms-auth .me-social { margin-bottom: 16px; }
.ms-auth .me-social__divider { margin-top: 20px; }
.ms-auth fieldset { margin: 0; padding: 0; border: 0; }
.ms-auth__field { margin-bottom: 16px; }
.ms-auth__field .form-label { margin-bottom: 6px; font-size: 15px; font-weight: 600; }
/* общее правило форм (#content form .form-control — до 22,5rem, пароль — до 20rem) здесь не нужно: поля во всю карточку */
#content.ms-auth form .form-control, #content.ms-auth form .form-select, #content.ms-auth form input[type="password"], #content.ms-auth form input[type="tel"] { width: 100%; max-width: none; height: 50px; font-size: 15px; border-radius: 12px; }
.ms-auth textarea.form-control { height: auto; }
.ms-auth__label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ms-auth__forgot { font-size: 13px; color: var(--ms-ink-2); }
.ms-auth__forgot:hover { color: var(--ms-ink); }
.ms-auth__pass { position: relative; }
.ms-auth__pass .form-control { padding-right: 52px; }
.ms-auth__eye {
  position: absolute; top: 3px; right: 3px; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  padding: 0; border: 0; border-radius: 10px; background: none; color: var(--ms-ink-2); font-size: 17px;
}
.ms-auth__eye:hover, .ms-auth__eye:focus-visible { color: var(--ms-ink); background: var(--ms-wall); }
.ms-auth__agree { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 16px; padding-left: 0; font-size: 13px; }
.ms-auth__agree .form-check-input { float: none; flex: none; width: 24px; height: 24px; margin: 0; }
.ms-auth__agree .form-check-label { padding-top: 2px; }
.ms-auth__submit { width: 100%; min-height: 56px; font-size: 17px; }
.ms-auth__switch { margin: 20px 0 0; text-align: center; font-size: 15px; }
.ms-auth__switch a { font-weight: 600; color: var(--ms-ink); }
.ms-auth__legal { margin: 12px 0 0; text-align: center; font-size: 13px; color: var(--ms-ink-2); }
.ms-auth__legal a { color: var(--ms-ink-2); }
@media (max-width: 575.98px) {
  .ms-auth { margin-bottom: 40px; }
  .ms-auth__card { padding: 24px 16px 20px; }
}

/* ---------- оформление заказа (13.11.2026): одна страница без шагов ---------- */
/* короткая шапка: логотип, «← Вернуться в корзину», «Вопрос по заказу? почта» */
.ms-header--checkout { background: var(--ms-paper); }
.ms-cohead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; min-height: 72px; padding-top: 12px; padding-bottom: 12px; }
.ms-cohead .ms-logo { margin-right: 0; }
.ms-cohead__back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ms-ink); font-size: 15px; font-weight: 600; text-decoration: none; }
.ms-cohead__back:hover, .ms-cohead__back:focus-visible { color: var(--ms-ink); text-decoration: underline; text-underline-offset: 3px; }
.ms-cohead__help { margin: 0 0 0 auto; font-size: 15px; color: var(--ms-ink-2); }
.ms-cohead__help a { color: var(--ms-ink); font-weight: 600; }
/* короткий подвал: реквизиты, оферта, политика */
footer.ms-cofoot { margin-top: 32px; padding: 20px 0; font-size: 13px; }
.ms-cofoot__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.ms-cofoot__row span { color: rgba(255, 255, 255, .72); }
.ms-cofoot__row a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.ms-co { padding-top: 24px; }
.ms-co__title { margin: 0 0 24px; }
.ms-co .ms-checkout { grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; }
.ms-co .ms-checkout__steps { gap: 16px; }
.ms-co .ms-step { padding: 24px; }
.ms-co .ms-step__title { margin: 0; font-size: 22px; }
.ms-co-block__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 0 0 20px; }
.ms-co-block__aside { margin-left: auto; color: var(--ms-ink-2); font-size: 13px; }
.ms-co-block__aside:hover { color: var(--ms-ink); }
.ms-co-saved { color: var(--ms-ink-2); font-size: 13px; }
.ms-co-saved:empty { display: none; }
.ms-step__title + .ms-co-saved { margin-left: auto; }
.ms-co-note { margin: 12px 0 16px; color: var(--ms-ink); font-size: 15px; font-weight: 600; }

/* «Получатель»: поля одной ширины, 50 px, подпись сверху; две колонки, на телефоне одна */
.ms-rform__social .me-social { margin: 0 0 20px; }
.ms-rform__social .me-social__divider { margin-top: 20px; }
.ms-rform fieldset { margin: 0; padding: 0; border: 0; }
.ms-rform__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ms-rfield { min-width: 0; margin: 0; }
.ms-rfield .form-label { margin-bottom: 6px; font-size: 15px; font-weight: 600; }
#content .ms-rform .form-control, #content .ms-rform .form-select, #content .ms-rform input[type="tel"], #content .ms-rform input[type="password"] {
  width: 100%; max-width: none; height: 50px; font-size: 15px; border-radius: 12px;
}
#content .ms-rform .form-control.is-invalid { border-color: var(--ms-error); background-image: none; padding-right: 16px; }
#content .ms-rform .ms-auth__pass .form-control { padding-right: 52px; }
.ms-rfield .form-text { margin-top: 6px; font-size: 13px; color: var(--ms-ink-2); }
.ms-rfield .invalid-feedback { margin-top: 6px; font-size: 13px; color: var(--ms-error); }
.ms-rform__account { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--ms-line); }
.ms-rform__check { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; padding-left: 0; }
.ms-rform__check .form-check-input { float: none; flex: none; width: 24px; height: 24px; margin: 0; cursor: pointer; }
.ms-rform__check .form-check-input:checked { background-color: var(--ms-ink); border-color: var(--ms-ink); }
.ms-rform__check .form-check-label { font-size: 15px; font-weight: 600; cursor: pointer; }
.ms-rform__password { max-width: calc(50% - 8px); margin-top: 12px; }
.ms-rform__password[hidden] { display: none; }
.ms-rform__note { margin: 8px 0 0; font-size: 13px; color: var(--ms-ink-2); }
.ms-rform__note a { color: var(--ms-ink-2); }
.ms-rform__warning { margin-top: 16px; padding: 10px 12px; border-radius: 10px; background: #fdecea; color: var(--ms-error); font-size: 13px; }
.ms-rform__warning[hidden] { display: none; }
.ms-rform__done { width: 100%; min-height: 52px; margin-top: 20px; font-size: 17px; border-radius: 14px; }
/* вошедший: одна строка «Получатель: …» и «Изменить» */
.ms-recipient-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--ms-wall); border-radius: 12px; }
.ms-recipient-card[hidden] { display: none; }
.ms-recipient-card__text { min-width: 0; margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.ms-recipient-card__label { font-weight: 700; }
.ms-recipient-card__edit { flex: none; min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--ms-ink); font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
#checkout-register[hidden] { display: none; }
.ms-recipient-card + #checkout-register:not([hidden]), .ms-co-note + #checkout-register { margin-top: 0; }

/* «Получение» — блок самовывоза; пока нет получателя — серый */
.ms-co-lock { display: none; margin: 0 0 12px; color: var(--ms-ink-2); font-size: 15px; font-weight: 600; }
.ms-co-block--point.is-locked { background: var(--ms-wall); }
.ms-co-block--point.is-locked .ms-co-lock { display: block; }
.ms-co .ms-point-btn, .ms-point-btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; padding: 8px 16px; font-size: 17px; font-weight: 700; line-height: 1.25; border-radius: 14px; }
.ms-point-btn.is-change { background: var(--ms-paper); border: 1px solid var(--ms-line); color: var(--ms-ink); }
.ms-point-btn.is-change:hover, .ms-point-btn.is-change:focus-visible { background: var(--ms-paper); border-color: var(--ms-ink); color: var(--ms-ink); }

/* «Добавить комментарий к заказу» — раскрывающаяся строка */
.ms-co .ms-comment { margin: 0; }
.ms-comment__toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--ms-ink); font-size: 15px; font-weight: 600; text-decoration: none; }
.ms-comment__toggle i { font-size: 13px; transition: transform .2s ease; }
.ms-comment__toggle.is-open i { transform: rotate(180deg); }
.ms-comment__opt { font-weight: 400; color: var(--ms-ink-2); }
#ms-comment-field { margin-top: 8px; }
#ms-comment-field[hidden] { display: none; }
#content .ms-comment textarea.form-control { max-width: none; border-radius: 12px; }

/* «Ваш заказ»: товары с фото 56 px, итог, экономия, баллы, кнопка и чек-лист */
.ms-co-items { display: grid; gap: 12px; margin: 0 0 16px; padding: 0 0 16px; list-style: none; border-bottom: 1px solid var(--ms-line); }
.ms-co-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.ms-co-item__img { display: block; width: 56px; height: 75px; border-radius: 8px; object-fit: cover; background: var(--ms-line); }
.ms-co-item__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ms-co-item__name { display: -webkit-box; overflow: hidden; color: var(--ms-ink); font-size: 13px; font-weight: 600; line-height: 1.35; text-decoration: none; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.ms-co-item__name:hover { color: var(--ms-ink); text-decoration: underline; }
.ms-co-item__qty { font-size: 13px; color: var(--ms-ink-2); }
.ms-co-item__sum { font-size: 15px; white-space: nowrap; }
.ms-co-items + .ms-order-box__total { margin-top: 0; padding-top: 0; border-top: 0; }
.ms-co-saving { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: #fff1cc; color: var(--ms-ink); font-size: 15px; font-weight: 700; }
.ms-co-saving b { white-space: nowrap; }
.ms-co-points { margin: 8px 0 0; font-size: 13px; color: var(--ms-ink-2); }
.ms-co-reward { margin-top: 12px; }
.ms-co .ms-agree { margin: 16px 0 12px; }
.ms-co-paynote { margin: 0 0 12px; font-size: 13px; color: var(--ms-ink-2); }
.ms-checkout .ms-checkout-pay .btn.ms-co-pay { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; height: auto; padding: 8px 16px; font-size: 17px; font-weight: 700; line-height: 1.25; border-radius: 14px; }
/* пока не всё готово — по-настоящему неактивная: серая, а не полупрозрачная оранжевая */
.ms-checkout .ms-checkout-pay .btn.ms-co-pay.ms-confirm-blocked,
.ms-checkout .ms-checkout-pay .btn.ms-co-pay.ms-confirm-blocked:hover,
.ms-checkout .ms-checkout-pay .btn.ms-co-pay.ms-confirm-blocked:focus-visible { opacity: 1; background: var(--ms-line); border-color: var(--ms-line); color: var(--ms-ink-2); box-shadow: none; }
.ms-checkout .ms-checkout-pay .btn.ms-co-pay.ms-confirm-blocked:focus-visible { outline: 3px solid var(--ms-ink); outline-offset: 2px; }
.ms-co-check { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--ms-ink-2); }
.ms-co-check li { white-space: nowrap; }
.ms-co-check li.is-done { color: var(--ms-ink); font-weight: 600; }
.ms-co-check li.is-done > span[aria-hidden] { margin-right: 4px; }

@media (max-width: 991.98px) {
  .ms-co .ms-checkout { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
  .ms-cohead__help { flex-basis: 100%; margin-left: 0; font-size: 13px; }
  .ms-co__title { font-size: 32px; }
}
@media (max-width: 575.98px) {
  .ms-cohead { gap: 4px 16px; min-height: 0; }
  .ms-co { padding-top: 16px; }
  .ms-co .ms-step { padding: 18px 16px; }
  .ms-rform__grid { grid-template-columns: 1fr; }
  .ms-rform__password { max-width: none; }
  .ms-co-block__aside { margin-left: 0; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .ms-comment__toggle i { transition: none; }
}
.ms-co .ms-agree .form-check-label a { color: var(--ms-ink); text-decoration: underline; text-underline-offset: 2px; }
.ms-recipient-card__part { white-space: nowrap; }
.ms-recipient-card__part:last-child { white-space: normal; overflow-wrap: anywhere; }

/* ---------- чат с продавцом (extension/me_chat, me-chat.js) ---------- */
/* кнопка «Чат» в шапке — как «Избранное»; значок новых ответов — оранжевый.
   Компьютер: в ряду с поиском; планшет: верхняя строка; телефон: вторая строка, справа от поиска */
.ms-chatlink {
  display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; border: 1px solid var(--ms-line); border-radius: 12px;
  background: var(--ms-paper); color: var(--ms-ink); font-size: 15px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.ms-chatlink:hover, .ms-chatlink[aria-expanded="true"] { border-color: var(--ms-ink); }
.ms-chatlink:focus-visible { outline: 3px solid var(--ms-amber); outline-offset: 2px; }
.ms-chatlink svg { flex: none; }
.ms-chatlink__count, .ms-cohead__chat .ms-chat__badge {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--ms-amber); color: var(--ms-ink);
  font-size: 13px; font-weight: 700; line-height: 22px; text-align: center; text-decoration: none; font-variant-numeric: tabular-nums;
}
.ms-chatlink__count[hidden], .ms-cohead__chat .ms-chat__badge[hidden] { display: none; }
.ms-header__row:has(.ms-chatlink) { grid-template-columns: auto auto minmax(0, 1fr) auto auto auto auto; }
@media (max-width: 1199.98px) {
  .ms-header__row:has(.ms-chatlink) { grid-template-columns: auto minmax(0, 1fr) auto auto auto auto; }
  .ms-header__row:has(.ms-chatlink) .ms-chatlink { grid-column: 3; grid-row: 1; }
  .ms-header__row:has(.ms-chatlink) .ms-favlink { grid-column: 4; }
  .ms-header__row:has(.ms-chatlink) .ms-account { grid-column: 5; }
  .ms-header__row:has(.ms-chatlink) .ms-header__cart { grid-column: 6; }
  .ms-header__row:has(.ms-chatlink) .ms-header__search { grid-column: 2 / 7; }
}
@media (max-width: 767.98px) {
  /* в верхней строке телефона места на пятую кнопку нет — «Чат» значком справа от поиска */
  .ms-header__row:has(.ms-chatlink) { grid-template-columns: auto minmax(0, 1fr) auto auto auto; }
  .ms-header__row:has(.ms-chatlink) .ms-favlink { grid-column: 3; }
  .ms-header__row:has(.ms-chatlink) .ms-account { grid-column: 4; }
  .ms-header__row:has(.ms-chatlink) .ms-header__cart { grid-column: 5; }
  .ms-header__row:has(.ms-chatlink) .ms-header__search { grid-column: 2 / 5; }
  .ms-header__row:has(.ms-chatlink) .ms-chatlink { position: relative; grid-column: 5; grid-row: 2; min-width: 44px; height: 44px; padding: 0; justify-content: center; }
  .ms-chatlink__text { display: none; }
  .ms-chatlink__count { position: absolute; top: -8px; right: -8px; box-shadow: 0 0 0 2px var(--ms-paper); }
}

/* ссылки на чат на «Контактах» и в шапке оформления (вместо почты) */
.ms-contact-card__chat {
  display: inline; min-height: 0; padding: 0; border: 0; background: none; color: var(--ms-ink); font: inherit; font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.ms-contact-card__chat:focus-visible { outline: 3px solid var(--ms-amber); outline-offset: 2px; border-radius: 4px; }
.ms-cohead__chat {
  position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 2px; border: 0; background: none;
  color: var(--ms-ink); font-size: inherit; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; cursor: pointer;
}
.ms-cohead__chat:hover { text-decoration-thickness: 2px; }
.ms-cohead__chat:focus-visible { outline: 3px solid var(--ms-amber); outline-offset: 2px; border-radius: 6px; }
.ms-cohead__chat svg { flex: none; }
.ms-cohead__chat .ms-chat__badge { margin-left: 2px; }
.ms-cohead__help:has(.ms-cohead__chat) { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; }

/* окно: на компьютере под кнопкой в шапке (место и высоту ставит me-chat.js), на телефоне — во весь экран */
.ms-chat__panel {
  position: fixed; top: 128px; right: 24px; z-index: 1045; display: flex; flex-direction: column; width: 384px; height: min(600px, calc(100vh - 144px));
  background: var(--ms-paper); color: var(--ms-ink); border: 1px solid var(--ms-line); border-radius: 16px; box-shadow: 0 24px 60px -24px rgba(22, 23, 27, .45); overflow: hidden;
}
.ms-chat__panel[hidden] { display: none; }
.ms-chat__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 10px 12px 20px; }
.ms-chat__title { margin: 0; font-family: var(--ms-display); font-size: 17px; font-weight: 600; line-height: 1.3; }
.ms-chat__sub { margin: 4px 0 0; color: var(--ms-ink-2); font-size: 13px; line-height: 1.4; }
.ms-chat__close {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-top: -8px; padding: 0;
  border: 0; border-radius: 12px; background: transparent; color: var(--ms-ink);
}
.ms-chat__close:hover { background: var(--ms-wall); }
.ms-chat__close:focus-visible, .ms-chat__callbtn:focus-visible, .ms-chat__back:focus-visible, .ms-chat__send:focus-visible, .ms-chat__link:focus-visible { outline: 3px solid var(--ms-amber); outline-offset: 2px; }
.ms-chat__view { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; border-top: 1px solid var(--ms-line); }
.ms-chat__callbtn {
  flex: none; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin: 12px 20px 0; padding: 0 14px;
  border: 1px solid var(--ms-line); border-radius: 12px; background: var(--ms-paper); color: var(--ms-ink); font-size: 15px; font-weight: 600; transition: border-color .15s ease;
}
.ms-chat__callbtn:hover { border-color: var(--ms-ink); }
.ms-chat__callbtn svg, .ms-chat__back svg { flex: none; }
.ms-chat__back {
  flex: none; display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; min-height: 44px; margin: 8px 12px 0; padding: 0 8px;
  border: 0; border-radius: 10px; background: none; color: var(--ms-ink); font-size: 15px; font-weight: 600;
}
.ms-chat__back:hover { background: var(--ms-wall); }
.ms-chat__call-title { margin: 0; font-family: var(--ms-display); font-size: 17px; font-weight: 600; line-height: 1.3; }
.ms-chat__view[hidden] { display: none; }

/* переписка: покупатель — справа, чёрным; продавец — слева, на сером */
.ms-chat__log { display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; min-height: 0; padding: 16px 20px; overflow-y: auto; overscroll-behavior: contain; }
.ms-chat__intro { align-self: flex-start; max-width: 88%; margin: 0; padding: 12px 14px; border-radius: 14px 14px 14px 4px; background: var(--ms-wall); font-size: 15px; line-height: 1.45; }
.ms-chat__intro[hidden] { display: none; }
.ms-chat__day { align-self: center; max-width: 100%; margin: 6px 0 0; color: var(--ms-ink-2); font-size: 13px; line-height: 1.4; text-align: center; overflow-wrap: anywhere; }
.ms-chat__msg { display: flex; flex-direction: column; gap: 3px; max-width: 85%; }
.ms-chat__msg--buyer { align-self: flex-end; align-items: flex-end; }
.ms-chat__msg--seller { align-self: flex-start; align-items: flex-start; }
.ms-chat__bubble { padding: 10px 14px; border-radius: 14px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.ms-chat__msg--buyer .ms-chat__bubble { border-bottom-right-radius: 4px; background: var(--ms-ink); color: #fff; }
.ms-chat__msg--seller .ms-chat__bubble { border-bottom-left-radius: 4px; background: var(--ms-wall); color: var(--ms-ink); }
.ms-chat__bubble a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.ms-chat__msg--buyer .ms-chat__bubble a { color: var(--ms-amber); }
.ms-chat__time { color: var(--ms-ink-2); font-size: 13px; line-height: 1.3; }
.ms-chat__msg.is-pending .ms-chat__bubble { opacity: .55; }

.ms-chat__contact { margin: 0 20px 12px; padding: 12px 14px; border: 1px solid var(--ms-line); border-radius: 12px; background: var(--ms-paper); }
.ms-chat__contact[hidden] { display: none; }
.ms-chat__contact-text { margin: 0 0 8px; font-size: 13px; line-height: 1.4; }
.ms-chat__contact-row { display: flex; gap: 8px; }
.ms-chat__contact-row .form-control { flex: 1 1 auto; min-width: 0; }
.ms-chat__contact-row .btn { flex: none; }
.ms-chat__link { min-height: 32px; margin-top: 4px; padding: 0; border: 0; background: none; color: var(--ms-ink-2); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.ms-chat__link:hover { color: var(--ms-ink); }

.ms-chat__form { position: relative; padding: 12px 20px 14px; border-top: 1px solid var(--ms-line); }
.ms-chat__compose { display: flex; align-items: flex-end; gap: 8px; }
.ms-chat__compose textarea {
  flex: 1 1 auto; min-width: 0; height: 48px; min-height: 48px; max-height: 132px; padding: 12px 14px; border: 1px solid var(--ms-line); border-radius: 12px;
  background: var(--ms-paper); color: var(--ms-ink); font-family: inherit; font-size: 15px; line-height: 1.4; resize: none;
}
.ms-chat__compose textarea:focus { border-color: var(--ms-ink); outline: none; box-shadow: 0 0 0 3px rgba(255, 176, 0, .35); }
.ms-chat__send {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0;
  border: 0; border-radius: 12px; background: var(--ms-amber); color: var(--ms-ink); transition: background-color .15s ease;
}
.ms-chat__send:hover { background: var(--ms-amber-hover); }
.ms-chat__send:disabled { opacity: .55; }
.ms-chat__legal { margin: 8px 0 0; color: var(--ms-ink-2); font-size: 13px; line-height: 1.4; }
.ms-chat__legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.ms-chat__error { margin: 0 0 8px; color: var(--ms-error); font-size: 13px; line-height: 1.4; }
.ms-chat__field-error { margin: 6px 0 0; color: var(--ms-error); font-size: 13px; line-height: 1.4; }
.ms-chat__error[hidden], .ms-chat__field-error[hidden] { display: none; }
.ms-chat__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* заказ звонка */
.ms-chat__call { display: flex; flex-direction: column; gap: 14px; flex: 1 1 auto; min-height: 0; padding: 4px 20px 20px; overflow-y: auto; }
.ms-chat__call[hidden] { display: none; }
.ms-chat__call-text { margin: 0; font-size: 15px; line-height: 1.45; }
.ms-chat__field label { display: block; margin-bottom: 6px; font-size: 15px; font-weight: 600; }
.ms-chat__opt { color: var(--ms-ink-2); font-weight: 400; }
.ms-chat__field .form-control { min-height: 48px; }
.ms-chat__field textarea.form-control { min-height: 72px; resize: vertical; }
.ms-chat__call-btn { width: 100%; min-height: 52px; }
.ms-chat__done { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 24px 20px; outline: none; }
.ms-chat__done[hidden] { display: none; }
.ms-chat__done-title { margin: 0; font-family: var(--ms-display); font-size: 17px; font-weight: 600; }
.ms-chat__done-text { margin: 0 0 8px; font-size: 15px; }

@media (max-width: 767.98px) {
  .ms-chat__panel { top: 0; right: 0; left: 0; width: auto; height: 100%; border: 0; border-radius: 0; box-shadow: none; }
  .ms-chat__head { padding-top: calc(12px + env(safe-area-inset-top)); }
  .ms-chat__form { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .ms-chat__compose textarea { font-size: 17px; }
  html.ms-chat-lock, html.ms-chat-lock body { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .ms-chat__send { transition: none; }
}

/* выбор раздела в поиске: выпадающий список ссылок вместо системного select */
.ms-catdrop { display: inline-block; margin-bottom: 8px; }
.ms-catdrop__panel { min-width: min(360px, calc(100vw - 40px)); max-height: 360px; overflow: auto; }
.ms-catdrop__item { display: block; padding: 7px 12px; border-radius: 8px; color: var(--ms-ink); font-size: 15px; line-height: 1.3; text-decoration: none; }
.ms-catdrop__item:hover { background: var(--ms-wall); color: var(--ms-ink); }
.ms-catdrop__item.is-active { background: var(--ms-ink); color: #fff; }
.ms-catdrop__item--2 { padding-left: 26px; }
.ms-catdrop__item--3 { padding-left: 40px; }

}

/* ---------- поиск: форма в одну строку и строка управления списком ---------- */
.ms-search { max-width: 900px; margin: 4px 0 20px; }
.ms-search__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ms-search__row .form-control { flex: 1 1 260px; min-width: 0; }
.ms-search__row .ms-fdrop { flex: 0 1 auto; }
.ms-search__row .btn { flex: 0 0 auto; }
.ms-search__checks { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 10px 0 0; font-size: 13px; }
.ms-search__checks .form-check { display: flex; align-items: center; gap: 8px; margin: 0; }
.ms-search__checks .form-check-input { margin: 0; }
.ms-list-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 16px; }
.ms-list-controls__view { flex: 0 0 auto; }
.ms-list-controls__sort { flex: 1 1 260px; max-width: 420px; margin-left: auto; }
.ms-list-controls__limit { flex: 0 0 auto; width: 190px; }
@media (max-width: 767.98px) {
  .ms-list-controls__sort, .ms-list-controls__limit { flex: 1 1 100%; max-width: none; width: auto; margin-left: 0; }
}

/* ---------- фильтры по характеристикам (в разделе) ---------- */
.ms-facets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 18px; }
.ms-facet { position: relative; }
.ms-facet__summary { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; border: 1px solid var(--ms-line); border-radius: 999px; background: var(--ms-paper); font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
.ms-facet__summary::-webkit-details-marker { display: none; }
.ms-facet__summary .fa-chevron-down { font-size: 10px; color: var(--ms-ink-2); transition: transform .18s ease; }
.ms-facet[open] .ms-facet__summary { border-color: var(--ms-ink); }
.ms-facet[open] .ms-facet__summary .fa-chevron-down { transform: rotate(180deg); }
.ms-facet__badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--ms-ink); color: #fff; font-size: 12px; }
.ms-facet__panel { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 240px; max-width: 320px; max-height: 320px; overflow-y: auto; padding: 8px; background: var(--ms-paper); border: 1px solid var(--ms-line); border-radius: 14px; box-shadow: 0 16px 40px -20px rgba(22, 23, 27, .45); }
.ms-facet__value { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; padding: 6px 10px; border-radius: 8px; color: var(--ms-ink); font-size: 14px; text-decoration: none; }
.ms-facet__value:hover { background: var(--ms-wall); color: var(--ms-ink); }
.ms-facet__value.is-on { background: var(--ms-ink); color: #fff; }
.ms-facet__value.is-on .ms-facet__count { color: rgba(255, 255, 255, .7); }
.ms-facet__count { color: var(--ms-ink-2); font-size: 12px; }
.ms-facets__reset { font-size: 13px; color: var(--ms-ink-2); }
.ms-facets__reset:hover { color: var(--ms-ink); }
@media (max-width: 767.98px) {
  .ms-facets { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .ms-facets::-webkit-scrollbar { display: none; }
  .ms-facet { flex: 0 0 auto; }
  .ms-facet__summary { white-space: nowrap; }
  .ms-facet__panel { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; max-width: none; max-height: 60vh; }
}

/* ---------- список товаров «списком»: строка с миниатюрой и кнопкой справа ---------- */
@media (min-width: 768px) {
  #product-list.product-list .col,
  #ms-product-list.product-list .col { flex: 0 0 100%; max-width: 100%; }
  .product-list .product-thumb { flex-direction: row; align-items: center; gap: 16px; padding: 10px 14px; border: 1px solid var(--ms-line); }
  .product-list .product-thumb .image { flex: 0 0 110px; width: 110px; border-radius: 10px; align-self: center; }
  .product-list .product-thumb .image img { aspect-ratio: 3 / 4; border-radius: 10px; }
  .product-list .product-thumb .content { flex: 1; min-width: 0; padding: 0; flex-direction: row; align-items: center; gap: 20px; }
  .product-list .product-thumb .description { flex: 1; min-width: 0; margin: 0; }
  .product-list .product-thumb .price { font-size: 18px; margin: 0; }
  .product-list .product-thumb .name { margin: 4px 0 0; font-size: 14px; -webkit-line-clamp: 2; }
  .product-list .ms-buy { flex: 0 0 auto; width: 220px; margin: 0 0 0 auto; align-self: center; }
  .product-list .ms-buy__add { height: 42px; }
}
@media (max-width: 767.98px) {
  .product-list .product-thumb { padding: 10px; }
  .product-list .product-thumb .image { flex: 0 0 96px; width: 96px; }
}

/* видеообзор в карточке товара */
.ms-video__frame { position: relative; padding-top: 56.25%; border-radius: 16px; overflow: hidden; background: #000; }
.ms-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* режим закупки для своего магазина: закупочная цена и поставщик */
.ms-supplier-cost { font-size: 12px; color: #6b6b6b; margin-left: 6px; }
.ms-supplier { font-size: 12px; color: #6b6b6b; margin-top: 2px; }
.ms-supplier a { color: #b26a00; text-decoration: none; }
