/* =========================================
   18. АДАПТИВНОСТЬ (МОБИЛЬНЫЕ)
   ========================================= */

@media (max-width: 1100px) {
    .nav { gap: 15px; }
    .nav__link { font-size: 15px; }
    .nav-catalog__btn { padding: 10px 18px; font-size: 15px; }
}

@media (max-width: 992px) {
    .category-card { width: calc(50% - 12px); }
    .partner-card { width: calc(33.333% - 16px); }
}

@media (max-width: 900px) {
    .header__search { display: none; }
    .header__search-toggle { display: inline-flex; }
    .header__search--open {
        display: flex !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: 1px solid var(--border-color);
        height: 56px;
        background: #fff;
        z-index: 200;
    }
    .product-page {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 20px;
    }
    .footer__top {
        flex-direction: column;
        gap: 40px;
    }
    .footer__brand {
        max-width: 100%;
    }
    .footer__slogan {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    /* Шапка */
    .nav { display: none !important; }
    .header__top { display: none; }
    .header__inner { height: 70px; gap: 12px; }
    .logo__img { height: 40px; max-width: 130px; }
    .header__actions { gap: 4px !important; }
    .header__actions .btn--icon { padding: 4px 8px !important; font-size: 20px !important; }

    /* Бургер и каталог */
    .header__burger {
        display: inline-flex !important;
        font-size: 24px;
        padding: 8px 12px;
        background: transparent;
        border: none;
        cursor: pointer;
        color: var(--text-main);
    }
    .header__mobile-catalog {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        padding: 8px 12px !important;
        font-size: 13px !important;
        white-space: nowrap;
        height: 40px;
    }

    /* Скрываем каталог в основном меню */
    .nav-catalog { display: none; }

    /* Остальное */
    .hero__title { font-size: 30px; }
    .breadcrumbs { font-size: 12px; gap: 6px; margin-top: 16px; }
    .subcategories-grid { flex-direction: column; align-items: center; }
    .subcategory-card { width: 100%; max-width: 300px; }
    .category-grid { gap: 16px; }
    .category-card { width: 100%; max-width: 100%; }
    .category-card__image { height: 140px; }
    .category-card__title { padding: 12px; font-size: 15px; }
    .page-content { padding: 20px; }
    .contact-item { flex-direction: column; align-items: flex-start; gap: 4px; }

    /* Кнопка назад */
    .btn-back-fixed { bottom: 20px; right: 20px; padding: 12px 24px; font-size: 14px; }

    /* Админка */
    .admin-products { grid-template-columns: 1fr; }
    .section-title { font-size: 22px; }

    /* Страница товара */
    .product-page__buy > div {
        flex-direction: column;
        align-items: stretch !important;
        width: 100%;
    }
    .product-page__buy .js-qty-minus,
    .product-page__buy .js-qty-plus {
        padding: 0 20px !important;
    }
    .product-page__buy .btn {
        width: 100%;
        justify-content: center;
    }
    .product-page__main-image img {
        padding: 10px !important;
    }
    .tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }
    .tabs::-webkit-scrollbar {
        display: none;
    }
    .tabs__item {
        white-space: nowrap;
        padding: 12px 14px !important;
        font-size: 12px !important;
    }
}

@media (max-width: 600px) {
    .footer { padding: 40px 0 20px; }
    .footer__contact-row { flex-direction: column; align-items: flex-start; gap: 12px; }
    .footer__logo { height: 56px; }
    .footer__slogan { font-size: 16px; margin-bottom: 24px; }
    .footer__contacts { font-size: 14px; }
    .footer__bottom { font-size: 11px; }
    .partners-grid { gap: 12px; }
    .partner-card { width: calc(50% - 6px); padding: 16px 8px; min-width: 140px; }
    .partner-card__logo { height: 50px; margin-bottom: 8px; }
    .partner-card__name { font-size: 11px; }
}

@media (max-width: 480px) {
    .header__inner {
        height: auto !important;
        padding: 12px 0;
        flex-wrap: wrap;
    }
    .header__user { display: none; }
    .btn--icon { padding: 4px 6px !important; font-size: 18px !important; }
    .cart-badge { font-size: 10px !important; padding: 1px 5px !important; top: -4px !important; right: -4px !important; }
}