.catalog {
    margin-top: calc(var(--bnd-base) * 4);
    margin-bottom: calc(var(--bnd-base) * 2);

    .catalog__layout {
        display: grid;
    }

    .catalog__aside {
        position: relative;
        display: grid;
        gap: 20px;
    }

    .catalog__select {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 43px;
        padding: 10px 0;
        border: 0;
        border-top: 1px solid var(--bnd-black);
        border-bottom: 1px solid var(--bnd-black);
        background: transparent;
        color: var(--bnd-black);
        font-family: inherit;
        font-size: 13px;
        font-weight: 500;
        line-height: 1;
        text-align: left;
        text-transform: uppercase;
        cursor: pointer;

        .catalog__select-icon {
            flex: 0 0 auto;
            transition: transform 0.2s ease;
        }
    }

    .catalog__filters {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: 0;
        z-index: 5;
        display: grid;
        padding: 10px 0;
        border-top: 1px solid var(--bnd-black);
        border-bottom: 1px solid var(--bnd-black);
        background: var(--bnd-white);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-8px);
        transition:
            opacity 0.2s ease,
            transform 0.2s ease,
            visibility 0.2s ease;
    }

    &.is-filters-open {
        .catalog__filters {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
            transform: translateY(0);
        }

        .catalog__select-icon {
            transform: rotate(180deg);
        }
    }

    .catalog__filter {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 40px;
        padding: 10px 0;
        border: 0;
        background: transparent;
        color: var(--bnd-black);
        font-family: inherit;
        font-size: 13px;
        font-weight: 500;
        line-height: 1;
        text-align: left;
        text-transform: uppercase;
        cursor: pointer;
    }

    .catalog__filter.current {
        color: var(--bnd-muted);
    }

    .catalog__grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 40px 20px;
        margin-top: var(--bnd-base);
    }

    .catalog-card {
        gap: 20px;
    }

    .catalog-card--featured {
        grid-column: 1 / -1;
        height: 560px;

        .product-card__image {
            position: absolute;
            inset: 0;
            height: 100%;
            aspect-ratio: auto;
        }

        .product-card__body {
            position: absolute;
            right: 0;
            bottom: 0;
            left: 0;
            z-index: 1;
            height: 186px;
            padding: calc(var(--bnd-base) * 4) var(--bnd-base) var(--bnd-base);
        }

        .product-card__info {
            flex-direction: row;
            align-items: baseline;
            gap: 20px;
        }

        .product-card__title {
            /* flex: 1 1 auto; */ 
            min-width: 0;
        }

        .product-card__price {
            flex: 0 0 auto;
        }
    }

    .product-card__image {
        height: calc((100vw - (var(--bnd-page-pad) * 2) - 20px) / 2);
        aspect-ratio: 1 / 1;
    }

    .product-card__image img {
        height: 100%;
    }

    .catalog-card .btn--order {
        height: 40px;
    }

    /* .catalog-card__badges {
        gap: 5px;

        img {
            width: 32px;
            height: 32px;
        }
    } */

    .catalog__more {
        width: 100%;
        margin-top: 40px;
        justify-content: space-between;
        font-size: 15px;
    }
}

@media (max-width: 389px) {
    .catalog {
        .catalog__grid {
            gap: 40px 10px;
        }

        .product-card__image {
            height: calc((100vw - (var(--bnd-page-pad) * 2) - 10px) / 2);
        }

        .catalog-card__badges {
            /* gap: 3px; */

            /* img {
                width: 28px;
                height: 28px;
            } */
        }
    }
}

@media (max-width: 1169px) {
    .catalog {
        .catalog-card--featured {
            order: -10;
        }
    }
}

