/* ============================================================
   Section: dealer-discount-table
   ============================================================ */

.dealer-discount {
    background: #f5f6f6;
    padding: 32px 120px 64px 120px;
}

.dealer-discount__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.dealer-discount__title {
    font-family: var(--font-neo);
    font-size: 36px;
    line-height: 42px;
    letter-spacing: -1px;
    color: var(--color-dark);
    margin: 0;
}

/* ── Table wrapper (enables horizontal scroll on mobile) ── */
/* Shadow is on the wrapper so it isn't clipped by overflow-x on mobile */
.dealer-discount__table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0px 2px 20px 0px rgba(0, 0, 0, 0.25);
    border-radius: 8px;
}

/* ── Table base ── */
.dealer-discount__table {
    width: 100%;
    /* separate keeps cell borders independent — black right border always renders */
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
    /* min-width forces horizontal scroll before content gets squashed */
    min-width: 720px;
}

/* ── Header ── */
.dealer-discount__th {
    font-family: var(--font-neo);
    font-size: 16px;
    font-weight: 400;
    font-style: normal;
    line-height: normal;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ffffff;
    padding: 16px 32px;
    text-align: left;
    white-space: nowrap;
}

.dealer-discount__th--label {
    width: 260px;
    background: #005e37;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.dealer-discount__th--value {
    background: #00693e;
}

/* ── Body cells: base ── */
.dealer-discount__td {
    font-family: var(--font-inter);
    font-size: 17px;
    font-style: normal;
    font-weight: 400;
    line-height: 23px;
    padding: 16px 32px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
    white-space: nowrap;
}

.dealer-discount__td:last-child {
    border-right: none;
}

/* ── Label (first column) ── */
.dealer-discount__td--label {
    width: 260px;
    background: #f7f7f7;
    text-align: left;
    color: var(--color-dark);
    border-bottom: none;
    border-right: 1px solid rgba(0, 0, 0, 0.15);
}

/* ── Highlighted cell (profitability match) ── */
.dealer-discount__td--highlight {
    background: #d3ffde;
    color: #000;
}

/* ── Empty / muted cell ── */
.dealer-discount__td--empty {
    background: #ffffff;
    color: rgba(0, 0, 0, 0.4);
}

/* ── Footer row ── */
.dealer-discount__tr--footer .dealer-discount__td {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: none;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    background: #e6e6e6;
    color: #000;
}

.dealer-discount__tr--footer .dealer-discount__td:last-child {
    border-right: none;
}

.dealer-discount__td--footer-label {
    background: #e0e0e0 !important;
    text-align: left;
}

.dealer-discount__td--discount {
    text-align: center;
}

/* ============================================================
   Tablet ≤ 1170px
   ============================================================ */
@media (max-width: 1170px) {
    .dealer-discount {
        padding: 56px 40px;
    }
}

/* ============================================================
   Compact table — starts at 850px so columns don't get squished
   ============================================================ */
@media (max-width: 850px) {
    .dealer-discount {
        padding: 32px 0 0;
    }

    .dealer-discount__inner {
        gap: 32px;
    }

    .dealer-discount__title {
        font-size: 32px;
        line-height: 37px;
        letter-spacing: -1px;
        padding: 0 24px;
    }

    .dealer-discount__th {
        font-size: 12px;
        padding: 16px;
    }

    .dealer-discount__th--label {
        width: 160px;
    }

    .dealer-discount__td {
        font-size: 12px;
        line-height: 15px;
        padding: 16px;
        min-width: 64px;
    }

    .dealer-discount__td--label {
        width: 160px;
        min-width: 160px;
    }
}
