/**
 * Products Module (Elementor widget) - Iron Fort
 * Prefix: .if-products (from mockup zf-*)
 */

/* Animation variables (fallback if not in style.css) */
.if-products {
    --if-transition-fast: var(--if-transition-fast, 0.2s ease);
    --if-transition: var(--if-transition, 0.3s ease);
}

/* Section */
.if-products {
    max-width: var(--if-container-max, 1260px);
    margin: 0 auto;
    padding: 60px 24px 80px;
}

/* Related blocks (single-product page) align horizontally with the catalog:
   no side padding by default. The widget's "Секция блока" control can override. */
.if-products--related,
.if-products--related-categories {
    padding-left: 0;
    padding-right: 0;
}

/* Шапка: колонка — ряд (заголовок + поиск/тулбар), затем крошки */
.if-products__header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--if-products-header-gap, 24px);
    margin-bottom: 32px;
}

.if-products__header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    column-gap: var(--if-products-header-row-gap, 16px);
    row-gap: var(--if-products-header-row-row-gap, 12px);
}

.if-products__header .if-products__title-wrap {
    flex: 0 0 auto;
}

.if-products__header .if-products__title {
    margin-bottom: 0;
    display: inline-block;
    font-size: clamp(1.25rem, 4vw, 2rem);
    transform: none;
}

.if-products__header .if-products__toolbar {
    margin-bottom: 0;
    flex: 1 1 280px;
    min-width: 0;
}

.if-products__header .if-products__search {
    min-width: min(280px, 100%);
    max-width: 540px;
}

/* Breadcrumbs: второй ряд под заголовком и поиском */
.if-products__breadcrumb {
    width: 100%;
}

