/* =============================================================================
   Brand Page Styles
   ============================================================================= */

/* =============================================================================
   Hero Card
   ============================================================================= */

.brand-hero-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
    margin-bottom: 24px;
    overflow: hidden;
}

/* Brand image header */
.brand-hero-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #eef1f5;
}

.brand-hero-header-img {
    max-height: 60px;
    width: auto;
    object-fit: contain;
}

/* Fallback text H1 (when no brand image) */
.brand-hero-title {
    font-size: 1.6em;
    font-weight: 600;
    color: #2a2a2a;
    margin: 0;
    padding: 8px 10px;
    line-height: 1.4em;
    background: #f8f9fa;
    border-left: 3px solid #337ab7;
    border-bottom: 1px solid #e1e1e1;
    border-radius: 4px;
}

.brand-hero-body {
    padding: 8px 16px 12px;
    overflow: hidden;
}

.brand-hero-desc {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.55;
    margin: 0;
}

/* Stats Bar */
.brand-hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 5px 16px;
    background: linear-gradient(to right, #f8fafc, #e2e8f0);
    border-top: 1px solid #eef1f5;
}

.brand-hero-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 24px;
    font-size: 0.85rem;
    color: #555;
}

.brand-hero-stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}

.brand-hero-stat-label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

.brand-hero-stat-divider {
    width: 1px;
    height: 28px;
    background: #cbd5e1;
}

/* =============================================================================
   Highlights Section
   ============================================================================= */

.brand-highlights {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}

.brand-highlights-col {
    flex: 1;
    min-width: 0;
}

.brand-highlights-col-full {
    flex: 1;
}

.brand-section-header {
    background: #f1f5f9;
    color: #334155;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    padding: 10px 16px;
    border-radius: 8px 8px 0 0;
    border-bottom: 1px solid #e2e8f0;
}

.brand-section-header i {
    margin-right: 6px;
    color: #64748b;
}

.brand-highlight-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
    border-top: none;
}

.brand-highlight-item {
    border-bottom: 1px solid #f1f5f9;
}

.brand-highlight-item:last-child {
    border-bottom: none;
}

.brand-highlight-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.brand-highlight-link:hover {
    background: #f8fafc;
    color: inherit;
    text-decoration: none;
}

.brand-highlight-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 6px;
    background: #f8f9fa;
    flex-shrink: 0;
}

.brand-highlight-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.brand-highlight-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-highlight-meta {
    font-size: 0.78rem;
    color: #64748b;
}

.brand-highlight-date {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* =============================================================================
   Tabbed Container
   ============================================================================= */

.brand-tabs-container {
    margin-bottom: 24px;
}

/* Vehicle Nav Bar */
.brand-vehicle-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #1e293b;
    border-left: 4px solid var(--tyre-reviews-blue, #0db1e7);
    border-radius: 8px 8px 0 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.brand-vehicle-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: 999px;
    background: transparent;
    color: rgba(255,255,255,0.8);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.brand-vehicle-tab:hover {
    background: rgba(13,177,231,0.15);
    color: #fff;
    border-color: rgba(13,177,231,0.5);
}

.brand-vehicle-tab.active {
    background: var(--tyre-reviews-blue, #0db1e7);
    color: #fff;
    border-color: var(--tyre-reviews-blue, #0db1e7);
}

.brand-vehicle-tab i {
    font-size: 0.9rem;
}

/* Season Filter Bar */
.brand-season-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f2f5f9;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.brand-season-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.brand-season-pill:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.brand-season-pill.active {
    background: #334155;
    color: #fff;
    border-color: #334155;
}

/* Season-specific active colors */
.brand-season-pill.brand-season-summer.active {
    background: #16a34a;
    border-color: #16a34a;
}

.brand-season-pill.brand-season-winter.active {
    background: #2563eb;
    border-color: #2563eb;
}

.brand-season-pill.brand-season-all-season.active {
    background: #ea580c;
    border-color: #ea580c;
}

.brand-season-pill.brand-season-all-weather.active {
    background: #9333ea;
    border-color: #9333ea;
}

.brand-season-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: rgba(0,0,0,0.08);
    font-size: 0.7rem;
    font-weight: 700;
}

.brand-season-pill.active .brand-season-count {
    background: rgba(255,255,255,0.25);
}

/* Vehicle Panels */
.brand-vehicle-panel {
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: #fff;
}

/* When JS is active, hide inactive panels */
.js-enhanced .brand-vehicle-panel {
    display: none;
}

.js-enhanced .brand-vehicle-panel.active {
    display: block;
}

/* When JS hides season groups */
.js-enhanced .brand-season-group.hidden {
    display: none;
}

/* =============================================================================
   Type Section & Tyre Cards
   ============================================================================= */

.brand-season-group {
    padding: 0 16px;
}

.brand-type-section {
    padding: 16px 0;
    border-bottom: 1px solid #f1f5f9;
}

.brand-type-section:last-child {
    border-bottom: none;
}

.brand-type-heading {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #334155;
    margin: 0 0 12px;
    padding: 10px 12px 10px 14px;
    background: #f1f5f9;
    border-left: 3px solid var(--tyre-reviews-blue, #0db1e7);
    border-radius: 4px;
}

/* Tyre Card Grid */
.brand-tyre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
}

.brand-tyre-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
}

.brand-tyre-card:hover {
    background: #f1f5f9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transform: translateY(-1px);
    text-decoration: none;
    color: inherit;
}

.brand-tyre-card-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
    flex-shrink: 0;
}

.brand-tyre-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.brand-tyre-card-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-tyre-card-type {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 500;
}

/* Badges */
.brand-tyre-card-badges {
    display: flex;
    gap: 5px;
    margin-top: 2px;
}

.brand-tyre-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 999px;
}

