.kh-pgr-product-box {
    --kh-pgr-primary: var(--kh-pgr-site-primary, var(--wd-primary-color, var(--e-global-color-primary, var(--ast-global-color-0, var(--theme-palette-color-1, var(--global-palette1, #0f6b5b))))));
    --kh-pgr-primary-dark: var(--kh-pgr-site-primary-dark, var(--kh-pgr-primary));
    --kh-pgr-primary-soft: var(--kh-pgr-site-primary-soft, color-mix(in srgb, var(--kh-pgr-primary) 9%, white));
    --kh-pgr-gold: var(--kh-pgr-primary);
    --kh-pgr-gold-soft: var(--kh-pgr-primary-soft);
    --kh-pgr-ink: #14231f;
    --kh-pgr-muted: #64756f;
    --kh-pgr-border: var(--kh-pgr-site-primary-border, color-mix(in srgb, var(--kh-pgr-primary) 18%, white));
    --kh-pgr-danger: #a13c32;
    --kh-pgr-danger-soft: #fff1ef;
    box-sizing: border-box;
    font-family: inherit;
}

.kh-pgr-status-panel,
.kh-pgr-installment-update-popup {
    --kh-pgr-primary: #0f6b5b;
    --kh-pgr-primary-dark: #0a5044;
    --kh-pgr-primary-soft: #eaf5f2;
    --kh-pgr-gold: #c9a24d;
    --kh-pgr-gold-soft: #fbf5e8;
    --kh-pgr-ink: #14231f;
    --kh-pgr-muted: #64756f;
    --kh-pgr-border: #dce8e4;
    --kh-pgr-danger: #a13c32;
    --kh-pgr-danger-soft: #fff1ef;
    box-sizing: border-box;
    font-family: inherit;
}

.kh-pgr-product-box *,
.kh-pgr-status-panel *,
.kh-pgr-installment-update-popup * {
    box-sizing: border-box;
}

/* Product installment summary */
.kh-pgr-seyedona-credit-box.kh-pgr-seyedona-credit-box-v29 {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin: 12px 0;
    padding: 13px 14px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--kh-pgr-primary) 18%, white);
    border-radius: 18px;
    background:
        radial-gradient(circle at 10% 0, color-mix(in srgb, var(--kh-pgr-gold) 18%, transparent), transparent 42%),
        linear-gradient(135deg, #fff, var(--kh-pgr-primary-soft));
    box-shadow: 0 10px 28px rgba(20, 35, 31, .07);
    color: var(--kh-pgr-ink);
}

.kh-pgr-seyedona-credit-box-v29 .kh-pgr-seyedona-credit-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.kh-pgr-seyedona-credit-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 4px 11px;
    border: 1px solid color-mix(in srgb, var(--kh-pgr-primary) 20%, white);
    border-radius: 999px;
    background: rgba(255, 255, 255, .86);
    color: var(--kh-pgr-primary-dark);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.6;
    white-space: nowrap;
}

.kh-pgr-seyedona-credit-icons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.kh-pgr-seyedona-credit-icons::-webkit-scrollbar {
    display: none;
}

.kh-pgr-seyedona-credit-gateway {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--kh-pgr-primary) 16%, white);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 14px rgba(20, 35, 31, .06);
}

.kh-pgr-logo,
.kh-pgr-pay-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #edf2f0;
    border-radius: 12px;
    background: #fff;
}

.kh-pgr-seyedona-credit-gateway .kh-pgr-logo {
    width: 38px;
    height: 38px;
    border: 0;
}

.kh-pgr-logo img,
.kh-pgr-pay-icon img {
    display: block;
    width: auto;
    height: auto;
    max-width: 32px;
    max-height: 32px;
    object-fit: contain;
}

.kh-pgr-seyedona-credit-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.kh-pgr-seyedona-credit-content strong {
    margin: 0;
    color: var(--kh-pgr-ink);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.9;
}

.kh-pgr-seyedona-credit-content mark {
    display: inline;
    padding: 2px 6px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--kh-pgr-primary) 10%, white);
    color: var(--kh-pgr-primary-dark);
    font-weight: 900;
    white-space: nowrap;
}

