/**
 * Список товаров каталога: bitrix:catalog.section / bought_together.
 * Карточка: convers:catalog.item с шаблоном .default → разметка .cardService (не product-item).
 * Точка входа: .catalog-section--bhModern.
 */

.catalog-section--bhModern {
    --bh-cat-card-radius: 20px;
    --bh-cat-card-border: 1px solid rgba(255, 255, 255, 0.1);
    --bh-cat-card-bg: linear-gradient(
        168deg,
        rgba(28, 48, 78, 0.95) 0%,
        rgba(18, 30, 52, 0.97) 42%,
        rgba(11, 18, 32, 0.99) 100%
    );
    --bh-cat-card-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 40px rgba(0, 0, 0, 0.28);
    --bh-cat-accent: #fe9900;
    --bh-cat-accent-soft: rgba(254, 153, 0, 0.14);
    /* Фон превью: чуть светлее к центру — тогда растворение краёв img к фону видно глазом */
    --bh-cat-img-matte: rgb(10, 16, 28);
    --bh-cat-img-matte-mid: rgba(26, 42, 68, 0.55);
    /* «Окно» превью (mask intersect); без тяжёлого вертикального затемнения hero */
    --bh-cat-photo-mask-x: 5%;
    --bh-cat-photo-mask-y: 10%;
}

.catalog-section--bhModern .gallery_2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 22px 20px;
    justify-content: stretch;
    max-width: 1400px;
    margin: 0 auto;
    padding: 4px 8px 8px;
    box-sizing: border-box;
}

/* Меньше 3 карточек на странице — выравнивание по центру блока */
.catalog-section--bhModern.catalog-section--fewItems .gallery_2 {
    justify-content: center;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 320px));
}

/* Варианты без gallery_2 (bootstrap .row) */
.catalog-section--bhModern.catalog-section--fewItems .row[data-entity="items-row"] {
    justify-content: center;
}

