/* «Распродажа»: переключатель «плитка / список» и вид списком (Ирина, 16.11.2026).
   Подключает catalog/main/include/sale_groups_newdesign.php прямой ссылкой.

   Список собран из той же карточки, что и плитка: корзина, счётчик, цены и
   скидки работают теми же скриптами. Карточку раскладываем сеткой в строку,
   .item_info растворяем (display: contents), чтобы его части встали в свои
   колонки. Строки nd-lrow-* (артикул, цена в других единицах, склады) печатает
   шаблон только в распродаже, в плитке они скрыты атрибутом hidden.

   Колонки: фото | артикул и название | цена | наличие | количество и корзина. */

/* --- переключатель ------------------------------------------------------- */
.nd-viewsw {
    display: inline-flex;
    gap: 4px;
    margin-left: auto;
    margin-right: 16px;
    flex: none;
    align-self: center;
}
.nd-viewsw__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    background: #fff;
    color: #9a9a9a;
    cursor: pointer;
    transition: color .15s, border-color .15s, background .15s;
}
.nd-viewsw__btn:hover { color: #1a1a1a; border-color: #c8c8c8; }
html:not(.nd-view-list) .nd-viewsw__btn--tile,
html.nd-view-list .nd-viewsw__btn--list {
    color: #fff;
    background: #1a1a1a;
    border-color: #1a1a1a;
}

/* На компьютере переключатель – под сортировкой, прижат вправо (Ирина, 16.11.2026, скриншот):
   строка сортировки сеткой, чипы групп слева на обе строки. Класс nd-catlist-sort--viewsw ставит
   sort_newdesign.php вместе с кнопками. На телефоне порядок прежний (newdesign-catalog.css). */
@media (min-width: 768px) {
    .nd-catlist-sort.nd-catlist-sort--viewsw {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        column-gap: 24px;
        row-gap: 8px;
        align-items: start;
    }
    /* 16.11.2026 (Ирина, скриншот): чипы – первой строкой во всю ширину, под ними слева сортировка,
       справа «плитка/список» – одной строкой */
    .nd-catlist-sort--viewsw .nd-catlist-sort__tags { grid-column: 1 / -1; grid-row: 1; }
    .nd-catlist-sort--viewsw .nd-catlist-sort__select { grid-column: 1; grid-row: 2; justify-self: start; align-self: center; }
    .nd-catlist-sort--viewsw .nd-viewsw { grid-column: 2; grid-row: 2; justify-self: end; align-self: center; margin: 0; }
    .nd-catlist-sort--viewsw .nd-catlist-sort__tags:empty { display: none; }
    /* сортировка теперь слева – список вариантов открываем вправо, а не поверх фильтра */
    .nd-catlist-sort--viewsw .nd-catlist-sort__list { left: 0 !important; right: auto !important; }
}

/* --- вид списком: общая сетка ------------------------------------------- */
html.nd-view-list .nd-sale-host .nd-lrow-art,
html.nd-view-list .nd-sale-host .nd-lrow-units,
html.nd-view-list .nd-sale-host .nd-lrow-stock { display: block; }

html.nd-view-list .nd-sale-host .catalog_block.nd-catlist__list {
    display: block !important;
    margin: 0 !important;
}
html.nd-view-list .nd-sale-host .catalog_block > .item_block {
    width: 100% !important;
    max-width: none !important;
    flex: none !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
    position: relative;
    /* Изолируем слои строки: у кнопок длин темы z-index: 9, и без контекста
       они перекрывают фото соседней строки, поднятой до z-index: 5. */
    z-index: 0;
}
/* увеличенное фото строки должно лечь поверх соседних строк */
html.nd-view-list .nd-sale-host .catalog_block > .item_block:hover { z-index: 5; }

html.nd-view-list .nd-sale-host .catalog_item_wrapp.item {
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid #ececec !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff;
}
html.nd-view-list .nd-sale-host .catalog_item_wrapp.item:hover { background: #fafafa; }
html.nd-view-list .nd-sale-host .catalog_item_wrapp .catalog_item,
html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap {
    height: auto !important;
    min-height: 0 !important;
    width: 100% !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap {
    display: grid !important;
    grid-template-columns: 80px minmax(0, 1fr) 240px 236px;
    column-gap: 20px;
    align-items: start;
}
html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap {
    grid-template-rows: auto auto auto 1fr;
    padding: 16px 12px !important;
    text-align: left !important;
}
/* .item_info растворяем – его дети встают прямо в сетку */
html.nd-view-list .nd-sale-host .catalog_item_wrapp .item_info { display: contents !important; }

/* --- фото (колонка 1) ------------------------------------------------------ */
html.nd-view-list .nd-sale-host .image_wrapper_block {
    grid-column: 1;
    grid-row: 1 / -1;
    width: 80px !important;
    height: 80px !important;
    margin: 0 !important;
    overflow: visible !important;
    position: relative;
}
html.nd-view-list .nd-sale-host .image_wrapper_block .nd-badges { display: none !important; }
html.nd-view-list .nd-sale-host .image_wrapper_block .thumb {
    display: block;
    width: 80px !important;
    height: 80px !important;
    overflow: visible !important;
    position: relative;
}
html.nd-view-list .nd-sale-host .image_wrapper_block .thumb::before,
html.nd-view-list .nd-sale-host .image_wrapper_block .thumb::after { display: none !important; } /* блик .shine */
html.nd-view-list .nd-sale-host .image_wrapper_block .thumb img {
    width: 80px !important;
    height: 80px !important;
    max-width: none !important;
    object-fit: contain;
    background: #fff;
    border-radius: 6px;
    transform-origin: 0 0;
    transition: transform .2s ease, box-shadow .2s ease;
    position: relative;
}
/* при наведении – крупно, поверх строки и соседей; только там, где есть мышь */
@media (hover: hover) and (pointer: fine) {
    html.nd-view-list .nd-sale-host .image_wrapper_block .thumb:hover img {
        transform: scale(3.4);
        z-index: 20;
        box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
        border-radius: 3px;
    }
    /* фото поверх всего в своей строке тоже: кнопки длин, цены, склады – соседние элементы той же
       сетки, без своего z-index у блока картинки увеличенное фото уходило под длины (16.11.2026) */
    html.nd-view-list .nd-sale-host .image_wrapper_block:hover { z-index: 30 !important; }
}
html.nd-view-list .nd-sale-host .colproduct_video { display: none !important; }

/* --- артикул и название (колонка 2) ------------------------------------ */
html.nd-view-list .nd-sale-host .nd-lrow-art {
    grid-column: 2;
    grid-row: 1;
    font-size: 13px;
    line-height: 1.3;
    color: #8c8c8c;
    margin-bottom: 4px;
}
html.nd-view-list .nd-sale-host .item-title {
    grid-column: 2;
    grid-row: 2 / -1;
    margin: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    font-size: 15px;
    line-height: 1.4;
}
html.nd-view-list .nd-sale-host .item-title a,
html.nd-view-list .nd-sale-host .item-title span {
    height: auto !important;
    max-height: none !important;
    -webkit-line-clamp: unset !important;
    display: inline !important;
    overflow: visible !important;
}
html.nd-view-list .nd-sale-host .article_block_nooffer,
html.nd-view-list .nd-sale-host .list__catalog_sku,
html.nd-view-list .nd-sale-host .nd-tline { display: none !important; }

/* --- цена (колонка 3) ------------------------------------------------------ */
html.nd-view-list .nd-sale-host .nd-price-row {
    grid-column: 3;
    grid-row: 1;
    margin: 0 !important;
}
html.nd-view-list .nd-sale-host .nd-price-row .price { font-size: 20px; }
html.nd-view-list .nd-sale-host .nd-old-row {
    grid-column: 3;
    grid-row: 2;
    margin: 4px 0 0 !important;
    flex-wrap: wrap;
    row-gap: 4px;
}
html.nd-view-list .nd-sale-host .nd-lrow-units {
    grid-column: 3;
    grid-row: 3;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: #595959;
}
html.nd-view-list .nd-sale-host .nd-lrow-units__item { display: block; white-space: nowrap; }
html.nd-view-list .nd-sale-host .nd-lrow-units:empty { display: none; }

/* --- наличие (колонка 4) ---------------------------------------------------- */
html.nd-view-list .nd-sale-host .nd-lrow-stock {
    grid-column: 4;
    grid-row: 3 / -1;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: #595959;
}
.nd-lrow-stock__total {
    font-size: 14px;
    font-weight: 600;
    color: #8c8c8c;
    margin-bottom: 4px;
}
.nd-lrow-stock__total.is-in { color: #1f9d55; }
.nd-lrow-stock__total.is-in::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    background: currentColor;
    vertical-align: 1px;
}
/* Склады – плашкой в тон «В наличии»: лёгкий зелёный фон, тонкая рамка, скругление, строки
   через тонкий разделитель (Ирина, 16.11.2026: «чтобы глаз цеплялся»).
   Отступы списков темы (ul/li) гасим с !important – иначе под складами пустое место. */
.nd-lrow-stock__list {
    list-style: none !important;
    margin: 6px 0 0 !important;
    padding: 2px 10px !important;
    background: #f2f9f4;
    border: 1px solid #d6ecdd;
    border-radius: 3px; /* как у счётчика рядом (Ирина, 16.11.2026) */
}
.nd-lrow-stock__list li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin: 0 !important;
    padding: 5px 0 !important;
    line-height: 1.35 !important;
    color: #3d4a42;
}
.nd-lrow-stock__list li + li { border-top: 1px solid #e1f0e6; }
.nd-lrow-stock__list li::before { display: none !important; } /* маркеры списков темы */
.nd-lrow-stock__list b { font-weight: 700; color: #14532d; white-space: nowrap; }

/* --- количество и корзина (колонка 5) -------------------------------------- */
/* селектор длинный нарочно: newdesign-catalog.css прижимает счётчик книзу плитки
   (.nd-catlist .catalog_item_wrapp .inner_wrap > .counter_wrapp { margin-top: auto !important }) */
html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap > .counter_wrapp {
    grid-column: 4;
    grid-row: 1 / 3;
    margin: 0 !important;
    width: auto !important;
    flex-wrap: wrap;
    row-gap: 8px;
}
/* Компактная покупка по образцу дилер-шопа (18.11.2026).
   Оба счётчика сохраняют свою разметку и обработчики. Не переопределяем display:
   после добавления товара скрипт скрывает счётчик и показывает «В корзине». */
html.nd-view-list .nd-sale-host .catalog_item_wrapp .counter_wrapp {
    --nd-list-control-size: 40px;
    gap: 8px;
}
html.nd-view-list .nd-sale-host .catalog_item_wrapp .counter_wrapp .measure-wrapper .measure-block,
html.nd-view-list .nd-sale-host .catalog_item_wrapp .counter_wrapp.nd-native-counter .counter_block {
    height: var(--nd-list-control-size) !important;
    background: #fff;
    border: 1px solid #e3e5e9 !important;
    border-radius: 8px;
}
html.nd-view-list .nd-sale-host .catalog_item_wrapp .counter_wrapp .measure-button,
html.nd-view-list .nd-sale-host .catalog_item_wrapp .counter_wrapp.nd-native-counter .counter_block :is(.minus, .plus) {
    width: 24px !important;
    height: 32px !important;
    background-size: 14px 14px !important;
    border-radius: 4px;
}
html.nd-view-list .nd-sale-host .catalog_item_wrapp .counter_wrapp .measure-button:hover,
html.nd-view-list .nd-sale-host .catalog_item_wrapp .counter_wrapp.nd-native-counter .counter_block :is(.minus, .plus):hover {
    background-color: #f3f4f6 !important;
}
html.nd-view-list .nd-sale-host .catalog_item_wrapp .counter_wrapp .button_block :is(.to-cart, .to-cart.btn.btn-default.white, a.in-cart.btn.btn-default) {
    height: var(--nd-list-control-size) !important;
    border-radius: 8px !important;
    background: #f3f4f6 !important;
}
html.nd-view-list .nd-sale-host .catalog_item_wrapp .counter_wrapp .button_block :is(.to-cart, .to-cart.btn.btn-default.white) {
    width: var(--nd-list-control-size) !important;
    min-width: var(--nd-list-control-size) !important;
}
html.nd-view-list .nd-sale-host .catalog_item_wrapp .counter_wrapp .to-cart::after {
    width: 20px;
    height: 20px;
    background-size: 18px;
    filter: brightness(.4);
}
html.nd-view-list .nd-sale-host .catalog_item_wrapp .counter_wrapp .button_block :is(.to-cart, .to-cart.btn.btn-default.white):hover {
    background: #c60000 !important;
}
html.nd-view-list .nd-sale-host .catalog_item_wrapp .counter_wrapp .to-cart:hover::after { filter: none; }
html.nd-view-list .nd-sale-host .catalog_item_wrapp .counter_wrapp :is(.to-cart, .in-cart, .measure-button, .minus, .plus):focus-visible {
    outline: 2px solid #525264;
    outline-offset: -2px;
}
@media (min-width: 768px) {
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap > .counter_wrapp,
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap > .offer_buy_block {
        max-width: 200px;
        justify-self: end;
        width: 100% !important;
    }
}
@media (max-width: 767px) {
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .counter_wrapp { --nd-list-control-size: 44px; }
}
/* На сенсорном экране сохраняем крупную область нажатия при маленьком значке. */
@media (pointer: coarse) {
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .counter_wrapp { --nd-list-control-size: 48px; }
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .counter_wrapp .measure-button,
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .counter_wrapp.nd-native-counter .counter_block :is(.minus, .plus) {
        width: 44px !important;
        height: 44px !important;
    }
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap > .counter_wrapp,
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap > .offer_buy_block { max-width: none; }
}

/* «Сравнить» (видно только группе тестирования) – в верхний левый угол строки, поверх угла фото (Ирина, 16.11.2026) */
html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap { position: relative; }
html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap > .nd-cmp-btn {
    position: absolute !important;
    top: 4px !important;
    left: 4px !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    z-index: 2;
}

/* --- товары каталога с длинами (с 16.11.2026 вид списком во всех разделах) -----------------
   У товара с предложениями своя разметка покупки: кнопки длин .sku_props и блок
   .offer_buy_block (счётчик и корзина) вместо .counter_wrapp. Без явных мест в сетке
   браузер раскладывает их сам и раздвигает строки. */
@media (min-width: 768px) {
    /* кнопки длин – в колонке названия, под ним (Ирина, 16.11.2026); покупка – одна в колонке 5 */
    /* Колонка 2 по строкам: артикул (1), название (2), длины (3); строка 4 (1fr) – запас.
       Цена занимает строки 1–2, старая цена и прочее колонки 3 – с 3-й до конца, склады и покупка –
       все строки: так соседние колонки не раздувают строку названия, и длины всегда сразу под ним. */
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap:has(.sku_props) .nd-lrow-art { grid-row: 1; }
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap:has(.sku_props) .item-title { grid-row: 2; padding-top: 0; min-height: 42px; }
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap:has(.sku_props) .nd-price-row { grid-row: 1 / 3; }
    /* старая цена – сразу под ценой с переключателем (их высота постоянна, ~59 px), а не ниже названия */
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap:has(.sku_props) .nd-old-row { grid-row: 1 / -1; margin: 64px 0 0 !important; }
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap:has(.sku_props) .nd-lrow-units { grid-row: 3 / -1; }
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap > .sku_props,
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .item_info > .sku_props {
        grid-column: 2;
        grid-row: 3;
        align-self: start;
        margin: 10px 0 0 !important;
    }
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap > .offer_buy_block {
        grid-column: 4;
        grid-row: 1 / 3;
        align-self: start;
        margin: 0 !important;
        width: 100% !important;
    }
    /* переключатель единиц, если скрипт вынес его из строки цены */
    html.nd-view-list .nd-sale-host .item_info > .measure-unit-block { grid-column: 3; grid-row: 2; margin: 4px 0 0 !important; }
}
/* название сразу под артикулом: обе в колонке 2 с первой строки сетки, название ниже на высоту
   артикула (иначе между ними пустота высотой первой строки – цена, кнопки длин) */
@media (min-width: 768px) {
    html.nd-view-list .nd-sale-host .item-title { grid-row: 1 / -1; align-self: start; padding-top: 22px; }
    html.nd-view-list .nd-sale-host .nd-lrow-art { align-self: start; position: relative; z-index: 1; }
}
/* служебная «минимальная цена» над блоком покупки (template.php, buttonHTML1) – в строке не нужна */
html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap > div:not([class]) { display: none !important; }
/* код товара в углу плитки – в строке уже есть «Арт.» */
html.nd-view-list .nd-sale-host .article_block.item-article { display: none !important; }

/* При смене вида цвет корзины применяется сразу, без перехода .transition_bg темы.
   Правило действует в обоих видах, чтобы обратное переключение тоже не мигало. */
.nd-sale-host .catalog_item_wrapp .button_block .to-cart {
    transition: none !important;
}

/* Цена и единицы в одной строке, как в плитке; на узкой колонке разрешён перенос. */
html.nd-view-list .nd-sale-host .nd-price-row {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 8px;
}
html.nd-view-list .nd-sale-host .nd-price-row .cost { flex: 0 1 auto; margin: 0 !important; }
html.nd-view-list .nd-sale-host .nd-price-row .price { white-space: nowrap; }
html.nd-view-list .nd-sale-host .nd-price-row .measure-unit-block { margin: 0 !important; }

/* Склады выше строки цены: скидка не должна отступать на высоту соседней колонки. */
@media (min-width: 1200px) {
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap .nd-old-row {
        grid-row: 1 / -1;
        align-self: start;
        margin-top: 34px !important;
    }
}

/* --- планшет: уже колонки -------------------------------------------------- */
@media (max-width: 1199px) {
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap {
        grid-template-columns: 72px minmax(0, 1fr) 140px 210px;
        column-gap: 16px;
    }
    html.nd-view-list .nd-sale-host .image_wrapper_block,
    html.nd-view-list .nd-sale-host .image_wrapper_block .thumb,
    html.nd-view-list .nd-sale-host .image_wrapper_block .thumb img { width: 72px !important; height: 72px !important; }
}

/* --- телефон: строка-карточка, фото слева ---------------------------------- */
@media (max-width: 767px) {
    .nd-viewsw { margin-right: 8px; }
    /* чипы групп – первой строкой, «плитка/список» и сортировка – под ними, сразу над товарами */
    .nd-catlist-sort--viewsw .nd-catlist-sort__tags { order: -1; }
    .nd-viewsw__btn { width: 32px; height: 32px; }

    html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap {
        grid-template-columns: 72px minmax(0, 1fr);
        grid-template-rows: none;
        column-gap: 12px;
        row-gap: 6px;
        /* поля по бокам и снизу: без них наличие и счётчик липли к краю и к следующей строке (16.11.2026) */
        padding: 18px 14px 20px !important;
    }
    html.nd-view-list .nd-sale-host .image_wrapper_block { grid-row: 1 / span 3; }
    html.nd-view-list .nd-sale-host .nd-lrow-art { grid-column: 2; grid-row: 1; margin: 0; }
    html.nd-view-list .nd-sale-host .item-title { grid-column: 2; grid-row: 2; font-size: 14px; }
    html.nd-view-list .nd-sale-host .nd-price-row { grid-column: 2; grid-row: 3; }
    html.nd-view-list .nd-sale-host .nd-old-row { grid-column: 2; grid-row: 4; margin: 0 !important; }
    html.nd-view-list .nd-sale-host .nd-lrow-units { grid-column: 2; grid-row: 5; margin: 0; }
    html.nd-view-list .nd-sale-host .nd-lrow-units__item { display: inline; }
    html.nd-view-list .nd-sale-host .nd-lrow-units__item + .nd-lrow-units__item::before { content: " · "; color: #bdbdbd; }
    html.nd-view-list .nd-sale-host .nd-lrow-stock { grid-column: 1 / -1; grid-row: 6; margin-top: 12px; }
    /* на телефоне склады в строку – каждый своей плашкой, скругление как у счётчика */
    html.nd-view-list .nd-sale-host .nd-lrow-stock__list {
        display: flex; flex-wrap: wrap; gap: 6px;
        padding: 0 !important; background: none; border: 0; border-radius: 0;
    }
    html.nd-view-list .nd-sale-host .nd-lrow-stock__list li {
        justify-content: flex-start; gap: 6px;
        padding: 4px 10px !important;
        background: #f2f9f4; border: 1px solid #d6ecdd; border-radius: 3px;
    }
    html.nd-view-list .nd-sale-host .nd-lrow-stock__list li + li { border-top: 1px solid #d6ecdd; }
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap > .counter_wrapp { grid-column: 1 / -1; grid-row: 7; margin-top: 14px !important; }
    /* «Сравнить» на телефоне – квадратом в ряду покупки, первым слева от счётчика, как на детальной
       (newdesign-compare.css, .nd-cmp-btn--detail). Кнопка и счётчик в одной ячейке сетки,
       счётчик сдвинут на ширину кнопки; высоту кнопка берёт у ряда (Ирина, 16.11.2026). */
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap:has(> .nd-cmp-btn) > .counter_wrapp { margin-left: 56px !important; }
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap > .nd-cmp-btn {
        position: static !important;
        grid-column: 1 / -1; grid-row: 7;
        justify-self: start; align-self: stretch;
        width: 48px; height: auto; min-height: 44px;
        margin: 14px 0 0 !important; padding: 0 !important;
        justify-content: center;
        border-radius: 3px;
        background: rgba(82, 82, 100, 0.1);
        color: #101014;
    }
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap > .nd-cmp-btn.is-active {
        background: #fdecec; color: #c60000; box-shadow: inset 0 0 0 1px #f0c2c2;
    }
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap > .nd-cmp-btn svg { width: 24px; height: 24px; }
    /* на телефоне увеличение по наведению не нужно – фото открывается в карточке товара */

    /* товары каталога с длинами: переключатель единиц под ценой (скрипт на телефоне выносит его
       из строки цены), кнопки длин и покупка – во всю ширину под складами */
    /* переключатель единиц – в строке цены справа, как в плитке (Ирина, 16.11.2026); цена ~100 px +
       переключатель ~110 px в колонку 244 px на 390-м экране помещаются */
    html.nd-view-list .nd-sale-host .item_info > .measure-unit-block {
        grid-column: 2;
        grid-row: 3;
        justify-self: end;
        align-self: center;
        width: auto !important;
        margin: 0 !important;
    }
    html.nd-view-list .nd-sale-host .item_info > .sku_props,
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap > .sku_props { grid-column: 1 / -1; grid-row: 7; margin: 12px 0 0 !important; }
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap > .offer_buy_block { grid-column: 1 / -1; grid-row: 8; margin: 10px 0 0 !important; width: auto !important; }
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap:has(> .offer_buy_block) > .nd-cmp-btn { grid-row: 8; margin-top: 10px !important; }
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap:has(> .nd-cmp-btn) > .offer_buy_block { margin-left: 56px !important; }
}

/* Плитки акций и сквозной баннер (.nd-promo-cell, .nd-catbanner) рассчитаны на сетку плиток;
   в строке списка растягиваются на всю ширину и становятся огромными – в списке их не показываем
   (Ирина, 16.11.2026). В плитке остаются. */
html.nd-view-list .nd-sale-host .nd-promo-cell { display: none !important; }

/* цены в шт / п.м / м² строкой ниже не нужны, если у товара есть переключатель единиц (Ирина, 16.11.2026) */
html.nd-view-list .nd-sale-host .catalog_item_wrapp:has(.measure-unit-block) .nd-lrow-units { display: none !important; }

/* Пока newdesign-catalog.js не собрал карточку (.nd-ready ставит arrangeCard, у товаров с длинами –
   после компонента единиц, ~0,5 с), цена, переключатель, длины и покупка ещё не в своих обёртках
   и в сетке списка наезжают друг на друга (цена, старая цена, цены в единицах – поочерёдно). До сборки
   колонки цены и покупки невидимы (место держат), цена заранее в своей колонке. Ирина, 16.11.2026. */
/* (уточнено: у товара без цены .nd-ready не ставится вовсе – прячем только то, что скрипт переносит) */
html.nd-view-list .nd-sale-host .catalog_item_wrapp:not(.nd-ready) .measure-unit-block,
html.nd-view-list .nd-sale-host .catalog_item_wrapp:not(.nd-ready) .item_info > .cost.prices,
html.nd-view-list .nd-sale-host .catalog_item_wrapp:not(.nd-ready) .nd-price-row,
html.nd-view-list .nd-sale-host .catalog_item_wrapp:not(.nd-ready) .nd-old-row,
html.nd-view-list .nd-sale-host .catalog_item_wrapp:not(.nd-ready) .nd-lrow-units,
html.nd-view-list .nd-sale-host .catalog_item_wrapp:not(.nd-ready) .inner_wrap > .offer_buy_block,
html.nd-view-list .nd-sale-host .catalog_item_wrapp:not(.nd-ready) .inner_wrap > .counter_wrapp {
    visibility: hidden;
    /* у товара без цены .nd-ready не ставится вовсе – показываем сами через 1,5 с */
    animation: nd-lrow-reveal 0s 1.5s forwards;
}
@keyframes nd-lrow-reveal { to { visibility: visible; } }
@media (min-width: 768px) {
    html.nd-view-list .nd-sale-host .catalog_item_wrapp:not(.nd-ready) .item_info > .cost.prices { grid-column: 3; grid-row: 1 / 3; }
}

/* «Цена по запросу» и «Узнать цену» в строке списка – мельче, чем в плитке (там 18 px и кнопка 48 px):
   по размеру как цена и счётчик соседних строк (Ирина, 16.11.2026) */
html.nd-view-list .nd-sale-host .nd-price-request {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 8px;
}
html.nd-view-list .nd-sale-host .button_block:has(> .nd-price-request) .btn {
    height: 40px !important;
    min-height: 0 !important;
    padding: 0 16px !important;
    font-size: 14px !important;
    line-height: 38px !important;
}

/* Наличие клетками по складам (Ирина, 16.11.2026, по образцу): МСК / КРД / БЕЛ / ВРН в ряд,
   под названием остаток или «–»; где есть – зелёная клетка. Разметка – template.php и script.js. */
.nd-lrow-stock__cap {
    font-size: 11px;
    line-height: 1.3;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #8c8c8c;
    margin: 0 0 6px;
}
.nd-scell-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}
.nd-scell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 0;
    margin: 0 !important;
    padding: 7px 2px 6px !important;
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    background: #fff;
    text-align: center;
}
.nd-scell::before { display: none !important; } /* маркеры списков темы */
.nd-scell span {
    font-size: 11px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: .03em;
    color: #8c8c8c;
}
.nd-scell b {
    font-size: 13px;
    line-height: 1.2;
    font-weight: 700;
    color: #b3b3b3;
    white-space: nowrap;
}
.nd-scell.is-in { border-color: #cfe9d8; background: #f2faf5; }
.nd-scell.is-in span { color: #3d7a55; }
.nd-scell.is-in b { color: #14532d; }
.nd-lrow-stock .nd-lrow-stock__total { margin-top: 6px; }
@media (max-width: 767px) {
    html.nd-view-list .nd-sale-host .nd-scell b { font-size: 14px; }
}

/* Кнопки длин в строке списка – компактнее, чтобы 3–4 длины (3000/4000/6000 мм) вставали в одну
   строку под названием (в плитке размер прежний). Ирина, 16.11.2026. */
html.nd-view-list .nd-sale-host .nd-sku--dlina ul { gap: 3px !important; }
html.nd-view-list .nd-sale-host .nd-sku--dlina li {
    padding: 0 6px !important;
    font-size: 12px !important;
    min-height: 0 !important;
    height: 28px !important;
    line-height: 26px !important;
}
html.nd-view-list .nd-sale-host .nd-sku--dlina li .cnt,
html.nd-view-list .nd-sale-host .nd-sku--dlina li .cnt::after { font-size: 12px !important; line-height: 26px !important; }

/* Артикул как на детальной (.nd-pd__article в newdesign-element.css): значок «копировать» перед номером,
   по клику номер в буфер и «Скопировано» над ним (newdesign-catalog.js). Ирина, 16.11.2026. */
.nd-lrow-art__num {
    position: relative;
    display: inline-block;
    cursor: pointer;
    color: rgba(82, 82, 100, .5);
    transition: color .15s;
}
.nd-lrow-art__num:hover,
.nd-lrow-art__num:focus-visible { color: #525264; outline: none; }
.nd-lrow-art__num:not(:empty)::before {
    content: "";
    display: inline-block;
    width: 1.15em;
    height: 1.15em;
    margin-right: .3em;
    vertical-align: -.2em;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='8' y='8' width='12' height='12' rx='2'/%3E%3Cpath d='M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2'/%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 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='8' y='8' width='12' height='12' rx='2'/%3E%3Cpath d='M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.nd-lrow-art__num::after {
    content: "Скопировано";
    position: absolute;
    left: 0;
    bottom: calc(100% + 6px);
    padding: 4px 8px;
    border-radius: 6px;
    background: #101014;
    color: #fff;
    font-size: 12px;
    line-height: 16px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s;
    z-index: 5;
}
.nd-lrow-art__num.nd-art-copied::after { opacity: 1; }

/* ни на одном складе нет – блок наличия в списке не показываем (Ирина, 16.11.2026) */
html.nd-view-list .nd-sale-host .nd-lrow-stock.nd-lrow-stock--none { display: none !important; }
@media (max-width: 767px) {
    /* без блока наличия на телефоне пустые строки сетки 4–6 всё равно дают по 6 px (row-gap) плюс
       12 px сверху у длин – получалась дыра ~36 px; оставляем 12 px от цены (или старой цены) */
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap:has(.nd-lrow-stock--none) > .sku_props,
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap:has(.nd-lrow-stock--none) .item_info > .sku_props { margin-top: -12px !important; }
}
@media (max-width: 767px) {
    /* то же для товара без длин: между ценой и счётчиком пустые строки 4–7 */
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap:has(.nd-lrow-stock--none):not(:has(.sku_props)) > .counter_wrapp,
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap:has(.nd-lrow-stock--none):not(:has(.sku_props)) > .offer_buy_block,
    html.nd-view-list .nd-sale-host .catalog_item_wrapp .inner_wrap:has(.nd-lrow-stock--none):not(:has(.sku_props)) > .nd-cmp-btn { margin-top: -12px !important; }
}

/* «Распродажа» во всю ширину без левой колонки, плитки по 5 в ряд (Ирина, 16.11.2026).
   Левую колонку не печатает footer.php (HIDE_LEFT_BLOCK из list_elements_1.php); .right_block печатается
   раньше раздела, класс ширины ей ставит строчка скрипта перед списком – так же сделан поиск. */
.right_block.nd-sale-wide-col {
    width: 100% !important;
    max-width: none !important;
    padding-left: 0 !important;
    float: none !important;
}
html:not(.nd-view-list) .nd-sale-wide .nd-catlist .catalog_block { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1500px) { html:not(.nd-view-list) .nd-sale-wide .nd-catlist .catalog_block { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1199px) { html:not(.nd-view-list) .nd-sale-wide .nd-catlist .catalog_block { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px)  { html:not(.nd-view-list) .nd-sale-wide .nd-catlist .catalog_block { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
