html,
body {
    overflow-x: hidden;
}

/* ───────── Бренд-секция ───────── */

.mainpage {
    max-width: 1440px;
}
.brand-card {
    position: relative;
    height: 522px;
    border-radius: 15px;
    background: #b1b1b1;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}
.brand-card--big {
    position: relative;
    background-image: url(../image/mainpage/mainpage-header.svg);
    background-repeat: no-repeat;
    background-size: cover;
}
.brand-card--big::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 1;
}
.brand-card--big > * {
    position: relative;
    z-index: 2;
}
.brand-card--small {
    background-image: url(../image/mainpage/page-header.svg);
    object-fit: cover;
    background-repeat: no-repeat;
    /* width: 565px; */
}

/* текст */

.brand-title {
    background-image: url(../image/icons/Logo_Bergsen.svg);
    position: absolute;
    width: 381px;
    height: 117px;
    top: 184px;
    left: 79px;
}
.brand-title-small {
    background-image: url(../image/icons/Logo_LaFoma.png);
    position: absolute;
    width: 307px;
    height: 103px;
    top: 193px;
    left: 79px;
}
.brand-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 3;
}
.brand-btn:hover {
    color: #ffffff;
}
.brand-card::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    background: #fff;
    border-top-left-radius: 30px;
    z-index: 1;
}

/* большая кнопка */

.brand-card--big::after {
    width: 349px;
    height: 70px;
}

/* маленькая кнопка */

.brand-card--small::after {
    width: 115px;
    height: 70px;
}
@media (max-width: 1060px) and (min-width: 992px) {
    .brand-title-small {
        left: 40px;
    }
}
@media(max-width: 768px) {
    .brand-card--big {
        height: 448px;
    }
    .brand-title {
        left: 22px;
        top: 171px;
        /* надпись — картинка шириной 381px; на узком экране её надо вписывать целиком,
           иначе cover срезает правый край (было «для стильного интер…») */
        width: auto;
        max-width: calc(100% - 44px);
        background-size: contain;
        background-repeat: no-repeat;
        background-position: left center;
    }
    .brand-card--small {
        height: 240px;
    }
    .brand-title-small {
        background-size: contain;
        background-repeat: no-repeat;
        height: 74px;
        left: 32px;
        top: 83px;
    }
}

/* ───────── Преимущества ───────── */

