/* Brands Page — равноправная витрина брендов (оригинальные логотипы) */

.brands-hero {
    text-align: center;
    margin-bottom: 28px;
}

.brands-hero-content h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--secondary-color);
    position: relative;
    display: inline-block;
    padding-bottom: 12px;
}

.brands-hero-content h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
}

.brands-intro {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
    color: #64748b;
    font-size: 15px;
    line-height: 1.6;
}

.brand-seller-status {
    background: rgba(63, 111, 148, 0.08);
    border: 1px solid rgba(63, 111, 148, 0.2);
    border-radius: 8px;
    padding: 8px 14px;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 500;
    display: inline-block;
    text-align: center;
}

.brand-seller-status strong {
    font-weight: 700;
}

.brands-alphabet {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 36px;
    padding: 16px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 12px;
    z-index: 100;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.alphabet-letter {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 8px;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 14px;
    transition: background 0.2s ease, color 0.2s ease;
    text-decoration: none;
}

.alphabet-letter:hover {
    background: var(--primary-color);
    color: var(--white);
}

.brand-group {
    margin-bottom: 40px;
}

.brand-group-title {
    font-size: 18px;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 14px;
    padding-left: 2px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Равноправная сетка одинаковых ячеек */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}

.brand-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: none;
    height: 150px;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
}

.brand-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

/* Одинаковая область под логотип — без изменения цвета/пропорций */
.brand-logo-container {
    width: 100%;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.brand-logo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    /* Оригинальные логотипы без фильтров и перекраски */
    filter: none;
    opacity: 1;
}

.brand-name-fallback {
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    padding: 8px;
    word-break: break-word;
}

.brand-name-sub {
    font-weight: 600;
    font-size: 12px;
    text-align: center;
    color: #64748b;
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-card:hover .brand-name-sub {
    color: #475569;
}

@media (max-width: 768px) {
    .brands-hero { margin-bottom: 16px; }
    .brands-hero-content h1 { font-size: 22px; padding-bottom: 10px; margin-bottom: 10px; }
    .brands-intro { font-size: 14px; line-height: 1.5; }
    .brands-alphabet { padding: 10px; margin-bottom: 20px; gap: 8px; top: 8px; position: static; }
    .alphabet-letter { width: 40px; height: 40px; font-size: 14px; }
    .brand-group { margin-bottom: 28px; }
    .brand-group-title { font-size: 15px; margin-bottom: 10px; }
    .brand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .brand-card { height: 130px; padding: 12px 8px; border-radius: 10px; }
    .brand-logo-container { height: 72px; margin-bottom: 6px; }
    .brand-name-sub { font-size: 12px; }
}

@media (min-width: 1100px) {
    .brand-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}