@media (min-width: 600px) {
    .catalog {
        margin-top: calc(var(--bnd-base) * 6);
        margin-bottom: calc(var(--bnd-base) * 4);

        .catalog__aside {
            position: static;
            gap: 20px;
        }

        .catalog__select {
            display: none;
        }

        .catalog__filters {
            position: static;
            display: flex;
            gap: 40px;
            overflow-x: auto;
            padding: 0;
            border: 0;
            background: transparent;
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
            transform: none;
            scrollbar-width: none;
        }

        .catalog__filters::-webkit-scrollbar {
            display: none;
        }

        .catalog__filter {
            position: relative;
            display: flex;
            align-items: center;
            gap: 0;
            flex: 0 0 auto;
            width: auto;
            min-height: 0;
            padding: 0;
            border: 0;
            background: transparent;
            color: var(--bnd-black);
            font-family: inherit;
            font-size: 15px;
            font-weight: 500;
            text-transform: uppercase;
            text-decoration-line: underline;
            text-decoration-style: solid;
            text-decoration-skip-ink: auto;
            text-decoration-thickness: auto;
            text-underline-offset: auto;
            text-underline-position: from-font;
            cursor: pointer;
            transition:
                color 0.25s ease,
                text-decoration-color 0.25s ease;
        }

        .catalog__filter::before {
            content: "";
            flex: 0 0 0;
            width: 13px;
            height: 9px;
            background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='9' viewBox='0 0 13 9' fill='none'%3E%3Cpath d='M8 0.353516L12 4.35352L8 8.35352M12 4.35352H0' stroke='%237B7B7B'/%3E%3C/svg%3E") center / contain no-repeat;
            opacity: 0;
            overflow: hidden;
            margin-right: 0;
            transform: translateX(-6px);
            transition:
                flex-basis 0.25s ease,
                margin-right 0.25s ease,
                opacity 0.25s ease,
                transform 0.25s ease;
        }

        .catalog__filter.current {
            color: var(--bnd-muted);
            text-decoration-color: transparent;
        }

        .catalog__filter.current::before {
            flex-basis: 13px;
            margin-right: 8px;
            opacity: 1;
            transform: translateX(0);
        }

        .catalog__grid {
            gap: 40px;
            margin-top: calc(var(--bnd-base) * 3);
        }

        .catalog-card {
            height: 640px;
            gap: 40px;
        }

        .catalog-card--featured {
            height: 640px;

            .product-card__body {
                width: min(350px, 100%);
                right: auto;
                height: 272px;
                gap: 40px;
                padding-left: var(--bnd-base);
            }

            .product-card__info {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }
        }

        .catalog-card:not(.catalog-card--featured) {
            .product-card__image {
                flex: 0 0 auto;
                height: 428px;
                aspect-ratio: auto;
            }

            .product-card__body {
                height: 172px;
                gap: 40px;
            }
        }

        .product-card__info {
            gap: 10px;
            width: min(350px, 100%);
        }

        /* .catalog-card__badges {
            gap: 10px;

            img {
                width: 48px;
                height: 48px;
            }
        } */
    }
}

@media (min-width: 1170px) {
    .catalog {
        .catalog__layout {
            grid-template-columns: 1fr;
        }

        .catalog__aside {
            grid-template-columns: auto 1fr;
            align-items: baseline;
            justify-content: space-between;
        }

        .catalog__filters {
            justify-content: flex-end;
            overflow: visible;
        }

        .catalog__grid {
            grid-template-columns: repeat(3, minmax(0, 1fr));
            align-items: start;
            margin-top: calc(var(--bnd-base) * 2);
        }

        .catalog-card,
        .catalog-card--featured {
            height: 720px;
        }

        .catalog-card:not(.catalog-card--featured) {
            .product-card__image {
                height: 488px;
            }
        }

        .catalog-card--featured {
            grid-column: span 2;
        }

        .catalog-card:nth-child(2) {
            order: -1;
        }

        .catalog__more {
            width: calc((100% - 80px) / 3);
            margin-top: var(--bnd-base);
            margin-left: calc((100% - 80px) / 3 + 40px);
        }
    }
}

@media (min-width: 1600px) {
    .catalog {
        .catalog__layout {
            grid-template-columns: 350px 1fr;
            align-items: start;
            column-gap: 40px;
        }

        .catalog__aside {
            position: sticky;
            top: var(--bnd-header-h);
            grid-template-columns: 1fr;
            gap: 40px;
        }

        .catalog__filters {
            display: grid;
            justify-content: start;
            gap: 8px;
        }

        .catalog__filter {
            min-height: 20px;
        }

        .catalog__grid {
            grid-template-columns: repeat(3, minmax(0, 1fr));
            margin-top: 0;
        }

        .catalog-card--featured {
            grid-column: span 2;
            order: 1;
        }

        .catalog-card:nth-child(2) {
            order: 0;
        }

        .catalog-card:nth-child(3),
        .catalog-card:nth-child(4),
        .catalog-card:nth-child(5) {
            order: 2;
        }

        .catalog__more {
            grid-column: 2;
            width: calc((100% - 80px) / 3);
            margin-top: var(--bnd-base);
            margin-left: calc((100% - 80px) / 3 + 40px);
        }
    }
}

@media (min-width: 1601px) {
    .catalog {
        .catalog__layout {
            max-width: 1520px;
            padding-right: 0;
            padding-left: 0;
        }
    }
}
