/* Шапка страницы, плитки, плашка металла, таблица товаров, текстовый блок */
.mdm-head{display:flex;justify-content:space-between;align-items:flex-start;gap:32px}
.mdm-head__main{display:flex;flex-direction:column;gap:12px;min-width:0}
.mdm-head__main>p{margin:0}
.mdm-plate{display:flex;flex-direction:row-reverse;justify-content:flex-end;align-items:center;gap:16px;width:320px;min-height:48px;padding:6px 16px;flex-shrink:0;border-radius:var(--mdm-r-lg);color:var(--mdm-ink)}
.mdm-plate__props{font-size:12px}
.mdm-plate__sym{font-size:26px;line-height:1;font-weight:700}
h2.mdm-overline{margin:0 0 10px;font-weight:400}
.mdm-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.mdm-tile{display:flex;flex-direction:column;gap:4px;padding:14px;border:1px solid var(--mdm-line);border-radius:var(--mdm-r-lg);background:var(--mdm-surface);color:var(--mdm-ink);min-height:64px}
.mdm-tile:hover{border-color:var(--mdm-accent);background:var(--mdm-accent-tint-2);color:var(--mdm-ink)}
.mdm-tile strong{font-size:15px}
.mdm-tile .mdm-mono{font-size:12px}
/* виды проката на странице металла — компактный список только до 1024 px (на компьютере они в полосе под поиском) */
.mdm-forms{display:none}
.mdm-forms__list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.mdm-forms__link{display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:44px;padding:8px 12px;border:1px solid var(--mdm-line);border-radius:var(--mdm-r-md);background:var(--mdm-surface);color:var(--mdm-ink);font-size:14px;line-height:1.2}
.mdm-forms__link:hover{border-color:var(--mdm-accent)}
.mdm-forms__link{flex-wrap:wrap}
.mdm-forms__link span{min-width:0;overflow-wrap:break-word;hyphens:auto}
.mdm-forms__link small{color:var(--mdm-muted);font-size:11px;white-space:nowrap}
@media (max-width:1023px){.mdm-forms{display:block}}
.mdm-muted{color:var(--mdm-muted)}
.mdm-accent-text{color:var(--mdm-accent-text)}
.mdm-card-title{margin:0;font-size:17px;font-weight:700}
.mdm-table-card{overflow:hidden}
.mdm-table-card__head{display:flex;justify-content:space-between;align-items:center;padding:20px 20px 16px}
.mdm-table-wrap{overflow-x:auto}
.mdm-table{width:100%;border-collapse:collapse}
.mdm-table th{background:var(--mdm-surface-alt);font-family:var(--mdm-font-mono);font-size:11px;font-weight:400;letter-spacing:.08em;text-transform:uppercase;color:var(--mdm-muted);text-align:left;padding:10px 14px}
.mdm-table td{padding:8px 14px;height:56px;border-top:1px solid var(--mdm-line-soft);font-size:15px;vertical-align:middle}
.mdm-table td.mdm-mono{font-size:14px;font-weight:500}
.mdm-table__name a{color:var(--mdm-ink)}
.mdm-table__name a:hover{color:var(--mdm-accent-text)}
.mdm-table__buy{white-space:nowrap}
.mdm-table__buy .mdm-btn{padding:0 12px}
.mdm-buy{display:grid;grid-template-columns:auto auto auto;justify-content:end;align-items:center;gap:4px 6px}
.mdm-unit{height:40px;border:1px solid var(--mdm-line-strong);border-radius:var(--mdm-r);background:var(--mdm-surface);padding:0 6px;font-size:13px;color:inherit}
.mdm-unit-fixed{font-size:13px;color:var(--mdm-muted);min-width:24px}
.mdm-qty-hint:empty{display:none}
.mdm-qty-hint{grid-column:1/-1;text-align:right;font-family:var(--mdm-font-mono);font-size:12px;color:var(--mdm-muted);min-height:16px}
/* узкая таблица (< 700 px, подбор рядом с заявкой): кнопка на всю ширину под количеством, без прокрутки таблицы */
.mdm-table-wrap{container-type:inline-size}
@container (max-width:699px){.mdm-buy{grid-template-columns:auto auto}.mdm-buy .mdm-btn{grid-column:1/-1}}
.mdm-more-wrap{display:flex;justify-content:center;padding:16px;border-top:1px solid var(--mdm-line-soft)}
.mdm-order-note{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;padding:8px 0}
.mdm-order-note strong{font-size:17px}
.mdm-order-note .mdm-btn{margin-left:auto}
.mdm-text{padding:32px;display:block}
.mdm-text--aside{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:40px}
.mdm-text .mdm-prose>:first-child{margin-top:0}
.mdm-text__aside{display:flex;flex-direction:column;gap:8px}
.mdm-faq{border:1px solid var(--mdm-line);border-radius:var(--mdm-r-md);padding:12px 14px}
.mdm-faq summary{font-weight:700;cursor:pointer}
.mdm-faq p{margin:8px 0 0;color:var(--mdm-ink-2)}
.mdm-aside-link{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border:1px solid var(--mdm-line);border-radius:var(--mdm-r-md);color:var(--mdm-ink);font-weight:700}
.mdm-aside-link span{color:var(--mdm-accent-text)}
/* Матрица наличия и карточка «Выбрано» */
.mdm-split{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:var(--mdm-gap);align-items:start}
/* Карточка товара */
.mdm-product{display:grid;grid-template-columns:minmax(0,1fr) 420px;gap:var(--mdm-gap);align-items:start}
.mdm-product__main,.mdm-product__side{display:flex;flex-direction:column;gap:16px;min-width:0}
.mdm-h1--product{font-size:28px;line-height:1.2;letter-spacing:-.01em}
.mdm-sketch-card{margin:0;padding:20px;background-image:linear-gradient(var(--mdm-line-soft) 1px,transparent 1px),linear-gradient(90deg,var(--mdm-line-soft) 1px,transparent 1px);background-size:20px 20px}
.mdm-sketch-card__cap{display:flex;justify-content:space-between}
/* соседние размеры — строкой под чертежом, в той же карточке */
.mdm-sketch-card__sizes{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin-top:12px;padding-top:14px;border-top:1px dashed var(--mdm-line-strong)}
.mdm-sketch-card__sizes .mdm-chip{font-family:var(--mdm-font-mono);min-width:44px;justify-content:center}
/* вторая строка — размеры при текущей толщине: без второй пунктирной линии */
.mdm-sketch-card__sizes--more{margin-top:8px;padding-top:0;border-top:0}
.mdm-sketch{width:100%;height:auto;display:block}
.mdm-sketch--tall{display:none}
/* эскиз не шире 560 px, по центру карточки — не перетягивает внимание с формы */
.mdm-sketch--wide{max-width:560px;margin:0 auto}
.mdm-sketch__dim{font-family:var(--mdm-font-mono);font-size:16px;fill:var(--mdm-accent-text)}
.mdm-sketch__k{font-family:var(--mdm-font-mono);font-size:11px;letter-spacing:.08em;fill:var(--mdm-muted)}
.mdm-sketch__v{font-family:var(--mdm-font-mono);font-size:15px;font-weight:500;fill:var(--mdm-ink)}
.mdm-sketch__grade{font-family:var(--mdm-font);font-size:28px;font-weight:700;fill:var(--mdm-ink)}
.mdm-sketch__sym{font-family:var(--mdm-font-mono);font-size:22px;font-weight:700;fill:var(--mdm-ink)}
.mdm-specs{padding:8px 20px}
.mdm-specs dl{margin:0;display:grid;grid-template-columns:1fr 1fr;column-gap:32px}
.mdm-specs dl>div{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--mdm-line-soft)}
.mdm-specs dt{color:var(--mdm-muted)}
.mdm-specs dd{margin:0;text-align:right}
/* название товара — строкой над эскизом и формой, кнопка аналогов справа на его уровне */
.mdm-product-head{display:flex;justify-content:space-between;align-items:flex-end;gap:24px}
.mdm-product-head__title{display:flex;flex-direction:column;gap:6px;min-width:0}
.mdm-product-head .mdm-analogs{align-self:auto;flex-shrink:0}
.mdm-calc{padding:22px;display:flex;flex-direction:column;gap:12px}
.mdm-calc__price{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.mdm-calc__big{font-size:30px;font-weight:700;color:#fff}
.mdm-calc__per{font-size:13px;color:var(--mdm-on-dark-muted)}
.mdm-calc__modes{display:flex;background:var(--mdm-rail-input);border-radius:var(--mdm-r-md);padding:4px;gap:4px}
.mdm-calc__modes button{flex:1;height:40px;border:0;border-radius:var(--mdm-r);background:transparent;color:var(--mdm-on-dark-2);font-weight:700;cursor:pointer}
.mdm-calc__modes button[aria-pressed="true"]{background:var(--mdm-on-dark);color:var(--mdm-ink)}
.mdm-calc__label{font-size:13px;color:var(--mdm-on-dark-muted)}
.mdm-calc__input{height:52px;border:1px solid var(--mdm-line-dark);border-radius:var(--mdm-r-md);background:var(--mdm-rail-input);color:#fff;font-size:20px;padding:0 16px}
.mdm-calc__out{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;font-size:12px;color:var(--mdm-on-dark-muted)}
.mdm-calc__out b{display:block;color:#fff;font-size:14px;font-weight:500}
.mdm-calc__add{height:52px;font-size:16px}
.mdm-calc__inquiry{height:52px;flex:1;font-size:16px}
.mdm-calc__info{display:flex;flex-direction:column;gap:12px;padding-top:12px;border-top:1px solid var(--mdm-line-dark);font-size:13px;color:var(--mdm-on-dark-muted)}
.mdm-calc__info p{margin:0}
.mdm-calc__info b{color:#fff}
.mdm-calc__delivery{display:flex;flex-direction:column;gap:6px}
.mdm-calc__info a{color:var(--mdm-accent)}
.mdm-calc__phone a{font-size:16px;font-weight:700;color:#fff}
.mdm-analogs{align-self:flex-start;white-space:nowrap}
/* Главная: подбор, заявка, преимущества, тост */
.mdm-head--home{align-items:flex-end}
.mdm-picker{display:grid;grid-template-columns:1.1fr 1fr 1fr 1.4fr}
.mdm-picker__step{padding:20px;display:flex;flex-direction:column;gap:14px;min-width:0}
.mdm-picker__step+.mdm-picker__step{border-left:1px solid var(--mdm-line-soft)}
.mdm-chips{display:flex;flex-wrap:wrap;gap:6px}
.mdm-cart-card{padding:20px;display:flex;flex-direction:column;gap:14px;position:sticky;top:calc(var(--mdm-topbar-h) + 16px)}
.mdm-cart-card .mdm-card-title{color:#fff}
.mdm-cart-card__head{display:flex;justify-content:space-between;align-items:baseline}
.mdm-on-dark-muted{color:var(--mdm-on-dark-muted);font-size:12px}
.mdm-cart-card__list{list-style:none;margin:0;padding:0}
.mdm-cart-card__list li{display:flex;flex-direction:column;gap:2px;padding:12px 0;border-bottom:1px solid var(--mdm-rail-active);color:var(--mdm-on-dark);font-size:14px}
.mdm-cart-card__list small{color:var(--mdm-on-dark-muted);font-size:12px}
.mdm-cart-card__sum{display:flex;justify-content:space-between;color:var(--mdm-on-dark);font-size:14px}
.mdm-cart-card__note{margin:0;color:var(--mdm-on-dark-muted);font-size:13px}
.mdm-adv{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:var(--mdm-gap)}
/* плашка о cookie: внизу экрана до выбора; «Принять» включает Метрику и пиксель */
.mdm-cookie{position:fixed;left:16px;right:16px;bottom:16px;z-index:50;max-width:720px;margin:0 auto;display:flex;align-items:center;gap:16px;padding:14px 16px;background:var(--mdm-surface);border:1px solid var(--mdm-line);border-radius:var(--mdm-r-md);box-shadow:0 8px 24px rgba(0,0,0,.12);font-size:13px;line-height:1.4}
.mdm-cookie[hidden]{display:none}
.mdm-cookie p{margin:0}
.mdm-cookie__actions{display:flex;gap:8px;flex-shrink:0}
.mdm-cookie .mdm-btn{height:40px;white-space:nowrap}
@media (max-width:640px){.mdm-cookie{flex-direction:column;align-items:stretch}.mdm-cookie__actions .mdm-btn{flex:1}}
.mdm-adv__item{padding:20px;display:flex;flex-direction:column;gap:4px}
.mdm-toast{position:fixed;right:24px;bottom:24px;background:var(--mdm-rail);color:#fff;padding:12px 18px;border-radius:var(--mdm-r-md);opacity:0;transform:translateY(8px);transition:opacity 120ms,transform 120ms;pointer-events:none;z-index:50}
.mdm-toast.is-shown{opacity:1;transform:none}
.mdm-tiles--wide{grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}
.mdm-search--page{max-width:720px;height:52px;background:var(--mdm-surface);border:1px solid var(--mdm-line)}
.mdm-search--page input{height:100%}
.pagination{display:flex;gap:6px;list-style:none;padding:0;margin:0}
.pagination li a,.pagination li span{display:inline-flex;min-width:36px;height:36px;align-items:center;justify-content:center;border:1px solid var(--mdm-line);border-radius:var(--mdm-r);background:var(--mdm-surface);color:var(--mdm-ink);font-family:var(--mdm-font-mono)}
.pagination li.active span{background:var(--mdm-ink);color:#fff;border-color:var(--mdm-ink)}

/* Кнопки старого сайта «к разделу таблицы» (.tegbutton): таблицы стали товарами, якорей нет — кнопки никуда не ведут */
.mdm-prose .tegbutton{display:none}
.mdm-prose [style*="justify"]{text-align:left!important}
.mdm-prose a.mdm-chip{margin:0 6px 6px 0;text-decoration:none;color:var(--mdm-ink)}
.mdm-prose a.mdm-chip:hover{border-color:var(--mdm-ink)}
.mdm-prose p:has(>a.mdm-chip){text-align:left!important}

/* Галерея видов проката из текстов старого сайта (.main.inline → 4 плитки в ряд, img.border1menu) */
.mdm-prose .main.inline{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 12px;max-width:none}
.mdm-lead .main.inline{max-width:none}
.mdm-head__main .mdm-lead:has(.main.inline){max-width:none}
.mdm-prose .main.inline>div{background:var(--mdm-surface);border:1px solid var(--mdm-line);border-radius:var(--mdm-r-lg);padding:10px;text-align:center}
.mdm-prose .main.inline a{display:flex;flex-direction:column;align-items:center;gap:8px;color:var(--mdm-ink);font-weight:600;font-size:14px;line-height:1.3}
.mdm-prose .main.inline img,.mdm-prose img.border1menu{width:100%;height:120px;object-fit:cover;border-radius:var(--mdm-r)}
/* Подбор: длинные списки форм и толщин — прокрутка внутри шага */
.mdm-picker .mdm-chips{max-height:252px;overflow-y:auto;align-content:flex-start}
/* Узкие экраны: широкая матрица не раздвигает сетку; карты и видео из старых текстов — по ширине блока; пагинация переносится */
.mdm-split>*,.mdm-product>*,.mdm-text--aside>*{min-width:0}
.mdm-prose iframe,.mdm-prose video,.mdm-prose embed{max-width:100%}
.mdm-prose table{display:block;max-width:100%;overflow-x:auto}
.pagination{flex-wrap:wrap}

/* Корзина-заявка */
.mdm-alert{padding:12px 16px;border-radius:var(--mdm-r-md);background:var(--mdm-accent-tint-2);border:1px solid var(--mdm-accent);color:var(--mdm-ink)}
.mdm-cart-total{display:flex;flex-direction:column;gap:10px;padding:16px 20px;border-top:1px solid var(--mdm-line-soft)}
.mdm-cart-total>div:first-child{display:flex;justify-content:space-between;gap:16px;font-size:15px}
.mdm-cart-total p{margin:0}
.mdm-cart-total__buttons{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.mdm-cart-total__buttons [hidden]{display:none}
/* Форма заявки */
.mdm-form{padding:24px;display:flex;flex-direction:column;gap:14px}
.mdm-form__pair{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.mdm-field{display:flex;flex-direction:column;gap:6px}
.mdm-field label{font-size:14px;font-weight:600}
.mdm-field input[type=text],.mdm-field input[type=tel],.mdm-field input[type=email],.mdm-field textarea{min-height:44px;border:1px solid var(--mdm-line-strong);border-radius:var(--mdm-r-md);padding:10px 12px;font-size:15px;background:var(--mdm-surface)}
.mdm-field [aria-invalid="true"]{border-color:#B3261E}
.mdm-err{color:#B3261E;font-size:13px}
.mdm-hint{color:var(--mdm-muted);font-size:13px}
.mdm-check{display:flex;gap:8px;align-items:center;font-size:14px}
.mdm-consent{align-items:flex-start;font-size:13px;line-height:1.4}
.mdm-consent input{margin-top:2px;flex-shrink:0}
.mdm-form__submit{height:52px;font-size:16px;align-self:flex-start;padding:0 28px}
.mdm-hp{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}
.mdm-request-sum{padding:20px;display:flex;flex-direction:column;gap:12px}
.mdm-request-sum__list{list-style:none;margin:0;padding:0}
.mdm-request-sum__list li{display:flex;flex-direction:column;gap:2px;padding:10px 0;border-bottom:1px solid var(--mdm-line-soft)}
.mdm-request-sum__list small{color:var(--mdm-muted)}
.mdm-request-sum__total{display:flex;justify-content:space-between}
.mdm-done{padding:28px;display:flex;flex-direction:column;gap:12px;align-items:flex-start}
.mdm-field input[aria-invalid="true"],.mdm-field textarea[aria-invalid="true"]{border-color:#B3261E}
.mdm-field select{min-height:44px;border:1px solid var(--mdm-line-strong);border-radius:var(--mdm-r-md);padding:10px 12px;font-size:15px;background:var(--mdm-surface)}
.mdm-filefield{position:relative;scroll-margin-top:96px}
.mdm-filefield input[type=file]{scroll-margin-top:96px}
.mdm-field__label{font-size:14px;font-weight:600}
.mdm-filefield__row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.mdm-filefield__name{font-size:14px;color:var(--mdm-muted);overflow-wrap:anywhere}
.mdm-filefield input:focus-visible+label{outline:2px solid var(--mdm-ink);outline-offset:2px}

/* Формы связи и диалог обратного звонка */
.mdm-feedback{padding:24px;display:flex;flex-direction:column;gap:12px;max-width:640px}
.mdm-form--contact{padding:0}
.mdm-done-note{margin:0;padding:12px 16px;border-radius:var(--mdm-r-md);background:#E7F3EA;color:var(--mdm-ok);font-weight:600}
.mdm-dialog{border:0;border-radius:var(--mdm-r-xl);padding:24px;width:min(420px,calc(100vw - 32px));box-shadow:0 20px 60px rgba(0,0,0,.25)}
.mdm-dialog::backdrop{background:rgba(22,23,26,.5)}
.mdm-dialog__head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.mdm-dialog__close{width:44px;height:44px;border:0;background:transparent;font-size:18px;cursor:pointer;border-radius:var(--mdm-r)}
.mdm-rail__callback{margin-top:8px;height:36px;border:1px solid var(--mdm-line-dark);border-radius:var(--mdm-r);background:transparent;color:var(--mdm-on-dark);font:inherit;font-size:13px;cursor:pointer}

/* Калькулятор веса */
.mdm-calc-widget{padding:24px;display:flex;flex-direction:column;gap:14px;max-width:760px}
.mdm-calc-widget__grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.mdm-calc-widget__dims{display:contents}
.mdm-calc-widget select,.mdm-calc-widget input{min-height:44px;border:1px solid var(--mdm-line-strong);border-radius:var(--mdm-r-md);padding:0 12px;font-size:15px;background:var(--mdm-surface)}
.mdm-calc-widget__out{margin:0;font-size:17px}
.mdm-calc-widget__out b{font-size:22px}
.mdm-empty{display:flex;flex-direction:column;gap:14px}
.mdm-empty__lead{font-size:17px;font-weight:700;margin:0}
.mdm-empty p{margin:0}
.mdm-tile--img img{display:block;width:100%;height:auto;aspect-ratio:160/110;object-fit:cover;border-radius:var(--mdm-r);margin-bottom:4px}

/* Контакты: склады из настроек, у каждого своя карта */
.mdm-offices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;align-items:start}
.mdm-office{padding:24px;display:flex;flex-direction:column;gap:12px;min-width:0}
.mdm-office .mdm-card-title{margin:0}
.mdm-office__info{font-style:normal;display:flex;flex-direction:column;gap:6px}
.mdm-office__info p{margin:0}
.mdm-office__map{min-height:240px;max-width:100%;overflow:hidden;border-radius:8px}
.mdm-office__map-off{min-height:240px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:16px;text-align:center;background:var(--mdm-bg)}
.mdm-office__map iframe{display:block;width:100%;height:360px;border:0}
.mdm-office__map>*{max-width:100%}
.mdm-office__map iframe,.mdm-office__map ymaps{max-width:100%!important}

/* Фильтры таблиц (как на mc.ru): списки в шапке таблицы, сортировка — щелчком по «Цена» */
.mdm-filters{margin:0 0 12px}
.mdm-chip--zero{opacity:.55}
.mdm-filters__found{margin:0;font-size:14px;color:var(--mdm-muted);display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center}
[data-mdm-filters-submit][hidden]{display:none}
.mdm-th{display:block}
.mdm-table th.mdm-th--ctl{padding:4px 8px;vertical-align:top}
.mdm-th__sum,a.mdm-th{display:flex;flex-direction:column;gap:2px;padding:6px;border-radius:var(--mdm-r);cursor:pointer;list-style:none;color:inherit;text-decoration:none}
.mdm-th__sum::-webkit-details-marker{display:none}
.mdm-th__sum:hover,a.mdm-th:hover,.mdm-th__drop[open]>.mdm-th__sum{background:var(--mdm-surface);color:var(--mdm-ink)}
.mdm-th__title{display:inline-flex;align-items:center;gap:8px;white-space:nowrap}
.mdm-th__caret{width:7px;height:7px;border-right:2px solid var(--mdm-accent-text);border-bottom:2px solid var(--mdm-accent-text);transform:translateY(-2px) rotate(45deg)}
.mdm-th__drop[open] .mdm-th__caret{transform:translateY(2px) rotate(-135deg)}
.mdm-th__sub{font-family:var(--mdm-font);font-size:12px;letter-spacing:0;text-transform:none;color:var(--mdm-muted);max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mdm-th__sum.is-on .mdm-th__sub,a.mdm-th.is-on .mdm-th__sub{color:var(--mdm-accent-text);font-weight:600}
.mdm-th__panel{margin-top:6px;padding:14px;min-width:240px;max-width:calc(100vw - 32px);display:flex;flex-direction:column;gap:14px;background:var(--mdm-surface);border:1px solid var(--mdm-line);border-radius:var(--mdm-r-lg);box-shadow:0 12px 32px rgba(22,23,26,.14);font-family:var(--mdm-font);font-size:14px;letter-spacing:0;text-transform:none;color:var(--mdm-ink);z-index:50}
.mdm-th__drop.is-floating .mdm-th__panel{position:fixed;margin:0;overflow:auto}
/* значения — колонками по 7 сверху вниз (--rows из шаблона), дальше — следующая колонка вправо */
.mdm-th__group{border:0;margin:0;padding:0;display:grid;grid-auto-flow:column;grid-template-rows:repeat(var(--rows,7),auto);grid-auto-columns:minmax(112px,max-content);gap:2px 12px;min-width:0}
.mdm-th__group legend{padding:0;margin:0 0 6px;font-family:var(--mdm-font-mono);font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--mdm-muted)}
.mdm-th__opt{display:flex;align-items:center;gap:8px;min-height:36px;padding:0 6px;border-radius:var(--mdm-r);cursor:pointer;font-weight:500}
.mdm-th__opt:hover{background:var(--mdm-surface-alt)}
.mdm-th__opt input{width:16px;height:16px;margin:0;accent-color:var(--mdm-ink)}
.mdm-th__opt small{margin-left:auto;color:var(--mdm-muted);font-size:12px}
.mdm-th__foot{display:flex;gap:14px;align-items:center}
.mdm-th__foot:not(:has(a,button:not([hidden]))){display:none}

/* Текст под таблицей раздела: старый HTML без правок содержимого. Цвет маркеров — по металлу страницы (--mdm-metal-a/-b на секции). */
.mdm-article{display:flow-root}
.mdm-article h2{margin:32px 0 10px;font-size:22px!important;line-height:1.25;letter-spacing:-.01em}
.mdm-article h3{margin:24px 0 8px;font-size:17px!important;line-height:1.3}
.mdm-article h4,.mdm-article h5,.mdm-article h6{margin:20px 0 6px;font-size:15px!important;line-height:1.35;color:var(--mdm-ink)}
.mdm-article>:first-child{margin-top:0}
.mdm-article p{margin:0 0 12px}
.mdm-article [style*="text-align"]{text-align:left!important}
.mdm-article [style*="font-"],.mdm-article font{font-family:inherit!important}
.mdm-article :not(h2,h3,h4,h5,h6)[style*="font-size"],.mdm-article font{font-size:inherit!important}
.mdm-article [style*="color:"],.mdm-article font{color:inherit!important}
.mdm-article img:not(.border1menu){float:right!important;clear:right;width:auto;max-width:190px;height:auto;margin:4px 0 14px 24px!important;border-radius:var(--mdm-r-md)}
.mdm-article .wp-caption{float:right!important;clear:right;width:190px!important;margin:4px 0 14px 24px!important}
.mdm-article .wp-caption img:not(.border1menu){float:none!important;display:block;width:100%;max-width:100%;margin:0!important}
/* фото в начале текста — заголовок вровень с ним */
.mdm-article>p:first-child:has(>img:only-child){margin:0}
.mdm-article>p:first-child:has(>img:only-child)+h2,.mdm-article>p:first-child:has(>img:only-child)+h3,.mdm-article>.wp-caption+h2,.mdm-article>.wp-caption+h3{margin-top:0}
.mdm-article .wp-caption-text{margin:6px 0 0;font-size:13px;line-height:1.35;color:var(--mdm-muted)}
/* картинка отдельной строкой между разделами: следующий заголовок начинается ниже неё */
.mdm-article>p:not(:first-child):has(>img:only-child)+h2,.mdm-article>p:not(:first-child):has(>a:only-child>img:only-child)+h2,.mdm-article>p:not(:first-child):has(>img:only-child)+h3{clear:both}
.mdm-article ul,.mdm-article ol{margin:0 0 14px;padding:0;list-style:none}
.mdm-article li{position:relative;margin-bottom:8px;padding-left:20px}
.mdm-article ul>li::before{content:"";position:absolute;left:2px;top:.62em;width:8px;height:8px;border-radius:2px;background:linear-gradient(135deg,var(--mdm-metal-a,var(--mdm-accent)),var(--mdm-metal-b,var(--mdm-accent-text)))}
.mdm-article ol{counter-reset:mdm-li}
.mdm-article ol>li{counter-increment:mdm-li}
.mdm-article ol>li::before{content:counter(mdm-li);position:absolute;left:0;font-family:var(--mdm-font-mono);font-size:13px;font-weight:700;color:var(--mdm-muted);color:color-mix(in srgb,var(--mdm-metal-b,var(--mdm-accent-text)) 65%,var(--mdm-ink))}
.mdm-article table{clear:both;width:fit-content;margin:16px 0;border:1px solid var(--mdm-line);border-radius:var(--mdm-r-md);border-collapse:separate;border-spacing:0}
.mdm-article td,.mdm-article th{border:0;border-bottom:1px solid var(--mdm-line-soft);border-right:1px solid var(--mdm-line-soft);padding:8px 12px;text-align:left}
.mdm-article td p{margin:0}
.mdm-article thead td,.mdm-article th,.mdm-article .tabHeader td{background:var(--mdm-surface-alt);color:var(--mdm-ink);font-weight:600}

/* Шапка раздела плотнее: h1 без отступа из default-pages.css, ссылки без пустой строки старого сайта и хвостового отступа чипа */
.mdm-head .mdm-h1{margin:0}
.mdm-lead p:has(>a.mdm-chip){margin-bottom:-6px}
.mdm-lead p:has(>a.mdm-chip)>br{display:none}
/* «Найдено» — подпись к таблице: в общей колонке страницы компенсируем её отступ, чтобы между ними осталось 12px */
.mdm-page>.mdm-filters{margin-bottom:-12px}

/* Текст старого сайта: цепочки слов через неразрывный пробел переносятся, а не расширяют страницу */
.mdm-prose{overflow-wrap:break-word}
/* Таблица в тексте: display:block растянул бы рамку шире колонок */
.mdm-prose table{width:fit-content}

/* Подбор на главной: при ширине до 1279px таблица и карточка заказа друг под другом — рядом таблице не хватает места */
@media (max-width:1279px){
	.mdm-split:has(>.mdm-table-card){grid-template-columns:minmax(0,1fr)}
	.mdm-split:has(>.mdm-table-card) .mdm-cart-card{position:static}
}
@media (min-width:768px){@container (max-width:620px){
	.mdm-table:not(:has(td[data-label="Размер"])) th,.mdm-table:not(:has(td[data-label="Размер"])) td{padding-left:10px;padding-right:10px}}
}

/* Таблица товаров на планшете и узком ноутбуке: колонки не помещаются и кнопка уходит за край —
   строка в два этажа: название, ниже характеристики с подписями и покупка справа. Узнаём таблицу по колонке «Размер» (в подборе на главной её нет). */
@media (min-width:768px){
	@container (max-width:949px){
		.mdm-table:has(td[data-label="Размер"]) thead tr{display:flex;flex-wrap:wrap;gap:6px;padding:10px 14px}
		.mdm-table:has(td[data-label="Размер"]) thead th{display:none}
		.mdm-table:has(td[data-label="Размер"]) thead th.mdm-th--ctl{display:block;padding:0;background:transparent}
		.mdm-table:has(td[data-label="Размер"]) thead:not(:has(.mdm-th--ctl)){display:none}
		.mdm-table:has(td[data-label="Размер"]) .mdm-th__sum,.mdm-table:has(td[data-label="Размер"]) a.mdm-th{min-height:44px;justify-content:center;padding:4px 12px;border:1px solid var(--mdm-line);background:var(--mdm-surface)}
		.mdm-table:has(td[data-label="Размер"]),.mdm-table:has(td[data-label="Размер"]) tbody,.mdm-table:has(td[data-label="Размер"]) thead{display:block}
		.mdm-table:has(td[data-label="Размер"]) tbody tr{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px 20px;padding:12px 14px;border-top:1px solid var(--mdm-line-soft)}
		.mdm-table:has(td[data-label="Размер"]) tbody td{display:block;height:auto;padding:0;border:0}
		.mdm-table:has(td[data-label="Размер"]) td.mdm-table__name{flex:0 0 100%;font-weight:600}
		.mdm-table:has(td[data-label="Размер"]) td[data-label]::before{content:attr(data-label);display:block;margin-bottom:2px;font-family:var(--mdm-font-mono);font-size:11px;font-weight:400;text-transform:uppercase;letter-spacing:.08em;color:var(--mdm-muted)}
		.mdm-table:has(td[data-label="Размер"]) td[data-label]:empty{display:none}
		.mdm-table:has(td[data-label="Размер"]) td.mdm-table__buy{margin-left:auto}
	}
}

/* статьи «Полезного»: подпись и содержание (10.11.2026) */
.mdm-article-meta{display:flex;flex-wrap:wrap;gap:4px 16px;margin:-4px 0 16px;color:var(--mdm-muted);font-size:13px}
.mdm-toc{margin-bottom:16px;padding:16px 20px}
.mdm-toc__title{margin:0 0 8px;font-size:15px;font-weight:700}
.mdm-toc ol{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:4px}
.mdm-prose h2[id],.mdm-prose h3[id]{scroll-margin-top:80px}
