/* Compare result page — compare/car-detail-compare-result.aspx */

.tb-compare-result {
    --cr-red: #c92127;
    --cr-red-dark: #a81b20;
    --cr-text: #24272c;
    --cr-muted: #6b7280;
    --cr-border: #e8ecf0;
    --cr-bg: #f5f6f8;
    background: var(--cr-bg);
    padding-bottom: 32px;
}

/* Breadcrumb */
.tb-cr-breadcrumb {
    background: #fff;
    border-bottom: 1px solid var(--cr-border);
}

.tb-cr-breadcrumb .container {
    padding-top: 10px;
    padding-bottom: 10px;
}

.tb-cr-breadcrumb .breadcrumb {
    margin: 0;
    padding: 0;
    background: transparent;
    font-size: 13px;
}

.tb-cr-breadcrumb .breadcrumb-item,
.tb-cr-breadcrumb .breadcrumb-item a,
.tb-cr-breadcrumb a {
    color: var(--cr-muted);
    text-decoration: none;
}

.tb-cr-breadcrumb a:hover {
    color: var(--cr-red);
}

.tb-cr-breadcrumb .breadcrumb-item.active,
.tb-cr-breadcrumb .list-inline {
    color: var(--cr-text);
    margin: 0;
    padding: 0;
    list-style: none;
}

.tb-cr-breadcrumb .list-inline > li {
    display: inline;
    font-size: 13px;
}

/* Hero */
.tb-cr-hero {
    background: linear-gradient(135deg, #fff 0%, #fafbfc 100%);
    border-bottom: 1px solid var(--cr-border);
    padding: 20px 0 16px;
}

.tb-cr-hero h1 {
    margin: 0;
    font-size: clamp(1.125rem, 2.2vw, 1.5rem);
    font-weight: 700;
    color: var(--cr-text);
    line-height: 1.35;
}

/* Sticky vehicle strip */
.tb-cr-vehicles-wrap {
    position: sticky;
    top: 0;
    z-index: 40;
    background: #fff;
    border-bottom: 1px solid var(--cr-border);
    box-shadow: 0 2px 10px rgba(36, 39, 44, 0.06);
}

.tb-cr-vehicles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    padding: 14px 0;
}

.tb-cr-vehicle {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px;
    background: #fafbfc;
    border: 1px solid var(--cr-border);
    border-radius: 12px;
    min-width: 0;
}

.tb-cr-vehicle a {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
}

.tb-cr-vehicle a:hover .tb-cr-vehicle-name {
    color: var(--cr-red);
}

.tb-cr-vehicle-img {
    width: 100%;
    max-width: 160px;
    height: 100px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.tb-cr-vehicle-img img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.tb-cr-vehicle-name {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--cr-text);
    line-height: 1.35;
    min-height: 38px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tb-cr-offer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 180px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #fff !important;
    background: var(--cr-red) !important;
    border: none !important;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.tb-cr-offer-btn:hover,
.tb-cr-offer-btn:focus {
    background: var(--cr-red-dark) !important;
    outline: none;
}

.tb-cr-vs {
    display: none;
}

/* Spec sections */
.tb-cr-specs {
    margin-top: 20px;
}

.tb-cr-spec-block {
    margin-bottom: 16px;
}

/* Compare_Card modern table */
.tb-compare-spec {
    background: #fff;
    border: 1px solid var(--cr-border);
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(36, 39, 44, 0.06);
    overflow: hidden;
    margin-bottom: 0;
}

.tb-compare-spec__head {
    padding: 14px 18px;
    background: linear-gradient(135deg, #c92127 0%, #a81b20 100%);
    color: #fff;
}

.tb-compare-spec__head h3 {
    margin: 0;
    padding: 0;
    font-size: 15px;
    font-weight: 700;
    color: #fff !important;
    text-transform: none;
    line-height: 1.3;
}

.tb-compare-spec__table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    margin: 0;
}

.tb-compare-spec__table tr {
    border-bottom: 1px solid #f0f2f5;
}

.tb-compare-spec__table tr:last-child {
    border-bottom: 0;
}

.tb-compare-spec__table tr:nth-child(even) {
    background: #fafbfc;
}

.tb-compare-spec__table th {
    width: 22%;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--cr-muted);
    text-align: left;
    vertical-align: top;
    border-right: 1px solid #f0f2f5;
    background: transparent;
}

.tb-compare-spec__table td {
    width: 26%;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--cr-text);
    text-align: left;
    vertical-align: top;
    line-height: 1.5;
    border-right: 1px solid #f0f2f5;
}

.tb-compare-spec__table td:last-child {
    border-right: 0;
}

.tb-compare-spec__table td:empty::after {
    content: "—";
    color: #9ca3af;
}

/* Description */
.tb-cr-desc {
    margin-top: 20px;
    background: #fff;
    border: 1px solid var(--cr-border);
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(36, 39, 44, 0.06);
    padding: 20px 22px;
}

.tb-cr-desc h2 {
    margin: 0 0 12px;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--cr-text);
    line-height: 1.35;
}

.tb-cr-desc-body {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.7;
}

.tb-cr-listing {
    margin-top: 20px;
}

/* Mobile sticky strip */
.tb-cr-vehicles--mobile {
    display: none;
}

.tb-cr-vehicles--desktop {
    display: grid;
}

@media (max-width: 767px) {
    .tb-cr-vehicles--desktop {
        display: none !important;
    }

    .tb-cr-vehicles--mobile {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 12px 0;
    }

    .tb-cr-vehicle {
        padding: 10px 8px;
    }

    .tb-cr-vehicle-img {
        height: 72px;
        max-width: 110px;
    }

    .tb-cr-vehicle-name {
        font-size: 12px;
        min-height: 32px;
        margin-bottom: 8px;
    }

    .tb-cr-offer-btn {
        font-size: 11px;
        padding: 7px 8px;
        max-width: none;
    }

    .tb-compare-spec__table,
    .tb-compare-spec__table tbody,
    .tb-compare-spec__table tr,
    .tb-compare-spec__table th,
    .tb-compare-spec__table td {
        display: block;
        width: 100% !important;
    }

    .tb-compare-spec__table tr {
        padding: 10px 14px 12px;
        border-bottom: 1px solid #f0f2f5;
    }

    .tb-compare-spec__table th {
        border-right: 0;
        padding: 0 0 8px;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

    .tb-compare-spec__table td {
        border-right: 0;
        padding: 4px 0;
        font-size: 13px;
    }

    .tb-compare-spec__table td:nth-child(2)::before,
    .tb-compare-spec__table td:nth-child(3)::before,
    .tb-compare-spec__table td:nth-child(4)::before {
        display: block;
        font-size: 11px;
        font-weight: 600;
        color: var(--cr-muted);
        margin-bottom: 2px;
    }

    .tb-cr-desc {
        padding: 16px;
    }
}
