:root {
    --brand-red-product: #CC323D;
    --brand-blue-product: #2970AA;
    --brand-gradient-product: linear-gradient(135deg, var(--brand-red-product), var(--brand-blue-product));

    --catalog-text: #172033;
    --catalog-muted: #64748b;
    --catalog-border: #e5eaf0;
    --catalog-soft: #f7f9fc;
    --catalog-radius: 16px;
    --catalog-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

/* =========================================================
   PAGE
   ========================================================= */

.catalog-page {
    min-height: 70vh;
    background:
        radial-gradient(circle at 8% 0%, rgba(41, 112, 170, 0.05), transparent 28%),
        radial-gradient(circle at 95% 12%, rgba(204, 50, 61, 0.045), transparent 25%);
}

.catalog-header {
    margin-bottom: 28px;
}

.catalog-breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--catalog-muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: color .2s ease;
}

.catalog-breadcrumb a:hover {
    color: var(--brand-blue-product);
}

.catalog-title-row {
    margin-top: 18px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.catalog-kicker,
.catalog-results-kicker,
.filter-kicker {
    display: block;
    margin-bottom: 5px;
    color: var(--brand-blue-product);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.catalog-title {
    margin: 0;
    color: var(--catalog-text);
    font-size: clamp(1.9rem, 3.2vw, 3rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -.035em;
}

.catalog-description {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--catalog-muted);
    line-height: 1.65;
}

.catalog-total {
    flex: 0 0 auto;
    min-width: 105px;
    padding: 15px 18px;
    border: 1px solid var(--catalog-border);
    border-radius: 14px;
    background: rgba(255,255,255,.85);
    box-shadow: var(--catalog-shadow);
    text-align: center;
}

.catalog-total-number {
    display: block;
    color: var(--catalog-text);
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.catalog-total-label {
    display: block;
    margin-top: 5px;
    color: var(--catalog-muted);
    font-size: .76rem;
}

/* =========================================================
   FILTER
   ========================================================= */

.catalog-filter-panel {
    position: sticky;
    top: 20px;
}

.filter-sidebar {
    padding: 20px;
    border: 1px solid var(--catalog-border);
    border-radius: var(--catalog-radius);
    background: rgba(255,255,255,.96);
    box-shadow: var(--catalog-shadow);
}

.filter-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.filter-heading h2 {
    margin: 0;
    color: var(--catalog-text);
    font-size: 1.15rem;
    font-weight: 800;
}

.filter-heading > i {
    color: var(--brand-blue-product);
    font-size: 1.25rem;
}

.filter-section {
    padding: 18px 0;
    border-top: 1px solid #edf0f4;
}

.filter-section:first-of-type {
    padding-top: 0;
    border-top: 0;
}

.filter-label,
.filter-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #334155;
    font-size: .82rem;
    font-weight: 750;
}

.filter-count {
    min-width: 22px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: .68rem;
    text-align: center;
}

.filter-price-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 7px;
}

.filter-price-row > span {
    color: #94a3b8;
}

.filter-input {
    border-color: #dfe5ec;
    border-radius: 9px;
}

.filter-input:focus {
    border-color: var(--brand-blue-product);
    box-shadow: 0 0 0 .2rem rgba(41,112,170,.1);
}

.filter-options {
    max-height: 210px;
    overflow-y: auto;
    padding-right: 4px;
}

.filter-options-scroll::-webkit-scrollbar,
.filter-options::-webkit-scrollbar {
    width: 5px;
}

.filter-options::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 5px;
}

.filter-options::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

.filter-check {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0;
    padding: 7px 5px;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
}

.filter-check:hover {
    background: #f8fafc;
}

.filter-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.filter-check-box {
    position: relative;
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    margin-top: 1px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    background: #fff;
    transition: all .18s ease;
}

.filter-check input:checked + .filter-check-box {
    border-color: var(--brand-blue-product);
    background: var(--brand-blue-product);
}

.filter-check input:checked + .filter-check-box::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-check-text {
    color: #475569;
    font-size: .83rem;
    line-height: 1.35;
}

.filter-check input:checked ~ .filter-check-text {
    color: #172033;
    font-weight: 650;
}

.filter-reset {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e1e6ed;
    border-radius: 9px;
    background: #fff;
    color: #64748b;
    font-weight: 650;
    transition: all .2s ease;
}

