/*
 * «Онлайн-кассы»: верх раздела и панель управления.
 * Применяется также на страницах пагинации.
 */

.center:has(> .fiji-catalog-hero) {
    position: relative;
}

/* Хлебные крошки */
.center:has(> .fiji-catalog-hero) > .breadcrumps {
    position: absolute;
    z-index: 3;
    top: 14px;
    left: 0;
    right: 0;
    max-width: 100%;
    margin: 0;
    padding: 0;
    color: #0086d1;
    font: 800 11px/1.7 "Segoe UI", Arial, sans-serif;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.center:has(> .fiji-catalog-hero) > .breadcrumps ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.center:has(> .fiji-catalog-hero) > .breadcrumps li {
    float: none;
    display: block;
    max-width: 100%;
    margin: 0;
    padding: 0;
    color: inherit;
    font: inherit;
    overflow-wrap: anywhere;
}

.center:has(> .fiji-catalog-hero) > .breadcrumps li::before,
.center:has(> .fiji-catalog-hero) > .breadcrumps li::after {
    content: none;
}

.center:has(> .fiji-catalog-hero) > .breadcrumps li + li::before {
    content: "›";
    display: inline-block;
    margin-right: 12px;
    color: #0086d1;
}

.center:has(> .fiji-catalog-hero) > .breadcrumps a {
    color: #0086d1;
    font: inherit;
    text-decoration: none;
}

.center:has(> .fiji-catalog-hero) > .breadcrumps a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.center:has(> .fiji-catalog-hero) > .breadcrumps a:focus-visible {
    outline: 2px solid #0086d1;
    outline-offset: 4px;
}

/* Верх раздела */
.fiji-catalog-hero {
    position: relative;
    isolation: isolate;
    clear: both;
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0 0 28px;
    padding: 52px 0 22px;
    box-sizing: border-box;
    border: 0;
    border-radius: 0;
    background: #f2f9ff;
    color: #10254b;
    font-family: "Segoe UI", Arial, sans-serif;
    box-shadow: 0 0 0 100vmax #f2f9ff;
    clip-path: inset(0 -100vmax);
}

.fiji-catalog-hero *,
.fiji-catalog-hero *::before,
.fiji-catalog-hero *::after {
    box-sizing: border-box;
}

.fiji-catalog-hero__layout {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    min-height: 110px;
}

.fiji-catalog-hero__layout::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -52px;
    right: 160px;
    width: 615px;
    max-width: 65%;
    height: 147px;
    background-image: url("/local/templates/fijiservice/components/bitrix/catalog.section/main_products_2026/assets/reference.png");
    background-position: 64.085% 2.259%;
    background-size: 262.826% 703.636%;
    background-repeat: no-repeat;
    opacity: .8;
    pointer-events: none;

    -webkit-mask-image:
        linear-gradient(
            90deg,
            transparent,
            #000 17%,
            #000 78%,
            transparent
        ),
        linear-gradient(
            to bottom,
            #000 67%,
            transparent
        );
    -webkit-mask-composite: source-in;

    mask-image:
        linear-gradient(
            90deg,
            transparent,
            #000 17%,
            #000 78%,
            transparent
        ),
        linear-gradient(
            to bottom,
            #000 67%,
            transparent
        );
    mask-composite: intersect;
}

.fiji-catalog-hero__text {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 570px;
}

.fiji-catalog-hero .fiji-catalog-hero__title {
    float: none;
    display: block;
    width: auto;
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: #10254b;
    font: 800 36px/1.08 Arial, Helvetica, sans-serif;
    letter-spacing: -1.2px;
    text-align: left;
    text-transform: none;
    overflow-wrap: anywhere;
}

.fiji-catalog-hero .fiji-catalog-hero__tagline {
    margin: 0;
    padding: 0;
    color: #7584ac;
    font: 400 20px/1.45 "Segoe UI", Arial, sans-serif;
    letter-spacing: normal;
    text-align: left;
}

.fiji-catalog-hero__side {
    position: relative;
    align-self: stretch;
    flex: 0 1 40%;
    min-width: 0;
}

.fiji-catalog-hero__signature {
    position: absolute;
    top: calc(50% - 15px);
    right: -110px;
    width: 270px;
    margin: 0;
    padding: 0;
    color: #258bff;
    font: italic 400 23px/1.25 "Segoe Print", "Comic Sans MS", cursive;
    text-align: center;
    transform: translateY(-50%) rotate(-9deg);
    pointer-events: none;
}