.catalog-section--bhModern .gallery_2__item {
    box-sizing: border-box;
    max-width: none;
    width: auto;
    flex: none;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.catalog-section--bhModern.catalog-section--fewItems .gallery_2__item {
    justify-self: center;
    width: 100%;
    max-width: min(100%, 360px);
}

.catalog-section--bhModern .gallery_2__item .product-item-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* ========== .default / cardService (реальный вывод на boost-hub.com/catalog/...) ========== */

.catalog-section--bhModern .cardService {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 100%;
    border-radius: var(--bh-cat-card-radius);
    overflow: hidden;
    background: var(--bh-cat-card-bg);
    border: var(--bh-cat-card-border);
    box-shadow: var(--bh-cat-card-shadow);
    transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.catalog-section--bhModern .cardService--inCompare {
    box-shadow:
        inset 3px 0 0 0 var(--bh-focus-ring-color, #7fdefc),
        var(--bh-cat-card-shadow);
}

.catalog-section--bhModern .cardService:hover,
.catalog-section--bhModern .cardService:focus-within {
    border-color: rgba(254, 153, 0, 0.35);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 22px 50px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(254, 153, 0, 0.12);
}

.catalog-section--bhModern .cardService--inCompare:hover,
.catalog-section--bhModern .cardService--inCompare:focus-within {
    box-shadow:
        inset 3px 0 0 0 var(--bh-focus-ring-color, #7fdefc),
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 22px 50px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(254, 153, 0, 0.12);
}

/* Нажатие по карточке: не только смена цвета — внутренняя «вдавленность» */
.catalog-section--bhModern .cardService:active {
    box-shadow:
        inset 0 2px 14px rgba(0, 0, 0, 0.42),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        0 10px 24px rgba(0, 0, 0, 0.22);
}

.catalog-section--bhModern .cardService--inCompare:active {
    box-shadow:
        inset 3px 0 0 0 var(--bh-focus-ring-color, #7fdefc),
        inset 0 2px 14px rgba(0, 0, 0, 0.42),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        0 10px 24px rgba(0, 0, 0, 0.22);
}

/*
 * Превью: как Base Cart `wrapSectionHeader` — маска из двух linear-gradient + intersect,
 * поверх виньетка с тем же mask (см. catalog-base-cart-card.css).
 * <picture> из WebP-обработчика: оверлей на `picture::after`; без picture — на ссылке.
 */
.catalog-section--bhModern .cardService__img {
    position: relative;
    isolation: isolate;
    /* Иначе при scale у picture обрезаются края с виньеткой; скругление даёт .cardService (overflow: hidden) */
    overflow: visible;
    border-radius: calc(var(--bh-cat-card-radius) - 1px) calc(var(--bh-cat-card-radius) - 1px) 0 0;
    flex: 0 0 auto;
    max-height: none;
    aspect-ratio: 16 / 10;
    min-height: 172px;
    box-sizing: border-box;
    padding: 10px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bh-cat-img-matte);
    background-image: radial-gradient(
        ellipse 100% 95% at 50% 38%,
        var(--bh-cat-img-matte-mid) 0%,
        rgba(14, 22, 38, 0.92) 52%,
        var(--bh-cat-img-matte) 100%
    );
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.catalog-section--bhModern .cardService__img > picture {
    display: block;
    position: relative;
    z-index: 0;
    isolation: isolate;
    flex-shrink: 1;
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    /* При transform на picture иначе виньетка ::after может оказаться под слоем img */
    overflow: visible;
    transition: transform 0.22s ease;
}

.catalog-section--bhModern .cardService__img > picture::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    border-radius: inherit;
    /* Отдельный композитный слой поверх img при hover-scale */
    transform: translateZ(0);
    /* Те же слои, что `wrapSectionHeader::after` в Base Cart */
    background-image:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.32) 0%,
            rgba(0, 0, 0, 0.2) 14%,
            rgba(0, 0, 0, 0.1) 32%,
            transparent 58%
        ),
        linear-gradient(
            270deg,
            rgba(0, 0, 0, 0.32) 0%,
            rgba(0, 0, 0, 0.2) 14%,
            rgba(0, 0, 0, 0.1) 32%,
            transparent 58%
        ),
        linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.22) 0%,
            rgba(0, 0, 0, 0.14) 14%,
            rgba(0, 0, 0, 0.06) 30%,
            transparent 62%
        ),
        /* Лёгкий уход в матовый тон карточки по углам */
        radial-gradient(
            ellipse 100% 88% at 50% 50%,
            transparent 0%,
            transparent 42%,
            rgba(10, 16, 28, 0.45) 100%
        );
    -webkit-mask-image:
        linear-gradient(
            90deg,
            transparent 0%,
            #000 var(--bh-cat-photo-mask-x),
            #000 calc(100% - var(--bh-cat-photo-mask-x)),
            transparent 100%
        ),
        linear-gradient(
            180deg,
            transparent 0%,
            #000 var(--bh-cat-photo-mask-y),
            #000 calc(100% - var(--bh-cat-photo-mask-y)),
            transparent 100%
        );
    -webkit-mask-size: 100% 100%;
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(
            90deg,
            transparent 0%,
            #000 var(--bh-cat-photo-mask-x),
            #000 calc(100% - var(--bh-cat-photo-mask-x)),
            transparent 100%
        ),
        linear-gradient(
            180deg,
            transparent 0%,
            #000 var(--bh-cat-photo-mask-y),
            #000 calc(100% - var(--bh-cat-photo-mask-y)),
            transparent 100%
        );
    mask-size: 100% 100%;
    mask-position: center;
    mask-repeat: no-repeat;
    mask-composite: intersect;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}

