/* ========== So sánh xe — Toyota-inspired ========== */
.compare-page {
    background: #fff;
    padding: 40px 0 72px;
}

.compare-page__header {
    text-align: center;
    margin-bottom: 36px;
}

.compare-page__title {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1a1a1a;
    line-height: 1.25;
}

.compare-page__section-title {
    margin: 0 0 24px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #1a1a1a;
}

.compare-slots {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.compare-slot {
    position: relative;
    background: #f5f5f5;
    border: 1px solid #e5e5e5;
    min-height: 320px;
}

.compare-slot.is-filled {
    background: #fff;
}

.compare-slot__pick {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 28px 20px 24px;
    text-align: center;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.compare-slot__media {
    position: relative;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.compare-slot__img {
    max-width: 100%;
    max-height: 160px;
    object-fit: contain;
}

.compare-slot__placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px dashed #c8c8c8;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.compare-slot__plus {
    font-size: 42px;
    line-height: 1;
    color: #eb0a1e;
    font-weight: 300;
}

.compare-slot__eyebrow {
    margin: 0 0 6px;
    font-size: 13px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.compare-slot__heading {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.compare-slot.is-filled .compare-slot__heading {
    color: #eb0a1e;
}

.compare-slot__meta {
    margin: 8px 0 0;
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

.compare-slot__clear {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #d0d0d0;
    background: #fff;
    color: #101010;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.compare-slot__clear:hover {
    background: #eb0a1e;
    border-color: #eb0a1e;
    color: #fff;
}

.compare-page__actions {
    display: flex;
    justify-content: center;
    margin-bottom: 48px;
}

.compare-page__btn {
    min-width: 200px;
    height: 48px;
    padding: 0 28px;
    border: 2px solid #eb0a1e;
    background: #eb0a1e;
    color: #eb0a1e;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.compare-page__btn_2:hover {
    background: #eb0a1e !important;
    color: #fff !important;
}
.compare-page__btn:hover:not(:disabled) {
    background: #fff;
    color: #eb0a1e;
}

.compare-page__btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.compare-page__btn--ghost {
    background: #fff;
    color: #eb0a1e;
}

.compare-page__btn--ghost:hover {
    background: #eb0a1e;
    color: #fff;
}

.compare-result {
    margin-top: 8px;
}

.compare-result__cars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.compare-result__car {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid #e5e5e5;
    background: #fafafa;
}

.compare-result__car img {
    width: 110px;
    height: 70px;
    object-fit: contain;
    flex-shrink: 0;
}

.compare-result__car-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.compare-result__car-body strong {
    font-size: 15px;
    color: #1a1a1a;
}

.compare-result__car-body span {
    font-size: 13px;
    color: #666;
}

.compare-result__car-body a {
    font-size: 13px;
    color: #eb0a1e;
    text-decoration: underline;
}

.compare-result__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 28px;
}

.compare-result__empty {
    padding: 24px;
    text-align: center;
    color: #666;
    border: 1px solid #e5e5e5;
}

/* Accordion specs — Toyota style */
.container-car-detail {
    border-top: 1px solid #e5e5e5;
}

.car-detail-list + .car-detail-list {
    border-top: 1px solid #e5e5e5;
}

.specifications-list-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 8px;
    cursor: pointer;
    user-select: none;
}

.specifications-list-name p {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #1a1a1a;
}

.specifications-list-name i {
    color: #777;
    transition: transform 0.2s ease;
}

.specifications-list-name.is-open i,
.specifications-list-name[aria-expanded="true"] i {
    transform: rotate(180deg);
    color: #eb0a1e;
}

.specifications-list-name:hover p {
    color: #eb0a1e;
}

.specifications-list-content {
    padding: 0 0 16px;
}

.specifications-content {
    overflow-x: auto;
}

.specifications-content table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
}

.specifications-content table td {
    padding: 12px 14px;
    border-bottom: 1px solid #ececec;
    font-size: 14px;
    color: #333;
    vertical-align: top;
    width: 25%;
}

.specifications-content table td:first-child {
    font-weight: 600;
    color: #1a1a1a;
    background: #fafafa;
    width: 28%;
}

.specifications-content table.three-rows[data-vehicle-count="2"] td:last-child:empty {
    background: #fff;
}

/* Modal */
.compare-modal[hidden],
.compare-alert[hidden] {
    display: none !important;
}

.compare-modal,
.compare-alert {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.compare-modal__overlay,
.compare-alert__overlay {
    position: absolute;
    inset: 0;
    background: rgba(16, 16, 16, 0.65);
}

.compare-modal__dialog,
.compare-alert__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    background: #fff;
    padding: 28px 24px 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

.compare-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #101010;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.compare-modal__close:hover {
    background: #eb0a1e;
    border-color: #eb0a1e;
    color: #fff;
}

.compare-modal__title,
.compare-alert__title {
    margin: 0 0 20px;
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-align: center;
    color: #1a1a1a;
}

.compare-modal__fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.compare-modal__field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.compare-modal__field select {
    width: 100%;
    height: 44px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    padding: 0 12px;
    font-size: 14px;
    background: #fff;
    outline: none;
}

.compare-modal__field select:focus {
    border-color: #eb0a1e;
}

.compare-modal__preview {
    text-align: center;
    padding: 16px;
    background: #f5f5f5;
    margin-bottom: 20px;
    display: none;
}

.compare-modal__preview img {
    max-width: 220px;
    max-height: 120px;
    object-fit: contain;
    margin: 0 auto 10px;
    display: block;
}

.compare-modal__preview-label {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
}

.compare-modal__preview-price {
    margin: 6px 0 0;
    font-size: 14px;
    color: #eb0a1e;
    font-weight: 600;
}

.compare-modal__submit {
    width: 100%;
}

.compare-alert__dialog {
    max-width: 420px;
    text-align: center;
}

.compare-alert__text {
    margin: 0 0 20px;
    font-size: 15px;
    color: #444;
    line-height: 1.5;
}

@media (max-width: 991px) {
    .compare-slots {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .compare-slot {
        min-height: 0;
    }

    .compare-slot__media {
        height: 120px;
    }

    .compare-page__title {
        font-size: 24px;
    }
}

@media (max-width: 575px) {
    .compare-page {
        padding: 28px 0 48px;
    }

    .compare-page__btn {
        width: 100%;
    }

    .compare-result__actions {
        flex-direction: column;
    }

    .compare-table__label {
        width: 120px;
        white-space: normal;
    }
}
