.wrapper {
    width: min(100%, 1140px);
}

#top {
    border: 0;
}

.slider .swiper-slide {
    position: relative;
    overflow: hidden;
}

.slider .slider-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 0;
}

.gallery img,
.main-products-list .item img,
.product-page img,
.products-list .item img {
    object-fit: cover;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.gallery-item {
    width: min(210px, 46%);
}

.gallery .gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    margin: 0;
}

.products-list .item img {
    width: 100%;
    height: 100%;
}

.products-list .item:is(:hover, :focus-within) .info {
    min-height: 350px;
}

.products-list .item:focus-within .desc {
    margin-bottom: 20px;
    height: auto;
}

.products-list .item:focus-within .btn {
    height: 57px;
    border-bottom-width: 5px;
}

.karayaz-pagination .visually-hidden,
.mod-menu .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.karayaz-pagination .pagination {
    flex-wrap: wrap;
}

@media (max-width: 1139px) {
    header .row {
        min-height: 180px;
        height: auto;
        padding-block: 20px;
    }

    header :is(.menu, .mod-menu) a {
        padding-inline: 10px;
    }

    .topline {
        gap: 8px 16px;
        flex-wrap: wrap;
        margin-bottom: 16px;
    }

    .topline > *::before {
        display: none;
    }

    h1#logo > a,
    .footer-logo {
        max-width: 100%;
        background-size: contain;
    }

    footer {
        background-color: #22547a;
    }

    .last-line::before,
    #map {
        left: 0;
        width: 100%;
    }

    .feedback-main .rsform {
        height: auto;
        min-height: 300px;
        padding: 28px 15px;
    }

    .feedback-main .rsform .form-row > div {
        display: grid;
        gap: 12px;
    }

    .feedback-main .rsform .rsform-block,
    .feedback-main .rsform div[id*="rsform_error"] {
        position: static;
        margin: 0;
    }

    .feedback-main .rsform :is(input, .rsform-submit-button) {
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    header .wrapper > div,
    footer .wrapper:not(.last-line) > div {
        flex: 0 0 100%;
        max-width: 100%;
        text-align: center;
    }

    header :is(.menu, .mod-menu),
    footer :is(.menu, .mod-menu) {
        justify-content: center;
    }

    .slider .wrapper {
        min-height: 360px;
        height: auto;
        padding-block: 25px;
    }

    .slider .ttl {
        font-size: 2.2rem;
    }

    .main-page .content-container,
    .catalog-container {
        padding-block: 40px;
    }

    .statistics ul {
        flex-wrap: wrap;
        gap: 24px 12px;
    }

    .statistics li {
        width: min(46%, 180px);
    }

    .main-products-list .info {
        padding: 20px 15px 0;
    }

    .main-about img {
        margin-top: 20px;
    }

    .map {
        height: 520px;
    }

    .map .text {
        width: min(100%, 400px);
    }

    .map .text::before,
    .map .text::after {
        display: none;
    }

    #map {
        position: relative;
        height: 300px;
    }

    .contacts-page .block {
        height: auto;
    }

    .product-page .feedback-container {
        margin-top: 15px;
    }

    footer .contacts {
        margin-top: 20px;
    }

    .last-line {
        row-gap: 12px;
    }

    .last-line > div {
        flex: 0 0 100%;
        max-width: 100%;
        text-align: center !important;
    }

    .last-line .metrika:empty {
        display: none;
    }

    .error-page {
        font-size: 2rem;
    }
}

@media (hover: none) {
    .products-list .item {
        height: auto;
    }

    .products-list .item img {
        position: static;
        height: auto;
        aspect-ratio: 1;
    }

    .products-list .item:is(:hover, :focus-within) .info {
        height: auto !important;
        min-height: 0;
    }

    .products-list .item .desc,
    .products-list .item:hover .desc {
        height: auto;
        margin-bottom: 20px;
    }

    .products-list .item .btn {
        height: 57px;
        border-bottom-width: 5px;
    }
}