.filter-reset:hover {
    border-color: rgba(204,50,61,.35);
    color: var(--brand-red-product);
    background: #fff7f8;
}

/* =========================================================
   RESULTS HEADER
   ========================================================= */

.catalog-results-header {
    min-height: 42px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.catalog-results-header strong {
    color: var(--catalog-text);
    font-size: .92rem;
}

.catalog-loading {
    display: none;
    align-items: center;
    gap: 7px;
    color: var(--catalog-muted);
    font-size: .78rem;
}

.catalog-loading.is-visible {
    display: inline-flex;
}

/* =========================================================
   PRODUCT CARD
   ========================================================= */

.product-list-card {
    margin-bottom: 16px;
    overflow: hidden;
    border: 1px solid var(--catalog-border);
    border-radius: var(--catalog-radius);
    background: #fff;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.035);
    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;
}

.product-list-card:hover {
    transform: translateY(-2px);
    border-color: #d5dce5;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}

.product-list-image-wrap {
    position: relative;
    min-height: 245px;
    height: 100%;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-right: 1px solid #edf0f4;
    background:
        radial-gradient(circle at center, rgba(41,112,170,.045), transparent 62%),
        #fff;
    text-decoration: none;
}

.product-list-image-wrap img {
    max-width: 100%;
    max-height: 205px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform .45s ease;
}

.product-list-card:hover .product-list-image-wrap img {
    transform: scale(1.045);
}

.product-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    color: #94a3b8;
    font-size: .75rem;
}

.product-image-placeholder i {
    font-size: 3rem;
}

.product-status {
    position: absolute;
    top: 14px;
    left: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 750;
    line-height: 1;
    box-shadow: 0 3px 10px rgba(15,23,42,.08);
}

.product-status-success {
    background: #ecfdf3;
    color: #15803d;
}

.product-status-order {
    background: #fff7ed;
    color: #c2410c;
}

.product-list-body {
    min-height: 245px;
    height: 100%;
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
}

.product-list-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.product-list-eyebrow {
    min-height: 18px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 5px;
    color: var(--brand-blue-product);
    font-size: .7rem;
    font-weight: 750;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.product-tag {
    padding: 3px 7px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: .63rem;
    letter-spacing: 0;
    text-transform: none;
}

.product-list-title {
    margin: 0;
    color: var(--catalog-text);
    font-size: clamp(1.08rem, 1.5vw, 1.35rem);
    line-height: 1.25;
    font-weight: 780;
}

.product-list-title a {
    color: inherit;
    text-decoration: none;
}

.product-list-title a:hover {
    color: var(--brand-blue-product);
}

.product-article {
    flex: 0 0 auto;
    padding: 6px 9px;
    border: 1px solid #e5eaf0;
    border-radius: 8px;
    color: #64748b;
    background: #f8fafc;
    font-size: .7rem;
    white-space: nowrap;
}

.product-list-description {
    max-width: 760px;
    margin-top: 10px;
    color: #64748b;
    font-size: .84rem;
    line-height: 1.55;
}

.product-list-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 12px;
    margin-top: 13px;
}

.product-spec {
    padding: 5px 8px;
    border-radius: 7px;
    background: #f7f9fc;
    color: #64748b;
    font-size: .73rem;
}

.product-spec strong {
    color: #334155;
    font-weight: 700;
}

.product-list-footer {
    margin-top: auto;
    padding-top: 16px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 15px;
    border-top: 1px solid #edf0f4;
}

.product-price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.product-price-current {
    color: var(--catalog-text);
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.05;
}

.product-price-old {
    color: #94a3b8;
    font-size: .78rem;
    text-decoration: line-through;
}

.product-price-request {
    color: #64748b;
    font-size: .95rem;
    font-weight: 700;
}

.btn-gradient {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 17px;
    border: 0;
    border-radius: 9px;
    background: var(--brand-gradient-product);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .22s ease, box-shadow .22s ease;
}

.btn-gradient:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(204, 50, 61, .22);
}

/* =========================================================
   LOAD MORE / EMPTY
   ========================================================= */

.catalog-load-more-wrap {
    padding: 14px 0 20px;
    text-align: center;
}

.btn-catalog-load-more {
    min-width: 210px;
    padding: 12px 22px;
    border: 1px solid #dce3eb;
    border-radius: 10px;
    background: #fff;
    color: #334155;
    font-weight: 750;
    transition: all .22s ease;
}

