/* =============================================================================
   Tyre Type Pages - Browse & Listing Styles
   ============================================================================= */

/* =============================================================================
   Shared: Hero Card
   ============================================================================= */

.ttype-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: 28px;
    overflow: hidden;
}

.ttype-hero-card h1 {
    font-size: 1.6em;
    font-weight: 600;
    color: #2a2a2a;
    margin: 0;
    padding: 18px 20px 0;
    line-height: 1.4em;
}

.ttype-hero-body {
    padding: 10px 20px 14px;
}

.ttype-hero-body p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.55;
    margin: 0;
}

.ttype-hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 8px 20px;
    background: linear-gradient(to right, #f8fafc, #e2e8f0);
    border-top: 1px solid #eef1f5;
}

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

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

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

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

.ttype-hero-btn {
    margin-top: 10px;
    display: inline-block;
}

/* =============================================================================
   Browse Page: Vehicle Sections
   ============================================================================= */

.ttype-vehicle-section {
    margin-bottom: 32px;
}

.ttype-vehicle-section.hidden {
    display: none;
}

.ttype-category-card.hidden {
    display: none;
}

.ttype-vehicle-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: #1e293b;
    border-left: 4px solid var(--tyre-reviews-blue, #0db1e7);
    border-radius: 10px 10px 0 0;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
}

.ttype-vehicle-header i {
    font-size: 1.1rem;
    color: var(--tyre-reviews-blue, #0db1e7);
}

.ttype-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 8px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 10px 10px;
    background: #f8fafc;
}

.ttype-category-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eef1f5;
    transition: background 0.15s, box-shadow 0.15s;
}

.ttype-category-card:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-decoration: none;
    color: inherit;
}

.ttype-season-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    flex-shrink: 0;
}

.ttype-season-pill-summer { background: #16a34a; }
.ttype-season-pill-winter { background: #2563eb; }
.ttype-season-pill-all-season { background: #ea580c; }
.ttype-season-pill-all-weather { background: #9333ea; }

.ttype-category-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.ttype-category-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ttype-category-count {
    font-size: 0.75rem;
    color: #64748b;
}

.ttype-category-score {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 800;
    color: #fff;
    margin-left: auto;
}

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

/* =============================================================================
   Listing Page: Toolbar
   ============================================================================= */

.ttype-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 20px;
    background: #f2f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 28px;
}

.ttype-toolbar-group {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ttype-toolbar-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    white-space: nowrap;
}

.ttype-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    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;
}

.ttype-sort-btn:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.ttype-sort-btn.active {
    background: #334155;
    color: #fff;
    border-color: #334155;
}

/* "Best in..." Dropdown */
.ttype-sort-dropdown {
    position: relative;
    display: inline-flex;
}

.ttype-sort-dropdown-trigger i {
    margin-left: 2px;
    transition: transform 0.15s ease;
}

.ttype-sort-dropdown.open .ttype-sort-dropdown-trigger i {
    transform: rotate(180deg);
}

.ttype-sort-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 150px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    z-index: 50;
    padding: 4px 0;
}

.ttype-sort-dropdown.open .ttype-sort-dropdown-menu {
    display: block;
}

.ttype-sort-dropdown-item {
    display: block;
    width: 100%;
    padding: 8px 16px;
    border: none;
    background: none;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
}

.ttype-sort-dropdown-item:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.ttype-sort-dropdown-item.active {
    background: #f1f5f9;
    color: var(--tyre-reviews-blue, #0db1e7);
}

.ttype-toolbar-divider {
    width: 1px;
    height: 24px;
    background: #cbd5e1;
    margin: 0 4px;
}

.ttype-filter-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;
}

.ttype-filter-pill:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.ttype-filter-pill.active {
    background: #334155;
    color: #fff;
    border-color: #334155;
}

.ttype-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: rgba(0,0,0,0.08);
    font-size: 0.65rem;
    font-weight: 700;
}

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

