/* Глобальный сброс box-sizing для предсказуемой верстки */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Планшеты и маленькие десктопы */
@media (max-width: 1024px) {
    .header__row {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    .header__left {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    .header__logo img {
        max-width: 260px;
        padding-top: 0;
    }
    .header__nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px 25px;
        padding: 12px 20px;
        border-radius: 20px;
    }
    .header-btn {
        margin-right: 0;
    }
    .header__right {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    .header__contacts,
    .header__contacts-row,
    .header__right__contacts-row {
        display: contents;
        align-items: center;
        justify-content: center;
    }
}

/* Мобильные устройства */
@media (max-width: 768px) {
    header {
        padding-top: 15px;
        padding-bottom: 15px;
    }
    .container {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100%;
    }

    /* Мобильное меню */
    .menu-button {
        display: block;
        position: absolute;
        right: 20px;
        top: 20px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        z-index: 100;
    }
    /* CSS-гамбургер */
    .menu-button span {
        display: block;
        width: 24px;
        height: 2px;
        background: #fff;
        margin: 5px 0;
        border-radius: 2px;
        transition: 0.3s;
    }
    .menu-button.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .menu-button.active span:nth-child(2) { opacity: 0; }
    .menu-button.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

    /* Скрываем десктопное меню, показываем по клику */
    .header__nav,
    .header-nav {
        display: none;
        width: 100%;
        margin-top: 10px;
    }
    .header__nav.active,
    .header-nav.active {
        display: block;
    }
    .header__nav ul,
    .header-nav ul {
        flex-direction: column;
        padding: 15px 20px;
        border-radius: 15px;
        gap: 10px;
        justify-content: flex-start;
    }
    .header-btn,
    .header-callbak {
        width: 100%;
        text-align: center;
        margin: 5px 0;
    }
    .header__contacts-phone a { font-size: 20px; }

    /* Каталог */
    .main-catalog__row {
        flex-direction: column;
        gap: 20px;
    }
    .main-catalog__row-item {
        width: 100%;
        padding: 20px 15px 25px;
    }
    .main-catalog__row-item__title {
        font-size: 26px;
        line-height: 1.2;
        margin-bottom: 20px;
    }
    .main-catalog { margin-top: 40px; }

    /* Блоки преимуществ */
    .features-row {
        flex-direction: column;
        gap: 25px;
    }
    .features-item {
        flex-direction: column;
        height: auto;
        max-width: 100%;
        margin-bottom: 25px;
    }
    .features-item:nth-child(2),
    .features-item:nth-child(3) {
        max-width: 100%;
    }
    .features-item__info {
        margin: 20px 0 0;
    }
    .features-item__info-title {
        font-size: 22px;
        padding: 8px 12px;
    }
    .features-item__info-text {
        font-size: 24px;
    }

    /* Карусель / Герой-блок */
    .carousel-inner,
    .carousel-item {
        max-height: 300px;
    }
    .carousel-text {
        padding: 50px 0 30px;
    }
    .carousel-inner h1 {
        font-size: 30px;
        line-height: 1.1;
    }
    .carousel-inner h2 {
        font-size: 18px;
        line-height: 1.3;
    }
}