.btn-catalog-load-more:hover:not(:disabled) {
    border-color: var(--brand-blue-product);
    color: var(--brand-blue-product);
    box-shadow: 0 8px 22px rgba(41,112,170,.11);
    transform: translateY(-1px);
}

.btn-catalog-load-more i {
    margin-left: 7px;
}

.btn-catalog-load-more .load-more-loading {
    display: none;
}

.btn-catalog-load-more.is-loading .load-more-label,
.btn-catalog-load-more.is-loading > i {
    display: none;
}

.btn-catalog-load-more.is-loading .load-more-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.catalog-progress {
    margin-top: 10px;
    color: #94a3b8;
    font-size: .73rem;
}

.catalog-progress strong {
    color: #64748b;
}

.catalog-empty-state-wrapper {
    margin-bottom: 18px;
}

.catalog-empty-state {
    padding: 55px 20px;
    border: 1px dashed #dbe2ea;
    border-radius: var(--catalog-radius);
    background: rgba(255,255,255,.7);
    text-align: center;
}

.catalog-empty-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 13px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #f1f5f9;
    color: #94a3b8;
    font-size: 1.3rem;
}

.catalog-empty-state h3 {
    margin-bottom: 5px;
    color: var(--catalog-text);
    font-size: 1.05rem;
    font-weight: 750;
}

.catalog-empty-state p {
    margin: 0;
    color: var(--catalog-muted);
    font-size: .85rem;
}

/* =========================================================
   MOBILE TOOLBAR
   ========================================================= */

.catalog-mobile-toolbar {
    display: none;
}

/* =========================================================
   LOAD ANIMATION
   ========================================================= */

.product-card-enter {
    animation: catalogCardEnter .35s ease both;
}

@keyframes catalogCardEnter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 991.98px) {
    .catalog-filter-panel {
        position: static;
    }

    .catalog-mobile-toolbar {
        margin-bottom: 18px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .catalog-toolbar-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 9px 13px;
        border: 1px solid #dce3eb;
        border-radius: 9px;
        background: #fff;
        color: #334155;
        font-size: .82rem;
        font-weight: 700;
    }

    .catalog-toolbar-count {
        color: #64748b;
        font-size: .76rem;
    }

    .catalog-filter-panel.offcanvas {
        width: min(360px, 92vw);
    }

    .catalog-filter-panel .offcanvas-body {
        overflow-y: auto;
    }
}

@media (max-width: 767.98px) {
    .catalog-title-row {
        align-items: flex-start;
    }

    .catalog-total {
        min-width: 80px;
        padding: 11px;
    }

    .catalog-total-number {
        font-size: 1.2rem;
    }

    .product-list-image-wrap {
        min-height: 205px;
        border-right: 0;
        border-bottom: 1px solid #edf0f4;
    }

    .product-list-image-wrap img {
        max-height: 170px;
    }

    .product-list-body {
        min-height: 0;
        padding: 18px;
    }

    .product-list-heading {
        display: block;
    }

    .product-article {
        display: inline-block;
        margin-top: 8px;
    }

    .product-list-footer {
        align-items: center;
    }
}

@media (max-width: 575.98px) {
    .catalog-title-row {
        display: block;
    }

    .catalog-total {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        margin-top: 12px;
    }

    .catalog-total-number,
    .catalog-total-label {
        display: inline;
        margin: 0;
    }

    .catalog-results-header {
        margin-bottom: 10px;
    }

    .product-list-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .product-price {
        width: 100%;
    }

    .btn-gradient {
        width: 100%;
    }

    .product-list-specs {
        gap: 5px;
    }
}
/* =========================================================
   CATALOG SELECTOR
   ========================================================= */

.catalog-selector {
    position: relative;
    margin-bottom: 18px;
    z-index: 30;
}


/* Кнопка */

.catalog-selector__button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 12px 14px;

    border: 1px solid #dfe5ec;
    border-radius: 12px;

    background: #fff;
    color: #334155;

    text-align: left;
    cursor: pointer;

    box-shadow: 0 4px 16px rgba(15, 23, 42, .04);

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.catalog-selector__button:hover {
    border-color: rgba(41, 112, 170, .35);
    box-shadow: 0 8px 24px rgba(41, 112, 170, .08);
    transform: translateY(-1px);
}

