/* ============================================================
   Comparison Section Styling — scoped entirely to .ase-compare-*
   classes so nothing outside the comparison table is affected.
   ============================================================ */

/* Mobile horizontal scroll containment:
   Only THIS wrapper scrolls sideways, never the whole page. */
.ase-compare-scroll {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.ase-compare-table {
    border-collapse: collapse;
    table-layout: fixed; /* enforces the colgroup widths set in PHP, so every
                             vehicle column — and therefore every image — is
                             exactly the same width regardless of how long
                             any single vehicle's text content is */
}

.ase-compare-table td {
    padding: 12px 16px;
    vertical-align: top;
    border-bottom: 1px solid #eee;
}

/* Ensure each vehicle column has a sensible minimum width on mobile,
   so content doesn't get crushed — this is what the horizontal
   scroll wrapper above is designed to accommodate. */
@media (max-width: 768px) {
    .ase-compare-table td {
        min-width: 200px;
    }
}

.ase-compare-label {
    font-weight: 600;
    white-space: nowrap;
    min-width: 130px;
}

/* Consistent image sizing across every vehicle column */
.ase-compare-img-wrap {
    width: 100% !important;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 10px;
    background: #f2f2f2;
}

/* !important guards used defensively here since theme stylesheets commonly
   apply their own "img { height: auto; max-width: 100%; }" rules that can
   otherwise override this and cause inconsistent-looking comparison images */
.ase-compare-img-wrap img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    display: block;
    margin: 0;
}

.ase-compare-view-details {
    display: inline-block;
    margin-top: 8px;
}

.ase-compare-remove {
    display: block;
    margin-top: 6px;
}

/* Prevent this section specifically from ever forcing page-wide overflow,
   even if something upstream misbehaves */
#ase-compare-results {
    max-width: 100%;
    overflow: hidden;
}