.brand-tyre-badge i {
    font-size: 0.65rem;
}

.brand-tyre-badge-reviews {
    background: #dbeafe;
    color: #1d4ed8;
}

.brand-tyre-badge-tests {
    background: #dcfce7;
    color: #16a34a;
}

/* Tyre Score on Card */
.brand-tyre-card-score {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 800;
    color: #fff;
    margin-left: auto;
}

.brand-tyre-card-score-excellent { background: var(--score-excellent, #28a745); }
.brand-tyre-card-score-good { background: var(--score-good, #0db1e7); }
.brand-tyre-card-score-average { background: var(--score-average, #fd7e14); }
.brand-tyre-card-score-poor { background: var(--score-poor, #dc3545); }

/* =============================================================================
   Responsive
   ============================================================================= */

@media (max-width: 768px) {
    .brand-hero-header {
        padding: 16px 12px;
    }

    .brand-hero-header-img {
        max-height: 50px;
    }

    .brand-hero-title {
        font-size: 1.3rem;
    }

    .brand-hero-stat {
        padding: 0 12px;
        flex-direction: column;
        gap: 2px;
        text-align: center;
    }

    .brand-hero-stat-value {
        font-size: 1rem;
    }

    .brand-highlights {
        flex-direction: column;
        gap: 16px;
    }

    .brand-vehicle-nav {
        padding: 8px 12px;
        gap: 6px;
    }

    .brand-vehicle-tab {
        padding: 6px 14px;
        font-size: 0.78rem;
    }

    .brand-season-filter {
        padding: 8px 12px;
        gap: 6px;
    }

    .brand-tyre-grid {
        grid-template-columns: 1fr;
    }

    .brand-season-group {
        padding: 0 12px;
    }
}

@media (max-width: 576px) {
    .brand-hero-card {
        border-radius: 10px;
    }

    .brand-hero-header {
        padding: 14px 10px;
    }

    .brand-hero-header-img {
        max-height: 40px;
    }

    .brand-hero-title {
        font-size: 1.15rem;
    }

    .brand-hero-body {
        padding: 6px 12px 10px;
    }

    .brand-hero-desc {
        font-size: 0.82rem;
    }

    .brand-hero-stat {
        padding: 0 8px;
    }

    .brand-hero-stat-value {
        font-size: 0.9rem;
    }

    .brand-vehicle-nav {
        border-radius: 6px 6px 0 0;
    }

    .brand-vehicle-panel {
        border-radius: 0 0 6px 6px;
    }

    .brand-tyre-card {
        padding: 8px 10px;
    }

    .brand-tyre-card-img {
        width: 40px;
        height: 40px;
    }
}