.catalog-selector__button.is-open {
    border-color: rgba(41, 112, 170, .4);
}


/* Иконка */

.catalog-selector__icon {
    width: 40px;
    height: 40px;

    flex: 0 0 40px;

    display: grid;
    place-items: center;

    border-radius: 10px;

    background:
        linear-gradient(
            135deg,
            rgba(204, 50, 61, .09),
            rgba(41, 112, 170, .10)
        );

    color: #2970aa;
    font-size: 1rem;
}


/* Текст */

.catalog-selector__text {
    min-width: 0;
    flex: 1;
}

.catalog-selector__text strong {
    display: block;

    font-size: .86rem;
    font-weight: 800;
    line-height: 1.2;
}

.catalog-selector__text small {
    display: block;

    margin-top: 3px;

    color: #94a3b8;

    font-size: .7rem;
}


/* Стрелка */

.catalog-selector__arrow {
    color: #94a3b8;
    font-size: .75rem;

    transition: transform .2s ease;
}

.catalog-selector__button.is-open
.catalog-selector__arrow {
    transform: rotate(180deg);
}


/* =========================================================
   BACKDROP
   ========================================================= */

.catalog-selector__backdrop {
    position: fixed;

    inset: 0;

    z-index: 1040;

    background: rgba(15, 23, 42, .42);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity .2s ease,
        visibility .2s ease;

    backdrop-filter: blur(2px);
}

.catalog-selector.is-open
.catalog-selector__backdrop {
    opacity: 1;
    visibility: visible;
}


/* =========================================================
   PANEL
   ========================================================= */

.catalog-selector__panel {
    position: fixed;

    z-index: 1050;

    top: 50%;
    left: 50%;

    width: min(520px, calc(100vw - 32px));
    max-height: min(720px, calc(100vh - 48px));

    display: flex;
    flex-direction: column;

    overflow: hidden;

    border: 1px solid #e2e8f0;
    border-radius: 18px;

    background: #fff;

    box-shadow:
        0 25px 70px rgba(15, 23, 42, .20);

    opacity: 0;
    visibility: hidden;

    transform:
        translate(-50%, -46%)
        scale(.97);

    transition:
        opacity .2s ease,
        visibility .2s ease,
        transform .2s ease;
}

.catalog-selector.is-open
.catalog-selector__panel {
    opacity: 1;
    visibility: visible;

    transform:
        translate(-50%, -50%)
        scale(1);
}


/* =========================================================
   PANEL HEADER
   ========================================================= */

.catalog-selector__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    padding: 20px 20px 17px;

    border-bottom: 1px solid #edf1f5;

    background:
        radial-gradient(
            circle at 0 0,
            rgba(41, 112, 170, .07),
            transparent 45%
        ),
        #fff;
}

.catalog-selector__kicker {
    display: block;

    margin-bottom: 4px;

    color: #2970aa;

    font-size: .65rem;
    font-weight: 800;

    letter-spacing: .12em;
    text-transform: uppercase;
}

.catalog-selector__header h3 {
    margin: 0;

    color: #1e293b;

    font-size: 1.15rem;
    font-weight: 800;
}

.catalog-selector__header p {
    margin: 4px 0 0;

    color: #94a3b8;

    font-size: .75rem;
}


/* Закрыть */

.catalog-selector__close {
    width: 34px;
    height: 34px;

    flex: 0 0 34px;

    display: grid;
    place-items: center;

    border: 0;
    border-radius: 9px;

    background: #f1f5f9;
    color: #64748b;

    cursor: pointer;

    transition:
        background .2s ease,
        color .2s ease;
}

.catalog-selector__close:hover {
    background: #e2e8f0;
    color: #1e293b;
}


/* =========================================================
   PANEL BODY
   ========================================================= */

.catalog-selector__body {
    min-height: 0;

    overflow-y: auto;

    padding: 16px;
}


/* Все каталоги */

.catalog-selector__all {
    display: grid;

    grid-template-columns: 42px minmax(0, 1fr) auto;

    align-items: center;

    gap: 11px;

    padding: 12px;

    border: 1px solid #e1e8ef;
    border-radius: 12px;

    background: #fff;

    color: #334155;
    text-decoration: none;

    transition: all .2s ease;
}