/* Разметка без <picture>: виньетка на ссылке */
.catalog-section--bhModern .cardService__img::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    border-radius: inherit;
    transform: translateZ(0);
    background-image:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.32) 0%,
            rgba(0, 0, 0, 0.2) 14%,
            rgba(0, 0, 0, 0.1) 32%,
            transparent 58%
        ),
        linear-gradient(
            270deg,
            rgba(0, 0, 0, 0.32) 0%,
            rgba(0, 0, 0, 0.2) 14%,
            rgba(0, 0, 0, 0.1) 32%,
            transparent 58%
        ),
        linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.22) 0%,
            rgba(0, 0, 0, 0.14) 14%,
            rgba(0, 0, 0, 0.06) 30%,
            transparent 62%
        ),
        radial-gradient(
            ellipse 100% 88% at 50% 50%,
            transparent 0%,
            transparent 42%,
            rgba(10, 16, 28, 0.45) 100%
        );
    -webkit-mask-image:
        linear-gradient(
            90deg,
            transparent 0%,
            #000 var(--bh-cat-photo-mask-x),
            #000 calc(100% - var(--bh-cat-photo-mask-x)),
            transparent 100%
        ),
        linear-gradient(
            180deg,
            transparent 0%,
            #000 var(--bh-cat-photo-mask-y),
            #000 calc(100% - var(--bh-cat-photo-mask-y)),
            transparent 100%
        );
    -webkit-mask-size: 100% 100%;
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(
            90deg,
            transparent 0%,
            #000 var(--bh-cat-photo-mask-x),
            #000 calc(100% - var(--bh-cat-photo-mask-x)),
            transparent 100%
        ),
        linear-gradient(
            180deg,
            transparent 0%,
            #000 var(--bh-cat-photo-mask-y),
            #000 calc(100% - var(--bh-cat-photo-mask-y)),
            transparent 100%
        );
    mask-size: 100% 100%;
    mask-position: center;
    mask-repeat: no-repeat;
    mask-composite: intersect;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}

/* Двойная виньетка не нужна: при <picture> оверлей только на нём */
.catalog-section--bhModern .cardService__img:has(> picture)::after {
    content: none;
    display: none;
}

.catalog-section--bhModern .cardService__img img {
    position: relative;
    z-index: 0;
    width: auto !important;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    flex-shrink: 1;
    box-sizing: border-box;
    transform: none;
    transition: transform 0.22s ease;
    border-radius: 8px;
    /* Как `wrapSectionHeader::before` в Base Cart: «окно» превью с intersect-маской */
    -webkit-mask-image:
        linear-gradient(
            90deg,
            transparent 0%,
            #000 var(--bh-cat-photo-mask-x),
            #000 calc(100% - var(--bh-cat-photo-mask-x)),
            transparent 100%
        ),
        linear-gradient(
            180deg,
            transparent 0%,
            #000 var(--bh-cat-photo-mask-y),
            #000 calc(100% - var(--bh-cat-photo-mask-y)),
            transparent 100%
        );
    -webkit-mask-size: 100% 100%;
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(
            90deg,
            transparent 0%,
            #000 var(--bh-cat-photo-mask-x),
            #000 calc(100% - var(--bh-cat-photo-mask-x)),
            transparent 100%
        ),
        linear-gradient(
            180deg,
            transparent 0%,
            #000 var(--bh-cat-photo-mask-y),
            #000 calc(100% - var(--bh-cat-photo-mask-y)),
            transparent 100%
        );
    mask-size: 100% 100%;
    mask-position: center;
    mask-repeat: no-repeat;
    mask-composite: intersect;
}

/* main.css: .cardService:hover .cardService__img img { scale(1.15) } — сбрасываем; зум только на <picture> */
.catalog-section--bhModern .cardService:hover .cardService__img img,
.catalog-section--bhModern .cardService:focus-within .cardService__img img,
.catalog-section--bhModern .cardService:focus .cardService__img img {
    transform: none;
}

.catalog-section--bhModern .cardService:hover .cardService__img > picture,
.catalog-section--bhModern .cardService:focus-within .cardService__img > picture {
    transform: scale(1.05);
}

/* Разметка без <picture>: зум только у img (перебивает сброс выше) */
.catalog-section--bhModern .cardService:hover .cardService__img:not(:has(> picture)) img,
.catalog-section--bhModern .cardService:focus-within .cardService__img:not(:has(> picture)) img {
    transform: scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
    .catalog-section--bhModern .cardService__img > picture,
    .catalog-section--bhModern .cardService__img img {
        transition: none !important;
    }

    .catalog-section--bhModern .cardService:hover .cardService__img > picture,
    .catalog-section--bhModern .cardService:focus-within .cardService__img > picture,
    .catalog-section--bhModern .cardService:hover .cardService__img:not(:has(> picture)) img,
    .catalog-section--bhModern .cardService:focus-within .cardService__img:not(:has(> picture)) img {
        transform: none !important;
    }
}

