.mahamu-rewards-join,
.mahamu-rewards-registration-note,
.mahamu-rewards-hero,
.mahamu-reward-ladder,
.mahamu-rewards-notice {
    font-family: var(--wp--custom--font--family--ui);
    color: var(--wp--custom--color--text--primary);
}

.mahamu-rewards-join,
.mahamu-rewards-registration-note,
.mahamu-rewards-hero,
.mahamu-reward-ladder {
    border: 1px solid var(--wp--custom--color--border--subtle);
    border-radius: var(--wp--custom--radius--surface);
    background: var(--wp--custom--color--surface--editorial);
    box-shadow: var(--wp--custom--shadow--none);
}

.mahamu-rewards-join {
    max-width: var(--wp--custom--layout--content-reading);
    margin: 28px auto;
    padding: var(--wp--custom--space--lg);
}

.mahamu-rewards-join h2,
.mahamu-rewards-hero h3,
.mahamu-reward-ladder h3 {
    font-family: var(--wp--custom--font--family--ui);
    font-weight: var(--wp--custom--font--weight--medium);
    color: var(--wp--custom--color--text--primary);
}

.mahamu-rewards-kicker,
.mahamu-next-kicker {
    margin: 0 0 6px;
    color: var(--wp--custom--color--text--secondary);
    font-size: 14px;
    line-height: 1.4;
}

.mahamu-rewards-primary,
.mahamu-reward-claim-button,
.mahamu-confirm-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--wp--custom--size--control-min-height);
    padding: 11px 18px;
    border: 1px solid var(--wp--custom--color--action--primary);
    border-radius: var(--wp--custom--radius--control);
    background: var(--wp--custom--color--action--primary);
    color: var(--wp--custom--color--text--inverse);
    font: inherit;
    font-weight: var(--wp--custom--font--weight--medium);
    text-decoration: none;
    box-shadow: var(--wp--custom--shadow--none);
    cursor: pointer;
}

.mahamu-rewards-primary:hover,
.mahamu-reward-claim-button:hover,
.mahamu-confirm-submit:hover {
    background: var(--wp--custom--color--action--primary-hover);
    color: var(--wp--custom--color--text--inverse);
}

.mahamu-rewards-primary:focus-visible,
.mahamu-reward-claim-button:focus-visible,
.mahamu-confirm-submit:focus-visible,
.mahamu-confirm-cancel:focus-visible,
.mahamu-reward-choice:focus-visible {
    outline: 2px solid var(--wp--custom--color--accent--focus);
    outline-offset: 2px;
}

.mahamu-rewards-fineprint,
.mahamu-rewards-timing,
.mahamu-reward-desc,
.mahamu-reward-needed {
    color: var(--wp--custom--color--text--secondary);
    font-size: 14px;
    line-height: 1.55;
}

.mahamu-rewards-registration-note {
    margin: 0 0 20px;
    padding: var(--wp--custom--space--md);
}

.mahamu-rewards-registration-note p {
    margin: 6px 0 0;
}

.mahamu-rewards-notice {
    margin: 0 0 20px;
    padding: 14px var(--wp--custom--space--md);
    border: 1px solid var(--wp--custom--color--border--subtle);
    border-left-width: 4px;
    background: var(--wp--custom--color--surface--transaction);
}

.mahamu-rewards-notice.is-success { border-left-color: var(--wp--custom--color--state--success); }
.mahamu-rewards-notice.is-error { border-left-color: var(--wp--custom--color--state--error); }

.mahamu-rewards-dashboard .spar-rewards-overview {
    margin-bottom: var(--wp--custom--space--lg);
}

.mahamu-rewards-hero {
    padding: var(--wp--custom--space--lg);
    margin-bottom: var(--wp--custom--space--lg);
}