.fiji-catalog-hero__signature::after {
    content: "";
    display: block;
    width: 140px;
    height: 0;
    margin: 8px auto 0;
    border-top: 2px solid #258bff;
    transform: rotate(-8deg);
}

/* Пустой контейнер подразделов */
.center:has(> .fiji-catalog-hero)
    > .catalog-sections-grid:not(:has(*)) {
    display: none;
    margin: 0;
    padding: 0;
}

/* Панель сортировки и производителей */
.center:has(> .fiji-catalog-hero) > .container-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    float: none;
    width: 100%;
    min-height: 44px;
    margin: 18px 0 0;
    padding: 0;
    box-sizing: border-box;
}

.center:has(> .fiji-catalog-hero) > .container-panel::before,
.center:has(> .fiji-catalog-hero) > .container-panel::after {
    content: none;
}

/* Упорядочить → по цене */
.center:has(> .fiji-catalog-hero) > .container-panel > .left {
    display: flex;
    align-items: center;
    gap: 9px;
    float: none;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    font: 400 13px/1.4 "Segoe UI", Arial, sans-serif;
}

.center:has(> .fiji-catalog-hero) > .container-panel > .left p {
    margin: 0;
    padding: 0;
    color: #60778e;
    font: inherit;
    white-space: nowrap;
}

.center:has(> .fiji-catalog-hero) > .container-panel > .left p::after {
    content: "→";
    margin-left: 9px;
    color: #9bb3c5;
}

.center:has(> .fiji-catalog-hero) > .container-panel > .left a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin: 0;
    padding: 0;
    color: #0086d1;
    font: 600 13px/1.4 "Segoe UI", Arial, sans-serif;
    text-decoration: none;
    white-space: nowrap;
}

.center:has(> .fiji-catalog-hero) > .container-panel > .left a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Сохраняем действующий значок направления сортировки */
.center:has(> .fiji-catalog-hero) > .container-panel > .left a img {
    display: block;
    width: 14px;
    height: 14px;
    object-fit: contain;
}