/* Крошки: общие переменные (виджет #id, шорткод .if-catalog-breadcrumbs, Кастомайзер) */
.if-products__header .if-breadcrumbs,
.if-catalog-breadcrumbs .if-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--if-bc-gap, var(--if-gap-xs, 8px));
    font-family: var(--if-bc-font-family, inherit);
    font-size: var(--if-bc-font-size, 14px);
    font-weight: var(--if-bc-font-weight, 600);
    line-height: var(--if-bc-line-height, 1.3);
    letter-spacing: var(--if-bc-letter-spacing, 0.05em);
    text-transform: var(--if-bc-text-transform, uppercase);
    color: var(--if-bc-color, var(--if-color-text-muted, #666));
    padding: 0;
    margin-top: var(--if-bc-margin-top, 4px);
}

.if-products__header .if-breadcrumbs a,
.if-catalog-breadcrumbs .if-breadcrumbs a {
    color: var(--if-bc-link-color, inherit);
    text-decoration: none;
    transition: color var(--if-transition-fast);
}

.if-products__header .if-breadcrumbs a:hover,
.if-catalog-breadcrumbs .if-breadcrumbs a:hover {
    color: var(--if-bc-link-hover-color, var(--if-color-primary));
}

.if-products__header .if-breadcrumbs__separator,
.if-catalog-breadcrumbs .if-breadcrumbs__separator {
    color: var(--if-bc-sep-color, var(--if-color-border, #ccc));
    margin-left: var(--if-bc-sep-margin-left, 0);
    margin-right: var(--if-bc-sep-margin-right, 0);
}

.if-products__header .if-breadcrumbs__current,
.if-catalog-breadcrumbs .if-breadcrumbs__current {
    color: var(--if-bc-current-color, var(--if-color-primary));
    font-weight: var(--if-bc-current-weight, 700);
}

/* Heading */
.if-products__title {
    font-family: var(--if-font-heading);
    font-size: clamp(2rem, 8vw, 6rem);
    font-weight: 700;
    color: var(--if-color-primary);
    text-transform: uppercase;
    line-height: 0.95;
    letter-spacing: -1px;
    margin-bottom: 32px;
}

/* Toolbar */
.if-products__toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.if-products__search {
    flex: 1 1 300px;
    max-width: 480px;
    position: relative;
}

.if-products__search input {
    width: 100%;
    height: 48px;
    border: 1px solid #a6a5a1;
    border-radius: 9999px;
    background: #edebde;
    padding: 0 72px 0 20px; /* room for the clear (×) button + search icon */
    font-family: var(--if-font-body);
    font-size: 13px;
    letter-spacing: 0.06em;
    color: var(--if-color-dark);
    outline: none;
    transition: border-color var(--if-transition-fast);
}

.if-products__search input::placeholder {
    color: #9a9a98;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.15em;
}

.if-products__search input:focus {
    border-color: var(--if-color-primary);
}

.if-products__search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--if-color-dark);
    pointer-events: none;
}

/* Clear (×) button — appears (via .is-visible) when the field has text */
.if-products__search-clear {
    position: absolute;
    right: 44px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    /* !important defeats the theme's global button styling on this bare button */
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 50%;
    color: #9a9a98;
    cursor: pointer;
    transition: color var(--if-transition-fast), background var(--if-transition-fast);
    -webkit-appearance: none;
    appearance: none;
}
.if-products__search-clear.is-visible {
    display: flex;
}
.if-products__search-clear:hover,
.if-products__search-clear:focus {
    background: rgba(0, 0, 0, 0.06) !important;
    color: var(--if-color-dark);
}
.if-products__search-clear svg {
    width: 14px;
    height: 14px;
    display: block;
}

.if-products__filters {
    display: flex;
    gap: var(--if-mf-filters-gap, 8px);
    align-items: center;
    flex-wrap: wrap;
}

/* На десктопе фильтры «Все/Под заказ/Наличие» в панели — кнопки в тулбаре скрываем */
/* Breakpoints (D7), matching Elementor's own and the spec:
     mobile  <= 767px   — grid drops to two columns, toolbar collapses
     tablet  768–1024px — sidebar and filter panel stack/hide
     desktop >= 1025px  — full layout
   The module used to run on its own 900/600 pair while the rest of the theme
   used 767/768, so a viewport between them got the module's tablet layout with
   the site's desktop chrome. */
@media (min-width: 1025px) {
    .if-products__toolbar .if-products__filters {
        display: none;
    }
}

/* Мобильная шапка: заголовок → полноширинный поиск → ряд кнопок фильтров (как в макете) */
@media (max-width: 1024px) {
    .if-products__header-row {
        flex-direction: column;
        align-items: stretch;
        column-gap: 0;
    }

    .if-products__header .if-products__title-wrap {
        width: 100%;
    }

    .if-products__header .if-products__toolbar {
        flex: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .if-products__header .if-products__search {
        max-width: none;
        width: 100%;
        flex: 0 0 auto;
        min-width: 0;
    }

    .if-products__header .if-products__toolbar .if-products__filters {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    /* Активная кнопка фильтра: контур (красный текст и рамка), без заливки — выше типичных правил Elementor.
       Красный — глобальный цвет Elementor (#FF0000, как в макете): --if-color-primary
       вычисляется на :root, где глобальных цветов Elementor ещё нет, и даёт запасной #DC2626. */
    .if-products .if-products__header .if-products__toolbar .if-products__filter-btn.is-active,
    .if-products .if-products__header .if-products__toolbar .if-products__filter-btn.is-active:hover {
        background: transparent;
        color: var(--e-global-color-primary, var(--if-color-primary));
        border-color: var(--e-global-color-primary, var(--if-color-primary));
    }

    .if-products .if-products__header .if-products__toolbar .if-products__filter-btn:not(.is-active):hover {
        background: var(--if-mf-btn-active-bg, var(--if-color-primary));
        border-color: var(--if-mf-btn-active-border, var(--if-color-primary));
        color: var(--if-mf-btn-active-color, var(--if-color-white));
    }
}

.if-products__filter-btn {
    min-height: var(--if-mf-btn-height, 40px);
    height: auto;
    padding: var(--if-mf-btn-padding-y, 0) var(--if-mf-btn-padding-x, 22px);
    border-radius: var(--if-mf-btn-radius, var(--if-radius-pill, 9999px));
    border-width: var(--if-mf-btn-border-width, 1.5px);
    border-style: solid;
    border-color: var(--if-mf-btn-border-color, var(--if-color-dark));
    background: var(--if-mf-btn-bg, transparent);
    font-family: var(--if-mf-btn-font-family, var(--if-font-heading));
    font-size: var(--if-mf-btn-font-size, 14px);
    font-weight: var(--if-mf-btn-font-weight, 600);
    letter-spacing: var(--if-mf-btn-letter-spacing, 0.05em);
    text-transform: var(--if-mf-btn-text-transform, uppercase);
    cursor: pointer;
    transition: background var(--if-transition-fast), color var(--if-transition-fast), border-color var(--if-transition-fast);
    color: var(--if-mf-btn-color, var(--if-color-dark));
}

.if-products__filter-btn:hover,
.if-products__filter-btn.is-active {
    background: var(--if-mf-btn-active-bg, var(--if-color-primary));
    border-color: var(--if-mf-btn-active-border, var(--if-color-primary));
    color: var(--if-mf-btn-active-color, var(--if-color-white));
}

.if-products__filter-icon {
    width: var(--if-mf-icon-size, 40px);
    height: var(--if-mf-icon-size, 40px);
    min-width: var(--if-mf-icon-size, 40px);
    border-radius: var(--if-mf-icon-radius, 50%);
    border-width: var(--if-mf-icon-border-width, 1.5px);
    border-style: solid;
    border-color: var(--if-mf-icon-border-color, var(--if-color-dark));
    background: var(--if-mf-icon-bg, transparent);
    color: var(--if-mf-icon-color, var(--if-color-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--if-transition-fast), border-color var(--if-transition-fast), color var(--if-transition-fast);
    margin-left: var(--if-mf-icon-margin-left, 4px);
}

.if-products__filter-icon:hover {
    background: var(--if-mf-icon-hover-bg, var(--if-color-primary));
    border-color: var(--if-mf-icon-hover-border, var(--if-color-primary));
    color: var(--if-mf-icon-hover-color, var(--if-color-white));
}

.if-products__filter-icon svg {
    width: var(--if-mf-icon-svg-size, 16px);
    height: var(--if-mf-icon-svg-size, 16px);
}

/* Layout */
.if-products__layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    align-items: start;
}

.if-products__layout--no-sidebar {
    grid-template-columns: 1fr !important;
}

@media (max-width: 1024px) {
    .if-products__layout {
        grid-template-columns: 1fr !important;
    }

    .if-products__sidebar {
        display: none;
    }

    /* Mobile: the filter icon reveals the category sidebar inline (products-module.js
       toggles .is-filters-open). Flows in the grid above the products, capped + scrollable. */
    .if-products.is-filters-open .if-products__sidebar {
        display: block;
        position: static;
        max-height: 65vh;
        overflow-y: auto;
        margin-bottom: 16px;
        /* A swipe that starts at the end of the list carries on to the page. With the
           desktop `contain` a finger on the list could not move the page at all, and the
           open list covers most of a phone screen. */
        overscroll-behavior-y: auto;
        /* scrollIntoView() on open must not tuck the panel under the sticky header. */
        scroll-margin-top: calc(var(--if-header-h, 0px) + 12px);
    }
}

/* Sidebar */
.if-products__sidebar {
    position: sticky;
    /* Below the sticky site header (--if-header-h, site-header.js). */
    top: calc(var(--if-header-h, 0px) + 24px);
    /* Desktop: keep the sidebar within the viewport and scroll its content
       internally instead of growing the page. (Below 1025px it is the drop-down panel above.)
       It takes the wheel only once fully on screen (nested-scroll.js, products-module.js). */
    max-height: calc(100vh - var(--if-header-h, 0px) - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
    /* Small gap so the category counts don't butt against the scrollbar. */
    padding-right: 12px;
    /* Thin black scrollbar (Firefox) */
    scrollbar-width: thin;
    scrollbar-color: #000 transparent;
}

/* Thin black scrollbar (Chrome / Safari / Edge) */
.if-products__sidebar::-webkit-scrollbar {
    width: 6px;
}

.if-products__sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.if-products__sidebar::-webkit-scrollbar-thumb {
    background: #000;
    border-radius: 999px;
}

.if-products__sidebar::-webkit-scrollbar-thumb:hover {
    background: #000;
}

.if-products-cat-group {
    margin-bottom: 8px;
}

.if-products-cat-group__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--if-font-heading);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 12px 0;
    cursor: pointer;
    border-bottom: 1px solid var(--if-color-border);
    user-select: none;
}

.if-products-cat-group__head svg {
    transition: transform var(--if-transition-fast);
    width: 14px;
    height: 14px;
    flex-shrink: 0; /* multi-line headers must not squeeze the chevron */
    margin-left: 10px;
}

.if-products-cat-group.is-open .if-products-cat-group__head svg {
    transform: rotate(180deg);
}

.if-products-cat-group__list {
    padding: 8px 0;
    display: none;
}

.if-products-cat-group.is-open .if-products-cat-group__list {
    display: block;
}

.if-products-cat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 13px;
    cursor: pointer;
    transition: color var(--if-transition-fast);
}

.if-products-cat-item:hover {
    color: var(--if-color-primary);
}

/* The checkboxes themselves are the cart's square ones: .if-checkbox in style.css
   (18×18, radius 6, red frame and tick when checked). */

/* «Все» is the "no category filter" state, ticked in every group at once
   (products-module.js syncCatAllStates). Red is kept for real picks, so a ticked «Все»
   gets a neutral frame and a dark tick. (0,4,1): above the shared rule, which loads later. */
.if-products-cat-item input[type="checkbox"].if-products-cat-all:checked {
    border-color: rgba(17, 24, 39, 0.55);
}
.if-products-cat-item input[type="checkbox"].if-products-cat-all:checked::after {
    border-color: var(--if-color-dark, #111827);
}

/* Picked category → red label + count (not «Все», see above). */
.if-products-cat-item input.if-products-cat-leaf:checked ~ .if-products-cat-item__label,
.if-products-cat-item input.if-products-cat-leaf:checked ~ .if-products-cat-item__count {
    color: var(--if-color-primary, #DC2626);
}

/* Phones and tablets: rows were 20px tall (Elementor sets padding 0), too small to hit
   with a finger next to each other; 28px clears the 24px minimum target size. */
@media (max-width: 1024px) {
    .if-products-cat-item {
        min-height: 28px;
    }
}

.if-products-cat-item__label {
    flex: 1;
}

.if-products-cat-item__count {
    color: var(--if-color-text-muted);
    font-size: 11px;
}

/* Content */

/* Filter panel: full-width section with link columns (no selects) */
.if-products__filter-panel {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 24px 32px;
    margin-bottom: 28px;
    /* No negative right margin / calc(100% + 24px) here. That pair is the classic
       gutter-compensation trick for a layout whose children carry right margins —
       but these columns are spaced with `gap`, so there is no trailing gutter to
       cancel. All it did was make the panel 24px wider than its container, which
       is what gave every catalog page a horizontal scrollbar. */
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    line-height: 1.5;
}

.if-products__filter-col {
    flex: 1 1 0;
    min-width: 80px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
}

.if-products__filter-col-title {
    flex-shrink: 0;
    white-space: nowrap;
    font-family: var(--if-font-heading);
    color: #6d130a;
    letter-spacing: 0.15em;
}

.if-products__filter-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.if-products__filter-link {
    color: #9a9a98;
    text-decoration: none;
    cursor: pointer;
    transition: color var(--if-transition-fast);
}

.if-products__filter-link:hover {
    color: var(--if-color-dark);
}

.if-products__filter-link.is-active {
    color: var(--if-color-dark);
    font-weight: 700;
}

@media (max-width: 1024px) {
    .if-products__filter-panel {
        display: none;
    }

    /* The «фильтры» icon opens the panel (sort, attributes) together with the category
       sidebar. Category templates have no sidebar, so on phones the icon opened nothing
       and there was no way to sort at all (28.09). The «Товары» column (Все / Под заказ /
       Наличие) repeats the buttons above the grid — not shown here. */
    .if-products.is-filters-open .if-products__filter-panel {
        display: flex;
        gap: 16px 28px;
        margin-bottom: 16px;
    }

    .if-products.is-filters-open .if-products__filter-panel > .if-products__filter-col:first-child {
        display: none;
    }
}

.if-products__select-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.if-products__select-label {
    font-family: var(--if-font-heading);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--if-color-text-muted);
    white-space: nowrap;
}

.if-products__select {
    height: 36px;
    padding: 0 32px 0 14px;
    border: 1.5px solid var(--if-color-border);
    border-radius: var(--if-radius-pill);
    background: var(--if-color-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' viewBox='0 0 10 6'%3E%3Cpath stroke='%23111827' stroke-width='1.5' d='M1 1l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center;
    -webkit-appearance: none;
    font-family: var(--if-font-heading);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    outline: none;
    min-width: 90px;
    transition: border-color var(--if-transition-fast);
}

.if-products__select:focus {
    border-color: var(--if-color-primary);
}

/* Grid */
.if-products__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

/* IF Related Products: the "Колонки" content control adds .if-products__grid--cols-N,
   but nothing consumed it — the grid stayed on auto-fill, so the actual column count
   depended only on the (often narrower, single-product) container width, e.g. showing
   3 instead of the requested 4. These rules make the setting actually take effect.
   min-width guard keeps the ≤600px (2-col) and ≤319px (1-col) responsive rules below
   in charge on mobile — (0,2,0) here would otherwise always outrank their (0,1,0). */
@media (min-width: 768px) {
    .if-products__grid.if-products__grid--cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
    .if-products__grid.if-products__grid--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .if-products__grid.if-products__grid--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .if-products__grid.if-products__grid--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .if-products__grid.if-products__grid--cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .if-products__grid.if-products__grid--cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* Обёртки блока категорий / блока товаров: дочерние карточки остаются в общей сетке */
.if-products__grid-section {
    display: contents;
}

.if-products__grid-divider {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    margin: 0;
    border: none;
    border-top: 1px solid var(--if-color-border, #ccc);
    border-top-style: solid;
}

/* Empty state split block (category-as-cart-item) */
.if-products-empty-split {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 20px;
    align-items: start;
    background: var(--if-color-border-light, #F5F3EE);
    border-radius: var(--if-radius, 18px);
}

.if-products-empty-split__media {
    background: var(--if-color-white, #fff);
    border-radius: 14px;
    overflow: hidden;
}

.if-products-empty-split__media img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.if-products-empty-split__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.if-products-empty-split__qty.if-products-qty {
    align-self: flex-start;
}

.if-products-empty-split__title {
    font-family: var(--if-font-heading);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.if-products-empty-split__desc {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

/* "ОПИСАНИЕ" heading, matching the IF Split widget's .if-single-cart-desc-title reference. */
.if-products-empty-split__desc-title {
    font-family: var(--if-font-heading);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.1em;
    color: var(--if-color-primary, #DC2626);
}

.if-products-empty-split__desc-text {
    font-family: var(--if-font-body);
    color: var(--if-color-dark, #111);
}

.if-products-empty-split__phone {
    font-family: var(--if-font-heading);
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--if-color-dark, #111);
}

/* Телефон под описанием «раздела как товара»: ONDER 16px просил ≈330px и при 360–390
   переносил «55» на следующую строку. На телефоне — 10px в одну строку (≈210px). */
@media (max-width: 767px) {
    .elementor-widget-if-products-module .if-products-empty-split__phone {
        font-size: 10px;
        white-space: nowrap;
    }
}

@media (max-width: 1024px) {
    .if-products-empty-split {
        grid-template-columns: 1fr;
    }
}

.if-products__grid {
    transition: opacity var(--if-transition-fast);
}

.if-products__grid.if-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Product card */
.if-products-card {
    background: var(--if-color-border-light, #F5F3EE);
    border-radius: var(--if-radius, 18px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.if-products-card:hover {
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
}

/* Внешние отступы и скругление сюда не пишем: и то и другое задаётся контролами
   виджета («Внешние отступы блока изображения», «Скругление углов блока
   изображения»), у которых есть свои дефолты. Захардкоженные значения здесь
   только сбивали с толку — контрол всё равно их перебивал, а при пустом контроле
   выигрывала эта строка, и было неочевидно, откуда взялся отступ. */
.if-products-card__img-wrap {
    position: relative;
    background: var(--if-color-white);
    padding: 16px 16px 8px;
}

.if-products-card__brand {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 28px;
    color: var(--if-color-primary);
}

.if-products-card__brand svg,
.if-products-card__brand .if-products-card__brand-img,
.if-products-card__brand img {
    width: 28px;
    height: 28px;
    display: block;
}

.if-products-card__brand img {
    object-fit: contain;
}

.if-products-card__more {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 9999px;
    background: var(--if-color-primary);
    color: #fff;
    font-family: var(--if-font-heading);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
    transition: background var(--if-transition-fast), opacity var(--if-transition-fast);
}

.if-products-card__more:hover {
    opacity: 0.9;
    background: #b01818;
    color: #fff;
}

.if-products-card__more--link {
    background: transparent !important;
    padding: 0;
    border-radius: 0;
    transition: opacity var(--if-transition-fast), color var(--if-transition-fast);
}

.if-products-card__more--link:hover {
    background: transparent !important;
    opacity: 1;
    text-decoration: underline;
}

.if-products-card__img {
    /* width:100% остаётся: без него на портретном фото (уже, чем выше — такие
       тоже попадаются среди if_card, просто сейчас в базе их нет) картинка
       не дотянется до края бокса даже с global img{max-width:100%}. */
    width: 100%;
    /* The photo box proportion comes from the «Соотношение сторон фото» control of the
       catalog and «Похожие» widgets (--if-card-img-ratio on the card); unset = the old
       square. A product photo is fitted whole (contain, on white), a category photo
       fills the box (cover, set on the category card). No height here: with width:100%
       aspect-ratio derives it, and the global img{height:auto} keeps the height="320"
       attribute from overriding it. */
    aspect-ratio: var(--if-card-img-ratio, 1 / 1);
    object-fit: contain;
    display: block;
    /* padding убран — именно он, а не object-fit, был причиной белых полей
       на скриншоте «как сейчас»: кадр и масштаб фото на обоих скриншотах
       дизайнера одинаковые, отличается только рамка вокруг. */
    /* !important обязателен: у Elementor есть свой глобальный сброс
       `.elementor img { border-radius: 0; ... }` (frontend.min.css), и по
       чистой специфичности (класс+элемент) он побеждает наш `.if-products-
       card__img` (просто класс) — без !important радиус тут не применится
       вообще, что и подтвердилось при проверке. */
    border-radius: 15px !important;
}

.if-products-card__img-placeholder {
    width: 100%;
    /* Same box as a real photo, so a card without one lines up with its row. */
    aspect-ratio: var(--if-card-img-ratio, 1 / 1);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--if-color-border-light, #F5F3EE);
    border-radius: 10px;
    overflow: hidden; /* clip the inner placeholder <img> to the rounded corners */
}

.if-products-card__img-placeholder img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: inherit;
}

.if-products-card__img-placeholder svg {
    width: 80px;
    height: 80px;
    opacity: 0.25;
}

.if-products-card__body {
    padding: 14px 16px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.if-products-card__name {
    font-family: var(--if-font-heading);
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    /* ONDER renders tall per px — 1.3 made 2-line card titles overlap (esp. in "Похожие"). */
    line-height: 1.6;
    color: var(--if-color-dark);
}

.if-products-card__variants {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Ширина колонки задаётся переменной, чтобы её можно было крутить контролом
   виджета, а не править CSS. 58px выбраны по содержимому: самая широкая подпись
   в каталоге («3000.0», «0.55 мм») занимает 41px, а при прежних 70px в ряд
   помещалось три пилюли из четырёх — четвёртая уезжала на вторую строку. */
.if-products-card__variant-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--if-pill-col, 58px), 1fr));
    gap: 6px;
}

/* Планшет: пилюли в одну строку, горизонтальный скролл. На телефоне (≤767px и боком,
   ниже 500px в высоту) ряд переносится — блок «Phone cards» ниже. */
@media (max-width: 1024px) {
    .if-products-card__variant-row {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 6px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
    }

    .if-products-card__variant-row::-webkit-scrollbar {
        height: 4px;
    }

    .if-products-card__variant-row::-webkit-scrollbar-thumb {
        background: var(--if-color-border, #ccc);
        border-radius: 4px;
    }

    .if-products-card__variant-row .if-products-pill,
    .if-products-card__variant-row .if-products-card__variant-key {
        flex: 0 0 auto;
    }
}

/* The attribute label is the first cell of the pill grid («ДЛИНА: [100] [106] [110]»,
   as in the mockup). products-module-card-variable.php puts it in the row and picks how
   many cells it spans from its length (the --span-N / --row modifiers below). min-width:0
   with overflow:hidden keeps a label that is still wider than its cells from widening
   the first column (the columns are 1fr, i.e. minmax(auto, 1fr)): it ends in «…»
   instead, the full text is in its title. In the tablet scrolling row it is
   flex: 0 0 auto (above) and never cut; on phones it wraps («Phone cards» below). */
.if-products-card__variant-key {
    display: block;
    align-self: center;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--if-font-heading);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6d130a;
    white-space: nowrap;
}

.if-products-card__variant-key--span-2 {
    grid-column: span 2;
}

.if-products-card__variant-key--span-3 {
    grid-column: span 3;
}

/* Too long for three cells: a row of its own above the pills, the old layout. */
.if-products-card__variant-key--row {
    grid-column: 1 / -1;
}

.if-products-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 0;
    border: 1px solid var(--if-color-dark);
    border-radius: 0;
    font-family: var(--if-font-body);
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: background var(--if-transition-fast), color var(--if-transition-fast), border-color var(--if-transition-fast), transform var(--if-transition-fast);
    white-space: nowrap;
    user-select: none;
    background: transparent;
    color: var(--if-color-dark);
    box-sizing: border-box;
}

.if-products-pill:hover,
.if-products-pill.is-active {
    background: var(--if-color-primary);
    border-color: var(--if-color-primary);
    color: #fff;
}

.if-products-pill:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* "Ещё" pill cap (Elementor: «Показывать пилюль»). Hidden pills stay in the DOM/grid
   flow (just display:none) so the JS reveal is a plain classList.remove — no re-render. */
.if-products-pill--overflow {
    display: none;
}

.if-products-pill--more {
    border-color: var(--if-color-primary);
    color: var(--if-color-primary);
}

.if-products-card__price-row {
    display: flex;
    /* first baseline, not centre: a long price ("2 135 ₽ – 12 420 ₽") wraps to
       two lines in a narrow mobile card, and `center` then floats the «ЦЕНА:»
       label down between them instead of keeping it on the first line. */
    align-items: baseline;
    gap: 10px;
    margin-top: auto;
}

/* The label is a fixed short word; only the value should ever wrap. */
.if-products-card__price-label {
    flex: 0 0 auto;
}

.if-products-card__price {
    min-width: 0;
}

/* In the variable card, price-row now lives in .if-products-card__actions-top (a
   horizontal row, not the .if-products-card__body column) — the bottom-push margin
   from the base rule above (still needed by simple/category cards) doesn't apply here. */
.if-products-card__actions-top .if-products-card__price-row {
    margin-top: 0;
}

.if-products-card__price-label {
    font-family: var(--if-font-heading);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.if-products-card__price {
    font-family: var(--if-font-heading);
    /* ONDER renders large per px — 16px dwarfed the 14px name; keep near the label. */
    font-size: 13px;
    font-weight: 700;
    color: var(--if-color-dark);
}

.if-products-card__price span {
    font-size: 13px;
    font-weight: 500;
}

/* Add-to-cart loading spinner — JS toggles .if-btn-loading around the AJAX request.
   Buttons are dark, so a light spinner; keyframes `if-atc-spin` live in style.css. */
.if-products-add-to-cart.if-btn-loading,
.if-products-add-category-to-cart.if-btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}
.if-products-add-to-cart.if-btn-loading::after,
.if-products-add-category-to-cart.if-btn-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-top-color: transparent;
    border-radius: 50%;
    animation: if-atc-spin 0.6s linear infinite;
}

/* Persisted "in cart" — button stays red so it's clear the item is already in the cart */
.if-products-add-to-cart.is-in-cart,
.if-products-add-category-to-cart.is-in-cart {
    background: var(--if-color-primary, #DC2626) !important;
    border-color: var(--if-color-primary, #DC2626) !important;
    color: #fff !important;
}

.if-products-card__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px 16px;
    margin-top: auto;
}

/* Variable card only (product-module-card-variable.php): two stacked rows —
   qty + price on top, Запрос + В корзину below — instead of one flat row.
   Scoped via a modifier so the simple/category cards' single-row .if-products-card__actions
   (used with --single or plain) is untouched. */
.if-products-card__actions--split {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.if-products-card__actions-top,
.if-products-card__actions-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.if-products-card__actions--single {
    justify-content: center;
}

.if-products-card__actions--single .if-products-btn {
    flex: 1;
    max-width: 100%;
}

.if-products-card--category .if-products-card__actions {
    justify-content: space-between;
}

/* Category cards used to render their image full-bleed with object-fit: cover
   (cropping to fill the square), while product cards used a white padded
   frame with object-fit: contain (fitting the whole photo). Since a category
   card's image is very often a product photo too (see
   if_get_product_cat_display_thumbnail_id()'s fallback), the exact same kind
   of photo would appear cropped-to-the-edges in one card and neatly framed
   in the next depending only on which template happened to render it — the
   inconsistent "photo scale" the client flagged. Category cards now share
   the base .if-products-card__img-wrap/__img/__img-placeholder rules above
   instead of overriding them. */

/* «Запрос» / «Заказ» are the same black as «В корзину» in the catalog cards (#020202,
   the widget's «Кнопка «В корзину» (фон)») — #111827 next to it read as a second,
   bluish black (mockups: one black for both). */
.if-products-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--if-radius-pill);
    border: 1.5px solid #020202;
    background: #020202;
    font-family: var(--if-font-heading);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    padding: 0 16px;
    transition: background var(--if-transition-fast), color var(--if-transition-fast), border-color var(--if-transition-fast);
    color: var(--if-color-white);
    white-space: nowrap;
    text-decoration: none;
}

.if-products-btn:hover {
    background: #333;
    border-color: #333;
    color: var(--if-color-white);
}

.if-products-btn--red {
    /* Named "--red" but was painted var(--if-color-dark) (black) — fixed to match
       its own name / the reference design (add-to-cart = red, order/request = dark). */
    background: var(--if-color-primary);
    border-color: var(--if-color-primary);
    color: var(--if-color-white);
}

.if-products-btn--red:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    color: var(--if-color-white);
}

.if-products-qty {
    display: flex;
    align-items: center;
    gap: 4px;
    border: none;
    border-radius: 9999px;
    height: 38px;
    padding: 0 8px;
    background: #e8e6e1;
}

/* Variable card (--split): the pill's own internal padding was pushing the minus
   button in from the row's left edge, misaligning it with «Запрос» below. Scoped so
   the standalone counter elsewhere (empty-split, simple/category cards) keeps its padding. */
.if-products-card__actions-top .if-products-qty {
    padding: 0;
}

.if-products-qty button {
    box-sizing: border-box !important;
    width: 15px !important;
    height: 15px !important;
    padding: 0 !important;
    border: 1.5px solid var(--if-color-dark) !important;
    border-radius: 50% !important;
    background: transparent !important;
    color: var(--if-color-dark) !important;
    font-size: 0 !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative;
    transition: background var(--if-transition-fast), border-color var(--if-transition-fast), color var(--if-transition-fast), opacity var(--if-transition-fast);
    flex-shrink: 0;
}

/* +/- glyphs are now inline SVG (if_qty_icon via .if-qty-ico); the old
   ::before/::after CSS-drawn lines are removed so they don't double up. */
.if-products-qty .if-qty-ico {
    width: 9px;
    height: 9px;
}

.if-products-qty button:hover {
    opacity: 0.9;
    background: rgba(0, 0, 0, 0.06) !important;
    border-color: var(--if-color-dark) !important;
}

.if-products-qty button:focus {
    background: transparent !important;
    outline: none !important;
    border-color: var(--if-color-dark) !important;
}

/* Two classes, not one: Hello Elementor's reset.css styles input[type="number"]
   (0,1,1: border, padding, width 100%) and beat the single class wherever that
   reset is enabled — the stepper then showed a boxed, stretched field. */
.if-products-qty .if-products-qty__val {
    /* Now an <input type="number"> (manual typing), reset to look identical to the
       old <span>: no border/background/native chrome, same size/font/color. */
    width: 32px;
    min-width: 32px;
    text-align: center;
    font-family: var(--if-font-heading);
    font-size: 13px;
    font-weight: 600;
    color: var(--if-color-primary);
    border: none;
    background: transparent;
    padding: 0;
    -moz-appearance: textfield;
    appearance: textfield;
}

.if-products-qty__val::-webkit-outer-spin-button,
.if-products-qty__val::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Load more */
.if-products__loadmore {
    display: flex;
    justify-content: center;
}

.if-products__loadmore-btn {
    padding: 0.75em 2em;
    border-radius: var(--if-radius-pill);
    background: var(--if-color-primary);
    border: none;
    font-family: var(--if-font-heading);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--if-color-white);
    cursor: pointer;
    transition: background var(--if-transition-fast), transform var(--if-transition-fast);
}

.if-products__loadmore-btn:hover {
    background: #b01818;
    transform: scale(1.03);
}

.if-products__loadmore.is-hidden {
    display: none;
}

/* Pagination */
.if-products__pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
}

.if-products__pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border-radius: 8px;
    /* Safe default, can be overridden by widget */
    background: transparent;
    color: var(--if-color-dark, #111827);
    font-family: var(--if-font-heading, sans-serif);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--if-transition-fast, 0.2s), color var(--if-transition-fast, 0.2s), transform var(--if-transition-fast, 0.2s);
}

.if-products__pagination .page-numbers:hover {
    background: rgba(0, 0, 0, 0.05);
}

.if-products__pagination .page-numbers.current {
    background: var(--if-color-primary, #b01818);
    color: #ffffff;
    cursor: default;
}

.if-products__pagination .page-numbers.prev,
.if-products__pagination .page-numbers.next {
    padding: 0 8px;
}

.if-products__pagination .page-numbers svg {
    width: 24px;
    height: 24px;
}

/* Related products block */
.if-products.if-products--related,
.if-products.if-products--related-categories {
    margin-top: 48px;
}

/* Scroll to top */
.if-products-totop {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--if-color-primary);
    color: var(--if-color-white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(208, 30, 30, 0.35);
    transition: transform var(--if-transition-fast), box-shadow var(--if-transition-fast), opacity var(--if-transition-fast);
    z-index: 99;
}

.if-products-totop:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(208, 30, 30, 0.45);
}

.if-products-totop.is-hidden {
    opacity: 0;
    pointer-events: none;
}

/* No products */
.if-products__empty {
    padding: 2rem;
    text-align: center;
    color: var(--if-color-text-muted);
}

/* Responsive */
@media (max-width: 767px) {
    /* Mockup mob-catalog-a: cards almost touch (≈5px across, ≈9px down at 390). */
    .if-products__grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px 6px;
    }

    .if-products {
        padding: 32px 16px 60px;
    }

    .if-products__toolbar {
        gap: 8px;
    }

    /* Кнопки в ряд — не переносить.
       Отступы, промежуток и шрифт здесь — только запасные значения: :where() обнуляет
       специфичность, поэтому любая настройка Elementor (отступы блока кнопок, отступы
       кнопок, типографика — на любом брейкпоинте) их перебивает. Раньше здесь стоял
       !important, и мобильные значения этих настроек не работали вовсе. Мобильный вид
       по умолчанию (0 10px 12px, промежуток 6px, кнопки 8px 6px) теперь задан в самих
       контролах как mobile_default — иначе туда стекали бы десктопные значения. */
    :where(.if-products .if-products-card) .if-products-card__actions {
        flex-wrap: nowrap !important;
        padding: 0 10px 12px;
        gap: 6px;
    }

    .if-products .if-products-card.if-products-card--category .if-products-card__actions {
        justify-content: space-between !important;
    }

    /* Кнопки — на весь ряд: одна кнопка целиком, две делят ряд (блок «Phone cards» ниже). */
    :where(.if-products .if-products-card .if-products-card__actions) .if-products-btn {
        flex: 1 1 0 !important;
        min-width: 0;
        width: auto;
        height: auto;
        padding: 8px 6px;
        font-size: 11px;
        letter-spacing: 0.03em;
    }

    .if-products-qty {
        display: none;
    }

    /* Variable card (--split): the qty stepper sits alone with the price in its own
       top row (not squeezed alongside 2 buttons like the old single-row layout), so it
       stays visible on mobile too — overrides the blanket hide above by specificity. */
    .if-products-card__actions-top .if-products-qty {
        display: flex;
    }

    /* Простые карточки и карточки разделов — цена в теле карточки, по центру под
       названием (у вариативных — над счётчиком, блок «Phone cards» ниже). */
    .if-products-card__price-row {
        justify-content: center;
    }

    /* Empty-split «категория как товар»: quantity is the ONLY way to pick how
       many to add to cart on this block (there's no per-item qty elsewhere on
       the page to fall back to) — must stay visible on mobile too. */
    .if-products-empty-split__qty.if-products-qty {
        display: flex;
    }
}

/* Phone cards: phones held upright (≤767px) and sideways (up to 1024px wide but at most
   500px tall: 844×390, 932×430; tablets are taller and keep the layout above). Sideways
   Elementor serves its tablet/desktop card values and a «Похожие» card is ≈200px wide in
   4 columns, as cramped as upright: the pill strip was cut, «Цена: от 3 720» broke into
   three lines and «В корзину» stuck 11px out of the card. */
@media (max-width: 767px), (max-width: 1024px) and (max-height: 500px) {
    /* «Цена: от …» — отдельной строкой по центру над счётчиком, как в мобильном макете
       (mob-catalog-a). В одном ряду со счётчиком «− 1 +» на цену оставалось 81px при 390:
       «от 624» переносилось, строки наезжали друг на друга, а при 360 цену обрезал край
       карточки. Так во всех карточках, и в «Похожих» тоже (раньше там цена уходила под
       счётчик влево). */
    .if-products-card__actions-top {
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 6px;
    }

    .if-products-card__actions-top .if-products-card__price-row {
        order: -1;
        flex: 0 0 100%;
        justify-content: center;
    }

    /* Variant pills wrap inside the card. The one-line scroll strip of the ≤1024px block
       above was wider than a phone card (≈120-200px): the last pills were cut off and
       desktop browsers drew a grey scrollbar under the label. The label stays first in
       the row when it fits next to a pill, otherwise it takes a line of its own; a label
       wider than the card wraps. */
    .if-products-card__variant-row {
        flex-wrap: wrap;
        overflow: visible;
    }

    .if-products-card__variant-row .if-products-card__variant-key {
        flex: 0 1 auto;
        max-width: 100%;
        white-space: normal;
    }

    /* «Запрос» / «В корзину»: each as wide as its label plus an equal share of the free
       space, so the longer «В КОРЗИНУ» gets the wider pill. With flex: 1 1 0 (≤767 block)
       each got half the row and «В КОРЗИНУ» (ONDER 4px ≈ 61px) touched or ran out of its
       pill at 320-360px. A long error label from products-module.js («Недостаточно товара
       на складе», shown 2.5s) can still push its button ≈11px past the card edge, where the
       card clips it (was ≈60px). (0,5,0) with !important beats the :where() rule; a lone
       button (simple card, category without «В корзину») keeps the whole row. */
    .if-products .if-products-card .if-products-card__actions .if-products-btn:not(:only-child) {
        flex: 1 1 auto !important;
        min-width: auto;
        white-space: normal;
        text-align: center;
    }
}

/* Sideways phones only: the Elementor tablet/desktop buttons (ONDER 5px, sides 10px) need
   ≈186px for the pair, the button row of a 4-column «Похожие» card (≈200px wide) has
   ≈150px at 844. Then the pair
   stacks, each button the full row, instead of running out of the card. Category cards
   get 8px between the buttons, as the variable card has: Elementor's desktop gap there is
   0 (9fdc262, 93521e4), meant for two small pills at the card edges, and the buttons that
   now share the row would touch. (0,4,2) beats post-NNN.css (0,4,0). */
@media (min-width: 768px) and (max-width: 1024px) and (max-height: 500px) {
    .if-products-card__actions-bottom,
    .if-products-card--category .if-products-card__actions {
        flex-wrap: wrap;
    }

    html body .if-products .if-products-card.if-products-card--category .if-products-card__actions {
        gap: 8px;
    }
}

/* 320-359px: at the Elementor phone size (ONDER 4px, sides 2-4px) the two card buttons and
   the gap need ≈125-135px, the row is 117-121px at 320; 3.5px with 3px sides makes it
   ≈116px. Elementor's smallest breakpoint is ≤767px, so this step is set here and, unlike
   the :where() fallbacks above, wins over the widgets' phone values: (0,6,2) beats
   post-NNN.css (0,4,0)-(0,6,0), which loads after this file (the custom CSS of 06f9ebe
   already sets the same 3.5px). A lone button fits anyway and keeps the Elementor values. */
@media (max-width: 359px) {
    html body .if-products .if-products__grid .if-products-card .if-products-card__actions .if-products-btn:not(:only-child) {
        padding-left: 3px;
        padding-right: 3px;
        font-size: 3.5px;
    }
}

/* Одна колонка только на очень узких экранах; до этого — 2 колонки как в мобильном макете */
@media (max-width: 319px) {
    .if-products__grid {
        grid-template-columns: 1fr;
    }
}
/* A failed catalog request (T4.5): shown above «Ещё», removed on the next success. */
.if-products__error {
    margin: 12px 0;
    text-align: center;
    color: var(--if-color-primary);
    font-size: 13px;
}

/* «Похожие»: «Все …» next to the title, «Ещё» under the grid (IF Related Products, T4.10).
   ONDER draws about twice its nominal size. (0,2,0) selectors beat Hello's pink reset hover. */
.if-products--related .if-products__header--with-link {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
}
.if-products .if-products__all-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border: 1px solid var(--if-color-primary);
    border-radius: var(--if-radius-pill);
    font-family: var(--if-font-heading);
    font-size: 6px;
    line-height: 1.4;
    text-transform: uppercase;
    color: #000;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--if-transition-fast);
}
.if-products .if-products__all-link:hover {
    background: var(--if-color-primary);
    color: #fff;
}
.if-products__rp-more {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}
.if-products__rp-more.is-hidden {
    display: none;
}
.if-products .if-products__rp-more-btn,
.if-products .if-products__rp-more-btn:hover,
.if-products .if-products__rp-more-btn:focus {
    padding: 12px 22px;
    border: 0;
    border-radius: var(--if-radius-pill);
    background: var(--if-color-primary);
    color: #fff;
    font-family: var(--if-font-heading);
    font-size: 6px;
    line-height: 1.4;
    text-transform: uppercase;
    cursor: pointer;
}
.if-products .if-products__rp-more-btn:hover {
    background: #b01818;
}
/* Phones: «ПОХОЖИЕ» and «Все …» share a row as in the mockup (mob-subcat-product, 1435:4017).
   The title keeps its width (the header rule for ≤1024px stretches it to 100%, which put
   the button on a line of its own). The pill sits next to the title when its whole label
   fits there in one line (flex-basis auto = the label's width); a longer label («ВСЕ:
   ВОДОСТОЧНАЯ СИСТЕМА») drops the pill under the title, still in one line — next to a 14px
   title it was squeezed into a three-line 164×62 pill. A label wider than the screen
   wraps inside the pill (max-width). */
@media (max-width: 767px) {
    .if-products--related .if-products__header.if-products__header--with-link {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }
    .if-products--related .if-products__header--with-link .if-products__title-wrap {
        flex: 0 1 auto;
        width: auto;
    }
    /* line-height 2.2: ONDER draws about twice its size, at 1.4 two lines of the label
       ran into each other. Narrower sides so that at 360 the pill still fits next to a
       16px title. */
    .if-products .if-products__all-link {
        flex: 0 1 auto;
        max-width: 100%;
        padding: 10px 14px;
        white-space: normal;
        text-align: center;
        line-height: 2.2;
    }
}

/* «Похожие категории» on phones: the photo fills the white box like the catalog cards
   next to it. The catalog module does that through its own controls (image box padding
   0, radius 20px); the related widget has none and kept the base 16/16/8px white frame
   (28.09). The card's own 4px padding is the inset. */
@media (max-width: 767px) {
    .if-products--related-categories .if-products-card__img-wrap {
        padding: 0;
        border-radius: 20px;
        overflow: hidden;
    }
}

/* ==========================================================================
   Phones and tablets by the Figma mobile frames (kit/figma/mob-catalog-a.png,
   mob-catalog-b.png, mob-subcat-product.png).
   ========================================================================== */

/* «ПРОДУКЦИЯ» above the category groups: only in the drop-down panel (below). */
.if-products__sidebar-label {
    display: none;
}

@media (max-width: 1024px) {
    /* The round filter icon sits at the right edge of the chip row (mockup), not right
       after «Наличие». (0,3,0) beats the base margin-left from --if-mf-icon-margin-left. */
    .if-products__header .if-products__filters .if-products__filter-icon {
        position: relative;
        margin-left: auto;
    }

    /* While the panel is open the icon is a ✕ in the same circle (products-module.js
       toggles .is-active). The cross is the ::after: two 1.5px bars turned 45°, laid out
       absolutely — as a flex item of the small button it came out squashed, one bar
       shorter than the other. */
    .if-products__filter-icon.is-active svg {
        display: none;
    }

    .if-products__header .if-products__filters .if-products__filter-icon.is-active::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 14px;
        height: 14px;
        margin: -7px 0 0 -7px;
        background:
            linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat,
            linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat;
        transform: rotate(45deg);
        pointer-events: none;
    }

    /* A tap leaves :hover behind on touch screens: the icon stayed a red disc after the
       panel was closed. There it keeps its resting look. */
    @media (hover: none) {
        .if-products__filter-icon:hover {
            background: var(--if-mf-icon-bg, transparent);
            border-color: var(--if-mf-icon-border-color, var(--if-color-dark));
            color: var(--if-mf-icon-color, var(--if-color-dark));
        }
    }

    /* The panel as in mob-catalog-b: one row per column — «СОРТИРОВКА ▾», then the
       attribute columns («ПОКРЫТИЕ ▾») — in ONDER capitals; a tap on the title opens its
       list (products-module.js: .is-open). The widget's typography of these titles and
       links is made for the desktop row (Inter 12px lowercase, line-height 10px — the
       links were 10px-tall targets), so the phone look is set here. Five classes: the
       widget's own CSS (post-NNN.css) styles the same elements at (0,4,0). */
    .if-products.is-filters-open .if-products__filter-panel {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 0;
    }

    .if-products.is-filters-open .if-products__filter-panel > .if-products__filter-col {
        flex: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        min-width: 0;
    }

    /* Sort first, as in the mockup: in the markup (and on desktop) it is the last column. */
    .if-products.is-filters-open .if-products__filter-panel > .if-products__filter-col:not([data-attribute]):last-child {
        order: -1;
    }

    .if-products.is-filters-open .if-products__filter-panel .if-products__filter-col .if-products__filter-col-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 40px;
        padding: 0;
        font-family: var(--if-font-heading);
        font-size: 6px;
        font-weight: 500;
        line-height: 1.4;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        white-space: normal;
        color: #000;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    /* Chevron in the mockup's dark red; points up while the list is open. */
    .if-products.is-filters-open .if-products__filter-panel .if-products__filter-col .if-products__filter-col-title::after {
        content: "";
        flex: none;
        width: 7px;
        height: 7px;
        margin: 0 4px 0 12px;
        border-right: 1.5px solid #7E0100;
        border-bottom: 1.5px solid #7E0100;
        transform: translateY(-25%) rotate(45deg);
        transition: transform var(--if-transition-fast);
    }

    .if-products.is-filters-open .if-products__filter-panel .if-products__filter-col.is-open .if-products__filter-col-title::after {
        transform: translateY(25%) rotate(-135deg);
    }

    .if-products.is-filters-open .if-products__filter-panel .if-products__filter-col .if-products__filter-list {
        display: none;
        gap: 0;
        padding-bottom: 8px;
    }

    .if-products.is-filters-open .if-products__filter-panel .if-products__filter-col.is-open .if-products__filter-list {
        display: flex;
    }

    .if-products.is-filters-open .if-products__filter-panel .if-products__filter-list .if-products__filter-link {
        display: block;
        padding: 10px 0;
        line-height: 1.4;
    }

    .if-products.is-filters-open .if-products__sidebar .if-products__sidebar-label {
        display: block;
        padding: 12px 0;
        font-family: var(--if-font-heading);
        font-size: 6px;
        font-weight: 500;
        line-height: 1.4;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: var(--e-global-color-primary, var(--if-color-primary));
    }

    /* Category rows: ≈37px with a thin line between them, the count right after the name
       in the same colour — «Желоб водосточный (32)». The square checkboxes stay on the
       left (owner's decision; the mockup has round radios on the right). The row's own
       padding is set by the widget to 0 at (0,4,0). */
    .if-products.is-filters-open .if-products__sidebar .if-products-cat-group__list .if-products-cat-item {
        min-height: 37px;
        padding: 8px 0;
        border-bottom: 1px solid #c9c7bd;
    }

    .if-products.is-filters-open .if-products__sidebar .if-products-cat-group__list .if-products-cat-item:last-child {
        border-bottom: 0;
    }

    .if-products__sidebar .if-products-cat-item .if-products-cat-item__label {
        flex: 0 1 auto;
    }

    /* -6px: the row's 10px gap shrinks to a word space. (0,2,0): the red of a picked
       category, (0,4,1) above, still wins. */
    .if-products__sidebar .if-products-cat-item__count {
        flex: none;
        margin-left: -6px;
        font-size: inherit;
        color: inherit;
    }
}

@media (max-width: 767px) {
    /* Search field ≈36px tall (mockup ≈28px; 48px was 1.7× that). */
    .if-products__header .if-products__search input {
        height: 36px;
    }

    /* «Наверх» as the site-wide button on every other page (.if-site-totop in style.css):
       44px, 16px from the edges. 52px at 32px covered the right card's name and pills. */
    .if-products-totop {
        right: 16px;
        bottom: 16px;
        width: 44px;
        height: 44px;
    }

    /* (0,2,0): Elementor's `.elementor a { text-decoration: none }` is (0,1,1). */
    .if-products-card .if-products-card__more--link {
        text-decoration: underline;
    }

    /* «Похожие» categories under a category's grid: 48px on top of the template's own
       paddings left ≈130px of empty cream above «ПОХОЖИЕ» on a phone. */
    .if-products.if-products--related-categories {
        margin-top: 0;
    }

    /* Bigger tap areas, same look: an invisible ::before around the small controls
       («Запрос» / «В корзину» were 16px tall, − / + 15px, the chips 24px, «Подробнее» 6px).
       The card clips at its edge (overflow: hidden), so the areas are kept within its
       padding. − / + reach only 4px sideways: the quantity field between them stays
       tappable. ::after is taken: the add-to-cart spinner and the ✕ of the filter icon. */
    .if-products-btn,
    .if-products__filter-btn,
    .if-products__header .if-breadcrumbs a {
        position: relative;
    }

    .if-products-btn::before,
    .if-products__filter-btn::before,
    .if-products__filter-icon::before,
    .if-products-card__more::before,
    .if-products-qty button::before,
    .if-products__header .if-breadcrumbs a::before {
        content: "";
        position: absolute;
        inset: -10px -3px;
    }

    .if-products__filter-btn::before {
        inset: -8px -3px;
    }

    .if-products__filter-icon::before {
        inset: -8px;
    }

    .if-products-card__more::before {
        inset: -12px -8px;
    }

    .if-products-qty button::before {
        inset: -12px -4px;
    }

    .if-products__header .if-breadcrumbs a::before {
        inset: -12px -4px;
    }

    /* Variant pills are 12-14px tall and, wrapped, their lines are 3-6px apart: the zone
       reaches 3px up and down and 1px sideways from the padding box (≈2px past the border),
       so a tap between two lines still hits a pill. Real 28px targets would need taller
       pills. */
    .if-products-card__variant-row .if-products-pill {
        position: relative;
    }

    .if-products-card__variant-row .if-products-pill::before {
        content: "";
        position: absolute;
        inset: -3px -1px;
    }

    /* «Категория как товар» — the order card (mockup mob-subcat-product): the photo on the
       left with the logo mark, the name, quantity, red «В корзину» and black «Заказ»
       centred on the right, the description full width under both, no panel of its own.
       It was one column on a cold grey #F3F4F6 panel with the text against its edge, and
       both buttons were full-width 16px-tall black strips (ONDER 4px). Long selectors on
       purpose: the widget's per-template CSS (post-390.css) styles these at (0,4,0). */
    .if-products .if-products__layout .if-products__content .if-products__grid .if-products-empty-split {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 24px 16px;
        align-items: center;
        padding: 0;
        background: transparent;
        border-radius: 0;
    }

    .if-products .if-products__grid .if-products-empty-split .if-products-empty-split__media {
        position: relative;
    }

    /* Same mark as on the catalog cards and the product photo (images/Group.png). */
    .if-products .if-products__grid .if-products-empty-split .if-products-empty-split__media::before {
        content: "";
        position: absolute;
        top: 10px;
        left: 10px;
        z-index: 1;
        width: 16px;
        height: 16px;
        background: url("../../images/Group.png") no-repeat center / contain;
        pointer-events: none;
    }

    .if-products .if-products__grid .if-products-empty-split .if-products-empty-split__actions {
        align-items: center;
        gap: 14px;
        min-width: 0;
        text-align: center;
    }

    /* The name in Inter, like the product names in the cards (owner's decision). */
    .if-products .if-products__grid .if-products-empty-split .if-products-empty-split__actions .if-products-empty-split__title {
        font-family: var(--if-font-body);
        font-size: 16px;
        font-weight: 700;
        line-height: 1.25;
        letter-spacing: 0;
        text-transform: none;
        color: #000;
    }

    .if-products .if-products__grid .if-products-empty-split .if-products-empty-split__actions .if-products-empty-split__qty {
        align-self: center;
    }

    /* Pills as wide as their label, 40px tall; a label wider than the column wraps
       instead of leaving the screen (at 360 the column is 152px and «СДЕЛАТЬ ЗАКАЗ»
       still fits on one line; at 320 it takes two). */
    .if-products .if-products__grid .if-products-empty-split .if-products-empty-split__actions .if-products-btn {
        align-self: center;
        width: auto;
        max-width: 100%;
        min-height: 40px;
        padding: 6px 14px;
        font-size: 5px;
        line-height: 2;
        white-space: normal;
        text-align: center;
    }

    /* In the catalog cards «В корзину» is black (post-NNN.css: .if-products-btn--red
       #020202), in the order card it is red as in the mockup. */
    .if-products .if-products__grid .if-products-empty-split .if-products-empty-split__actions .if-products-btn--red {
        background-color: var(--e-global-color-primary, var(--if-color-primary));
        border-color: var(--e-global-color-primary, var(--if-color-primary));
        color: #fff;
    }

    .if-products .if-products__grid .if-products-empty-split .if-products-empty-split__desc {
        grid-column: 1 / -1;
        gap: 12px;
    }

    .if-products .if-products__grid .if-products-empty-split .if-products-empty-split__desc .if-products-empty-split__desc-title {
        font-size: 7px;
        line-height: 1.4;
        letter-spacing: 0.04em;
        color: #000;
    }
}

/* «Ещё» в «Похожих» страницы товара, когда все карточки помещаются на компьютере (их не
   больше четырёх): нужна только на телефоне, где сначала видны две (mobile-product.css,
   template-parts/catalog/related-products.php). */
.if-products__rp-more.if-products__rp-more--phone {
    display: none;
}

@media (max-width: 767px) {
    body.single-product .if-products__rp-more.if-products__rp-more--phone:not(.is-hidden) {
        display: flex;
    }
}

/* ==========================================================================
   Телефон, второй проход по кадрам Figma kit/figma/mobile (576px → 390px, ×0,677):
   1435:3119 (/catalog/), 1435:3899 и 1435:3263 (раздел), 1435:4142 («категория как
   товар»), 1435:4017 («Похожие» страницы товара). Размеры заголовков, крошек, кнопок
   и баннера — в базе (dev/migrations/mobile-shop.php); здесь то, что Elementor не
   задаёт отдельно для телефона (шрифт, начертание, порядок блоков).
   Этот файл подключается в <head> раньше post-NNN.css Elementor, поэтому селекторы
   весомее его правил (0,4,0) / (0,5,1).
   ========================================================================== */
@media (max-width: 767px) {

    /* Цена в карточках (каталог, разделы, «Похожие» раздела и товара): «Цена: от 100 ₽»
       Inter жирным обычным регистром в одну строку, как в кадрах (было ONDER 5px капсом
       с разрядкой: «135 РУБ./ПОГ.» и отдельной строкой «М»). Размер — как у названий
       (2.3vw ≈ 9px при 390). Слова и знак не меняются. Цвет — чёрный (в «Похожих»
       раздела была красная). */
    html body .if-products .if-products__grid .if-products-card .if-products-card__price-row {
        gap: 4px;
    }

    html body .if-products .if-products__grid .if-products-card .if-products-card__price-row .if-products-card__price-label,
    html body .if-products .if-products__grid .if-products-card .if-products-card__price-row .if-products-card__price,
    html body .if-products .if-products__grid .if-products-card .if-products-card__price-row .if-products-card__price span {
        font-family: var(--if-font-body, 'Inter', sans-serif);
        font-size: 2.3vw;
        font-weight: 700;
        line-height: 1.3;
        letter-spacing: 0;
        text-transform: none;
        color: #000;
    }

    /* Раздел (шаблон 390): под «КАТАЛОГ» сразу крошки, потом поиск и фильтры (кадр
       1435:3899: подзаголовок раздела под «КАТАЛОГ», ряд фильтров ниже). Было: поиск,
       фильтры и только потом крошки. Текущий раздел — чёрным, как в кадре (был красный
       запасной #DC2626). Размер крошек — в базе. */
    .elementor-390 .elementor-element-9fdc262 .if-products__header .if-products__header-row {
        display: contents;
    }

    .elementor-390 .elementor-element-9fdc262 .if-products__header .if-products__breadcrumb {
        order: 1;
    }

    .elementor-390 .elementor-element-9fdc262 .if-products__header .if-products__toolbar {
        order: 2;
    }

    .elementor-390 .elementor-element-9fdc262 .if-products__header .if-products__breadcrumb .if-breadcrumbs {
        margin-top: 0;
    }

    .elementor-390 .elementor-element.elementor-element-9fdc262 .if-products__header .if-products__breadcrumb .if-breadcrumbs__current {
        color: #000;
    }

    /* «Категория как товар» (кадр 1435:4142): фото ≈40% ширины слева, справа колонка
       пошире (было 1fr / 1fr — фото 167×167); название 12px в одну строку («Сайдинг
       металлический»), как название на странице товара. */
    .if-products .if-products__layout .if-products__content .if-products__grid .if-products-empty-split {
        grid-template-columns: minmax(0, 40%) minmax(0, 1fr);
    }

    .if-products .if-products__grid .if-products-empty-split .if-products-empty-split__actions .if-products-empty-split__title {
        font-size: 12px;
    }

    /* Счётчик: кружки 20px и чёрное «10» ONDER (были 15px и красное 6px). Зона нажатия
       кнопок (::before выше) остаётся. !important — у кнопок счётчика размер с
       !important в общем правиле .if-products-qty button. */
    .if-products .if-products__grid .if-products-empty-split .if-products-empty-split__qty button {
        width: 20px !important;
        height: 20px !important;
    }

    .if-products .if-products__grid .if-products-empty-split .if-products-empty-split__qty .if-products-qty__val {
        font-size: 8px;
        color: #000;
    }

    /* Текст описания 13px (было 16px), как на «Услугах»; в кадре ≈11px — мельче для
       основного текста уже трудно читать. */
    .if-products .if-products__grid .if-products-empty-split .if-products-empty-split__desc .if-products-empty-split__desc-text,
    .if-products .if-products__grid .if-products-empty-split .if-products-empty-split__desc .if-products-empty-split__desc-text p {
        font-size: 13px;
        line-height: 1.3;
    }

    /* «Категория как товар»: три кнопки «заказать звонок / форма / корзина» (59da626) —
       сразу под «Похожими», как в кадре; баннер, SEO-текст, таблица и серые кнопки —
       после них (было: кнопки в самом низу, после текста ≈5000px). Блоки в шаблоне не
       переставлены — на обычных страницах раздела порядок прежний; здесь корень
       шаблона — колонка flex, и эти четыре блока уходят в конец через order (как
       SEO-текст страницы товара в mobile-product.css). :has() — Safari 15.4+, в старых
       браузерах порядок просто прежний. */
    .elementor-390.elementor-location-archive:has(.if-products-empty-split) {
        display: flex;
        flex-direction: column;
    }

    .elementor-390.elementor-location-archive:has(.if-products-empty-split) > .elementor-element-d9e834b,
    .elementor-390.elementor-location-archive:has(.if-products-empty-split) > .elementor-element-f95261e,
    .elementor-390.elementor-location-archive:has(.if-products-empty-split) > .elementor-element-e9370a1,
    .elementor-390.elementor-location-archive:has(.if-products-empty-split) > .elementor-element-689126f {
        order: 1;
    }

    /* От карточек «Похожих» до первой кнопки ≈56px, как в кадре (было ≈140px: 60px
       поля под «Похожими» и 60px отступа кнопок с компьютера). */
    .elementor-390.elementor-location-archive:has(.if-products-empty-split) .elementor-element.elementor-element-06f9ebe .if-products {
        padding-bottom: 24px;
    }

    .elementor-390.elementor-location-archive:has(.if-products-empty-split) > .elementor-element.elementor-element-59da626 {
        --margin-top: 16px;
    }

    /* Те же три кнопки на всех страницах раздела — капсулы 24px, как на странице товара
       (размер текста и поля — в базе); зона нажатия 40px — невидимая, на 9px вверх и
       вниз от внутреннего края рамки. */
    .elementor-390 .elementor-element-59da626 .elementor-element a.elementor-button {
        position: relative;
    }

    .elementor-390 .elementor-element-59da626 .elementor-element a.elementor-button::after {
        content: "";
        position: absolute;
        top: -9px;
        right: 0;
        bottom: -9px;
        left: 0;
    }

    /* /catalog/ (323), кнопки внизу (c73324d): 32–34px в высоту — зона нажатия 40px. */
    .elementor-323 .elementor-element-c73324d .elementor-element a.elementor-button {
        position: relative;
    }

    .elementor-323 .elementor-element-c73324d .elementor-element a.elementor-button::after {
        content: "";
        position: absolute;
        top: -4px;
        right: 0;
        bottom: -4px;
        left: 0;
    }

    /* «ЕЩЁ» под сеткой (≈68×30): зона нажатия 42px. */
    .if-products .if-products__loadmore .if-products__loadmore-btn {
        position: relative;
    }

    .if-products .if-products__loadmore .if-products__loadmore-btn::before {
        content: "";
        position: absolute;
        inset: -6px -4px;
    }

    /* Таблица характеристик раздела (e9370a1): у <dd> отступ браузера 40px слева, и при
       360px таблица выходила за колонку на 1px — страница прокручивалась вбок. */
    .elementor-390 .if-category-tech-table dd {
        margin-inline-start: 0;
    }

    .elementor-390 .if-category-tech-table table {
        width: 100%;
    }

    /* При 320 самое длинное слово («Трапециевидная») с полями ячеек делало таблицу шире
       колонки на 21px: длинные слова переносятся внутри ячейки. */
    .elementor-390 .if-category-tech-table :is(th, td) {
        overflow-wrap: anywhere;
        hyphens: auto;
    }

    /* SEO-текст раздела (24a829f, кадр 1435:3899): основной текст Inter Light 13px / 1,35
       (было 16px — страница на треть длиннее макета; в кадре ≈12px, 13px — как на
       «Услугах»), заголовки h2/h3 не крупнее 8px ONDER (были 10/9px: «ОПИСАНИЕ /
       ОЦИНКОВАННОЙ / ВОДОСТОЧНОЙ / СИСТЕМЫ» в 4 строки), у списков отступ 20px (был 40px).
       Только шаблон раздела 390 — описание товара (.woocommerce-Tabs-panel--description)
       не трогается. Вес (0,3,x) — выше category-content.css и переменных Кастомайзера на
       том же блоке (0,2,0). Блоки Elementor внутри текста (шаблон 18016) сбрасывают эти
       правила сами (category-content.css). */
    .elementor-390 .if-category-content.if-category-seo-content {
        --if-content-p-size: 13px;
        --if-content-li-size: 13px;
        font-size: 13px;
        font-weight: 300;
        line-height: 1.35;
    }

    .elementor-390 .if-category-content.if-category-seo-content h2 {
        font-size: min(var(--if-content-h2-size), 8px);
    }

    .elementor-390 .if-category-content.if-category-seo-content h3 {
        font-size: min(var(--if-content-h3-size), 8px);
    }

    .elementor-390 .if-category-content.if-category-seo-content ul,
    .elementor-390 .if-category-content.if-category-seo-content ol {
        padding-left: 20px;
    }

    /* Блок 18016 в тексте раздела («Сделать заказ» / телефон и панель с видео): у виджета
       видео (221396b) высота считалась 0, видео или картинка вылезали из белой панели и
       накрывали следующий заголовок (нажатия уходили в плеер VK). post-18016.css
       подключается после этого файла, поэтому вес (0,3,1). */
    body .elementor-18016 .elementor-element.elementor-element-221396b,
    body .elementor-18016 .elementor-element.elementor-element-221396b > .elementor-widget-container {
        flex: none;
        width: 100%;
        height: auto;
    }
}
