/* ==========================================================================
   Compare Overview Page
   Modern card-based layout for /Compare/ landing page
   ========================================================================== */

/* --- Page Header --- */
.co-header {
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    background: #fff;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.1),
                0 10px 20px -2px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.co-header__title-bar {
    padding: 24px 28px 12px;
}

.co-header__title {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0 0 6px;
    color: #1a1a2e;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.co-header__subtitle {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
}

.co-header__stats {
    display: flex;
    align-items: center;
    padding: 14px 28px;
    gap: 20px;
    border-top: 1px solid #f1f5f9;
    flex-wrap: wrap;
}

.co-header__stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: #64748b;
}

.co-header__stat i {
    color: var(--tyre-reviews-blue, #0db1e7);
    font-size: 0.85rem;
}

.co-header__stat strong {
    color: #1a1a2e;
}

/* --- Multi-Compare CTA (hero position) --- */
.co-multi-cta {
    border-radius: 14px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #f8fafc;
    padding: 32px;
    margin-bottom: 1.5rem;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 24px;
    position: relative;
    overflow: hidden;
}

.co-multi-cta::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 200px;
    height: 200px;
    background: var(--tyre-reviews-blue, #0db1e7);
    opacity: 0.08;
    border-radius: 50%;
    pointer-events: none;
}

.co-multi-cta__icon {
    font-size: 2rem;
    color: var(--tyre-reviews-blue, #0db1e7);
    margin-bottom: 8px;
}

.co-multi-cta__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.3;
}

.co-multi-cta__desc {
    color: #94a3b8;
    font-size: 0.92rem;
    margin: 0 0 16px;
    line-height: 1.5;
    max-width: 500px;
}

.co-multi-cta__features {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.co-multi-cta__features li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: #94a3b8;
}

.co-multi-cta__features li i {
    color: var(--tyre-reviews-blue, #0db1e7);
    font-size: 0.75rem;
}

.co-multi-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--tyre-reviews-blue, #0db1e7);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 10px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s;
}

.co-multi-cta__btn:hover {
    background: var(--tyre-reviews-blue-dark, #0a9bcc);
    color: #fff;
    transform: translateY(-1px);
    text-decoration: none;
}

.co-multi-cta__btn i {
    font-size: 0.9rem;
}

/* --- Section wrapper --- */
.co-section {
    margin-bottom: 2rem;
}

.co-section__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.co-section__title i {
    color: var(--tyre-reviews-blue, #0db1e7);
    font-size: 1rem;
}

/* --- Season Tabs --- */
.co-season-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.co-season-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #d7dde6;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    background: #fff;
    color: #364152;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    appearance: none;
}

.co-season-tab:hover {
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.co-season-tab--active {
    background: #1e293b;
    border-color: #1e293b;
    color: #fff;
    box-shadow: 0 4px 8px rgba(30, 41, 59, 0.25);
}

.co-season-tab img {
    width: 20px;
    height: 20px;
}

/* --- Comparison Card Grid --- */
.co-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.co-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.15s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.co-card:hover {
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.co-card__image {
    padding: 16px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.co-card__image img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.co-card__body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.co-card__season {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.co-card__season img {
    width: 16px;
    height: 16px;
}

.co-card__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.35;
    margin: 0;
}

.co-card__meta {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: auto;
}

.co-card__meta i {
    margin-right: 4px;
}

/* --- Multi-Comparison Cards --- */
.co-multi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.co-multi-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.15s;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.co-multi-card:hover {
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.co-multi-card__badges {
    display: flex;
    gap: 6px;
}

.co-multi-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.co-multi-card__badge--tyres {
    background: rgba(13, 177, 231, 0.1);
    color: var(--tyre-reviews-blue, #0db1e7);
}

.co-multi-card__badge--tests {
    background: #f1f5f9;
    color: #64748b;
}

.co-multi-card__title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.4;
    margin: 0;
}

.co-multi-card__views {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: auto;
}

/* --- Brand Grid --- */
.co-brand-section {
    margin-bottom: 1.5rem;
}

.co-brand-section__title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

.co-brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.co-brand-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    padding: 16px 12px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.co-brand-card:hover {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    border-color: var(--tyre-reviews-blue, #0db1e7);
    text-decoration: none;
    color: inherit;
}

.co-brand-card__logo {
    height: 40px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.co-brand-card__name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.3;
}

.co-brand-card__count {
    font-size: 0.72rem;
    color: #94a3b8;
}

/* --- Latest Comparisons (compact list) --- */
.co-latest-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.co-latest-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, border-color 0.15s;
}

.co-latest-item:hover {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    border-color: var(--tyre-reviews-blue, #0db1e7);
    text-decoration: none;
    color: inherit;
}

.co-latest-item__season {
    flex-shrink: 0;
}

.co-latest-item__season img {
    width: 28px;
    height: 28px;
}

.co-latest-item__text {
    flex: 1;
    min-width: 0;
}

.co-latest-item__title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.co-latest-item__date {
    font-size: 0.75rem;
    color: #94a3b8;
}

.co-latest-item__arrow {
    flex-shrink: 0;
    color: #cbd5e1;
    font-size: 0.85rem;
    transition: color 0.15s, transform 0.15s;
}

.co-latest-item:hover .co-latest-item__arrow {
    color: var(--tyre-reviews-blue, #0db1e7);
    transform: translateX(2px);
}

/* --- View All link --- */
.co-view-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--tyre-reviews-blue, #0db1e7);
    text-decoration: none;
    margin-top: 12px;
}

.co-view-all:hover {
    color: var(--tyre-reviews-blue-dark, #0a9bcc);
    text-decoration: none;
}

/* --- Season panel visibility (JS-driven) --- */
.co-season-panel {
    display: none;
}

.co-season-panel--active {
    display: block;
}

/* ==========================================================================
   Multi-Compare Selector Page (/Compare/Multi/)
   ========================================================================== */

/* --- Layout --- */
.mcs-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    margin-top: 1.5rem;
}

/* --- Builder Panel --- */
.mcs-builder {
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.1),
                0 10px 20px -2px rgba(15, 23, 42, 0.08);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mcs-builder__section {
    position: relative;
}

.mcs-builder__label {
    font-size: 0.92rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mcs-builder__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
}

.mcs-builder__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 40px;
}

.mcs-builder__input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d7dde6;
    border-radius: 10px;
    font-size: 1rem;
    color: #1a1a2e;
    background: #f8fafc;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.mcs-builder__input:focus {
    border-color: var(--tyre-reviews-blue, #0db1e7);
    box-shadow: 0 0 0 3px rgba(13, 177, 231, 0.12);
    background: #fff;
}

.mcs-builder__input::placeholder {
    color: #94a3b8;
}

.mcs-builder__results {
    position: absolute;
    z-index: 1000;
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    margin-top: 4px;
    border: 1px solid #e2e8f0;
}

.mcs-builder__info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(13, 177, 231, 0.06);
    border: 1px solid rgba(13, 177, 231, 0.15);
    color: #334155;
    font-size: 0.88rem;
    line-height: 1.5;
}

.mcs-builder__info i {
    color: var(--tyre-reviews-blue, #0db1e7);
    flex-shrink: 0;
}

.mcs-builder__suggestions {
    padding: 16px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

/* --- Sidebar --- */
.mcs-sidebar__card {
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.1),
                0 10px 20px -2px rgba(15, 23, 42, 0.08);
    padding: 24px;
    position: sticky;
    top: 100px;
}

.mcs-sidebar__title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mcs-sidebar__title i {
    color: var(--tyre-reviews-blue, #0db1e7);
}

.mcs-sidebar__steps {
    margin: 0;
    padding: 0 0 0 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mcs-sidebar__steps li {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.5;
    padding-left: 4px;
}

.mcs-sidebar__steps li::marker {
    color: var(--tyre-reviews-blue, #0db1e7);
    font-weight: 700;
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .co-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .co-multi-cta {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .co-multi-cta__desc {
        max-width: none;
    }

    .co-multi-cta__features {
        justify-content: center;
    }

    .co-multi-cta__actions {
        text-align: center;
    }

    .mcs-layout {
        grid-template-columns: 1fr;
    }

    .mcs-sidebar__card {
        position: static;
    }
}

@media (max-width: 768px) {
    .co-header__title-bar {
        padding: 16px 16px 8px;
    }

    .co-header__title {
        font-size: 1.25rem;
    }

    .co-header__stats {
        padding: 12px 16px;
        gap: 12px;
    }

    .co-header__stat {
        font-size: 0.82rem;
    }

    .co-multi-cta {
        padding: 24px 20px;
    }

    .co-multi-cta__title {
        font-size: 1.1rem;
    }

    .co-card-grid {
        grid-template-columns: 1fr;
    }

    .co-latest-grid {
        grid-template-columns: 1fr;
    }

    .co-brand-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .co-section__title {
        font-size: 1.05rem;
    }

    .mcs-builder {
        padding: 20px 16px;
    }

    .mcs-builder__input {
        padding: 12px 14px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .co-multi-cta__features {
        flex-direction: column;
        gap: 6px;
    }

    .co-brand-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .co-brand-card {
        padding: 12px 8px;
    }

    .co-brand-card__logo {
        height: 30px;
    }

    .co-brand-card__name {
        font-size: 0.75rem;
    }
}
