/* ============================================
   МЕДИА-ЗАПРОСЫ ДЛЯ АДАПТИВНОСТИ
   ============================================ */

/* Планшеты и ноутбуки (1024px и меньше) */
@media (max-width: 1024px) {
    .product-container-info {
        flex-direction: column;
    }
    
    .product-image-info,
    .product-info-details {
        width: 100%;
    }
    
    .product-image-info {
        height: 50vh;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Планшеты (768px и меньше) */
@media (max-width: 768px) {
    /* Навигация */
    .nav {
        padding: 15px 20px;
    }
    
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
        background: none;
        border: none;
        font-size: 1.5em;
        cursor: pointer;
        color: #2c3e50;
    }
    
    .mobile-menu {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: white;
        padding: 20px;
        flex-direction: column;
        gap: 15px;
        z-index: 999;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
    
    .mobile-menu.active {
        display: flex;
    }
    
    .mobile-menu a {
        text-decoration: none;
        color: #2c3e50;
        padding: 10px;
        text-align: center;
        border-bottom: 1px solid #eee;
    }
    
    /* Слайдер */
    .block_one {
        height: 400px;
    }
    
    .slide .description {
        left: 20px;
        right: 20px;
        bottom: 20px;
        padding: 20px;
        max-width: none;
    }
    
    .slide .description h3 {
        font-size: 1.3em;
    }
    
    .slide .description p {
        font-size: 0.85em;
    }
    
    /* Сетки */
    .products-main,
    .catalog-grid,
    .news-grid,
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    /* Преимущества */
    .features {
        flex-direction: column;
        align-items: center;
    }
    
    .feature-box {
        width: 100%;
        max-width: 300px;
    }
    
    /* Футер */
    .footer {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 40px 20px;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    /* Фильтры */
    .catalog-filters {
        flex-direction: column;
    }
    
    .search-box,
    .category-tabs,
    .sort-select {
        width: 100%;
    }
    
    .category-tabs {
        justify-content: center;
        overflow-x: auto;
    }
    
    /* Отзывы */
    .reviews-container {
        flex-direction: column;
    }
    
    /* О нас */
    .about-content {
        grid-template-columns: 1fr;
    }
    
    /* Профиль */
    .profile-btns {
        flex-direction: column;
    }
    
    .profile-btn {
        width: 100%;
    }
    
    /* Корзина */
    .cart-actions {
        flex-direction: column;
    }
    
    .btn-clear,
    .btn-order {
        text-align: center;
    }
    
    /* Заказы */
    .order-card {
        padding: 15px;
    }
    
    .order-status {
        position: static;
        display: inline-block;
        margin-bottom: 10px;
    }
    
    .orders-container {
        padding: 15px;
    }
}

/* Мобильные телефоны (480px и меньше) */
@media (max-width: 480px) {
    /* Навигация */
    .logo img {
        height: 40px;
    }
    
    /* Слайдер */
    .block_one {
        height: 300px;
    }
    
    .slide .description {
        padding: 12px;
    }
    
    .slide .description h3 {
        font-size: 1em;
        margin-bottom: 5px;
    }
    
    .slide .description p {
        font-size: 0.75em;
        margin-bottom: 8px;
    }
    
    .slide-btn {
        padding: 6px 12px;
        font-size: 0.8em;
    }
    
    /* Заголовки */
    .section-title,
    .gallery-title,
    .page-title,
    .catalog-title {
        font-size: 1.5em;
        margin: 20px 0;
    }
    
    /* Карточки */
    .product-title-main {
        font-size: 1em;
    }
    
    .product-price-main {
        font-size: 1em;
    }
    
    .btn-main {
        padding: 8px 0;
        font-size: 0.85em;
    }
    
    /* Фильтры */
    .filter-tab {
        padding: 6px 12px;
        font-size: 0.85em;
    }
    
    /* Формы */
    .auth-container {
        padding: 20px;
        margin: 20px;
    }
    
    .auth-container h1 {
        font-size: 1.5em;
    }
    
    /* Профиль */
    .profile-header {
        font-size: 1.3em;
        padding: 20px;
    }
    
    .profile-content {
        padding: 20px;
    }
    
    .profile-photo {
        width: 100px;
        height: 100px;
    }
    
    /* Кнопка наверх */
    .butt-up {
        bottom: 15px;
        right: 15px;
    }
    
    .btn-up {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }
}

/* Очень маленькие экраны (375px и меньше) */
@media (max-width: 375px) {
    .products-main,
    .catalog-grid,
    .news-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .product-card-main {
        max-width: 100%;
    }
    
    .slide .description h3 {
        font-size: 0.9em;
    }
    
    .slide .description p {
        display: none;
    }
    
    .slide-btn {
        padding: 5px 10px;
        font-size: 0.7em;
    }
}

/* Телефоны в ландшафтной ориентации */
@media (max-width: 812px) and (orientation: landscape) {
    .block_one {
        height: 350px;
    }
    
    .slide .description {
        bottom: 10px;
        left: 10px;
        right: 10px;
        padding: 10px;
    }
    
    .slide .description h3 {
        font-size: 1em;
        margin-bottom: 5px;
    }
    
    .slide .description p {
        display: none;
    }
}

/* Предотвращение масштабирования на iOS */
@media (max-width: 768px) {
    input, 
    select, 
    textarea, 
    button {
        font-size: 16px !important;
    }
}

/* Стили для скролла категорий */
@media (max-width: 768px) {
    .category-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    .category-tabs::-webkit-scrollbar {
        height: 4px;
    }
    
    .category-tabs::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }
    
    .category-tabs::-webkit-scrollbar-thumb {
        background: #e94e77;
        border-radius: 10px;
    }
}

/* Адаптив для хлебных крошек */
@media (max-width: 768px) {
    .breadcrumbs {
        margin-bottom: 20px;
        font-size: 0.75em;
        padding: 0 15px;
    }
}