.mahamu-rewards-balance {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.mahamu-rewards-balance-number {
    font-size: clamp(36px, 7vw, 58px);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    font-weight: var(--wp--custom--font--weight--medium);
}

.mahamu-rewards-balance-label {
    color: var(--wp--custom--color--text--secondary);
    font-size: 16px;
}

.mahamu-rewards-tier {
    display: flex;
    gap: 10px var(--wp--custom--space--md);
    flex-wrap: wrap;
    margin: 14px 0 0;
}

.mahamu-rewards-tier span { color: var(--wp--custom--color--text--secondary); }

.mahamu-next-reward {
    margin-top: var(--wp--custom--space--lg);
    padding-top: 20px;
    border-top: 1px solid var(--wp--custom--color--border--subtle);
}

.mahamu-next-reward h3 {
    margin: 0;
    font-size: clamp(24px, 4vw, 32px);
    line-height: 1.28;
}

.mahamu-next-reward p { margin: var(--wp--custom--space--xs) 0 0; }

.mahamu-reward-progress {
    height: var(--wp--custom--space--xs);
    margin-top: var(--wp--custom--space--md);
    overflow: hidden;
    background: var(--wp--custom--color--border--subtle);
    border-radius: var(--wp--custom--radius--surface);
}

.mahamu-reward-progress span {
    display: block;
    height: 100%;
    background: var(--wp--custom--color--action--primary);
}

.mahamu-reward-ladder {
    padding: var(--wp--custom--space--lg);
    margin-bottom: 28px;
}

.mahamu-reward-catalogue {
    border: 1px solid var(--wp--custom--color--border--subtle);
    border-radius: var(--wp--custom--radius--surface);
    background: var(--wp--custom--color--surface--transaction);
}

.mahamu-reward-catalogue-summary {
    display: flex;
    align-items: center;
    min-height: var(--wp--custom--size--tap-target-min);
    padding: var(--wp--custom--space--sm) var(--wp--custom--space--md);
    color: var(--wp--custom--color--text--primary);
    font-weight: var(--wp--custom--font--weight--medium);
    cursor: pointer;
}

.mahamu-reward-catalogue-summary:focus-visible {
    outline: 2px solid var(--wp--custom--color--accent--focus);
    outline-offset: 2px;
}

.mahamu-reward-catalogue[open] .mahamu-reward-catalogue-summary {
    border-bottom: 1px solid var(--wp--custom--color--border--subtle);
}

.mahamu-reward-catalogue-body {
    padding: var(--wp--custom--space--lg);
}

.mahamu-reward-ladder-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 420px);
    gap: var(--wp--custom--space--lg);
    align-items: end;
    margin-bottom: var(--wp--custom--space--lg);
}

.mahamu-reward-ladder-heading h3 { margin: 0; }
.mahamu-reward-ladder-heading > p { margin: 0; color: var(--wp--custom--color--text--secondary); }

.mahamu-reward-ladder-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: var(--wp--custom--color--border--subtle);
    border: 1px solid var(--wp--custom--color--border--subtle);
}

.mahamu-reward-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 18px;
    min-height: 180px;
    padding: 20px;
    background: var(--wp--custom--color--surface--transaction);
}

.mahamu-reward-card.is-cash {
    grid-template-columns: 1fr;
    min-height: auto;
    background: var(--wp--custom--color--surface--editorial);
}

.mahamu-reward-image {
    width: 112px;
    height: 112px;
    object-fit: contain;
    align-self: start;
}

.mahamu-reward-choice-images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    align-self: start;
}

.mahamu-reward-choice-images .mahamu-reward-image {
    width: 52px;
    height: 52px;
}

.mahamu-reward-card h4 {
    margin: 0;
    color: var(--wp--custom--color--text--primary);
    font-size: 18px;
    line-height: 1.35;
}

.mahamu-reward-cost {
    margin: var(--wp--custom--space--xs) 0 0;
    color: var(--wp--custom--color--action--primary);
    font-weight: var(--wp--custom--font--weight--semibold);
    font-variant-numeric: tabular-nums;
}

.mahamu-reward-desc,
.mahamu-reward-needed { margin: var(--wp--custom--space--xs) 0 0; }

.mahamu-reward-needed { font-weight: var(--wp--custom--font--weight--medium); }

.mahamu-reward-choice-label {
    display: block;
    margin-top: 14px;
    font-size: 14px;
    font-weight: var(--wp--custom--font--weight--medium);
}