.kh-pgr-product-installment-amount {
    transition: opacity .18s ease, color .18s ease, background-color .18s ease;
}

.kh-pgr-seyedona-credit-box.is-installment-unavailable .kh-pgr-product-installment-amount {
    background: #f8e9e7;
    color: #9a3f35;
    white-space: normal;
}

.kh-pgr-seyedona-credit-box.is-installment-calculating .kh-pgr-product-installment-amount {
    opacity: .62;
}

.kh-pgr-seyedona-credit-content small {
    display: block;
    color: var(--kh-pgr-muted);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.8;
}

.kh-pgr-seyedona-credit-content small b {
    color: var(--kh-pgr-primary-dark);
    font-weight: 800;
}

.kh-pgr-fallback-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--kh-pgr-primary-soft);
    color: var(--kh-pgr-primary-dark);
    font-size: 13px;
    font-weight: 900;
}

/* Checkout and cart payment cards */
.kh-pgr-status-panel {
    position: relative;
    width: 100%;
    margin: 14px 0 18px;
    padding: 15px;
    border: 1px solid var(--kh-pgr-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(20, 35, 31, .06);
    color: var(--kh-pgr-ink);
}

.kh-pgr-status-checkout {
    margin-block: 8px 16px;
}

.kh-pgr-status-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-block-end: 14px;
    padding-block-end: 12px;
    border-block-end: 1px solid var(--kh-pgr-border);
}

.kh-pgr-status-head > span {
    color: var(--kh-pgr-ink);
    font-size: 14px;
    font-weight: 850;
}

.kh-pgr-status-head > small {
    max-width: 55%;
    color: var(--kh-pgr-muted);
    font-size: 11px;
    line-height: 1.8;
    text-align: end;
}

.kh-pgr-status-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.kh-pgr-status-checkout .kh-pgr-status-columns {
    grid-template-columns: 1fr;
}

.kh-pgr-status-col {
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
}

.kh-pgr-status-title {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--kh-pgr-primary-soft);
    color: var(--kh-pgr-primary-dark);
    font-size: 11px;
    font-weight: 800;
}

.kh-pgr-status-title.blocked {
    background: var(--kh-pgr-danger-soft);
    color: var(--kh-pgr-danger);
}

.kh-pgr-status-checkout .kh-pgr-status-title,
.kh-pgr-status-checkout .kh-pgr-status-head {
    display: none;
}

.kh-pgr-pay-card {
    position: relative;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-height: 72px;
    margin: 0;
    padding: 11px 12px;
    border: 1px solid var(--kh-pgr-border);
    border-radius: 15px;
    background: #fff;
    color: var(--kh-pgr-ink);
    box-shadow: 0 3px 10px rgba(20, 35, 31, .025);
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease, transform .16s ease;
}

.kh-pgr-pay-card.is-selectable {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.kh-pgr-pay-card.is-selectable:hover {
    border-color: color-mix(in srgb, var(--kh-pgr-primary) 42%, white);
    box-shadow: 0 8px 22px rgba(15, 107, 91, .09);
    transform: translateY(-1px);
}

.kh-pgr-pay-card.is-selectable:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--kh-pgr-primary) 35%, transparent);
    outline-offset: 2px;
}

.kh-pgr-pay-card.is-selected {
    border-color: var(--kh-pgr-primary);
    background: linear-gradient(135deg, #fff, var(--kh-pgr-primary-soft));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--kh-pgr-primary) 13%, transparent), 0 9px 24px rgba(15, 107, 91, .09);
}

.kh-pgr-pay-card.is-inactive {
    border-color: #e4e9e7;
    background: #f7f9f8;
    color: #687670;
}

.kh-pgr-pay-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
}

.kh-pgr-pay-icon img {
    max-width: 37px;
    max-height: 37px;
}

