/* Compare page — Autoline-style side-by-side table */

.page-compare .compare-bar {
    display: none !important;
}

.page-compare .fixed-social-buttons {
    bottom: 24px;
}

.compare-page {
    max-width: 1300px;
    margin: 0 auto;
    padding: 28px 20px 60px;
}

.compare-page__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.compare-page__title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 6px;
}

.compare-page__subtitle {
    color: #777;
    font-size: 14px;
}

.compare-page__header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.compare-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 10px;
    padding: 11px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.compare-btn--primary {
    background: var(--primary);
    color: #fff;
}

.compare-btn--primary:hover {
    background: #e08610;
    color: #fff;
}

.compare-btn--outline {
    background: #fff;
    color: #2c3e50;
    border: 1px solid #e0e0e0;
}

.compare-btn--outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.compare-btn--ghost {
    background: #fff;
    color: #666;
    border: 1px solid #e8e8e8;
}

.compare-btn--ghost:hover {
    color: #c0392b;
    border-color: #f5c6cb;
    background: #fff5f5;
}

.compare-btn--sm {
    padding: 8px 14px;
    font-size: 12px;
    width: 100%;
}

.compare-table-wrap {
    overflow-x: auto;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #ececec;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

.compare-mobile {
    display: none;
}

.compare-mobile-card {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.compare-mobile-card + .compare-mobile-card {
    margin-top: 16px;
}

.compare-product-card--mobile {
    padding: 16px 16px 0;
}

.compare-mobile-specs {
    margin: 0;
    padding: 12px 16px 16px;
}

.compare-mobile-spec {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.compare-mobile-spec:last-child {
    border-bottom: none;
}

.compare-mobile-spec dt {
    flex: 0 0 42%;
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #666;
}

.compare-mobile-spec dd {
    flex: 1;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    text-align: right;
}

.compare-mobile-spec--diff {
    background: #fffaf3;
    margin: 0 -16px;
    padding: 10px 16px;
    border-bottom-color: #ffe8cc;
}

.compare-mobile-spec--diff dt {
    color: #c56d00;
}

.compare-table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
}

.compare-table thead th {
    vertical-align: top;
    background: #fafafa;
    border-bottom: 1px solid #ececec;
    padding: 18px 14px;
}

.compare-table tbody th,
.compare-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    vertical-align: middle;
}

.compare-table__label-col {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 180px;
    max-width: 220px;
    background: #f8f9fb;
    color: #666;
    font-weight: 700;
    text-align: left;
    border-right: 1px solid #ececec;
}

.compare-table thead .compare-table__label-col {
    background: #f3f4f6;
    z-index: 3;
}

.compare-table__product-col {
    min-width: 220px;
    width: 25%;
}

.compare-table__value-col {
    text-align: center;
    color: #2c3e50;
    font-weight: 600;
    background: #fff;
}

.compare-row--diff .compare-table__label-col {
    background: #fff8ef;
    color: #c56d00;
}

.compare-row--diff .compare-table__value-col {
    background: #fffaf3;
}

.compare-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.compare-product-card__remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    z-index: 2;
    transition: 0.2s;
}

.compare-product-card__remove:hover {
    background: #fee;
    color: #c0392b;
}

.compare-product-card__image-link {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f5;
}

.compare-product-card__image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.compare-product-card__title {
    font-size: 13px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.4;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
    text-align: left;
}

.compare-product-card__title:hover {
    color: var(--primary);
}

.compare-product-card__price {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
    text-align: left;
}

.compare-empty-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 220px;
    border: 2px dashed #ddd;
    border-radius: 12px;
    color: #999;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: 0.2s;
    padding: 20px;
}

.compare-empty-slot:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #fffaf3;
}

.compare-empty-slot i {
    font-size: 24px;
}

.compare-page__legend {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 12px;
    color: #888;
}

.compare-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    background: #fff8ef;
    border: 1px solid #ffd8a8;
    flex-shrink: 0;
}

.compare-empty-state {
    text-align: center;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #ececec;
    padding: 60px 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

.compare-empty-state__icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: rgba(247, 151, 28, 0.12);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.compare-empty-state h2 {
    font-size: 1.35rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.compare-empty-state p {
    color: #777;
    max-width: 480px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .compare-page__header-actions {
        width: 100%;
    }

    .compare-page__header-actions .compare-btn {
        flex: 1;
        min-width: 0;
    }

    .compare-table-wrap {
        display: none;
    }

    .compare-mobile {
        display: block;
    }

    .compare-product-card__image {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .compare-page__title {
        font-size: 1.4rem;
    }

    .compare-table__label-col {
        min-width: 140px;
    }

    .compare-table__product-col {
        min-width: 200px;
    }
}
