#chassis-comparison-page {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px 80px;
}

.comparison-title {
    font-size: 1.9rem;
    font-weight: 700;
    margin-bottom: 36px;
    color: #212529;
    text-align: left;
}

/* ---- Selectors ---- */
.selectors-row {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.selector-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 220px;
}

.selector-block label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ---- Brand buttons ---- */
.brand-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.brand-btn {
    padding: 5px 15px;
    border: 1.5px solid #ced4da;
    border-radius: 20px;
    background: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    white-space: nowrap;
    line-height: 1.4;
}

.brand-btn:hover {
    border-color: black;
    color: white;
}

.brand-btn.active {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.comp-select {
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.93rem;
    background: #fff;
    cursor: pointer;
    appearance: auto;
    width: 100%;
}

.comp-select:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13,110,253,0.15);
}

.comp-select:disabled {
    background: #f8f9fa;
    cursor: default;
    color: #aaa;
}

.vs-badge {
    font-weight: 800;
    font-size: 1.1rem;
    color: #aaa;
    padding-bottom: 10px;
    flex-shrink: 0;
}

/* ---- Placeholder ---- */
.placeholder-msg {
    text-align: center;
    color: #aaa;
    font-size: 1rem;
    padding: 48px 0;
}

/* ---- Highlight toggle ---- */
.highlight-toggle {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #555;
    cursor: pointer;
}

.highlight-toggle input {
    cursor: pointer;
}

/* ---- Sticky comparison header ---- */
.sticky-compare-header {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 1160px;
    z-index: 98;
    display: flex;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-bottom: 2px solid #ced4da;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.sticky-spec-col {
    width: 30%;
    padding: 11px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sticky-val-col {
    width: 35%;
    padding: 11px 16px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #212529;
    text-align: center;
    border-left: 1px solid #e5e7eb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Table ---- */
.table-scroll {
    overflow-x: auto;
}

#comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

#comparison-table td {
    padding: 10px 16px;
    border: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
}

.col-spec-cell {
    width: 30%;
}

.col-chassis-cell {
    width: 35%;
}

/* Section header rows */
#comparison-tbody tr.section-header td {
    background: #e9ecef;
    font-weight: 700;
    font-size: 0.95rem;
    color: #343a40;
    padding: 10px 16px;
    border-top: 2px solid #ced4da;
}

/* Spec rows */
#comparison-tbody tr:not(.section-header):nth-child(even) {
    background: #fafafa;
}

.spec-label {
    color: #555;
    font-weight: 500;
}

.spec-val {
    text-align: center;
}

.empty-val {
    color: #ccc;
}

/* Highlighted differences */
tr.highlight-diff td {
    background: #fff8e1 !important;
}

tr.highlight-diff .spec-label {
    font-weight: 600;
    color: #333;
}

.hidden {
    display: none !important;
}

@media (max-width: 640px) {
    .selectors-row {
        flex-direction: column;
        gap: 16px;
    }
    .vs-badge {
        text-align: center;
        padding-bottom: 0;
    }
}