.kh-pgr-pay-main {
    min-width: 0;
}

.kh-pgr-gateway-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    min-width: 0;
}

.kh-pgr-pay-card strong {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--kh-pgr-ink);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.65;
}

.kh-pgr-card-installment-pill,
.kh-pgr-fee-badge {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--kh-pgr-gold-soft);
    color: #795e22;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    line-height: 1.5;
    white-space: nowrap;
}

.kh-pgr-card-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-block-start: 4px;
}

.kh-pgr-pay-card small,
.kh-pgr-fee-help {
    display: block;
    color: var(--kh-pgr-muted);
    font-size: 11px;
    line-height: 1.75;
}

.kh-pgr-selected-desc {
    margin-block-start: 6px;
    padding: 7px 9px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .72);
    color: var(--kh-pgr-primary-dark);
    font-size: 11px;
    line-height: 1.8;
}

.kh-pgr-pay-card > b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    min-height: 42px;
    padding: 7px 12px;
    border: 1px solid color-mix(in srgb, var(--kh-pgr-primary) 20%, white);
    border-radius: 12px;
    background: var(--kh-pgr-primary-soft);
    color: var(--kh-pgr-primary-dark);
    font-size: 11px;
    font-weight: 850;
    line-height: 1.4;
    white-space: nowrap;
}

.kh-pgr-pay-card.is-selected > b {
    border-color: var(--kh-pgr-primary);
    background: var(--kh-pgr-primary);
    color: #fff;
}

.kh-pgr-pay-card.is-inactive > b {
    border-color: #dce3e0;
    background: #edf1ef;
    color: #6f7b76;
}

.kh-pgr-empty {
    padding: 14px;
    border: 1px dashed var(--kh-pgr-border);
    border-radius: 13px;
    background: #f8faf9;
    color: var(--kh-pgr-muted);
    font-size: 12px;
    line-height: 1.8;
}

.kh-pgr-live-region {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.kh-pgr-live-region.is-error {
    position: static;
    width: auto;
    height: auto;
    margin: 0 0 10px;
    padding: 9px 11px;
    overflow: visible;
    clip: auto;
    white-space: normal;
    border: 1px solid #f0c7c1;
    border-radius: 11px;
    background: var(--kh-pgr-danger-soft);
    color: var(--kh-pgr-danger);
    font-size: 11px;
    line-height: 1.8;
}

/* Preserve real gateway fields while replacing only the native labels. */
body.kh-pgr-enhanced-checkout #payment ul.kh-pgr-native-payment-list {
    display: block !important;
    margin: 10px 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    list-style: none !important;
}

body.kh-pgr-enhanced-checkout #payment ul.kh-pgr-native-payment-list > li {
    position: relative;
    display: block !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

body.kh-pgr-enhanced-checkout #payment ul.kh-pgr-native-payment-list > li > input[name="payment_method"],
body.kh-pgr-enhanced-checkout #payment ul.kh-pgr-native-payment-list > li > label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

body.kh-pgr-enhanced-checkout #payment ul.kh-pgr-native-payment-list > li:not(.kh-pgr-native-method-selected) .payment_box {
    display: none !important;
}

body.kh-pgr-enhanced-checkout #payment ul.kh-pgr-native-payment-list > li.kh-pgr-native-method-selected .payment_box {
    display: block !important;
    width: 100%;
    margin: 10px 0 0 !important;
    padding: 13px 14px !important;
    border: 1px solid var(--kh-pgr-border, #dce8e4) !important;
    border-radius: 14px !important;
    background: #f8faf9 !important;
    color: #34453f !important;
    box-shadow: none !important;
    font-size: 12px;
    line-height: 1.9;
}

body.kh-pgr-enhanced-checkout #payment ul.kh-pgr-native-payment-list .kh-pgr-native-duplicate-description,
body.kh-pgr-enhanced-checkout #payment ul.kh-pgr-native-payment-list > li.kh-pgr-native-method-selected .payment_box.kh-pgr-native-description-only {
    display: none !important;
}

