/* Современный дизайн страницы производителей */

/* Алфавитный указатель */
.manufacturer-alphabet {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.alphabet-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
}

.alphabet-item {
    display: inline-block;
}

.alphabet-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    text-decoration: none;
    color: #007bff;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.alphabet-link:hover {
    background: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
    text-decoration: none;
}

.alphabet-link.active {
    background: #007bff;
    color: white;
    transform: scale(1.1);
}

/* Секция производителей */
.manufacturer-section {
    margin-bottom: 25px;
    opacity: 0;
    animation: fadeInUp 0.4s ease forwards;
}

.manufacturer-section:nth-child(1) { animation-delay: 0.05s; }
.manufacturer-section:nth-child(2) { animation-delay: 0.1s; }
.manufacturer-section:nth-child(3) { animation-delay: 0.15s; }
.manufacturer-section:nth-child(4) { animation-delay: 0.2s; }
.manufacturer-section:nth-child(5) { animation-delay: 0.25s; }

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
}

.section-letter {
    font-size: 28px;
    font-weight: 700;
    color: #007bff;
    margin-right: 15px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(102,126,234,0.3);
}

.section-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, #667eea, transparent);
}

/* Сетка производителей */
.manufacturers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

/* Карточка производителя */
.manufacturer-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.manufacturer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.manufacturer-card:hover::before {
    transform: translateX(0);
}

.manufacturer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.manufacturer-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    gap: 8px;
}

.manufacturer-logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 700;
    color: white;
    box-shadow: 0 2px 8px rgba(240,147,251,0.3);
}

.manufacturer-info {
    flex: 1;
    min-width: 0; /* Позволяет тексту обрезаться если не помещается */
}

.manufacturer-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
    transition: color 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.manufacturer-card:hover .manufacturer-name {
    color: #007bff;
}

.manufacturer-count {
    font-size: 11px;
    color: #6c757d;
}

.manufacturer-arrow {
    font-size: 12px;
    color: #dee2e6;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 2px;
}

.manufacturer-card:hover .manufacturer-arrow {
    color: #007bff;
    transform: translateX(2px);
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Поиск производителей */
.manufacturer-search {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.03);
}

.search-container {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid #e9ecef;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.search-input:focus {
    outline: none;
    border-color: #007bff;
    background: white;
    box-shadow: 0 4px 20px rgba(0,123,255,0.15);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 16px;
}

/* Счетчики и статистика */
.manufacturer-stats {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(102,126,234,0.3);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 2px;
}

.stat-label {
    font-size: 11px;
    opacity: 0.9;
}

/* Адаптивность */
@media (max-width: 768px) {
    .manufacturer-alphabet {
        padding: 10px;
    }
    
    .alphabet-link {
        width: 25px;
        height: 25px;
        font-size: 11px;
    }
    
    .section-letter {
        font-size: 24px;
        width: 35px;
        height: 35px;
    }
    
    .manufacturers-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .manufacturer-card {
        padding: 10px;
    }
    
    .manufacturer-logo {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .manufacturer-name {
        font-size: 13px;
    }
    
    .popular-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
    }
    
    .popular-item {
        font-size: 11px;
        padding: 6px 8px;
    }
}

/* Эффект загрузки */
.manufacturer-loading {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.empty-title {
    font-size: 24px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
}

.empty-text {
    color: #6c757d;
    margin-bottom: 30px;
}

/* Премиум производители */
.manufacturer-card.premium {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe3e3 100%);
    border: 2px solid #ff6b6b;
}

.manufacturer-card.premium .manufacturer-logo {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 20px rgba(102,126,234,0.4);
}

.manufacturer-card.premium::before {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.manufacturer-card.premium .manufacturer-name {
    color: #333;
    font-weight: 700;
}

.manufacturer-card.premium:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(102,126,234,0.3);
}

/* Популярные производители */
.popular-manufacturers {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.popular-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
    color: #333;
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.popular-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 8px 10px;
    text-align: center;
    transition: all 0.2s ease;
    font-size: 13px;
}

.popular-item:hover {
    border-color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,123,255,0.15);
}