.mahamu-reward-choice {
    width: 100%;
    min-height: var(--wp--custom--size--control-min-height);
    margin-top: 6px;
    padding: var(--wp--custom--space--xs) 10px;
    border: 1px solid var(--wp--custom--color--border--control);
    border-radius: var(--wp--custom--radius--control);
    background: var(--wp--custom--color--surface--transaction);
    color: var(--wp--custom--color--text--primary);
    font: inherit;
}

.mahamu-reward-claim-button { margin-top: 14px; width: 100%; }

.mahamu-reward-card.is-locked { opacity: .72; }

.mahamu-reward-confirm[hidden] { display: none; }

.mahamu-reward-confirm {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: grid;
    place-items: center;
    padding: 20px;
    background: color-mix(in srgb, var(--wp--custom--color--text--primary) 46%, transparent);
}

.mahamu-reward-confirm-panel {
    width: min(520px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: var(--wp--custom--space--lg);
    border: 1px solid var(--wp--custom--color--border--subtle);
    border-radius: var(--wp--custom--radius--surface);
    background: var(--wp--custom--color--surface--transaction);
    color: var(--wp--custom--color--text--primary);
}

.mahamu-reward-confirm-panel h3 { margin: 0; }

.mahamu-confirm-summary {
    display: grid;
    gap: 0;
    margin: var(--wp--custom--space--md) 0 0;
}

.mahamu-confirm-summary > div {
    display: flex;
    justify-content: space-between;
    gap: var(--wp--custom--space--md);
    padding: var(--wp--custom--space--xs) 0;
    border-top: 1px solid var(--wp--custom--color--border--subtle);
}

.mahamu-confirm-summary dt { color: var(--wp--custom--color--text--secondary); }
.mahamu-confirm-summary dd {
    margin: 0;
    font-weight: var(--wp--custom--font--weight--semibold);
    font-variant-numeric: tabular-nums;
}
.mahamu-confirm-shipping {
    margin: var(--wp--custom--space--sm) 0 0;
    color: var(--wp--custom--color--text--secondary);
}
.mahamu-confirm-final { margin: var(--wp--custom--space--sm) 0 0; color: var(--wp--custom--color--state--warning); }

.mahamu-confirm-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.mahamu-confirm-cancel {
    min-height: var(--wp--custom--size--control-min-height);
    padding: 11px 18px;
    border: 1px solid var(--wp--custom--color--action--secondary);
    border-radius: var(--wp--custom--radius--control);
    background: transparent;
    color: var(--wp--custom--color--action--secondary);
    font: inherit;
    cursor: pointer;
}

/* Replace the plugin's truncated first-three reward grid with the MAHAMU ladder.
   Keep the native points-discount section below as a secondary option. */
#spar-tab-claim > .spar-section > .spar-redeem-title:not(.spar-pd-heading),
#spar-tab-claim > .spar-section > .spar-redeem-intro,
#spar-tab-claim > .spar-section > .spar-redeem-grid {
    display: none !important;
}

#spar-tab-claim .spar-pd-heading {
    margin-top: 30px;
    padding-top: var(--wp--custom--space--lg);
    border-top: 1px solid var(--wp--custom--color--border--subtle);
    font-size: 20px;
}

.mahamu-order-points-earned {
    margin: 20px auto;
    padding: 20px;
    max-width: 680px;
    border: 1px solid var(--wp--custom--color--border--strong);
    border-radius: var(--wp--custom--radius--surface);
    background: var(--wp--custom--color--surface--editorial);
    color: var(--wp--custom--color--text--primary);
    text-align: center;
    font-family: var(--wp--custom--font--family--ui);
}

.mahamu-order-points-earned h2 {
    margin: 6px 0 var(--wp--custom--space--xs);
    color: var(--wp--custom--color--text--primary);
    font-family: var(--wp--custom--font--family--ui);
    font-weight: var(--wp--custom--font--weight--medium);
}

.mahamu-order-points-earned p {
    margin: 6px 0;
}

