/* ==========================================================================
   МЕДИА-ЗАПРОСЫ ДЛЯ ВСЕХ ЭКРАНОВ (НА MARGIN)
   ========================================================================== */

@media (max-width: 1024px) {
    /* Адаптив шапки */
    body {
        padding-top: 130px;
    }
    .header {
        height: auto;
        padding: 15px 0;
    }
    .header__container {
        flex-wrap: wrap;
    }
    .header__logo-block {
        margin-bottom: 10px;
    }
    .header__menu {
        order: 3;
        width: 100%;
        overflow-x: auto;
        padding-top: 15px;
        border-top: 1px solid #f0f4f8;
        margin-top: 10px;
    }
    .menu-list {
        display: flex;
        justify-content: space-between;
        white-space: nowrap;
    }
    .menu-list li {
        margin-right: 15px;
    }
    .menu-list li:last-child {
        margin-right: 0;
    }
    .header__phones {
        text-align: left;
    }

    /* Адаптив первого экрана */
    .hero__container {
        flex-direction: column;
        text-align: center;
    }
    .hero__content {
        max-width: 100%;
        margin-bottom: 45px;
    }
    .hero__triggers {
        align-items: center;
    }
    .trigger-item {
        margin-bottom: 20px;
    }
    .trigger-item:last-child {
        margin-bottom: 0;
    }

    /* Адаптив второго экрана */
    .buyback__grid {
        flex-direction: column;
        align-items: center;
    }
    .buyback__info {
        max-width: 100%;
        margin-bottom: 50px;
    }
    .buyback__cards {
        width: 100%;
    }

    /* Адаптив третьего экрана (Каталог) */
    .catalog__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .catalog__info-panel {
        flex-direction: column;
    }
    .info-block {
        margin-bottom: 30px;
    }
    .info-block:last-child {
        margin-bottom: 0;
    }

    /* Адаптив четвертого экрана (Ремонт) */
    .repair__features {
        grid-template-columns: 1fr;
        margin-bottom: 40px;
    }
    .feature-card {
        margin-bottom: 20px;
    }
    .feature-card:last-child {
        margin-bottom: 0;
    }
    .repair__grid {
        flex-direction: column;
        align-items: center;
    }
    .repair__price-list {
        max-width: 100%;
        width: 100%;
        margin-bottom: 40px;
    }
    .repair__calc-wrapper {
        max-width: 500px;
    }

    /* Адаптив блока О компании и Контактов */
    .about__grid,
    .contacts__grid {
        flex-direction: column;
    }
    .about__text {
        max-width: 100%;
        width: 100%;
        margin-bottom: 40px;
    }
    .about__stats {
        max-width: 100%;
        width: 100%;
    }
    .contacts__info {
        max-width: 100%;
        width: 100%;
        margin-bottom: 40px;
    }
    .contacts__map {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 28px;
    }
    .buyback,
    .catalog,
    .repair,
    .about,
    .contacts {
        padding: 60px 0;
    }
    .footer__container {
        flex-direction: column;
        text-align: center;
    }
    .footer__left {
        margin-bottom: 15px;
    }
    .catalog__tabs {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
        white-space: nowrap;
    }
    .tab-btn {
        margin-right: 12px;
    }
    .tab-btn:last-child {
        margin-right: 0;
    }
}

@media (max-width: 640px) {
    .header__info {
        display: none;
    }
    .hero__title {
        font-size: 32px;
    }
    .hero__subtitle {
        font-size: 16px;
    }
    .catalog__grid {
        grid-template-columns: 1fr;
    }
    .buyback__cards {
        grid-template-columns: 1fr;
    }
    .buyback-card {
        margin-bottom: 20px;
    }
    .buyback-card:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .menu-list {
        justify-content: flex-start;
    }
    .hero__title {
        font-size: 28px;
    }
    .hero__form-wrapper,
    .buyback__form-wrapper,
    .catalog__info-panel,
    .repair__calc-form {
        padding: 20px;
    }
    .buyback__guarantee {
        margin-top: 25px;
    }
    .buyback__map-wrapper {
        height: 200px;
    }
    .price-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .price-name {
        margin-bottom: 6px;
        padding-right: 0;
    }
    .about__stats {
        grid-template-columns: 1fr;
    }
    .stat-item {
        padding: 20px;
        margin-bottom: 15px;
    }
    .stat-item:last-child {
        margin-bottom: 0;
    }
    .contact-card {
        margin-bottom: 25px;
    }
    .contact-card:last-child {
        margin-bottom: 0;
    }
    .contacts__map {
        height: 300px;
    }
}

/**/

/* Полная адаптация под мобилки */
/* Адаптив: меняем количество картинок на экране */
@media (max-width: 992px) {
    .about__slider-wrapper { --visible-slides: 2; } /* На планшетах видно 2 картинки */
    .slide img { height: 220px; }
}

@media (max-width: 600px) {
    .about__slider-wrapper { --visible-slides: 1; } /* На мобилках видна 1 картинка */
    .slide img { height: 200px; }
    .prev-btn { left: 10px; }
    .next-btn { right: 10px; }
}

/**/

/* Адаптив под экраны */
@media (max-width: 992px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); } /* 2 в ряд на планшетах */
}

@media (max-width: 650px) {
    .products-grid { grid-template-columns: 1fr; } /* 1 в ряд на телефонах */
    .prod-slide img { height: 180px; }
    .products-tabs { gap: 8px; }
    .tab-btn { padding: 10px 18px; font-size: 14px; }
}

/**/

/* Адаптив под мобилки, чтобы картинка занимала больше места */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95%;
        padding-top: 40px;
    }
    .lightbox-close {
        top: 10px;
        right: 20px;
        font-size: 35px;
    }
}

/* 📱 Планшеты (до 768px) */
@media (max-width: 768px) {
    .service-banner__content {
        flex-direction: column;
        align-items: flex-start; /* Выравнивание по левому краю */
        gap: 8px;
    }
}

/* 📱 Мобильные телефоны (до 480px) */
@media (max-width: 480px) {
    .service-banner {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .mobile-break {
        display: block; /* Перенос адреса на новую строку для компактности */
    }

    .schedule-days {
        display: flex;
        flex-direction: column; /* Дни недели встают друг под друга */
        gap: 4px;
        margin-top: 2px;
    }

    .schedule-separator {
        display: none; /* Прячем вертикальную черту на мобильных */
    }
}