.ttype-filter-pill-premium.active { background: #46B1C9; border-color: #46B1C9; }
.ttype-filter-pill-mid-range.active { background: #5a8f97; border-color: #5a8f97; }
.ttype-filter-pill-economy.active { background: #7a8e82; border-color: #7a8e82; }
.ttype-filter-pill-budget.active { background: #8a8e87; border-color: #8a8e87; }

/* Season filter pill active colors */
.ttype-season-filter-summer.active { background: #16a34a; border-color: #16a34a; }
.ttype-season-filter-winter.active { background: #2563eb; border-color: #2563eb; }
.ttype-season-filter-all-season.active { background: #ea580c; border-color: #ea580c; }
.ttype-season-filter-all-weather.active { background: #9333ea; border-color: #9333ea; }

/* =============================================================================
   Listing Page: Section Headers
   ============================================================================= */

.ttype-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: #1e293b;
    border-left: 4px solid var(--tyre-reviews-blue, #0db1e7);
    border-radius: 10px 10px 0 0;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 32px;
}

.ttype-section-header i {
    color: var(--tyre-reviews-blue, #0db1e7);
}

.ttype-section-count {
    margin-left: auto;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
}

/* =============================================================================
   Listing Page: Tyre Card List
   ============================================================================= */

.ttype-tyre-grid,
.ttype-unscored-grid {
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 10px 10px;
    background: #fff;
    overflow: hidden;
}

.ttype-tyre-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}

.ttype-tyre-card:last-child {
    border-bottom: none;
}

.ttype-tyre-card:hover {
    background: #f8fafc;
}

.ttype-tyre-card.hidden {
    display: none;
}

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

.ttype-tyre-card-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

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

.ttype-tyre-card-name a {
    color: inherit;
    text-decoration: none;
}

.ttype-tyre-card-name a:hover {
    color: var(--tyre-reviews-blue, #0db1e7);
    text-decoration: underline;
}

.ttype-tyre-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ttype-tier-pill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

.ttype-tier-premium { background: #46B1C9; }
.ttype-tier-mid-range { background: #5a8f97; }
.ttype-tier-economy { background: #7a8e82; }
.ttype-tier-budget { background: #8a8e87; }

.ttype-review-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
}

.ttype-review-count i {
    font-size: 0.65rem;
}

/* Category Mini-Bars */
.ttype-tyre-card-bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 180px;
    flex-shrink: 0;
}

.ttype-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ttype-bar-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #94a3b8;
    width: 50px;
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ttype-bar-track {
    flex: 1;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.ttype-bar-fill {
    height: 100%;
    border-radius: 3px;
}

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

.ttype-bar-value {
    font-size: 0.68rem;
    font-weight: 700;
    color: #64748b;
    width: 20px;
    text-align: right;
    flex-shrink: 0;
}

/* Score Circle */
.ttype-tyre-card-score {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 800;
    color: #fff;
    margin-left: auto;
}

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

/* Unscored tyre percentage circle */
.ttype-tyre-card-pct {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    background: #e2e8f0;
    margin-left: auto;
}

/* =============================================================================
   Listing Page: No Reviews Section
   ============================================================================= */

.ttype-no-reviews {
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 10px 10px;
    background: #fff;
    padding: 20px 24px;
    font-size: 0.85rem;
    line-height: 1.8;
    color: #475569;
}

.ttype-no-reviews a {
    color: var(--tyre-reviews-blue, #0db1e7);
    text-decoration: none;
}

.ttype-no-reviews a:hover {
    text-decoration: underline;
}

/* =============================================================================
   Listing Page: Review Highlights
   ============================================================================= */

.ttype-review-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
}

.ttype-review-card-header {
    margin-bottom: 10px;
}

.ttype-review-card-header a {
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
}

.ttype-review-card-header a:hover {
    color: var(--tyre-reviews-blue, #0db1e7);
    text-decoration: underline;
}

.ttype-review-pct {
    font-weight: 700;
    color: var(--tyre-reviews-blue, #0db1e7);
}

.ttype-review-car {
    font-size: 0.82rem;
    color: #64748b;
    margin-top: 4px;
}

.ttype-review-text {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.65;
    margin-bottom: 10px;
}

.ttype-review-date {
    font-size: 0.75rem;
    color: #94a3b8;
}

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

@media (max-width: 768px) {
    .ttype-hero-card h1 {
        font-size: 1.3rem;
        padding: 16px 16px 0;
    }

    .ttype-hero-body {
        padding: 8px 16px 12px;
    }

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

    .ttype-category-grid {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 6px;
    }

    .ttype-toolbar {
        padding: 12px 16px;
    }

    .ttype-tyre-card {
        padding: 12px 16px;
    }

    .ttype-tyre-card-bars {
        display: none;
    }

    .ttype-vehicle-header,
    .ttype-section-header {
        padding: 12px 16px;
        font-size: 0.92rem;
    }
}

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

    .ttype-hero-card h1 {
        font-size: 1.15rem;
        padding: 14px 14px 0;
    }

    .ttype-hero-body {
        padding: 6px 14px 10px;
    }

    .ttype-hero-body p {
        font-size: 0.82rem;
    }

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

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

    .ttype-tyre-card {
        padding: 10px 14px;
        gap: 10px;
    }

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

    .ttype-tyre-card-score,
    .ttype-tyre-card-pct {
        width: 36px;
        height: 36px;
        font-size: 0.72rem;
    }

    .ttype-category-card {
        padding: 12px 14px;
    }

    .ttype-review-card {
        padding: 16px;
    }
}