.mahamu-order-points-earned a {
    color: var(--wp--custom--color--action--primary);
    text-decoration: underline;
}

.mahamu-order-points-next,
.mahamu-product-points-entry,
.mahamu-reward-cart-success,
.mahamu-email-rewards {
    font-family: var(--wp--custom--font--family--ui);
}

.mahamu-order-points-next {
    margin-top: var(--wp--custom--space--xs);
    color: var(--wp--custom--color--action--primary);
}

.mahamu-product-points-entry {
    margin: 10px 0 0;
    color: var(--wp--custom--color--text--secondary);
    font-size: 14px;
    line-height: 1.5;
}

.mahamu-product-points-entry a {
    color: var(--wp--custom--color--action--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.mahamu-reward-cart-success {
    margin: 0 0 20px;
    padding: 18px;
    border: 1px solid var(--wp--custom--color--border--strong);
    border-radius: var(--wp--custom--radius--surface);
    background: var(--wp--custom--color--surface--editorial);
    color: var(--wp--custom--color--text--primary);
}

.mahamu-reward-cart-success p {
    margin: 6px 0;
    line-height: 1.55;
}

@media (max-width: 768px) {
    .mahamu-reward-ladder-heading { grid-template-columns: 1fr; }
    .mahamu-reward-ladder-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .mahamu-rewards-join,
    .mahamu-rewards-hero,
    .mahamu-reward-ladder,
    .mahamu-reward-confirm-panel { padding: var(--wp--custom--space--md); }

    .mahamu-reward-catalogue-body { padding: var(--wp--custom--space--md); }

    .mahamu-reward-card {
        grid-template-columns: 88px minmax(0, 1fr);
        gap: 14px;
        padding: var(--wp--custom--space--md);
        min-height: 150px;
    }

    .mahamu-reward-card.is-cash { grid-template-columns: 1fr; }
    .mahamu-reward-image { width: 88px; height: 88px; }
    .mahamu-confirm-actions { flex-direction: column; }
    .mahamu-confirm-submit,
    .mahamu-confirm-cancel { width: 100%; }
}

/* MAHAMU Rewards 0.3.8 journey refinement */
.mahamu-rewards-adjustment-note,.mahamu-rewards-recommended,.mahamu-rewards-summary{margin-top:var(--wp--custom--space--md);padding:var(--wp--custom--space--md);border:1px solid var(--wp--custom--color--border--subtle);background:var(--wp--custom--color--surface--editorial);border-radius:var(--wp--custom--radius--surface);font-family:var(--wp--custom--font--family--ui);}
.mahamu-rewards-adjustment-note{display:grid;gap:4px;}
.mahamu-rewards-recommended{display:grid;gap:6px;}
.mahamu-rewards-recommended strong{font-size:18px;color:var(--wp--custom--color--text--primary);}
.mahamu-rewards-summary h3{margin:0 0 var(--wp--custom--space--xs);font-family:var(--wp--custom--font--family--ui);font-size:16px;}
.mahamu-rewards-summary ul{margin:0;padding:0;list-style:none;display:grid;gap:var(--wp--custom--space--xs);}
.mahamu-rewards-summary li{display:flex;justify-content:space-between;gap:var(--wp--custom--space--md);border-top:1px solid var(--wp--custom--color--border--subtle);padding-top:var(--wp--custom--space--xs);}
.mahamu-reward-alternative{margin-top:var(--wp--custom--space--xs);color:var(--wp--custom--color--text--primary);}
.mahamu-product-points-explanation{margin-top:6px;font-size:14px;color:var(--wp--custom--color--text--secondary);}
.mahamu-product-points-explanation summary{cursor:pointer;text-decoration:underline;text-underline-offset:3px;}
.mahamu-product-points-explanation p{margin:6px 0 0;}
@media (max-width:390px){.mahamu-rewards-summary li{display:block}.mahamu-rewards-summary li span{display:block;margin-top:2px}.mahamu-rewards-adjustment-note,.mahamu-rewards-recommended,.mahamu-rewards-summary{padding:var(--wp--custom--space--sm);}}