/* Производитель */
.center:has(> .fiji-catalog-hero) > .container-panel > .right {
    float: none;
    flex: 0 0 262px;
    width: 262px;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.center:has(> .fiji-catalog-hero) > .container-panel .select {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    font: 400 13px/1.4 "Segoe UI", Arial, sans-serif;
}

.center:has(> .fiji-catalog-hero) > .container-panel .text-select {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin: 0;
    padding: 0 28px 0 2px;
    box-sizing: border-box;
    border: 0;
    border-bottom: 1px solid #cbdfed;
    border-radius: 0;
    background: transparent;
    color: #385570;
    font: inherit;
    cursor: pointer;
}

/*
 * Не задаём display для списка:
 * открытием и закрытием управляет существующий скрипт сайта.
 */
.center:has(> .fiji-catalog-hero) > .container-panel .list-select {
    z-index: 30;
    top: 100%;
    left: auto;
    right: 0;
    width: 100%;
    min-width: 180px;
    max-height: 300px;
    margin: 6px 0 0;
    padding: 6px;
    overflow-y: auto;
    box-sizing: border-box;
    border: 1px solid #dceaf5;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(16, 37, 75, .12);
}

.center:has(> .fiji-catalog-hero) > .container-panel .list-select a {
    display: block;
    margin: 0;
    padding: 10px 12px;
    border-radius: 7px;
    color: #385570;
    font: 400 13px/1.4 "Segoe UI", Arial, sans-serif;
    text-decoration: none;
}

.center:has(> .fiji-catalog-hero) > .container-panel .list-select a:hover {
    background: #edf7ff;
    color: #0086d1;
}

.center:has(> .fiji-catalog-hero) > .container-panel a:focus-visible {
    outline: 2px solid #0086d1;
    outline-offset: 3px;
}

/* Расстояние от панели до карточек */
.center:has(> .fiji-catalog-hero) > .fiji-catalog-2026 {
    margin-top: 14px;
    padding-top: 0;
}

/* Планшеты и небольшие компьютеры */
@media (max-width: 1150px) {
    .fiji-catalog-hero__layout::before {
        right: 100px;
        width: 480px;
    }

    .fiji-catalog-hero__text {
        max-width: 55%;
    }

    .fiji-catalog-hero__signature {
        right: 0;
        width: 235px;
        font-size: 21px;
    }
}

/* Мобильная версия */
@media (max-width: 800px) {
    .center:has(> .fiji-catalog-hero) > .breadcrumps {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 10px 0 9px;
        box-sizing: border-box;
        color: #0086d1;
        font: 600 10px/1.5 "Segoe UI", Arial, sans-serif;
        letter-spacing: .4px;
        text-transform: uppercase;
        background: #f2f9ff;
        box-shadow: 0 0 0 100vmax #f2f9ff;
        clip-path: inset(0 -100vmax);
    }

    .center:has(> .fiji-catalog-hero) > .breadcrumps ul {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 3px 7px;
        margin: 0;
        padding: 0;
        font: inherit;
        letter-spacing: inherit;
    }

    .center:has(> .fiji-catalog-hero) > .breadcrumps li,
    .center:has(> .fiji-catalog-hero) > .breadcrumps a {
        font: inherit;
        letter-spacing: inherit;
        line-height: 1.5;
    }

    .center:has(> .fiji-catalog-hero) > .breadcrumps li + li::before {
        margin-right: 7px;
    }

    .fiji-catalog-hero {
        margin: 0 0 12px;
        padding: 4px 0 18px;
        overflow: hidden;
        border: 0;
        border-radius: 0;
    }

    .fiji-catalog-hero__layout {
        display: flex;
        align-items: center;
        min-height: 118px;
        margin: 0;
        padding: 0;
    }

    /* Изображение справа с плавным исчезновением */
    .fiji-catalog-hero__layout::before {
        content: "";
        display: block;
        position: absolute;
        z-index: -1;
        top: -8px;
        right: -80px;
        width: 300px;
        max-width: none;
        height: 140px;

        background-image: url("/local/templates/fijiservice/components/bitrix/catalog.section/main_products_2026/assets/reference.png");
        background-position: 64.085% 2.259%;
        background-size: 262.826% 703.636%;
        background-repeat: no-repeat;

        opacity: .62;
        pointer-events: none;

        -webkit-mask-image:
            linear-gradient(
                90deg,
                transparent 0%,
                rgba(0, 0, 0, .12) 35%,
                #000 76%
            ),
            linear-gradient(
                to bottom,
                #000 65%,
                transparent
            );
        -webkit-mask-composite: source-in;

        mask-image:
            linear-gradient(
                90deg,
                transparent 0%,
                rgba(0, 0, 0, .12) 35%,
                #000 76%
            ),
            linear-gradient(
                to bottom,
                #000 65%,
                transparent
            );
        mask-composite: intersect;
    }

    .fiji-catalog-hero__text {
        position: relative;
        z-index: 1;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    .fiji-catalog-hero .fiji-catalog-hero__title {
        margin: 0 0 8px;
        font-size: 28px;
        line-height: 1.12;
        letter-spacing: -.8px;
    }

    .fiji-catalog-hero .fiji-catalog-hero__tagline {
        max-width: 245px;
        margin: 0;
        font-size: 15px;
        line-height: 1.45;
    }

    .fiji-catalog-hero__side {
        display: none;
    }

    /* Сортировка и производитель в одном ряду */
    .center:has(> .fiji-catalog-hero) > .container-panel {
        gap: 12px;
        min-height: 44px;
        margin: 12px 0 0;
    }

    .center:has(> .fiji-catalog-hero) > .container-panel > .left {
        flex: 0 0 auto;
        gap: 5px;
        font-size: 10px;
    }

    .center:has(> .fiji-catalog-hero) > .container-panel > .left p::after {
        margin-left: 5px;
    }

    .center:has(> .fiji-catalog-hero) > .container-panel > .left a {
        font-size: 10px;
    }

    .center:has(> .fiji-catalog-hero) > .container-panel > .left a img {
        width: 12px;
        height: 12px;
    }

    .center:has(> .fiji-catalog-hero) > .container-panel > .right {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }

    .center:has(> .fiji-catalog-hero) > .container-panel .select {
        font-size: 11px;
    }

    .center:has(> .fiji-catalog-hero) > .fiji-catalog-2026 {
        margin-top: 12px;
        padding-top: 0;
    }

    /* Только кнопка чата, без автоматического приветствия */
    body:has(.fiji-catalog-hero) .b24-widget-button-popup {
        display: none !important;
    }
}

/* Узкие телефоны */
@media (max-width: 374px) {
    .center:has(> .fiji-catalog-hero) > .breadcrumps {
        font-size: 9px;
        letter-spacing: .2px;
    }

    .fiji-catalog-hero .fiji-catalog-hero__title {
        font-size: 26px;
    }

    .fiji-catalog-hero .fiji-catalog-hero__tagline {
        max-width: 225px;
        font-size: 14px;
    }
}
/* Стрелка выбора производителя только в «Онлайн-кассах» */
.center:has(> .fiji-catalog-hero)
    > .container-panel .text-select {
    position: relative;
}

.center:has(> .fiji-catalog-hero)
    > .container-panel .text-select::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 8px;
    width: 7px;
    height: 7px;
    border: solid #0086d1;
    border-width: 0 2px 2px 0;
    background: none;
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}
/* Убираем лишний отступ после верха раздела */
.center:has(> .fiji-catalog-hero) > .fiji-catalog-hero {
    margin-bottom: 0;
}

.center:has(> .fiji-catalog-hero) > .container-panel {
    margin: 12px 0 0;
}

/* Убираем внешнюю линию и старую фиксированную высоту */
.center:has(> .fiji-catalog-hero) > .container-panel .select {
    height: auto;
    min-height: 0;
    border: 0;
    box-shadow: none;
}

/* Оставляем одну линию под производителем */
.center:has(> .fiji-catalog-hero) > .container-panel .text-select {
    position: relative;
    height: auto;
    min-height: 44px;
    border: 0;
    border-bottom: 1px solid #cbdfed;
    box-shadow: none;
}

/* Синяя стрелка */
.center:has(> .fiji-catalog-hero)
    > .container-panel .text-select::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 8px;
    width: 7px;
    height: 7px;
    border: solid #0086d1;
    border-width: 0 2px 2px 0;
    background: none;
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}
@media (max-width: 800px) {
    .center:has(> .fiji-catalog-hero)
        > .container-panel > .right {
        margin-left: auto;
    }

    .center:has(> .fiji-catalog-hero)
        > .container-panel .text-select {
        justify-content: flex-end;
        padding-right: 28px;
        text-align: right;
    }
}
/* Светло-голубой фон только в разделе «Онлайн-кассы» */
.content:has(.fiji-catalog-hero),
.block-catalog:has(.fiji-catalog-hero) {
    background: #f2f9ff;
}

