.bevis-catalog {
    display: grid;
    grid-template-columns: 254px minmax(0, 1fr);
    align-items: start;
    gap: 30px;
}

.bevis-catalog__filters {
    position: sticky;
    top: 105px;
}

.bevis-filter-group {
    padding: 14px 0;
    border-top: 1px solid #e6e6e6;
}

.bevis-filter-group + .bevis-filter-group {
    margin-top: 8px;
}

.bevis-filter-group h2 {
    margin: 0 0 9px;
    color: #626262;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.bevis-filter-group button,
.bevis-filter-group a {
    display: block;
    width: 100%;
    padding: 6px 8px 6px 10px;
    color: #575757;
    background: transparent;
    border: 0;
    border-left: 2px solid transparent;
    font-size: 13px;
    line-height: 1.35;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.bevis-filter-group button:hover,
.bevis-filter-group button.is-active,
.bevis-filter-group a:hover,
.bevis-filter-group a.is-active {
    color: #111;
    background: #f1f1f1;
}

.bevis-filter-group button.is-active,
.bevis-filter-group a.is-active {
    border-left-color: #111;
    font-weight: 600;
}

.bevis-catalog__topline {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid #e6e6e6;
    color: #666;
    font-size: 11px;
}

.bevis-catalog__topline a {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.bevis-catalog__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.bevis-product {
    display: block;
    width: 100%;
    overflow: hidden;
    padding: 0;
    aspect-ratio: 4 / 4.7;
    background: #f5f5f5;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
}

.bevis-product img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 260ms ease;
}

.bevis-product:hover img {
    transform: scale(1.035);
}

.bevis-catalog__pagination {
    display: flex;
    min-height: 68px;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.bevis-catalog__pagination button {
    display: grid;
    width: 39px;
    height: 39px;
    place-items: center;
    background: #f1f1f1;
    border: 1px solid #e3e3e3;
    border-radius: 50%;
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
}

.bevis-catalog__pagination button:disabled {
    opacity: 0.4;
    cursor: default;
}

.bevis-catalog__pagination span {
    color: #666;
    font-size: 12px;
}

.bevis-gallery {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    place-items: center;
}

.bevis-gallery__backdrop {
    position: absolute;
    inset: 0;
    padding: 0;
    background: rgb(0 0 0 / 72%);
    border: 0;
}

.bevis-gallery__dialog {
    position: relative;
    display: grid;
    width: min(950px, calc(100% - 52px));
    height: min(760px, calc(100vh - 80px));
    box-sizing: border-box;
    overflow: hidden;
    padding: 56px 64px 52px;
    place-items: center;
    background: #fff;
    border-radius: 5px;
}

.bevis-gallery__image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    min-width: 0;
    min-height: 0;
    place-self: center;
    object-fit: contain;
    object-position: center;
}

.bevis-gallery__close,
.bevis-gallery__arrow {
    position: absolute;
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    background: #f0f0f0;
    border: 0;
    border-radius: 50%;
    line-height: 1;
    cursor: pointer;
}

.bevis-gallery__close {
    top: 13px;
    right: 13px;
    font-size: 27px;
}

.bevis-gallery__arrow {
    top: calc(50% - 21px);
    font-size: 34px;
}

.bevis-gallery__arrow--prev {
    left: 13px;
}

.bevis-gallery__arrow--next {
    right: 13px;
}

.bevis-gallery__dots {
    position: absolute;
    bottom: 20px;
    display: flex;
    gap: 8px;
}

.bevis-gallery__dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    background: #d0d0d0;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.bevis-gallery__dots button[aria-current="true"] {
    background: #111;
}

@media (max-width: 900px) {
    .bevis-catalog {
        grid-template-columns: 204px minmax(0, 1fr);
        gap: 17px;
    }

    .bevis-filter-group button {
        font-size: 11px;
    }

    .bevis-catalog__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .bevis-catalog {
        grid-template-columns: minmax(116px, 34%) minmax(0, 1fr);
        gap: 10px;
    }

    .bevis-catalog__filters {
        position: static;
    }

    .bevis-filter-group button {
        padding: 6px 4px;
        font-size: 10px;
    }

    .bevis-catalog__grid {
        gap: 6px;
    }

    .bevis-catalog__topline a {
        display: none;
    }

    .bevis-gallery__dialog {
        width: calc(100% - 24px);
        height: min(580px, calc(100vh - 80px));
        padding: 54px 42px 48px;
    }

    .bevis-gallery__image {
        width: auto;
        max-width: 100%;
    }

    .bevis-gallery__arrow {
        width: 35px;
        height: 35px;
    }
}
