/*
 * УЛУЧШЕНИЯ ФОРМАТИРОВАНИЯ - ДОВЕРИЕ И КОМФОРТ
 * Особое внимание к деталям и аккуратности
 */

/* ==========================================
   BOTTOM NAV - ВЫРАВНИВАНИЕ ПО КОНТЕНТУ
   ========================================== */

.bottom-nav {
    /* Центрируем и выравниваем по контенту */
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

/* Убираем растяжение на всю ширину */
.bottom-nav .nav-item {
    width: 100%;
    max-width: 100%;
}

@media (max-width: 768px) {
    .bottom-nav {
        padding: 12px 16px;
        gap: 12px;
    }
}

/* ==========================================
   КАТЕГОРИИ - ИДЕАЛЬНОЕ ФОРМАТИРОВАНИЕ
   ========================================== */

.categories-section {
    padding: 64px 24px;
}

.categories-heading {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* Улучшенный grid для категорий */
.hero-gallery {
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    padding: 0;
}

/* Идеальное форматирование карточек категорий */
.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Большая карточка - горизонтальный layout */
.gallery-item.gallery-large {
    grid-column: span 2;
    aspect-ratio: 2/1;
    flex-direction: row;
    padding: 40px;
    gap: 32px;
}

.gallery-large .gallery-emoji {
    font-size: 96px;
    margin: 0;
}

.gallery-large .gallery-text-content {
    text-align: left;
    align-items: flex-start;
}

/* Эмодзи - четкий размер */
.gallery-emoji {
    font-size: 72px;
    margin-bottom: 16px;
    line-height: 1;
    user-select: none;
}

/* Текстовый контент - идеальная типографика */
.gallery-text-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.gallery-category-name {
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.gallery-category-desc {
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
    line-height: 1.4;
    max-width: 280px;
}

.gallery-count {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    margin-top: 4px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(8px);
}

/* CTA карточка */
.gallery-cta {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border: 2px dashed #dee2e6;
}

.gallery-cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.gallery-cta-icon {
    font-size: 48px;
    color: var(--text-muted);
}

.gallery-cta-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-muted);
}

/* ==========================================
   PRODUCT CARDS - УЛУЧШЕННОЕ ФОРМАТИРОВАНИЕ
   ========================================== */

.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

/* Информация о товаре - идеальные отступы */
.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.4;
    letter-spacing: -0.01em;
    margin: 0;
    min-height: 48px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.02em;
    margin: 4px 0;
}

.product-seller {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-action-hint {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    padding: 8px;
    background: var(--bg-light);
    border-radius: 8px;
    margin-top: 8px;
}

/* Badge - аккуратный дизайн */
.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.product-badge.hot {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
}

.product-badge.new {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

/* ==========================================
   ФИЛЬТРЫ - БЕЗ ИКОНОК (ПО ЗАПРОСУ)
   ========================================== */

.catalog-filters {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 24px;
    border-radius: 50px;
    border: 2px solid var(--border-color);
    background: white;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    background: rgba(216, 67, 21, 0.05);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary-gradient);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(216, 67, 21, 0.25);
}

/* Иконки в фильтрах */
.filter-btn .filter-icon {
    font-size: 18px;
    line-height: 1;
}

/* ==========================================
   АДАПТИВНОСТЬ - МОБИЛЬНЫЕ УСТРОЙСТВА
   ========================================== */

@media (max-width: 768px) {
    .categories-heading {
        font-size: 28px;
        margin-bottom: 32px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .gallery-item.gallery-large {
        grid-column: span 1;
        aspect-ratio: 1;
        flex-direction: column;
        padding: 32px 24px;
    }
    
    .gallery-large .gallery-emoji {
        font-size: 72px;
        margin-bottom: 16px;
    }
    
    .gallery-large .gallery-text-content {
        text-align: center;
        align-items: center;
    }
    
    .product-name {
        font-size: 16px;
        min-height: auto;
    }
    
    .product-price {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .categories-section {
        padding: 48px 16px;
    }
    
    .gallery-item {
        padding: 24px 20px;
    }
    
    .gallery-emoji {
        font-size: 56px;
    }
    
    .gallery-category-name {
        font-size: 20px;
    }
    
    .gallery-category-desc {
        font-size: 14px;
    }
}

/* ==========================================
   CATALOG SECTION - ВЫРАВНИВАНИЕ
   ========================================== */

.catalog-section {
    padding: 64px 24px;
    background: var(--bg-light);
}

.catalog-header {
    max-width: 1200px;
    margin: 0 auto 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.section-heading {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.02em;
    margin: 0;
}

/* ==========================================
   PETITION SECTION - УЛУЧШЕННОЕ ФОРМАТИРОВАНИЕ
   ========================================== */

.masterclass-petition {
    padding: 64px 24px;
}

.petition-card {
    max-width: 900px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .catalog-section,
    .masterclass-petition {
        padding: 48px 16px;
    }
    
    .section-heading {
        font-size: 28px;
    }
}