/* Убираем прежний градиент за карточками */
.center:has(> .fiji-catalog-hero) > .fiji-catalog-2026 {
    background: transparent;
}
/* Фон панели и выбора производителя */
.center:has(> .fiji-catalog-hero) > .container-panel,
.center:has(> .fiji-catalog-hero) > .container-panel > .right,
.center:has(> .fiji-catalog-hero) > .container-panel .select,
.center:has(> .fiji-catalog-hero) > .container-panel .text-select {
    background: #f2f9ff;
}
@media (min-width: 801px) {
    .center:has(> .fiji-catalog-hero)
        > .container-panel > .right {
        margin-left: auto;
    }

    .center:has(> .fiji-catalog-hero)
        > .container-panel .text-select {
        justify-content: flex-end;
        padding-right: 28px;
        text-align: right;
    }
}
/* Современная пагинация только в «Онлайн-кассах» */
body:has(.fiji-catalog-hero) .pagination {
    clear: both;
    margin: 24px 0 30px;
    padding: 0;
    background: transparent;
}

body:has(.fiji-catalog-hero) .pagination ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

body:has(.fiji-catalog-hero) .pagination li {
    float: none;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    list-style: none;
}

body:has(.fiji-catalog-hero) .pagination li::before,
body:has(.fiji-catalog-hero) .pagination li::after {
    content: none;
}

body:has(.fiji-catalog-hero) .pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    margin: 0;
    padding: 0 14px;
    box-sizing: border-box;
    border: 1px solid #d5e8f6;
    border-radius: 13px;
    background: #fff;
    color: #315577;
    font: 600 14px/1 "Segoe UI", Arial, sans-serif;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(25, 87, 130, .06);
    transition:
        background-color .2s ease,
        border-color .2s ease,
        color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

body:has(.fiji-catalog-hero) .pagination a.active {
    border-color: #0086d1;
    background: #0086d1;
    color: #fff;
    box-shadow: 0 6px 15px rgba(0, 134, 209, .22);
    cursor: default;
}

body:has(.fiji-catalog-hero) .pagination a:focus-visible {
    outline: 3px solid #75c9f4;
    outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
    body:has(.fiji-catalog-hero)
        .pagination a:not(.active):hover {
        transform: translateY(-2px);
        border-color: #7fc9ee;
        background: #edf8ff;
        color: #007bbd;
        box-shadow: 0 7px 16px rgba(25, 87, 130, .12);
    }
}

@media (max-width: 767px) {
    body:has(.fiji-catalog-hero) .pagination {
        margin: 20px 0 24px;
    }

    body:has(.fiji-catalog-hero) .pagination ul {
        gap: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body:has(.fiji-catalog-hero) .pagination a {
        transition: none;
    }

    body:has(.fiji-catalog-hero) .pagination a:hover {
        transform: none;
    }
}