/* МОБИЛЬНЫЕ КАТЕГОРИИ В СТИЛЕ ЯНДЕКС.МАРКЕТА */

/* Скрываем только основные фильтры на мобильных, но оставляем быстрые фильтры и сортировку */
@media (max-width: 768px) {    
    .filters-section .filters-card {
        display: none !important;
    }
}

/* ГЛАВНЫЕ КАТЕГОРИИ - КРУПНЫЕ КАРТОЧКИ */
.mobile-main-categories {
    display: none;
}

@media (max-width: 768px) {
    .mobile-main-categories {
        display: block !important;
        padding: 1rem 0;
    }
    
    .mobile-category-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .mobile-category-card {
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        padding: 1.5rem 1rem;
        text-align: center;
        text-decoration: none !important;
        color: inherit !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        transition: all 0.2s ease;
        min-height: 120px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .mobile-category-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        border-color: #3b82f6;
    }
    
    .mobile-category-icon {
        font-size: 2.5rem;
        color: #3b82f6;
        margin-bottom: 0.75rem;
    }
    
    .mobile-category-name {
        font-weight: 600;
        font-size: 0.95rem;
        line-height: 1.3;
        color: #1f2937;
        margin: 0;
    }
    
    .mobile-category-count {
        font-size: 0.8rem;
        color: #6b7280;
        margin-top: 0.25rem;
    }
}

/* НИЖНИЕ ФИЛЬТРЫ В СТИЛЕ ЯНДЕКСА */
.mobile-bottom-filters {
    display: none;
}

@media (max-width: 768px) {
    .mobile-bottom-filters {
        display: block !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid #e5e7eb;
        padding: 0.75rem 1rem;
        z-index: 1000;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .mobile-filter-buttons {
        display: flex;
        gap: 0.5rem;
        justify-content: space-around;
        max-width: 100%;
    }
    
    .mobile-filter-btn {
        flex: 1;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        padding: 0.6rem 0.5rem;
        font-size: 0.8rem;
        font-weight: 500;
        color: #374151;
        text-decoration: none !important;
        text-align: center;
        transition: all 0.2s ease;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.2rem;
        min-height: 50px;
    }
    
    .mobile-filter-btn:hover,
    .mobile-filter-btn.active {
        background: #3b82f6;
        color: white;
        border-color: #3b82f6;
    }
    
    .mobile-filter-icon {
        font-size: 1rem;
    }
    
    /* Добавляем отступ снизу для контента */
    body {
        padding-bottom: 80px;
    }
}

/* УПРОЩЕННЫЕ ТОВАРНЫЕ КАРТОЧКИ НА МОБИЛЬНЫХ В СТИЛЕ ЯНДЕКС.МАРКЕТА */
@media (max-width: 768px) {
    .products-section .row {
        margin: 0 -0.5rem;
    }
    
    .products-section .col-lg-3,
    .products-section .col-md-4,
    .products-section .col-sm-6 {
        width: 50% !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding: 0 0.5rem;
        margin-bottom: 1rem;
    }
    
    .product-card {
        border-radius: 16px;
        border: 1px solid #e5e7eb;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        background: white;
        overflow: hidden;
        transition: all 0.2s ease;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
    }
    
    .product-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        border-color: #3b82f6;
    }
    
    /* Компактные изображения */
    .product-card .image-container,
    .product-card .card-img-top {
        height: 140px !important;
        max-height: 140px !important;
        border-radius: 0;
    }
    
    .product-card .product-image,
    .product-card img {
        height: 140px !important;
        max-height: 140px !important;
        object-fit: cover;
        border-radius: 0;
    }
    
    /* Компактное содержимое карточки */
    .product-card .card-body {
        padding: 0.75rem !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem;
        height: auto !important;
    }
    
    /* Компактный заголовок */
    .product-card .card-title {
        font-size: 0.85rem !important;
        line-height: 1.3 !important;
        margin: 0 !important;
        height: 2.2rem !important;
        overflow: hidden !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        font-weight: 600 !important;
        color: #1f2937 !important;
    }
    
    .product-card .card-title a {
        color: inherit !important;
        text-decoration: none !important;
    }
    
    /* Компактная информация о бренде */
    .product-card .text-muted {
        font-size: 0.7rem !important;
        margin: 0 !important;
        height: auto !important;
        color: #6b7280 !important;
    }
    
    /* Улучшенный блок цен */
    .product-card .price-block {
        margin: 0.25rem 0 !important;
        height: auto !important;
    }
    
    .product-card .old-price {
        font-size: 0.75rem !important;
        color: #9ca3af !important;
        text-decoration: line-through !important;
        margin: 0 !important;
        line-height: 1.2 !important;
    }
    
    .product-card .price {
        font-size: 1rem !important;
        font-weight: 700 !important;
        color: #1f2937 !important;
        margin: 0 !important;
        line-height: 1.2 !important;
    }
    
    /* Компактные кнопки */
    .product-card .btn {
        font-size: 0.75rem !important;
        padding: 0.5rem 0.75rem !important;
        border-radius: 8px !important;
        font-weight: 600 !important;
        margin-bottom: 0.25rem !important;
    }
    
    .product-card .btn-outline-primary {
        border-color: #e5e7eb !important;
        color: #6b7280 !important;
        background: #f9fafb !important;
    }
    
    .product-card .btn-outline-primary:hover {
        background: #f3f4f6 !important;
        border-color: #d1d5db !important;
        color: #374151 !important;
    }
    
    .product-card .btn-primary {
        background: #3b82f6 !important;
        border-color: #3b82f6 !important;
        color: white !important;
    }
    
    .product-card .btn-primary:hover {
        background: #2563eb !important;
        border-color: #2563eb !important;
    }
    
    /* Компактные бейджи статуса */
    .product-status-badge {
        top: 0.5rem !important;
        right: 0.5rem !important;
        font-size: 0.65rem !important;
        padding: 0.25rem 0.5rem !important;
        border-radius: 6px !important;
        font-weight: 700 !important;
        background: #ef4444 !important;
        color: white !important;
        border: none !important;
    }
    
    /* Убираем лишние отступы между кнопками */
    .product-card .d-grid {
        gap: 0.25rem !important;
        margin-top: auto !important;
    }
}

/* СКРЫТИЕ ЛИШНИХ ЭЛЕМЕНТОВ НА МОБИЛЬНЫХ */
@media (max-width: 768px) {
    .advantages-section {
        display: none !important;
    }
    
    .hero-section {
        padding: 2rem 0 1rem !important;
    }
    
    .hero-section .display-4 {
        font-size: 1.75rem !important;
    }
    
    .hero-section .lead {
        font-size: 1rem !important;
    }
    
    .page-header h2 {
        font-size: 1.5rem !important;
    }
}

/* ИКОНКИ ДЛЯ КАТЕГОРИЙ */
.category-icon-korma { color: #f59e0b; }
.category-icon-igrushki { color: #ef4444; }
.category-icon-odezhda { color: #8b5cf6; }
.category-icon-sredstva { color: #10b981; }
.category-icon-kletki { color: #6b7280; }
.category-icon-transport { color: #3b82f6; }
.category-icon-default { color: #6366f1; } 