body.kh-pgr-enhanced-checkout #payment ul.kh-pgr-native-payment-list .payment_box::before {
    display: none !important;
}

body.kh-pgr-enhanced-checkout #payment ul.kh-pgr-native-payment-list .payment_box input:not([type="checkbox"]):not([type="radio"]),
body.kh-pgr-enhanced-checkout #payment ul.kh-pgr-native-payment-list .payment_box select,
body.kh-pgr-enhanced-checkout #payment ul.kh-pgr-native-payment-list .payment_box textarea {
    width: 100%;
    min-height: 44px;
}

/* Fee-aware checkout pricing */
.kh-pgr-checkout-price-stack {
    display: flex !important;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    line-height: 1.6;
}

.kh-pgr-checkout-price-new {
    color: var(--kh-pgr-ink, #14231f);
    font-size: 13px;
    font-weight: 850;
}

.kh-pgr-checkout-price-label {
    color: var(--kh-pgr-muted, #65736e);
    font-size: 10px;
    font-weight: 700;
}

.kh-pgr-checkout-price-old {
    color: #7a8984;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

/* Loading and feedback */
.kh-pgr-status-checkout.kh-pgr-is-loading {
    min-height: 84px;
    overflow: hidden;
    pointer-events: none;
}

.kh-pgr-status-checkout.kh-pgr-is-loading::before {
    content: "";
    position: absolute;
    z-index: 4;
    inset: 0;
    border-radius: inherit;
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(2px);
}

.kh-pgr-status-checkout.kh-pgr-is-loading::after {
    content: attr(data-kh-pgr-loading-text);
    position: absolute;
    z-index: 5;
    inset: 50% auto auto 50%;
    min-width: min(260px, calc(100% - 30px));
    padding: 10px 14px 10px 40px;
    transform: translate(-50%, -50%);
    border: 1px solid var(--kh-pgr-border);
    border-radius: 999px;
    background: #fff;
    color: var(--kh-pgr-primary-dark);
    box-shadow: 0 10px 30px rgba(20, 35, 31, .12);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.7;
    text-align: center;
    white-space: nowrap;
}

.kh-pgr-installment-update-popup {
    position: fixed;
    z-index: 999999;
    inset-inline-start: 50%;
    inset-block-end: max(18px, env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: max-content;
    max-width: calc(100vw - 28px);
    padding: 12px 15px;
    visibility: hidden;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 16px;
    background: rgba(20, 35, 31, .96);
    color: #fff;
    box-shadow: 0 18px 45px rgba(20, 35, 31, .28);
    opacity: 0;
    transform: translate(-50%, 14px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    pointer-events: none;
    text-align: center;
}

.kh-pgr-installment-update-popup.is-visible {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, 0);
}

.kh-pgr-installment-update-popup-icon {
    display: inline-flex;
    flex: 0 0 25px;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: var(--kh-pgr-gold);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}

.kh-pgr-installment-update-popup strong {
    color: #fff;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.8;
}

.kh-pgr-front-mode-selector,
.kh-pgr-mode-hidden {
    display: none !important;
}

.kh-pgr-single-installment-label-source {
    display: none !important;
}

/* Woodmart single-product gallery label */
.single-product .wd-carousel-container .product-labels .kh-pgr-single-installment-label,
.single-product .woocommerce-product-gallery .product-labels .kh-pgr-single-installment-label {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding-inline: 9px;
    border: 1px solid rgba(255, 255, 255, .72) !important;
    background: var(--kh-pgr-site-primary, var(--wd-primary-color, #0f6b5b)) !important;
    color: var(--kh-pgr-site-primary-contrast, #fff) !important;
    box-shadow: 0 7px 18px var(--kh-pgr-site-primary-shadow, rgba(15, 107, 91, .22)) !important;
    font-weight: 850 !important;
    letter-spacing: 0 !important;
}

.single-product .kh-pgr-single-installment-label::before {
    content: none !important;
}

.single-product .product-labels.kh-pgr-single-installment-labels-created {
    z-index: 7 !important;
}

@media (max-width: 768px) {
    .kh-pgr-status-columns {
        grid-template-columns: 1fr;
    }

    .kh-pgr-status-head {
        flex-direction: column;
        gap: 5px;
    }

    .kh-pgr-status-head > small {
        max-width: none;
        text-align: start;
    }
}

@media (max-width: 640px) {
    .kh-pgr-seyedona-credit-box.kh-pgr-seyedona-credit-box-v29 {
        gap: 8px;
        margin-block: 10px;
        padding: 11px;
        border-radius: 15px;
    }

    .kh-pgr-seyedona-credit-head {
        gap: 8px;
    }

    .kh-pgr-seyedona-credit-kicker {
        min-height: 28px;
        padding: 3px 9px;
        font-size: 10.5px;
    }

    .kh-pgr-seyedona-credit-gateway {
        width: 36px;
        height: 36px;
        border-radius: 11px;
    }

    .kh-pgr-seyedona-credit-gateway .kh-pgr-logo {
        width: 34px;
        height: 34px;
    }

    .kh-pgr-seyedona-credit-gateway .kh-pgr-logo img {
        max-width: 28px;
        max-height: 28px;
    }

    .kh-pgr-seyedona-credit-content strong {
        font-size: 12px;
        line-height: 1.85;
    }

    .kh-pgr-seyedona-credit-content small {
        font-size: 10.5px;
    }

    .kh-pgr-status-panel {
        margin-block: 10px 14px;
        padding: 10px;
        border-radius: 15px;
    }

    .kh-pgr-pay-card {
        grid-template-columns: 44px minmax(0, 1fr) auto;
        gap: 9px;
        min-height: 70px;
        padding: 10px;
        border-radius: 14px;
    }

    .kh-pgr-pay-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }

    .kh-pgr-pay-icon img {
        max-width: 34px;
        max-height: 34px;
    }

    .kh-pgr-pay-card strong {
        font-size: 12px;
    }

    .kh-pgr-pay-card > b {
        min-width: 70px;
        min-height: 44px;
        padding-inline: 9px;
    }

    .kh-pgr-pay-card small,
    .kh-pgr-selected-desc {
        font-size: 10.5px;
    }

    .kh-pgr-checkout-price-stack {
        align-items: flex-start;
    }

    .kh-pgr-installment-update-popup {
        inset-block-end: max(10px, env(safe-area-inset-bottom));
        width: calc(100vw - 24px);
        padding: 11px 12px;
        border-radius: 14px;
    }

    body.kh-pgr-enhanced-checkout #payment ul.kh-pgr-native-payment-list > li.kh-pgr-native-method-selected .payment_box {
        padding: 11px !important;
        border-radius: 12px !important;
    }
}

@media (max-width: 390px) {
    .kh-pgr-pay-card {
        grid-template-columns: 40px minmax(0, 1fr) 64px;
        gap: 8px;
        padding: 9px;
    }

    .kh-pgr-pay-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }

    .kh-pgr-pay-icon img {
        max-width: 31px;
        max-height: 31px;
    }

    .kh-pgr-pay-card > b {
        min-width: 64px;
        padding-inline: 6px;
        font-size: 10px;
    }

    .kh-pgr-card-installment-pill {
        padding-inline: 6px;
        font-size: 9.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kh-pgr-pay-card,
    .kh-pgr-installment-update-popup {
        scroll-behavior: auto;
        transition: none;
    }

    .kh-pgr-pay-card.is-selectable:hover {
        transform: none;
    }
}

@media (forced-colors: active) {
    .kh-pgr-pay-card.is-selected,
    .kh-pgr-pay-card.is-selectable:focus-visible,
    .kh-pgr-card-installment-pill,
    .kh-pgr-pay-card > b {
        border: 2px solid CanvasText;
    }
}