.advantages {
    margin-top: 150px;
    text-align: center;
}
.advantages-subtitle {
    font-size: 20px;
    font-weight: 500;
    font-family: "Manrope", sans-serif;
}
.advantages-title {
    font-size: 40px;
    font-weight: 500;
    font-family: 'Cera Pro';
    color: #000;
}
.advantages-list {
    padding-top: 60px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 32px;
    font-family: "Manrope", sans-serif;
}
.advantage-icon {
    width: 92px;
    height: 92px;
    border: 2px solid #E2E2E2;
    border-radius: 30px;
    padding: 33px 27px 32px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.icon-placeholder {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.advantage-title {
    font-size: 20px;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 16px;
    font-family: 'Cera Pro';
}
.advantage-text {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    color: #000000;
}
@media (max-width: 1400px) {
    .advantages-list {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 992px) {
    .advantages-list {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 32px;
    }
}
@media (max-width: 768px) {
    .advantages {
        margin-top: 80px;
    }
    .advantages-title {
        font-size: 32px;
        font-weight: 500;
    }
    .advantages-subtitle {
        font-size: 18px;
    }
    .advantages-list {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .advantage-icon {
        width: 72px;
        height: 72px;
        border-radius: 20px;
        padding: 18px;
    }
    .advantage-title {
        font-size: 16px;
        margin-bottom: 8px;
    }
    .advantage-text {
        font-size: 14px;
    }
    .advantages-list {
        padding-top: 40px;
    }
    .new-arrivals-subtitle {
        font-size: 18px !important;
    }
    .new-arrivals-title {
        font-size: 32px !important;
    }
}
@media (max-width: 576px) {
    .advantage-item {
        display: -webkit-flex;
        display: -moz-flex;
        display: -ms-flex;
        display: -o-flex;
        display: flex;
        -ms-align-items: center;
        align-items: center;
        gap: 24px;
        text-align: left;
    }
    .advantage-icon {
        margin: 0;
        width: 92px;
        height: 92px;
        border-radius: 30px;
    }
    .advantages-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .advantage-title {
        font-size: 20px;
        font-weight: 500;
    }
    .advantage-text {
        font-size: 16px;
    }
}

/* ───────── Категории ───────── */

.categories {
    margin-top: 140px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* ряд */

.categories-row {
    display: flex;
    gap: 15px;
}

/* карточка */

.category-card {
    position: relative;
    height: 300px;
    border-radius: 15px;
    border-bottom-right-radius: 0px;
    background: #cfcfcf;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

/* размеры */

.category-card--small {
    width: 450px;
}
.category-card--big {
    width: 915px;
}
.category-title-sm {
    color: #ffffff;
    position: absolute;
    font-size: 32px;
    font-weight: 500;
    top: 134px;
    left: 116px;
    z-index: 1;
    font-family: 'Cera Pro';
}
.category-title-xl {
    color: #ffffff;
    position: absolute;
    font-size: 32px;
    font-weight: 500;
    top: 134px;
    left: 120px;
    z-index: 1;
    font-family: 'Cera Pro';
}
.category-bg-table {
    background-image: url(../image/mainpage/category-tables.svg);
    object-fit: cover;
    background-repeat: no-repeat;
    z-index: 3;
    background-size: 100%;
    background-position-y: 50%;
    height: 100%;
    width: 100%;
}
.category-bg-comode {
    background-image: url(../image/mainpage/category-dresser.svg);
    object-fit: cover;
    background-repeat: no-repeat;
    background-size: 100%;
    background-position-y: 64%;
    background-position-x: -193px;
    height: 100%;
    width: 125%;
}
.category-bg-sofa {
    background-image: url(../image/mainpage/category-sofa.svg);
    object-fit: cover;
    background-repeat: no-repeat;
    background-size: 100%;
    background-position-y: 84%;
    height: 100%;
    width: 100%;
}
.category-bg-chairs {
    background-image: url(../image/mainpage/category-chairs.svg);
    object-fit: cover;
    background-repeat: no-repeat;
    background-size: 100%;
    background-position-y: 93%;
    height: 100%;
    width: 100%;
}
.category-bg-beds {
    background-image: url(../image/mainpage/category-beds.svg);
    object-fit: cover;
    background-repeat: no-repeat;
    background-size: 100%;
    background-position-y: 50%;
    height: 100%;
    width: 100%;
}
.category-bg-lights {
    background-image: url(../image/mainpage/category-lights.svg);
    object-fit: cover;
    background-repeat: no-repeat;
    background-size: 100%;
    background-position-y: 22%;
    height: 100%;
    width: 100%;
}

/* кнопка */

.category-btn {
    font-weight: 600;
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 3;
    background-color: #F1F1F1;
}

/* для широкой кнопки */

.category-btn--wide {
    width: 260px;
    height: 56px;
}

/* ───── вырез ───── */

.category-card::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    background: #fff;
    border-top-left-radius: 30px;
}

/* маленькая карточка */

.category-card--small::after {
    width: clamp(70px, 115px, 115px);
    height: 70px;
}

/* большая карточка */

.category-card--big::after {
    width: clamp(140px, 350px, 350px);
    height: 70px;
}
.category-card--small::before {
    right: 115px;
}
.category-card--big::before {
    right: 349px;
}
.category-card--small .category-cut-fix {
    right: 115px;
}
.category-card--big .category-cut-fix {
    right: 349px;
}
.btn-radius .btn::after {
    content: "";
    position: absolute;
    top: 30px;
    left: -44px;
    transform: rotate(180deg);
    width: 30px;
    height: 30px;
    background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath d='M30 0H0V30A30 30 0 0 1 30 0Z' fill='white'/%3E%3C/svg%3E");
}
.btn-radius .btn::before {
    content: "";
    position: absolute;
    top: -40px;
    left: 71px;
    transform: rotate(180deg);
    width: 30px;
    height: 30px;
    background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath d='M30 0H0V30A30 30 0 0 1 30 0Z' fill='white'/%3E%3C/svg%3E");
}
.btn-radius .btn_arrow_second.btn::before {
    content: "";
    position: absolute;
    top: -40px;
    left: 304px;
    transform: rotate(180deg);
    width: 30px;
    height: 30px;
    background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath d='M30 0H0V30A30 30 0 0 1 30 0Z' fill='white'/%3E%3C/svg%3E");
}

/* ========== ПЛАНШЕТ ========== */

@media (max-width: 1024px) {
    .categories {
        margin-top: 100px;
    }
    .categories-row {
        gap: 12px;
    }
    .category-card {
        height: 260px;
    }
    .category-card--small {
        width: 40%;
    }
    .category-card--big {
        width: calc(60% - 12px);
    }
    /* текст */
    .category-title-sm,
    .category-title-xl {
        font-size: 28px;
        left: 40px;
    }
}
@media (max-width: 768px) {
    .category-card--small {
        width: 50%;
    }
    .category-card--big {
        width: 50%;
    }
    .category-card .btn_arrow_second span {
        display: none;
    }
    .category-card .btn_arrow_second {
        display: block;
        padding-left: 20px;
        width: 101px;
    }
    .category-card--big::after {
        width: 115px;
        height: 70px;
    }
    .categories .btn_arrow_second.btn::before {
        content: "";
        position: absolute;
        top: -40px;
        left: 71px;
        transform: rotate(180deg);
        width: 30px;
        height: 30px;
        background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath d='M30 0H0V30A30 30 0 0 1 30 0Z' fill='white'/%3E%3C/svg%3E");
    }
}
@media (max-width: 480px) {
    .category-card--small {
        width: 50%;
        height: 214px;
    }
    .btn-radius .btn::before {
        top: -25px;
        left: 45px;
        width: 15px;
        height: 15px;
        background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 15'%3E%3Cpath d='M15 0H0V15A15 15 0 0 1 15 0Z' fill='white'/%3E%3C/svg%3E");
    }
    .btn-radius .btn::after {
        top: 45px;
        left: -29px;
        width: 15px;
        height: 15px;
        background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 15'%3E%3Cpath d='M15 0H0V15A15 15 0 0 1 15 0Z' fill='white'/%3E%3C/svg%3E");
    }
    .categories .btn_arrow_second.btn::before {
        top: 45px;
        left: -29px;
        width: 15px;
        height: 15px;
        background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 15'%3E%3Cpath d='M15 0H0V15A15 15 0 0 1 15 0Z' fill='white'/%3E%3C/svg%3E");
    }
    .categories .btn_arrow_second.btn::after {
        top: -25px;
        left: 45px;
        width: 15px;
        height: 15px;
        background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 15'%3E%3Cpath d='M15 0H0V15A15 15 0 0 1 15 0Z' fill='white'/%3E%3C/svg%3E");
    }
    .brand-section .btn::before {
        left: 86px;
    }
    .category-card::after {
        border-top-left-radius: 15px;
    }
    .category-card--big::after {
        width: 74px;
        height: 70px;
    }
    .category-card--small::after {
        width: 74px;
        height: 70px;
    }
    .category-card--big {
        width: 50%;
        height: 214px;
    }
    .category-btn {
        width: 60px !important;
        padding: 5px;
    }
    .category-card .btn_arrow_second {
        padding: 5px;
    }
    .category-btn icon {
        width: 50px;
    }
    .category-title-sm,
    .category-title-xl {
        /* размер подстраивается под ширину экрана: на 360px «ОСВЕЩЕНИЕ» не влезало в 28px
           и обрезалось. clamp держит его читаемым и в границах карточки */
        font-size: clamp(18px, 5.2vw, 28px);
        left: 16px;
        top: 75px;
        max-width: calc(100% - 32px);
        overflow-wrap: break-word;
    }
    .category-bg-table {
        background-image: url(../image/mainpage/category-tables.svg);
        object-fit: cover;
        background-repeat: no-repeat;
        z-index: 3;
        background-size: 100%;
        background-position-y: 77%;
        height: 100%;
        width: 141%;
    }
    .category-bg-comode {
        background-image: url(../image/mainpage/category-dresser.svg);
        object-fit: cover;
        background-repeat: no-repeat;
        background-position-x: -233px;
        background-position-y: 69%;
        height: 100%;
        width: 281%;
    }
    .category-bg-sofa {
        background-image: url(../image/mainpage/category-sofa.svg);
        object-fit: cover;
        background-repeat: no-repeat;
        background-position-y: 86%;
        background-position-x: -228px;
        height: 100%;
        width: 235%;
    }
    .category-bg-chairs {
        background-image: url(../image/mainpage/category-chairs.svg);
        object-fit: cover;
        background-repeat: no-repeat;
        background-size: 100%;
        background-position-y: 93%;
        height: 100%;
        width: 100%;
    }
    .category-bg-beds {
        background-image: url(../image/mainpage/category-beds.svg);
        object-fit: cover;
        background-repeat: no-repeat;
        background-size: 100%;
        background-position-y: 50%;
        height: 100%;
        width: 100%;
    }
    .category-bg-lights {
        background-image: url(../image/mainpage/category-lights.svg);
        object-fit: cover;
        background-repeat: no-repeat;
        background-size: 100%;
        background-position-y: 22%;
        height: 100%;
        width: 138%;
    }
}

/* ───────── Новые поступления ───────── */

.new-arrivals {
    margin-top: 150px;
    text-align: center;
}
@media (max-width: 992px) {
    .new-arrivals {
        margin-top: 100px;
    }
}
.new-arrivals-subtitle {
    font-size: 20px;
    font-weight: 500;
    color: #000;
    font-family: "Manrope", sans-serif;
}
.new-arrivals-title {
    font-size: 40px;
    font-weight: 500;
    color: #000;
    font-family: 'Cera Pro';
}

/* CARDS */

.product-grid {
    display: grid;
    -ms-grid-template-columns: repeat(4, 1fr);
    grid-template-columns: repeat(4, 1fr);
    justify-content: center;
    justify-items: center;
    gap: 24px;
}
.product-card {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    background-color: white;
    position: relative;
    overflow: hidden;
}
.product-card__slider {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 16px;
    border-radius: 12px;
}
.product-card__slide {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.product-card__tags {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    margin-top: -14px;
}
.product-card__tag-new {
    padding-left: 4px;
    padding-right: 4px;
    border-radius: 4px;
    border: 1px solid black;
}
.product-card__tag-sale {
    border-radius: 4px;
    padding-left: 8px;
    padding-right: 8px;
    background-color: #FF5449;
    line-height: 22px;
    color: white;
    font-size: 14px;
    font-weight: 300;
}
.product-card__tag-sale::before {
    content: "";
    margin-right: 8px;
    width: 8px;
    height: 8px;
    background-color: #fff;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.product-card__title {
    margin: 0 0 23px;
    font-size: 20px;
    font-weight: 500;
    color: black;
}
.product-card__price {
    display: flex;
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 31px;
    font-family: "Inter", sans-serif;
}
.product-card__price-group .product-card__price {
    margin-bottom: 16px;
}
.product-card__price-group {
    display: flex;
    gap: 4px;
    flex-direction: row;
}
.new-price {
    color: #FF5449;
}
.old-price {
    font-size: 24px;
    color: #9B9B9B;
    text-decoration: line-through;
}
.product-card__note {
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 13px;
    display: block;
}
.product-card__sizes {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 400;
}
.product-card__size {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.product-card__size p {
    color: black;
}
.product-card__size-label {
    font-size: 14px;
    font-weight: 400;
    margin: 0;
}
.product-card__size-value {
    font-size: 14px;
    font-weight: 400;
    margin: 0;
}
.product-card__colors {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    font-weight: 400;
}
.product-card__colors-title {
    font-size: 14px;
    font-weight: 400;
}
.product-card__colors-count {
    font-size: 14px;
    font-weight: 400;
}
.product-btn {
    font-weight: 600;
    margin-top: auto;
}
.product-card__slider {
    width: 100%;
    margin-bottom: 16px;
}
.product-card__slide {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.product-card__slide img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}
.product-card__pagination {
    position: static;
    margin-top: 8px;
    text-align: center;
}
.product-card__pagination .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    background: #ccc;
    opacity: 1;
    margin: 0 4px;
}
.product-card__pagination .swiper-pagination-bullet-active {
    background: #000;
}
.product-card__favorite {
    display: block;
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 2;
}
.product-card__favorite:hover path {
    fill: #000;
}
@media (max-width: 550px) {
    .product-card__favorite {
        top: 10px;
        right: 10px;
    }
}
/* Десктоп (≥1466px) - 4 большие карточки по 334px */

@media (min-width: 1466px) {
    .product-grid {
        -ms-grid-template-columns: repeat(4, 1fr);
        grid-template-columns: repeat(4, 1fr);
        justify-content: center;
    }
}

/* Планшет большой (1101px-1465px) - 3 карточки по 334px */

@media (max-width: 1465px) and (min-width: 1101px) {
    .product-grid {
        -ms-grid-template-columns: repeat(3, 1fr);
        grid-template-columns: repeat(3, 1fr);
        justify-content: center;
        gap: 20px;
    }
}

/* Планшет маленький (769px-1100px) - 3 карточки по 334px */

@media (max-width: 1100px) and (min-width: 769px) {
    .product-grid {
        -ms-grid-template-columns: repeat(3, 1fr);
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

/* Планшет-мобилка (481px-768px) - 2 карточки по 334px */

@media (max-width: 768px) and (min-width: 481px) {
    .product-grid {
        -ms-grid-template-columns: repeat(2, 1fr);
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

/* Планшет-мобилка (481px-700px) - 2 карточки, но меньше */

@media (max-width: 700px) and (min-width: 481px) {
    .product-grid {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
        justify-content: center;
        gap: 16px;
        padding: 0 10px;
        /* отступы по краям */
    }
    .product-card {
        max-width: 280px;
        transform-origin: center;
    }
    .product-btn {
        max-width: 218px;
        max-height: 44px;
        padding: 6px 10px;
        font-size: 14px;
        font-weight: 600;
    }
    .product-card__slide {
        height: 250px !important;
        /* меньше высота */
        background-size: contain;
    }
}

/* Мобилка (≤480px) - 2 карточки по 218px в ряд */

@media (max-width: 480px) {
    .brand-title {
        width: calc(100% - 60px);
        /* надпись-картинка: вписываем целиком, cover срезал правый край */
        -webkit-background-size: contain;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: left center;
        left: 30px;
        height: 117px;
    }
    .container,
    .mainpage {
        padding-left: 16px;
        padding-right: 16px;
    }
    .product-grid {
        -ms-grid-template-columns: repeat(2, 1fr);
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .product-card {
        width: 100%;
    }
    .product-card__slider {
        height: 234.48px;
        gap: 4px;
        margin-bottom: 1px;
    }
    .product-card__slide {
        width: 100% !important;
        height: 234.48 !important;
        flex: 0 0 auto;
        background-size: contain;
    }
    /* Уменьшаем текст для маленьких карточек */
    .product-card__title {
        font-size: 20px;
        margin-bottom: 8px;
        line-height: 1.2;
    }
    .product-card__price {
        font-size: 24px;
        margin-bottom: 10px;
    }
    .old-price {
        font-size: 20px;
    }
    .product-card__note {
        font-size: 14px;
        font-weight: 400;
        margin-bottom: 6px;
    }
    .product-card__sizes {
        gap: 8px;
        margin-bottom: 8px;
        font-size: 14px;
        font-weight: 400;
    }
    .product-card__size-label {
        font-size: 14px;
        font-weight: 400;
    }
    .product-card__size-value {
        font-size: 14px;
        font-weight: 400;
    }
    .product-card__colors {
        gap: 6px;
        margin-bottom: 8px;
    }
    .product-card__colors-title,
    .product-card__colors-count {
        font-size: 14px;
        font-weight: 400;
    }
    .product-btn {
        max-width: 218px;
        max-height: 44px;
        padding: 0px 0px 0px 16px;
        font-size: 14px;
        font-weight: 600;
    }
    /* Делаем теги меньше */
    .product-card__tags {
        gap: 6px;
        margin-bottom: 6px;
        margin-top: -10px;
    }
    .product-card__tag-sale {
        max-width: 98px;
    }
    .product-card__tag-sale,
    .product-card__tag-new {
        height: 21px;
        font-size: 13px;
        padding: 2px 8px;
        line-height: 16px;
        margin-top: 8px;
    }
}

/* Очень маленькие телефоны (<360px) - 1 карточка в ряд */

@media (max-width: 420px) {
    .product-card__price-group {
        flex-direction: column;
        gap: 0px;
    }
    .product-card__colors-title,
    .product-card__colors-count {
        font-size: 12px !important;
    }
    .product-card__size-label,
    .product-card__sizes {
        font-size: 13px !important;
    }
    .product-btn {
        font-size: 12px;
    }
}
@media (max-width: 360px) {
    .product-grid {
        -ms-grid-template-columns: repeat(1, 1fr);
        grid-template-columns: repeat(1, 1fr);
        margin: 0 auto;
    }
    .product-card {}
}

/* ───────── Проекты ───────── */

.projects {
    margin-top: 159px;
    font-family: "Manrope", sans-serif;
}
.projects-header {
    text-align: center;
}
.projects-subtitle {
    font-size: 20px;
    font-weight: 500;
    color: #000;
}
.projects-title {
    font-size: 40px;
    font-weight: 500;
    font-family: 'Cera Pro';
    color: #000;
}

/* отступ между заголовком и карточками */

.projects-grid {
    padding-top: 79px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

/* ссылка снизу */

.projects-more {
    grid-column: 1 / -1;
    flex-basis: 100%;
    width: 100%;
    display: block;
    text-align: center;
    font-size: 14px;
    text-decoration: underline;
    color: #353535;
    transition: all 0.2s ease;
}
.card__image {
    width: 45%;
}
.btn-card {
    font-weight: 600;
    width: 100%;
}
.projects-more:hover {
    color: #FF5449;
    text-decoration: underline;
}
@media (max-width: 992px) {
    .projects-grid {
        padding-top: 35px;
        display: -webkit-flex;
        display: -moz-flex;
        display: -ms-flex;
        display: -o-flex;
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        /* Firefox */
    }
    .projects-grid::-webkit-scrollbar {
        display: none;
        /* Chrome / Safari */
    }
    .projects-grid > * {
        scroll-snap-align: start;
    }
    .project-card {
        width: 332px;
        flex-shrink: 0;
    }
    .projects-title {
        font-size: 32px;
        text-align: center;
        font-weight: 500;
    }
    .card {
        width: 100% !important;
        height: fit-content;
        padding: 8px;
        padding-bottom: 16px;
        padding-top: 16px;
        flex-direction: column;
        gap: 12px;
    }
    .card__image-box {
        height: 330px;
        overflow: hidden;
        border-radius: 16px;
    }
    .card__image {
        width: 100%;
    }
    .card__title {
        margin: 0;
        margin-bottom: 16px;
        font-size: 18px;
    }
    .card__text {
        font-size: 16px;
        margin-bottom: 32px;
    }
    .card__content {
        padding-right: 0;
    }
    .projects-subtitle {
        font-size: 18px;
    }
    .btn-card {
        padding-left: 20px;
        justify-content: center;
        padding-right: 20px;
        justify-content: space-between;
    }
}
@media (max-width: 767px) {
    .projects {
        margin-top: 100px;
    }
    .projects-subtitle {
        margin-bottom: 9px;
    }
}
@media(max-width: 425px) {
    .project-card {
        width: 250px;
    }
    .card__image-box {
        height: 250px;
    }
    .card__content .btn-card span {
        font-size: 14px;
    }
}

/* ───────── Почему выбирают нас ───────── */

.why-us {
    margin-top: 157px;
}

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

.why-us-header {
    text-align: center;
}
.why-us-subtitle {
    font-size: 20px;
    font-weight: 500;
    font-family: "Manrope", sans-serif;
    color: #000;
}
.why-us-title {
    font-size: 40px;
    font-weight: 500;
    font-family: 'Cera Pro';
    color: #000;
}

/* пункты */

.why-us-list {
    padding-top: 60px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    font-family: "Manrope", sans-serif;
}
.why-us-item {
    text-align: center;
}
.why-us-icon {
    width: 96px;
    height: 92px;
    border: 2px solid #D9D9D9;
    border-radius: 30px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.why-us-item-title {
    font-size: 20px;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 16px;
    font-family: 'Cera Pro';
}
.why-us-text {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    color: #000000;
}
.why-us-info {
    padding-top: 50px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 78px;
    font-family: "Manrope", sans-serif;
}
.why-us-col {
    font-size: 16px;
    line-height: 1.6;
    color: #000000;
}
.why-us-col ul {
    padding-left: 18px;
}
@media (max-width: 1200px) {
    .why-us-list {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 40px;
    }
}
@media(max-width: 992px) {
    .why-us-info {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .why-us-list {
        gap: 24px;
        padding-top: 44px;
    }
}
@media (max-width: 768px) {
    .why-us {
        margin-top: 80px;
    }
    .why-us-title {
        font-size: 32px;
        font-weight: 500;
    }
    .why-us-subtitle {
        font-size: 16px;
    }
    .why-us-list {
        grid-template-columns: 1fr;
    }
    .why-us-item {
        max-width: 360px;
        margin: 0 auto;
    }
    .why-us-icon {
        width: 92px;
        height: 92px;
        border-radius: 30px;
        flex-shrink: 0;
        margin: 0;
    }
    .why-us-item-title {
        font-size: 16px;
    }
    .why-us-text {
        font-size: 14px;
    }
    .why-us-item {
        display: -webkit-flex;
        display: -moz-flex;
        display: -ms-flex;
        display: -o-flex;
        display: flex;
        -ms-align-items: center;
        align-items: center;
        gap: 32px;
        text-align: left;
    }
}

/* Блок «проекты с мебелью»: кнопка «Смотреть все» на всю ширину и по центру.
   На узких экранах контейнер переключается с grid на flex (класс flex_767) —
   без переноса строк кнопка уезжала за край экрана. */
@media (max-width: 767px) {
    .project-last-row {
        flex-wrap: wrap;
    }

    .project-last-row .projects-more {
        flex: 0 0 100%;
        width: 100%;
    }
}

@media (max-width: 767px) {
    .hero-container {
        position: relative;
        isolation: isolate;
    }

    .hero-container::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: -1;
        border-radius: inherit;
        background: linear-gradient(180deg, rgba(20, 20, 20, 0) 30%, rgba(20, 20, 20, 0.45) 100%);
        pointer-events: none;
    }
}

@media (max-width: 767px) {
    .blog-category.grid-col-2 {
        grid-template-columns: 1fr;
    }

    .blog-category .project-card {
        width: 100%;
    }
}

/* H1 главной: нужен поисковым системам и скринридерам, но в дизайне баннера
   заголовок нарисован картинкой — поэтому текстовый убираем из потока,
   не пряча его через display:none (такой текст поисковики игнорируют). */
.home-h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
