/* Catalog / shop section
 * Mobile-first styles for the catalog landing page and future catalog views.
 * Loaded on catalog/category pages and the product card where RD catalog cards are reused.
 */

.rd-catalog-page {
    margin: 0;
    padding: 20px 0 28px !important;
    color: #102a50;
    background: #f8fafc;
    font-family: "Rubik", Arial, Helvetica, sans-serif;
    line-height: 1.35;
}

.rd-catalog-page *,
.rd-catalog-page *::before,
.rd-catalog-page *::after {
    box-sizing: border-box;
}

.rd-catalog__container {
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 14px;
}

.rd-catalog__breadcrumb {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 5px;
    margin: 0 0 12px;
    color: #7a8798;
    font-size: 12px;
    line-height: 1.35;
}

.rd-catalog__breadcrumb-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    color: #6e7d90;
    font-size: 11px;
}

.rd-catalog__breadcrumb .breadcrumbs-d {
    display: flex;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
    padding: 0;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.rd-catalog__breadcrumb .breadcrumb-d {
    color: inherit;
}

.rd-catalog__breadcrumb .breadcrumb-d a,
.rd-catalog__breadcrumb .breadcrumb-d span {
    color: inherit;
    text-decoration: none;
}

.rd-catalog__breadcrumb .breadcrumb-d a:hover,
.rd-catalog__breadcrumb .breadcrumb-d a:focus-visible {
    color: #f31d2c;
}

.rd-catalog__breadcrumb-system-separator {
    display: none;
}

.rd-catalog__header {
    margin-bottom: 15px;
}

.rd-catalog__title {
    margin: 0;
    color: #102a50;
    font-size: 29px;
    line-height: 1.12;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.rd-catalog__subtitle {
    margin: 7px 0 0;
    color: #607089;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 400;
}

.rd-catalog__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.rd-catalog-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid #edf1f5;
    border-radius: 5px;
    box-shadow: 0 7px 22px rgba(15, 39, 72, 0.035);
}

.rd-catalog-card__image-link {
    display: block;
    padding: 16px 16px 0;
    color: inherit;
    text-decoration: none;
}

.rd-catalog-card__image-box {
    display: flex;
    width: 100%;
    height: 190px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.rd-catalog-card__image-box picture {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.rd-catalog-card__image-box img,
.rd-catalog-card__image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.rd-catalog-card__image-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: #c0cad6;
    background: #f8fafc;
    border-radius: 4px;
}

.rd-catalog-card__image-placeholder .bi {
    font-size: 44px;
}

.rd-catalog-card__body {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 11px 16px 16px;
}

.rd-catalog-card__title {
    margin: 0;
    color: #102a50;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 700;
}

.rd-catalog-card__title-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.18s ease;
}

.rd-catalog-card__count {
    display: inline;
    margin-left: 6px;
    color: #7f8997;
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
}

.rd-catalog-card__description {
    display: flex;
    min-height: 43px;
    flex-direction: column;
    gap: 2px;
    margin: 8px 0 13px;
    overflow: hidden;
    color: #778397;
    font-size: 13px;
    line-height: 1.5;
}

.rd-catalog-card__description span,
.rd-catalog-card__subcategory {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rd-catalog-card__subcategory {
    color: #778397;
    text-decoration: none;
    transition: color 0.18s ease;
}

.rd-catalog-card__subcategory:hover,
.rd-catalog-card__subcategory:focus-visible {
    color: #f31d2c;
}

.rd-catalog-card__description--text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.rd-catalog-card__description--text > * {
    margin: 0;
}

.rd-catalog-card__description--empty {
    visibility: hidden;
}

.rd-catalog-card__more {
    display: inline-flex;
    width: max-content;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    color: #102a50;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.18s ease;
}

.rd-catalog-card__more .bi {
    font-size: 17px;
    line-height: 1;
    transition: transform 0.18s ease;
}

.rd-catalog-card__title-link:hover,
.rd-catalog-card__title-link:focus-visible,
.rd-catalog-card__more:hover,
.rd-catalog-card__more:focus-visible {
    color: #f31d2c;
}

.rd-catalog-card__more:hover .bi,
.rd-catalog-card__more:focus-visible .bi {
    transform: translateX(3px);
}

.rd-catalog__more,
.rd-catalog__pagination {
    margin-top: 18px;
}

.rd-catalog-banner {
    width: 100%;
    margin-top: 18px;
    overflow: hidden;
    border-radius: 4px;
}

.rd-catalog-banner__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.rd-catalog-banner__image {
    display: block;
    width: 100%;
    height: auto;
}

@media (min-width: 600px) {
    .rd-catalog__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rd-catalog-card__image-box {
        height: 205px;
    }
}

@media (min-width: 768px) {
    .rd-catalog-page {
        padding-top: 24px !important;
        padding-bottom: 30px !important;
    }

    .rd-catalog__container {
        padding-right: 20px;
        padding-left: 20px;
    }

    .rd-catalog__title {
        font-size: 34px;
    }

    .rd-catalog__subtitle {
        font-size: 15px;
    }
}

@media (min-width: 992px) {
    .rd-catalog__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px;
    }

    .rd-catalog-card__image-box {
        height: 190px;
    }

    .rd-catalog-card__body {
        padding: 10px 16px 15px;
    }

    .rd-catalog-card__title {
        font-size: 14px;
    }

    .rd-catalog-card__description {
        font-size: 12px;
    }
}

@media (min-width: 1200px) {
    .rd-catalog-page {
        padding-top: 26px !important;
        padding-bottom: 32px !important;
    }

    .rd-catalog__container {
        padding-right: 24px;
        padding-left: 24px;
    }

    .rd-catalog__breadcrumb {
        margin-bottom: 13px;
    }

    .rd-catalog__header {
        margin-bottom: 19px;
    }

    .rd-catalog__title {
        font-size: 40px;
    }

    .rd-catalog__subtitle {
        margin-top: 6px;
        font-size: 16px;
    }

    .rd-catalog__grid {
        gap: 16px;
    }

    .rd-catalog-card__image-link {
        padding: 18px 18px 0;
    }

    .rd-catalog-card__image-box {
        height: 205px;
    }

    .rd-catalog-card__body {
        padding: 12px 18px 17px;
    }

    .rd-catalog-card__title {
        font-size: 15px;
    }

    .rd-catalog-card__description {
        min-height: 45px;
        margin-top: 9px;
        margin-bottom: 14px;
        font-size: 13px;
    }

    .rd-catalog-card__more {
        font-size: 13px;
    }
    .rd-catalog__container__search ._viewgrid {
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    }
}

/* Category / subcategory pages */
.rd-catalog-category__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

.rd-catalog-category__filter,
.rd-catalog-category__content,
.rd-catalog-category__module {
    min-width: 0;
}

.rd-catalog-category__header {
    margin-bottom: 5px;
}

.rd-catalog-category__title {
    margin: 0;
    color: #102a50;
    font-size: 29px;
    line-height: 1.12;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.rd-catalog-category__subtitle {
    margin: 0 0 16px;
    color: #607089;
    font-size: 14px;
    line-height: 1.45;
}

.rd-catalog-category__subtitle > * {
    margin: 0;
}

.rd-catalog-category__notice {
    margin: 0;
}

.rd-subcategories {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.rd-subcategory-card {
    display: grid;
    min-width: 0;
    grid-template-columns: 74px minmax(0, 1fr);
    align-items: center;
    overflow: hidden;
    background: #fff;
    border: 1px solid #edf1f5;
    border-radius: 5px;
    box-shadow: 0 5px 18px rgba(15, 39, 72, 0.035);
}

.rd-subcategory-card__image-link {
    display: block;
    min-width: 0;
    padding: 9px 0 9px 9px;
    color: inherit;
    text-decoration: none;
}

.rd-subcategory-card__image-box {
    display: flex;
    width: 64px;
    height: 64px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.rd-subcategory-card__image-box picture {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.rd-subcategory-card__image,
.rd-subcategory-card__image-box img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: contain;
}

.rd-subcategory-card__placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: #a8b3c0;
    background: #f8fafc;
}

.rd-subcategory-card__body {
    min-width: 0;
    padding: 10px 12px;
}

.rd-subcategory-card__title {
    margin: 0;
    color: #102a50;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 600;
}

.rd-subcategory-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.18s ease;
}

.rd-subcategory-card__title a:hover,
.rd-subcategory-card__title a:focus-visible {
    color: #f31d2c;
}

.rd-subcategory-card__count {
    margin-top: 4px;
    color: #748299;
    font-size: 12px;
    line-height: 1.25;
}

.rd-category-toolbar {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
}

.rd-category-sort {
    display: flex;
    min-width: 0;
    flex: 1 1 230px;
    align-items: center;
    gap: 8px;
}

.rd-category-sort__label {
    flex: 0 0 auto;
    margin: 0;
    color: #718096;
    font-size: 12px;
    font-weight: 400;
}

.rd-category-sort__control {
    position: relative;
    min-width: 0;
    max-width: 210px;
    flex: 1 1 auto;
}

.rd-category-sort__select {
    width: 100%;
    height: 38px;
    padding: 0 34px 0 12px;
    color: #102a50;
    background: #fff;
    border: 1px solid #dfe6ee;
    border-radius: 4px;
    outline: 0;
    font: inherit;
    font-size: 12px;
    appearance: none;
    cursor: pointer;
}

.rd-category-sort__select:focus {
    border-color: #f31d2c;
}

.rd-category-sort__icon {
    position: absolute;
    top: 50%;
    right: 11px;
    color: #8a97a8;
    font-size: 11px;
    pointer-events: none;
    transform: translateY(-50%);
}

.rd-category-view {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
}

.rd-category-view__button {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    padding: 0;
    color: #748299;
    background: transparent;
    border: 0;
    border-radius: 4px;
    font: inherit;
    font-size: 20px;
    cursor: pointer;
    transition:
        color 0.18s ease,
        background 0.18s ease;
}

.rd-category-view__button:hover,
.rd-category-view__button:focus-visible,
.rd-category-view__button._active {
    color: #f31d2c;
    background: #fff;
}

.rd-category-products.section-d__list {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 12px;
}

.rd-catalog-category .rd-product-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 0;
    height: 100%;
    align-self: stretch;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid #edf1f5;
    border-radius: 5px;
    box-shadow: 0 5px 18px rgba(15, 39, 72, 0.035);
}

.rd-catalog-category .rd-product-card__image-wrap {
    position: relative;
    min-width: 0;
}

.rd-catalog-category .rd-product-card__image-link {
    display: none;
    height: 210px;
    padding: 12px 12px 0;
    color: inherit;
    text-decoration: none;
}

.rd-catalog-category .rd-product-card__image-link:first-of-type {
    display: block;
}

.rd-catalog-category .rd-product-card__image-box {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.rd-catalog-category .rd-product-card__image-box picture {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.rd-catalog-category .rd-product-card__image,
.rd-catalog-category .rd-product-card__image-box img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: contain;
}

.rd-catalog-category .rd-product-card__image-box--empty {
    color: #b9c3ce;
    background: #f8fafc;
}

.rd-catalog-category .rd-product-card__badge {
    position: absolute;
    z-index: 3;
    top: 10px;
    left: 10px;
    display: inline-flex;
    min-height: 25px;
    align-items: center;
    padding: 4px 13px;
    color: #fff;
    background: #f31d2c;
    border-radius: 20px;
    font-size: 11px;
    line-height: 1;
    font-weight: 500;
}

.rd-catalog-category .rd-product-card__body {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 10px 12px 13px;
}

.rd-catalog-category .rd-product-card__title {
    display: -webkit-box;
    min-height: 52px;
    margin: 0;
    overflow: hidden;
    color: #102a50;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 500;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.rd-catalog-category .rd-product-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.18s ease;
}

.rd-catalog-category .rd-product-card__title a:hover,
.rd-catalog-category .rd-product-card__title a:focus-visible {
    color: #f31d2c;
}

.rd-catalog-category .rd-product-card__anons {
    display: none;
    margin-top: 7px;
    color: #748299;
    font-size: 12px;
    line-height: 1.45;
}

.rd-catalog-category .rd-product-card__anons > * {
    margin: 0;
}

.rd-catalog-category .rd-product-card__article {
    display: none;
    margin-top: 7px;
    color: #7c899a;
    font-size: 11px;
}

.rd-catalog-category .rd-product-card__form {
    display: contents;
}

.rd-catalog-category .rd-product-card__system {
    display: none !important;
}

.rd-catalog-category .rd-product-card__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    column-gap: 10px;
    row-gap: 8px;
    align-items: end;
    margin-top: auto;
    padding: 10px 0 0;
}

.rd-catalog-category .rd-product-card__price-group {
    display: grid;
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    min-height: 42px;
    align-content: end;
    gap: 2px;
}

.rd-catalog-category .rd-product-card__price-row {
    display: none;
}

.rd-catalog-category .rd-product-card__price-row:first-child {
    display: block;
}

.rd-catalog-category .rd-product-card__price-current {
    color: #102a50;
    font-size: 18px;
    line-height: 1.1;
    font-weight: 700;
}

.rd-catalog-category .rd-product-card__price-old {
    color: #8d9aaa;
    font-size: 11px;
    text-decoration: line-through;
}

.rd-catalog-category .rd-product-card__buy-controls {
    position: static;
    display: flex;
    grid-column: 2;
    grid-row: 1;
    align-items: flex-end;
    justify-content: flex-end;
}

.rd-catalog-category .rd-product-card__cart {
    display: inline-flex;
    width: 42px;
    min-width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #fff;
    background: #f31d2c;
    border: 0;
    border-radius: 4px;
    font: inherit;
    cursor: pointer;
}

.rd-catalog-category .rd-product-card__cart .bi {
    font-size: 17px;
}

.rd-catalog-category .rd-product-card__cart-message {
    width: 100%;
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
    padding: 7px 10px;
    color: #111;
    background: #f8f8f8;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.35;
    text-align: center;
}

.rd-catalog-category .rd-product-card__cart-message a {
    color: inherit;
}

/* Catalog card: «Цена по запросу» — пассивная информационная плашка. */
.rd-catalog-category .rd-product-card__actions--request {
    display: block;
    margin-top: auto;
    padding-top: 10px;
}

.rd-catalog-category
    .rd-product-card__actions--request
    .rd-product-card__price-group {
    display: none;
}

.rd-catalog-category
    .rd-product-card__actions--request
    .rd-product-card__buy-controls {
    display: block;
    width: 100%;
}

.rd-catalog-category .rd-product-card__request-price {
    display: inline-flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    color: #fff;
    background: #0c274d;
    border: 1px solid #0c274d;
    border-radius: 4px;
    font: inherit;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 500;
    text-align: center;
    cursor: default;
    user-select: none;
}

/* DIAFAN: точечное оформление штатной кнопки «Показать ещё».
   js_paginator_more_button не меняем — класс нужен штатному AJAX. */
.rd-catalog-category .paginator_more_form,
.rd-catalog-category .paginator_more {
    grid-column: 1 / -1;
    align-self: start;
    width: 100%;
    margin: 4px 0 10px !important;
    padding: 0 !important;
    text-align: center;
}

.rd-catalog-category .paginator_more_button {
    min-width: 160px;
    min-height: 42px;
    margin: 0 !important;
    padding: 10px 24px;
    color: #fff;
    background: #f31d2c;
    border: 1px solid #f31d2c;
    border-radius: 4px !important;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.rd-catalog-category .paginator_more_button:hover,
.rd-catalog-category .paginator_more_button:focus,
.rd-catalog-category .paginator_more_button:focus-visible {
    color: #fff;
    background: #d91523;
    border-color: #d91523;
    border-radius: 4px !important;
}

.rd-category-products__pagination {
    margin-top: 14px;
}

.rd-category-products__pagination .paginat-d {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 0;
}

.rd-category-products__pagination .paginat-d__item {
    display: inline-grid;
    min-width: 34px;
    height: 34px;
    place-items: center;
    padding: 0 9px;
    color: #102a50;
    background: #fff;
    border: 1px solid #e1e7ee;
    border-radius: 4px;
    text-decoration: none;
}

.rd-category-products__pagination .paginat-d__item:hover,
.rd-category-products__pagination .paginat-d__item:focus-visible,
.rd-category-products__pagination .paginat-d__item_current {
    color: #fff;
    background: #f31d2c;
    border-color: #f31d2c;
    border-radius: 4px !important;
}

.rd-category-seo {
    display: flow-root;
    min-width: 0;
    margin-top: 26px;
    padding: 14px;
    background: #fff;
    border: 1px solid #e8edf2;
    border-radius: 5px;
}

.rd-category-seo__image-box {
    float: left;
    width: 42%;
    max-width: 320px;
    min-width: 120px;
    margin: 0 16px 10px 0;
}

.rd-category-seo__image-box picture {
    display: block;
    width: 100%;
}

.rd-category-seo__image,
.rd-category-seo__image-box img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.rd-category-seo__content {
    min-width: 0;
    color: #44556d;
    line-height: 1.5;
}

.rd-category-seo__content h2,
.rd-category-seo__content h3 {
    margin-top: 0;
    color: #102a50;
    line-height: 1.2;
}

.rd-category-seo__content h2 {
    font-size: 22px;
}

.rd-category-seo__content h3 {
    font-size: 18px;
}

.rd-category-seo__content a {
    color: #102a50;
    text-decoration: underline;
    transition: color 0.18s ease;
}

.rd-category-seo__content a:hover,
.rd-category-seo__content a:focus-visible {
    color: #f31d2c;
}

.rd-category-products.section-d__list._viewrows {
    grid-template-columns: minmax(0, 1fr);
}

.rd-category-products.section-d__list._viewrows .rd-product-card {
    min-height: 0;
}

.rd-category-products.section-d__list._viewrows .rd-product-card__anons,
.rd-category-products.section-d__list._viewrows .rd-product-card__article {
    display: block;
}

@media (min-width: 600px) {
    .rd-subcategories {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rd-category-products.section-d__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rd-category-seo {
        padding: 18px;
    }
}

@media (min-width: 768px) {
    .rd-catalog-category__title {
        font-size: 34px;
    }

    .rd-catalog-category__subtitle {
        font-size: 15px;
    }

    .rd-subcategories {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .rd-category-products.section-d__list._viewrows .rd-product-card {
        display: grid;
        grid-template-columns: 190px minmax(0, 1fr);
    }

    .rd-category-products.section-d__list._viewrows
        .rd-product-card__image-link {
        height: 170px;
    }

    .rd-category-products.section-d__list._viewrows .rd-product-card__body {
        padding: 18px;
    }

    .rd-category-seo__image-box {
        width: 36%;
        max-width: 360px;
        margin-right: 22px;
        margin-bottom: 12px;
    }
}

@media (min-width: 992px) {
    .rd-catalog-category__layout {
        grid-template-columns: 260px minmax(0, 1fr);
        align-items: start;
        gap: 18px;
    }

    .rd-catalog-category__filter {
        position: relative;
    }

    .rd-category-products.section-d__list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .rd-catalog-category__layout {
        grid-template-columns: 280px minmax(0, 1fr);
        gap: 20px;
    }

    .rd-catalog-category__header {
        margin-bottom: 4px;
    }

    .rd-catalog-category__title {
        font-size: 40px;
    }

    .rd-catalog-category__subtitle {
        margin-bottom: 17px;
        font-size: 15px;
    }

    .rd-subcategories {
        gap: 12px;
        margin-bottom: 18px;
    }

    .rd-subcategory-card {
        grid-template-columns: 86px minmax(0, 1fr);
    }

    .rd-subcategory-card__image-box {
        width: 76px;
        height: 76px;
    }

    .rd-subcategory-card__body {
        padding: 12px 14px;
    }

    .rd-subcategory-card__title {
        font-size: 14px;
    }

    .rd-category-toolbar {
        margin-bottom: 13px;
    }

    .rd-category-products.section-d__list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }

    .rd-catalog-category .rd-product-card {
        min-height: 0;
    }

    .rd-catalog-category .rd-product-card__image-link {
        height: 220px;
    }

    .rd-category-seo {
        margin-top: 28px;
        padding: 18px 24px;
    }

    .rd-category-seo__content h2 {
        font-size: 24px;
    }
}

/* Режим списка: «Цена по запросу» не растягиваем на всю ширину строки. */
@media (min-width: 768px) {
    .rd-category-products.section-d__list._viewrows
        .rd-product-card__actions--request
        .rd-product-card__buy-controls {
        width: auto;
    }

    .rd-category-products.section-d__list._viewrows
        .rd-product-card__request-price {
        width: 220px;
        max-width: 100%;
    }
}

/* Режим списка: сообщение «В корзине N шт.» не растягиваем на всю ширину строки. */
@media (min-width: 768px) {
    .rd-category-products.section-d__list._viewrows
        .rd-product-card__cart-message {
        width: 220px;
        max-width: 100%;
        justify-self: start;
    }
}

/* Режим списка: сообщение корзины располагается прямо под кнопкой справа. */
@media (min-width: 768px) {
    .rd-category-products.section-d__list._viewrows
        .rd-product-card__actions:not(.rd-product-card__actions--request) {
        grid-template-columns: minmax(0, 1fr) 220px;
    }

    .rd-category-products.section-d__list._viewrows
        .rd-product-card__buy-controls {
        width: 100%;
        justify-content: flex-end;
    }

    .rd-category-products.section-d__list._viewrows
        .rd-product-card__cart-message {
        grid-column: 2;
        grid-row: 2;
        width: 220px;
        max-width: 100%;
        justify-self: end;
    }
}

/* 2026-09-19: price presentation in catalog cards.
 * Normal price and "Цена по запросу" use the same blue price plate.
 * The DIAFAN cart remains a separate functional control on the right.
 */
.rd-catalog-category .rd-product-card__price-current {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    padding: 9px 14px;
    color: #fff;
    background: #0c274d;
    border-radius: 4px;
    white-space: nowrap;
}

.rd-catalog-category .rd-product-card__price-current .js_shop_price {
    color: inherit;
}

.rd-catalog-category .rd-product-card__price-current--request {
    min-width: 180px;
}

@media (min-width: 768px) {
    .rd-category-products.section-d__list._viewrows
        .rd-product-card__price-current {
        width: 220px;
        max-width: 100%;
    }
}

/* Цена по запросу: сохраняем такой же визуальный зазор до корзины, как у обычной цены. */
.rd-catalog-category .rd-product-card__price-current--request {
    width: calc(100% - 10px);
    max-width: calc(100% - 10px);
    justify-self: start;
}

@media (min-width: 768px) {
    .rd-category-products.section-d__list._viewrows
        .rd-product-card__price-current--request {
        width: 210px;
        max-width: 210px;
    }
}

/* 2026-09-19: точечное выравнивание блока цены в карточках каталога. */
.rd-catalog-category .rd-product-card__actions--price-request {
    column-gap: 10px;
}

.rd-catalog-category
    .rd-product-card__actions--price-request
    .rd-product-card__price-current--request {
    box-sizing: border-box;
    max-width: 100% !important;
    min-width: 0;
}

.rd-catalog-category .rd-product-card__price-current--with-old {
    height: 42px;
    min-height: 42px;
    flex-direction: column;
    gap: 1px;
    padding-top: 4px;
    padding-bottom: 4px;
}

.rd-catalog-category .rd-product-card__price-main {
    display: block;
    line-height: 1.05;
}

.rd-catalog-category .rd-product-card__price-old--inside {
    margin: 0;
    color: rgba(255, 255, 255, 0.65);
    font-size: 10px;
    line-height: 1;
    font-weight: 400;
    text-decoration: line-through;
}

/* Related products on product card.
 * Legacy style.css forces .block-d_shop_item_rel .gall-d__list to CSS Grid,
 * which breaks the existing DIAFAN/Swiper carousel. Restore only this slider
 * to Swiper flex layout; card appearance is reused from the category styles.
 */
.rd-related-products .gall-d__list {
    display: flex;
    grid-template-columns: none;
    gap: 0;
}

.rd-related-products .swiper-slide {
    height: auto;
}

.rd-related-products .rd-product-card {
    height: 100%;
}

/* Related products heading. */
.rd-related-products .block-d__name {
    margin-bottom: 10px;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 600;
}

@media (min-width: 768px) {
    .rd-related-products .block-d__name {
        font-size: 28px;
    }
}

/* Related products: keep Swiper navigation flush with the card area edges. */
.rd-related-products .swiper-button-prev {
    left: 0;
}

.rd-related-products .swiper-button-next {
    right: 0;
}

/* Product detail: normal price matches the compact "Цена по запросу" plate. */
.js_shop_id .pricelist-d__row strong {
    display: inline-flex;
    width: 220px;
    max-width: 100%;
    min-width: 0;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin-bottom: 10px;
    padding: 9px 14px;
    color: #fff;
    background: #0c274d;
    border-radius: 4px;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    text-align: center;
}

.js_shop_id .pricelist-d__row strong .price-d_basic,
.js_shop_id .pricelist-d__row strong .js_shop_price {
    color: inherit;
    font-size: inherit;
    line-height: inherit;
    font-weight: inherit;
}

/* Catalog/product pages: slightly more compact H1/H2 without touching other site sections. */
main h1 {
    font-size: 32px;
    line-height: 1.18;
}

main h2 {
    font-size: 26px;
    line-height: 1.22;
}

@media (max-width: 767px) {
    main h1 {
        font-size: 28px;
    }

    main h2 {
        font-size: 23px;
    }
}

/* RD product cards in catalog, brands, new products, related products:
   align with the shared quantity/cart/quick-order design from home.css.
   Specificity deliberately beats historical grid/request styles above. */
.rd-catalog-category
    .rd-product-card.rd-category-product
    .rd-product-card__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 11px;
    margin-top: auto;
    padding-top: 12px;
}

.rd-catalog-category
    .rd-product-card.rd-category-product
    .rd-product-card__price-group {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 0;
}

.rd-catalog-category
    .rd-product-card.rd-category-product
    .rd-product-card__price-current {
    display: inline-flex;
    width: auto;
    max-width: 100%;
    min-height: 0;
    justify-content: flex-start;
    padding: 0;
    color: #102a50;
    background: transparent;
    border-radius: 0;
    font-size: 19px;
    line-height: 1.2;
    font-weight: 700;
    white-space: normal;
}

.rd-catalog-category
    .rd-product-card.rd-category-product
    .rd-product-card__price-current--request {
    width: auto;
    min-width: 0;
    max-width: 100%;
    min-height: 34px;
    justify-content: center;
    padding: 7px 12px;
    color: #fff;
    background: #0c274d;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    white-space: normal;
}

.rd-catalog-category
    .rd-product-card.rd-category-product
    .rd-product-card__buy-controls {
    display: grid;
    grid-column: auto;
    grid-row: auto;
    justify-self: stretch;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 42px 42px;
    align-items: stretch;
    justify-content: stretch;
    gap: 7px;
}

.rd-catalog-category
    .rd-product-card.rd-category-product
    .rd-product-card__cart,
.rd-catalog-category
    .rd-product-card.rd-category-product
    .rd-product-card__cart.btn-buys {
    width: 42px;
    min-width: 42px;
    max-width: 42px;
    height: 42px;
    min-height: 42px;
    background: #f31d2c;
}

.rd-catalog-category
    .rd-product-card.rd-category-product
    .rd-product-card__article {
    display: none;
}

@media (max-width: 399px) {
    .rd-catalog-category
        .rd-product-card.rd-category-product
        .rd-product-card__buy-controls {
        grid-template-columns: minmax(0, 1fr) 38px 38px;
        gap: 5px;
    }
}

/* Old price stays legible when the normal price is no longer a blue plate. */
.rd-catalog-category
    .rd-product-card.rd-category-product
    .rd-product-card__price-current--with-old {
    height: auto;
    min-height: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 0;
}

.rd-catalog-category
    .rd-product-card.rd-category-product
    .rd-product-card__price-old--inside {
    color: #8d9aaa;
    font-size: 11px;
    font-weight: 400;
}

/* Keep stock directly below the name rather than after an artificial title height. */
.rd-catalog-category
    .rd-product-card.rd-category-product
    .rd-product-card__title {
    min-height: 0;
}

@media (max-width: 399px) {
    .rd-catalog-category
        .rd-product-card.rd-category-product
        .rd-product-card__cart,
    .rd-catalog-category
        .rd-product-card.rd-category-product
        .rd-product-card__cart.btn-buys {
        width: 38px;
        min-width: 38px;
        max-width: 38px;
    }
}
/* Быстрый заказ — убираем верхний отступ */
.rd-product-card__quick.js_shop_one_click {
    margin-top: 0;
}

/* Режим «Список» — компактный счётчик количества */
.rd-category-products._viewrows
    .rd-product-card__buy-controls
    .rd-product-card__quantity {
    flex: 0 0 170px;
    width: 170px;
    max-width: 170px;
}