.catalog-selector__all:hover {
    border-color: rgba(41, 112, 170, .3);

    color: #2970aa;

    box-shadow:
        0 7px 20px rgba(15, 23, 42, .05);
}

.catalog-selector__all-icon {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border-radius: 10px;

    background: #f3f7fb;

    color: #2970aa;
}

.catalog-selector__all strong {
    display: block;

    font-size: .84rem;
    font-weight: 800;
}

.catalog-selector__all small {
    display: block;

    margin-top: 3px;

    color: #94a3b8;

    font-size: .7rem;
}


/* Разделитель */

.catalog-selector__divider {
    height: 1px;

    margin: 17px 0;

    background: #e7ecf1;
}


/* Заголовок */

.catalog-selector__title {
    margin-bottom: 9px;

    color: #64748b;

    font-size: .67rem;
    font-weight: 800;

    letter-spacing: .09em;
    text-transform: uppercase;
}


/* =========================================================
   SECTION LIST
   ========================================================= */

.catalog-selector__list {
    display: grid;
    gap: 7px;
}

.catalog-selector__item {
    display: grid;

    grid-template-columns: 43px minmax(0, 1fr) auto;

    align-items: center;

    gap: 10px;

    padding: 8px;

    border: 1px solid transparent;
    border-radius: 11px;

    background: #fff;

    color: #334155;

    text-decoration: none;

    transition:
        border-color .2s ease,
        background .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.catalog-selector__item:hover {
    border-color: #e0e7ee;

    color: #2970aa;

    box-shadow:
        0 6px 18px rgba(15, 23, 42, .045);

    transform: translateX(2px);
}


/* Текущий раздел */

.catalog-selector__item.is-current {
    border-color: rgba(41, 112, 170, .18);

    background:
        linear-gradient(
            135deg,
            rgba(41, 112, 170, .055),
            rgba(204, 50, 61, .035)
        );
}


/* Изображение */

.catalog-selector__item-image {
    width: 43px;
    height: 43px;

    display: grid;
    place-items: center;

    overflow: hidden;

    border: 1px solid #e7ecf1;
    border-radius: 10px;

    background: #f8fafc;

    color: #94a3b8;
}

.catalog-selector__item-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* Текст */

.catalog-selector__item-content {
    min-width: 0;
}

.catalog-selector__item-content strong {
    display: block;

    overflow: hidden;

    color: #334155;

    font-size: .82rem;
    font-weight: 750;

    line-height: 1.25;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-selector__item:hover
.catalog-selector__item-content strong {
    color: #2970aa;
}

.catalog-selector__item-content small {
    display: block;

    margin-top: 3px;

    color: #94a3b8;

    font-size: .68rem;
}


/* Текущий */

.catalog-selector__current {
    width: 25px;
    height: 25px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: rgba(41, 112, 170, .10);

    color: #2970aa;

    font-size: .8rem;
}


/* Стрелка */

.catalog-selector__item-arrow {
    color: #c0c9d3;

    font-size: .72rem;
}


/* Пустой каталог */

.catalog-selector__empty {
    padding: 18px;

    border: 1px dashed #dbe2ea;
    border-radius: 10px;

    background: #fff;

    color: #94a3b8;

    font-size: .78rem;
    text-align: center;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 575.98px) {

    .catalog-selector {
        margin-bottom: 12px;
    }

    .catalog-selector__button {
        padding: 10px 11px;
    }

    .catalog-selector__icon {
        width: 37px;
        height: 37px;
        flex-basis: 37px;
    }

    .catalog-selector__panel {
        top: 0;
        left: auto;
        right: 0;

        width: min(94vw, 420px);
        height: 100dvh;
        max-height: 100dvh;

        border-radius: 16px 0 0 16px;

        transform:
            translateX(105%);

        transition:
            opacity .2s ease,
            visibility .2s ease,
            transform .25s ease;
    }

    .catalog-selector.is-open
    .catalog-selector__panel {
        transform: translateX(0);
    }

    .catalog-selector__header {
        padding:
            calc(16px + env(safe-area-inset-top))
            16px
            15px;
    }

    .catalog-selector__body {
        padding:
            14px
            14px
            calc(18px + env(safe-area-inset-bottom));
    }

    .catalog-selector__item {
        padding: 9px;
    }

}


/* Очень маленькие экраны */

@media (max-width: 360px) {

    .catalog-selector__text small {
        display: none;
    }

    .catalog-selector__panel {
        width: 100vw;
        border-radius: 0;
    }

}
/* =========================================================
   КАТАЛОГ + ФИЛЬТР
   НОВАЯ СТРУКТУРА
   ========================================================= */


/* =========================================================
   1. КНОПКА КАТАЛОГА
   ========================================================= */

.catalog-floating-button {
    position: sticky;

    top: 20px;

    z-index: 101;

    margin-bottom: 14px;
}


/*
 * Не переопределяем весь btn-gradient,
 * а только добавляем структуру каталога.
 */

.catalog-menu-trigger {
    width: 100%;

    min-height: 58px;

    display: flex;
    align-items: center;

    gap: 11px;

    padding: 9px 12px;

    border-radius: 12px;

    cursor: pointer;
}


.catalog-menu-trigger__icon {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    display: grid;
    place-items: center;

    border-radius: 9px;

    background: rgba(255,255,255,.16);

    font-size: .95rem;
}


.catalog-menu-trigger__text {
    min-width: 0;

    flex: 1;

    text-align: left;
}


.catalog-menu-trigger__text strong {
    display: block;

    font-size: .83rem;

    line-height: 1.2;
}


.catalog-menu-trigger__text small {
    display: block;

    margin-top: 3px;

    color: rgba(255,255,255,.72);

    font-size: .67rem;
}


.catalog-menu-trigger__arrow {
    font-size: .72rem;

    transition: transform .2s ease;
}


.catalog-menu-trigger.is-open
.catalog-menu-trigger__arrow {
    transform: rotate(180deg);
}




/* =========================================================
   3. КАТАЛОГ — BACKDROP
   ========================================================= */

.catalog-selector__backdrop {

    position: fixed;

    inset: 0;

    z-index: 1040;

    background:
        rgba(15, 23, 42, .48);

    opacity: 0;

    visibility: hidden;

    transition:
        opacity .2s ease,
        visibility .2s ease;

    backdrop-filter: blur(3px);
}


.catalog-selector.is-open
.catalog-selector__backdrop {

    opacity: 1;

    visibility: visible;
}


/* =========================================================
   4. КАТАЛОГ — ПАНЕЛЬ
   ========================================================= */

.catalog-selector__panel {

    position: fixed;

    z-index: 1050;

    top: 50%;
    left: 50%;

    width: min(520px, calc(100vw - 32px));

    max-height:
        calc(100vh - 48px);

    display: flex;

    flex-direction: column;

    overflow: hidden;

    border:
        1px solid #e2e8f0;

    border-radius: 18px;

    background: #fff;

    box-shadow:
        0 25px 70px
        rgba(15,23,42,.22);

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transform:
        translate(-50%, -46%)
        scale(.97);

    transition:
        opacity .2s ease,
        visibility .2s ease,
        transform .2s ease;
}


.catalog-selector.is-open
.catalog-selector__panel {

    opacity: 1;

    visibility: visible;

    pointer-events: auto;

    transform:
        translate(-50%, -50%)
        scale(1);
}


/* =========================================================
   5. HEADER МЕНЮ
   ========================================================= */

.catalog-selector__header {

    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 20px;

    padding: 20px;

    border-bottom:
        1px solid #edf1f5;

    background: #fff;
}


.catalog-selector__kicker {

    display: block;

    margin-bottom: 4px;

    color:
        var(--brand-blue-product);

    font-size: .65rem;

    font-weight: 800;

    letter-spacing: .12em;

    text-transform: uppercase;
}


.catalog-selector__header h3 {

    margin: 0;

    color: #1e293b;

    font-size: 1.15rem;

    font-weight: 800;
}


.catalog-selector__header p {

    margin: 4px 0 0;

    color: #94a3b8;

    font-size: .75rem;
}


.catalog-selector__close {

    width: 34px;
    height: 34px;

    flex: 0 0 34px;

    display: grid;

    place-items: center;

    border: 0;

    border-radius: 9px;

    background: #f1f5f9;

    color: #64748b;

    cursor: pointer;
}


.catalog-selector__close:hover {

    background: #e2e8f0;

    color: #1e293b;
}


/* =========================================================
   6. BODY МЕНЮ
   ========================================================= */

.catalog-selector__body {

    min-height: 0;

    overflow-y: auto;

    padding: 16px;

    scrollbar-width: thin;
}


/* =========================================================
   7. МОБИЛЬНЫЕ
   ========================================================= */

@media (max-width: 991.98px) {

    .catalog-floating-button {

        position: relative;

        top: auto;

        margin-bottom: 12px;
    }


    /*
     * Bootstrap сам управляет offcanvas фильтра.
     */

    .catalog-filter-panel {

        height: 100dvh;

        max-height: 100dvh;
    }


    .catalog-filter-panel
    .offcanvas-body {

        overflow-y: auto;
    }


    /*
     * На телефоне меню каталога
     * превращаем в боковую панель.
     */

    .catalog-selector__panel {

        top: 0;

        left: auto;

        right: 0;

        width:
            min(92vw, 430px);

        height: 100dvh;

        max-height: 100dvh;

        border-radius:
            16px 0 0 16px;

        transform:
            translateX(105%);
    }


    .catalog-selector.is-open
    .catalog-selector__panel {

        transform:
            translateX(0);
    }

}


/* =========================================================
   8. ТЕЛЕФОН
   ========================================================= */

@media (max-width: 575.98px) {

    .catalog-menu-trigger {

        min-height: 54px;

        padding: 8px 10px;
    }


    .catalog-menu-trigger__icon {

        width: 36px;
        height: 36px;

        flex-basis: 36px;
    }


    .catalog-selector__header {

        padding:
            calc(16px + env(safe-area-inset-top))
            16px
            15px;
    }


    .catalog-selector__body {

        padding:
            14px
            14px
            calc(18px + env(safe-area-inset-bottom));
    }

}


/* =========================================================
   9. БЛОКИРОВКА SCROLL СТРАНИЦЫ
   ========================================================= */

body.catalog-menu-open {

    overflow: hidden;
}
/* =========================================================
   ПЛАВАЮЩАЯ КОЛОНКА КАТАЛОГА И ФИЛЬТРА
   ========================================================= */

@media (min-width: 992px) {

    /*
     * ВАЖНО:
     * sticky находится непосредственно на ASIDE.
     */

    .catalog-sidebar {

        position: sticky;

        /* фиксированная шапка ~70px + 20px отступ */
        top: 90px;

        align-self: flex-start;

        z-index: 100;

        height: auto;

        max-height: calc(100vh - 110px);


    }


    /*
     * Кнопка каталога — обычный элемент.
     * Sticky ей больше НЕ нужен.
     */

    .catalog-floating-button {

        position: relative;

        top: auto;

        width: 100%;

        margin-bottom: 14px;

        z-index: 101;
        

    }


    /*
     * Фильтр — обычный блок внутри sticky aside.
     */

    .catalog-filter-panel {

        position: relative;

        top: auto;

        width: 100%;

        height: auto;

        max-height:
            calc(100vh - 40px - 72px);

        overflow: hidden;

    }


    /*
     * Bootstrap offcanvas на desktop
     * не должен создавать собственный scroll.
     */

    .catalog-filter-panel
    .offcanvas-body {

        height: auto;

        max-height:
            calc(100vh - 40px - 72px);

        overflow: hidden;

    }


    /*
     * Заголовок фильтра остаётся наверху.
     */

    .catalog-filter-panel
    .filter-sidebar {

        height: auto;

        max-height:
            calc(100vh - 40px - 72px);

        display: flex;

        flex-direction: column;

        overflow: hidden;

    }


    /*
     * ПРОКРУЧИВАЕТСЯ ТОЛЬКО ФОРМА.
     */

    .catalog-filter-panel
    #product-filter-form {

        min-height: 0;

        max-height:
            calc(100vh - 120px);

        overflow-y: auto;

        overflow-x: hidden;

        padding-right: 6px;

        scrollbar-width: thin;

        scrollbar-color:
            rgba(41,112,170,.35)
            transparent;

    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 991.98px) {

    .catalog-sidebar {

        position: static;

        top: auto;

        height: auto;

        max-height: none;

    }


    .catalog-floating-button {

        position: relative;

        top: auto;

        margin-bottom: 12px;

    }


    .catalog-filter-panel {

        position: fixed;

        height: 100dvh;

        max-height: 100dvh;

    }


    .catalog-filter-panel
    .offcanvas-body {

        overflow-y: auto;

        max-height: none;

    }

}
