/* Compare Page — Apple-style clean layout */

.compare-page {
    background: #fff;
    min-height: 100vh;
}

/* ── Header ── */
.compare-header {
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.compare-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.compare-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.compare-back-link {
    font-size: 0.875rem;
    color: #6b7280;
    text-decoration: none;
    white-space: nowrap;
}

.compare-back-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* ── Body ── */
.compare-body {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* ── Three Columns ── */
.compare-columns-wrap {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.compare-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
}

/* Dropdown */
.compare-col-dropdown {
    width: 100%;
}

.compare-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
    background: #f9fafb;
    cursor: pointer;
    appearance: auto;
}

.compare-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

/* Image */
.compare-col-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #f3f4f6;
}

.compare-col-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.compare-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d1d5db;
    font-size: 2.5rem;
}

/* Name */
.compare-col-name {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}

/* Preferred badge */
.compare-preferred-badge {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    background: #fef3c7;
    color: #92400e;
    border-radius: 999px;
    border: 1px solid #fde68a;
    vertical-align: middle;
}

/* Location */
.compare-col-location {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Cost */
.compare-col-cost {
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
}

/* Rating */
.compare-col-rating {
    line-height: 1.4;
}

.compare-score {
    font-size: 2rem;
    font-weight: 800;
    color: #f59e0b;
}

.compare-score-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #f59e0b;
    margin-left: 0.25rem;
}

.compare-review-count {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.1rem;
}

.compare-no-rating {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* View Details button */
.compare-view-btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
    margin-top: 0.25rem;
}

.compare-view-btn:hover {
    background: #1d4ed8;
    color: #fff;
    text-decoration: none;
}

/* Empty column */
.compare-col-empty {
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 2px dashed #e5e7eb;
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #d1d5db;
}

.compare-empty-icon {
    font-size: 2rem;
}

.compare-empty-text {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* ── Sections ── */
.compare-section {
    margin-bottom: 3rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 2rem;
}

.compare-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

/* ── Quick Look Table ── */
.compare-table {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.compare-row {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) repeat(3, 1fr);
    align-items: center;
    border-bottom: 1px solid #f3f4f6;
    padding: 0.75rem 0;
}

.compare-row-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    padding-right: 1rem;
}

.compare-row-cell {
    text-align: center;
    font-size: 0.875rem;
}

.compare-cat-score {
    font-size: 1.25rem;
    font-weight: 700;
}

.compare-cat-score.score-high { color: #059669; }
.compare-cat-score.score-mid  { color: #d97706; }
.compare-cat-score.score-low  { color: #dc2626; }

.compare-cat-na {
    color: #d1d5db;
    font-size: 0.875rem;
}

.compare-distance-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1d4ed8;
}

/* ── Highlights ── */
.compare-highlights-row {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) repeat(3, 1fr);
    align-items: start;
    gap: 0.5rem;
    border-top: 1px solid #f3f4f6;
    padding-top: 0.75rem;
}

.compare-highlights-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    padding-top: 0.25rem;
}

.compare-highlights-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
}

.compare-hl-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    font-size: 0.75rem;
    color: #374151;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .compare-columns-wrap {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .compare-row {
        grid-template-columns: minmax(120px, 1fr) repeat(3, 1fr);
        font-size: 0.8rem;
    }

    .compare-row-label {
        font-size: 0.78rem;
    }

    .compare-highlights-row {
        grid-template-columns: minmax(120px, 1fr) repeat(3, 1fr);
    }

    .compare-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .compare-body {
        padding: 1rem 1rem 3rem;
    }

    .compare-header-inner {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .compare-row {
        grid-template-columns: minmax(100px, 0.8fr) repeat(3, 1fr);
    }

    .compare-highlights-row {
        grid-template-columns: minmax(100px, 0.8fr) repeat(3, 1fr);
    }
}