.catalog-section--bhModern .cardService__sticker {
    top: 10px;
    right: 10px;
    left: auto;
    bottom: auto;
    /* Выше виньетки (picture::after / a::after z-index: 2); ниже title в .cardService__info */
    z-index: 3;
    width: auto;
    max-width: calc(100% - 20px);
    min-width: 48px;
    height: auto;
    max-height: 28px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--bh-cat-accent-soft) !important;
    background-image: none !important;
    color: var(--bh-cat-accent);
    border: 1px solid rgba(254, 153, 0, 0.4);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    line-height: 1;
    justify-content: center;
    pointer-events: none;
    box-sizing: border-box;
}

.catalog-section--bhModern .cardService__info {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    flex-wrap: nowrap;
    /* Base Cart / PM: плотнее к mw__content 1.25rem и заголовкам карточки */
    padding: 18px 20px 20px;
    background: rgba(10, 16, 28, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.catalog-section--bhModern .cardService__ttl,
.catalog-section--bhModern .cardService__ttl:visited {
    width: auto;
    flex: 0 0 auto;
    margin: 0 0 10px;
    /* было 1.8rem в legacy cardService — ближе к pmProductDesc / карточке */
    font-size: clamp(1.42rem, 2.1vw, 1.65rem);
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.94);
}

.catalog-section--bhModern .cardService__ttl:hover {
    color: var(--bh-cat-accent);
}

.catalog-section--bhModern .cardService__ttl:focus-visible {
    color: var(--bh-cat-accent);
    outline: var(--bh-focus-ring-width, 2px) solid var(--bh-focus-ring-color, #7fdefc);
    outline-offset: var(--bh-focus-ring-offset, 2px);
    border-radius: 10px;
    box-shadow: 0 0 0 4px var(--bh-focus-ring-soft, rgba(127, 222, 252, 0.28));
}

.catalog-section--bhModern .cardService__img:focus-visible {
    outline: var(--bh-focus-ring-width, 2px) solid var(--bh-focus-ring-color, #7fdefc);
    outline-offset: 3px;
    border-radius: 12px;
    box-shadow: 0 0 0 4px var(--bh-focus-ring-soft, rgba(127, 222, 252, 0.28));
}

.catalog-section--bhModern .cardService__desc {
    flex: 1 1 auto;
    width: auto;
    margin: 0 0 14px;
    /* Base Cart: .pmMissionProtoPage--baseCart .pmPageCard__lead ~1.3rem; список — читабельный основной текст */
    font-size: clamp(1.12rem, 1.65vw, 1.28rem);
    line-height: 1.48;
    color: rgba(255, 255, 255, 0.82);
}

.catalog-section--bhModern .cardService__desc ul,
.catalog-section--bhModern .cardService__desc ol {
    margin: 0.35em 0 0;
    padding-left: 1.15em;
}

.catalog-section--bhModern .cardService__desc li {
    margin: 0.28em 0;
    color: rgba(255, 255, 255, 0.8);
}

.catalog-section--bhModern .cardService__desc strong {
    color: rgba(255, 255, 255, 0.94);
}

.catalog-section--bhModern .cardService__price {
    flex: 0 0 auto;
    width: auto;
    margin: 0 0 14px;
    font-size: clamp(1.38rem, 2vw, 1.65rem);
    font-weight: 800;
    color: var(--bh-cat-accent);
}

.catalog-section--bhModern .cardService__price span {
    color: inherit;
}

/* CTA: как `btnToCart bhPremiumCartBtn` (bh-premium-cart-btn.css); перебиваем legacy main.css .cardService__link */
.catalog-section--bhModern .cardService__link.btnToCart.bhPremiumCartBtn,
.catalog-section--bhModern .cardService__link.btnToCart.bhPremiumCartBtn:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: none;
    flex: 0 0 auto;
    margin: 0;
    margin-top: auto;
    text-decoration: none;
    box-sizing: border-box;
    color: rgba(255, 235, 200, 0.96);
}

.catalog-section--bhModern .cardService__link.btnToCart.bhPremiumCartBtn:hover,
.catalog-section--bhModern .cardService__link.btnToCart.bhPremiumCartBtn:focus-visible {
    text-decoration: none;
}

/* ========== convers / bought_together (product-item) — на случай другого шаблона ========== */

.catalog-section--bhModern .product-item {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
    border-radius: var(--bh-cat-card-radius);
    overflow: hidden;
    background: var(--bh-cat-card-bg);
    border: var(--bh-cat-card-border);
    box-shadow: var(--bh-cat-card-shadow);
    transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.catalog-section--bhModern .product-item:hover,
.catalog-section--bhModern .product-item:focus-within {
    border-color: rgba(254, 153, 0, 0.35);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 22px 50px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(254, 153, 0, 0.12);
}

.catalog-section--bhModern .product-item:active {
    box-shadow:
        inset 0 2px 14px rgba(0, 0, 0, 0.42),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        0 10px 24px rgba(0, 0, 0, 0.22);
}

/* Превью-картинка: фиксированное соотношение, скругление только сверху у блока */
.catalog-section--bhModern .product-item-image-wrapper {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    min-height: 168px;
    border-radius: 0;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.catalog-section--bhModern .product-item-image-slider-slide-container,
.catalog-section--bhModern .product-item-image-original,
.catalog-section--bhModern .product-item-image-alternative,
.catalog-section--bhModern .product-item-image-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.catalog-section--bhModern .product-item-image-slider-control-container {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    z-index: 3;
}

.catalog-section--bhModern .product-item-label-ring,
.catalog-section--bhModern .product-item-label-text {
    z-index: 4;
}

.catalog-section--bhModern .product-item-image-original,
.catalog-section--bhModern .product-item-image-slide,
.catalog-section--bhModern .product-item-image-alternative {
    background-size: cover !important;
    background-position: center !important;
}

.catalog-section--bhModern .product-item-title {
    margin: 0;
    padding: 16px 18px 6px;
    font-family: var(--bh-font-sans, "Inter", system-ui, sans-serif);
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.94);
}

.catalog-section--bhModern .product-item-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

.catalog-section--bhModern .product-item-title a:hover {
    color: var(--bh-cat-accent);
}

.catalog-section--bhModern .product-item-title a:focus-visible {
    color: var(--bh-cat-accent);
    outline: var(--bh-focus-ring-width, 2px) solid var(--bh-focus-ring-color, #7fdefc);
    outline-offset: var(--bh-focus-ring-offset, 2px);
    border-radius: 8px;
    box-shadow: 0 0 0 4px var(--bh-focus-ring-soft, rgba(127, 222, 252, 0.28));
}

.catalog-section--bhModern a.product-item-image-wrapper:focus-visible {
    outline: var(--bh-focus-ring-width, 2px) solid var(--bh-focus-ring-color, #7fdefc);
    outline-offset: 3px;
    border-radius: 10px;
    box-shadow: 0 0 0 4px var(--bh-focus-ring-soft, rgba(127, 222, 252, 0.28));
}

/* Краткое описание (анонс) под заголовком */
.catalog-section--bhModern .bhCatalogCard__preview {
    flex: 1 1 auto;
    padding: 0 18px 12px;
    font-family: var(--bh-font-sans, "Inter", system-ui, sans-serif);
    font-size: 0.92rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.74);
}

.catalog-section--bhModern .bhCatalogCard__preview ul,
.catalog-section--bhModern .bhCatalogCard__preview ol {
    margin: 0.35em 0 0;
    padding-left: 1.15em;
}

.catalog-section--bhModern .bhCatalogCard__preview li {
    margin: 0.2em 0;
}

.catalog-section--bhModern .bhCatalogCard__preview strong {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 700;
}

.catalog-section--bhModern .bhCatalogCard__preview p {
    margin: 0.35em 0 0;
}

.catalog-section--bhModern .bhCatalogCard__preview p:first-child {
    margin-top: 0;
}

/* Цена */
.catalog-section--bhModern .product-item-price-container {
    margin-top: auto;
    padding: 4px 18px 4px;
}

.catalog-section--bhModern .product-item-price-current {
    font-family: var(--bh-font-sans, "Inter", system-ui, sans-serif);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--bh-cat-accent);
    letter-spacing: -0.02em;
}

.catalog-section--bhModern .product-item-price-old {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.45);
}

/* HIT / стикеры */
.catalog-section--bhModern .product-item-label-text {
    top: 12px;
    left: 12px;
    right: auto;
}

.catalog-section--bhModern .product-item-label-text > div span {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: var(--bh-cat-accent-soft);
    color: var(--bh-cat-accent);
    border: 1px solid rgba(254, 153, 0, 0.35);
}

/* Кнопка «Select option» / в корзину */
.catalog-section--bhModern .product-item-button-container {
    padding: 10px 18px 18px;
}

.catalog-section--bhModern .product-item-button-container .btn.btn-primary {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 10px 18px;
    border-radius: 999px;
    font-family: var(--bh-font-sans, "Inter", system-ui, sans-serif);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    border: none;
    background: linear-gradient(180deg, #ffb84d 0%, var(--bh-cat-accent) 55%, #e08800 100%);
    color: #111;
    box-shadow: 0 8px 22px rgba(254, 153, 0, 0.28);
    transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.catalog-section--bhModern .product-item-button-container .btn.btn-primary:hover,
.catalog-section--bhModern .product-item-button-container .btn.btn-primary:focus-visible {
    filter: brightness(1.06);
    transform: none;
    box-shadow: 0 10px 26px rgba(254, 153, 0, 0.36);
    color: #111;
}

.catalog-section--bhModern .product-item-button-container .btn.btn-primary:active {
    filter: brightness(0.97);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35), 0 4px 14px rgba(254, 153, 0, 0.22);
}

.catalog-section--bhModern .product-item-button-container .btn.btn-link {
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.55);
}

.catalog-section--bhModern .product-item-compare-container {
    padding: 0 18px 12px;
    opacity: 0.85;
}

.catalog-section--bhModern .product-item-compare .checkbox label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
}

/* Слайдер-точки на превью */
.catalog-section--bhModern .product-item-image-slider-control.active {
    background: var(--bh-cat-accent);
    border-color: rgba(254, 153, 0, 0.6);
}

@media (max-width: 520px) {
    .catalog-section--bhModern .gallery_2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 8px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .catalog-section--bhModern.catalog-section--fewItems .gallery_2 {
        justify-items: stretch;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .catalog-section--bhModern.catalog-section--fewItems .gallery_2__item {
        max-width: none;
        justify-self: stretch;
    }

    /* Compact card for 2-column mobile */
    .catalog-section--bhModern .cardService {
        border-radius: 14px;
    }

    .catalog-section--bhModern .cardService__img {
        min-height: 0;
        aspect-ratio: 1 / 1;
        padding: 6px;
        border-radius: 13px 13px 0 0;
    }

    /* HIT stays inside image tile — never overlaps title in 2-col */
    .catalog-section--bhModern .cardService__img {
        overflow: hidden;
    }

    .catalog-section--bhModern .cardService__sticker {
        top: 6px;
        right: 6px;
        min-width: 0;
        max-width: calc(100% - 12px);
        max-height: 22px;
        padding: 3px 7px;
        font-size: 9px;
        letter-spacing: 0.04em;
    }

    .catalog-section--bhModern .cardService__info {
        padding: 10px 10px 12px;
        position: relative;
        z-index: 1;
    }

    .catalog-section--bhModern .cardService__ttl,
    .catalog-section--bhModern .cardService__ttl:visited {
        margin: 0 0 6px;
        font-size: 1.2rem;
        line-height: 1.25;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        position: relative;
        z-index: 1;
    }

    .catalog-section--bhModern .cardService__desc {
        display: none;
    }

    .catalog-section--bhModern .cardService__price {
        margin: 0 0 8px;
        font-size: 1.2rem;
    }

    .catalog-section--bhModern .cardService__link.btnToCart.bhPremiumCartBtn,
    .catalog-section--bhModern .cardService__link.btnToCart.bhPremiumCartBtn:visited {
        min-height: 36px;
        padding: 0 8px;
        font-size: 1.1rem;
        border-radius: 10px;
    }
}

/* main.css задаёт .gallery_2__item { width: 50% } и { width: 300px } в медиа — ломает CSS grid */
@media screen and (max-width: 1230px) {
    .catalog-section--bhModern .gallery_2__item {
        width: auto !important;
        max-width: none !important;
    }

    .catalog-section--bhModern.catalog-section--fewItems .gallery_2__item {
        max-width: min(100%, 360px) !important;
    }
}

@media screen and (max-width: 680px) {
    .catalog-section--bhModern .gallery_2__item {
        width: auto !important;
        max-width: none !important;
    }

    .catalog-section--bhModern.catalog-section--fewItems .gallery_2__item {
        max-width: min(100%, 360px) !important;
    }
}
