.hnnp-purchase-actions {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) minmax(118px, .34fr);
    width: 100%;
}

.hnnp-purchase-actions.has-installment {
    grid-template-columns: minmax(104px, .34fr) minmax(0, 1fr) minmax(104px, .34fr);
}

.hnnp-purchase-actions .hnnp-btn-buynow {
    margin: 0 !important;
    max-width: none !important;
    width: 100% !important;
}

body .electron-product-info button.hnnp-installment-trigger {
    align-items: center;
    background: #fff !important;
    border: 1px solid #4A79FF !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    color: #2B5ACD !important;
    display: flex;
    justify-content: center;
    line-height: 1.25;
    min-height: 58px;
    padding: 7px 10px !important;
    text-align: center;
    text-transform: none !important;
    width: 100%;
}

body .electron-product-info button.hnnp-installment-trigger span {
    font-size: 13px;
    font-weight: 700;
}

.hnnp-installment-trigger[hidden],
.hnnp-sticky-product__installment[hidden] {
    display: none !important;
}

.hnnp-sticky-product.has-installment .hnnp-sticky-product__actions {
    grid-template-columns: 44px 92px 132px 150px 44px;
}

body .hnnp-sticky-product__installment {
    align-items: center;
    background: #fff !important;
    border: 1px solid #4A79FF !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    color: #2B5ACD !important;
    display: flex;
    font-family: inherit;
    font-size: 13px !important;
    font-weight: 700;
    justify-content: center;
    line-height: 1.2;
    margin: 0;
    min-height: 44px;
    padding: 7px 9px !important;
    text-align: center;
    text-transform: none !important;
}

body .hnnp-sticky-product__installment:hover {
    background: #eef3ff !important;
    color: #214dbb !important;
}

@media (max-width: 900px) {
    .hnnp-sticky-product.has-installment .hnnp-sticky-product__secondary {
        display: none;
    }

    .hnnp-sticky-product.has-installment .hnnp-sticky-product__actions {
        grid-template-columns: 44px 124px 150px 44px;
    }
}

@media (max-width: 700px) {
    .hnnp-purchase-actions.has-installment {
        align-items: stretch;
        grid-template-columns: 104px minmax(0, 1fr) 104px;
    }

    .hnnp-purchase-actions.has-installment > * {
        min-width: 0;
    }

    body .electron-product-info .hnnp-purchase-actions .hnnp-btn-buynow .cart-text .sub-text {
        display: none !important;
    }

    .hnnp-sticky-product.has-installment .hnnp-sticky-product__actions {
        grid-template-columns: 42px minmax(88px, .85fr) minmax(120px, 1.35fr) 42px;
    }

    body .hnnp-sticky-product__installment {
        border-radius: 7px !important;
        font-size: 11px !important;
        min-height: 44px;
        padding-inline: 5px !important;
    }
}

html.hnnp-installment-open,
html.hnnp-installment-open body {
    overflow: hidden;
}

.hnnp-installment-modal[hidden] {
    display: none !important;
}

.hnnp-installment-modal {
    align-items: center;
    display: flex;
    inset: 0;
    justify-content: center;
    opacity: 0;
    padding: 18px;
    position: fixed;
    transition: opacity .18s ease;
    z-index: 100000;
}

.hnnp-installment-modal.is-open {
    opacity: 1;
}

.hnnp-installment-modal__backdrop {
    background: rgba(15, 23, 42, .62);
    inset: 0;
    position: absolute;
}

.hnnp-installment-modal__dialog {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .22);
    color: #1d1d20;
    max-height: min(760px, calc(100vh - 36px));
    max-width: 640px;
    opacity: 0;
    overflow: auto;
    position: relative;
    transform: translateY(12px);
    transition: opacity .18s ease, transform .18s ease;
    width: 100%;
}

.hnnp-installment-modal.is-open .hnnp-installment-modal__dialog {
    opacity: 1;
    transform: translateY(0);
}

.hnnp-installment-modal__header {
    align-items: center;
    border-bottom: 1px solid #e8eaf0;
    display: flex;
    justify-content: space-between;
    padding: 16px 18px;
}

.hnnp-installment-modal__header small {
    color: #63708a;
    display: block;
    font-size: 11px;
    margin-bottom: 2px;
}

.hnnp-installment-modal__header h2 {
    color: #1d1d20;
    font-size: 20px;
    line-height: 1.3;
    margin: 0;
}

body .hnnp-installment-modal__header button {
    align-items: center;
    background: #f1f3f6 !important;
    border: 0 !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    color: #30343b !important;
    display: flex;
    font-size: 22px !important;
    height: 32px;
    justify-content: center;
    min-width: 32px !important;
    padding: 0 0 2px !important;
    width: 32px;
}

.hnnp-installment-modal__body {
    padding: 16px 18px;
}

.hnnp-installment-product {
    align-items: center;
    border: 1px solid #dfe3ea;
    border-radius: 10px;
    display: grid;
    gap: 12px;
    grid-template-columns: 72px minmax(0, 1fr);
    padding: 10px;
}

.hnnp-installment-product img {
    height: 72px;
    object-fit: contain;
    width: 72px;
}

.hnnp-installment-product strong {
    color: #1d1d20;
    display: block;
    font-size: 14px;
    line-height: 1.4;
}

.hnnp-installment-product span {
    color: #df1f36;
    display: block;
    font-size: 16px;
    font-weight: 700;
    margin-top: 4px;
}

.hnnp-installment-benefits {
    display: grid;
    gap: 7px;
    grid-template-columns: repeat(3, 1fr);
    margin: 12px 0 16px;
}

.hnnp-installment-benefits span {
    background: #f1f6ff;
    border-radius: 7px;
    color: #2B5ACD;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
    padding: 8px;
    text-align: center;
}

.hnnp-installment-terms p {
    color: #1d1d20;
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 8px;
}

.hnnp-installment-terms > div {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, 1fr);
}

body .hnnp-installment-terms button {
    background: #fff !important;
    border: 1px solid #d9dee8 !important;
    border-radius: 7px !important;
    box-shadow: none !important;
    color: #293246 !important;
    font-size: 13px !important;
    font-weight: 600;
    min-height: 40px;
    padding: 7px !important;
}

body .hnnp-installment-terms button.is-active {
    background: #edf3ff !important;
    border-color: #4A79FF !important;
    color: #2B5ACD !important;
}

.hnnp-installment-summary {
    border: 1px solid #dfe3ea;
    border-radius: 9px;
    margin: 14px 0 10px;
    overflow: hidden;
}

.hnnp-installment-summary > div {
    align-items: center;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) minmax(170px, .75fr);
    margin: 0;
    padding: 10px 12px;
}

.hnnp-installment-summary > div + div {
    border-top: 1px solid #e7e9ee;
}

.hnnp-installment-summary dt,
.hnnp-installment-summary dd {
    font-size: 12px;
    line-height: 1.4;
    margin: 0;
}

.hnnp-installment-summary dd {
    color: #1d1d20;
    font-weight: 650;
    text-align: right;
}

.hnnp-installment-summary .is-highlight {
    background: #eef8f2;
}

.hnnp-installment-summary .is-highlight dd {
    color: #087443;
    font-size: 14px;
}

.hnnp-installment-note {
    background: #fff8e8;
    border-radius: 7px;
    color: #73510c;
    font-size: 11px;
    line-height: 1.5;
    margin: 0;
    padding: 9px 10px;
}

.hnnp-installment-modal__footer {
    border-top: 1px solid #e8eaf0;
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 1fr;
    padding: 14px 18px 16px;
}

.hnnp-installment-modal__footer a,
body .hnnp-installment-modal__footer button {
    align-items: center;
    border-radius: 7px;
    display: flex;
    font-size: 13px;
    font-weight: 700;
    justify-content: center;
    min-height: 42px;
    padding: 9px 12px;
    text-align: center;
    text-transform: none !important;
    text-decoration: none !important;
    width: 100%;
}

.hnnp-installment-zalo {
    background: #fff !important;
    border: 1px solid #4A79FF;
    color: #2B5ACD !important;
}

body .hnnp-installment-modal__footer .hnnp-installment-confirm {
    background: linear-gradient(180deg, #4A79FF 0%, #2B5ACD 100%) !important;
    border: 1px solid #2B5ACD !important;
    box-shadow: none !important;
    color: #fff !important;
}

body .hnnp-installment-modal__footer .hnnp-installment-confirm:disabled {
    cursor: wait;
    opacity: .72;
}

.hnnp-installment-request-page {
    background: #f2f4f7;
}

.hnnp-installment-page,
.hnnp-installment-page * {
    box-sizing: border-box;
}

.hnnp-installment-page {
    margin: 0 auto;
    max-width: 1180px;
    padding: 28px 18px 60px;
    width: 100%;
}

.hnnp-installment-page__heading {
    margin-bottom: 18px;
}

.hnnp-installment-page__heading > a {
    color: #2B5ACD;
    display: inline-block;
    font-size: 13px;
    margin-bottom: 9px;
    text-decoration: none;
}

.hnnp-installment-page__heading h1 {
    color: #182235;
    font-size: 28px;
    line-height: 1.25;
    margin: 0 0 5px;
}

.hnnp-installment-page__heading p {
    color: #647087;
    font-size: 13px;
    margin: 0;
}

.hnnp-installment-page__layout {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-areas:
        "product estimate"
        "form estimate";
    grid-template-columns: minmax(0, 1fr) 340px;
}

.hnnp-installment-page__card,
.hnnp-installment-page__error,
.hnnp-installment-page__success {
    background: #fff;
    border: 1px solid #dfe3ea;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.hnnp-installment-page__product {
    align-items: center;
    display: grid;
    gap: 14px;
    grid-area: product;
    grid-template-columns: 88px minmax(0, 1fr);
    min-width: 0;
    padding: 14px;
}

.hnnp-installment-page__product img {
    height: 88px;
    object-fit: contain;
    width: 88px;
}

.hnnp-installment-page__product h2 {
    color: #202838;
    font-size: 15px;
    line-height: 1.45;
    margin: 0 0 6px;
}

.hnnp-installment-page__product p {
    color: #df1f36;
    font-size: 16px;
    font-weight: 750;
    margin: 0;
}

.hnnp-installment-form {
    grid-area: form;
    min-width: 0;
    padding: 20px;
}

.hnnp-installment-form > h2,
.hnnp-installment-page__estimate > h2 {
    color: #202838;
    font-size: 17px;
    margin: 0 0 16px;
}

.hnnp-installment-form__grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hnnp-installment-form label {
    display: block;
    min-width: 0;
}

.hnnp-installment-form label.is-wide {
    grid-column: 1 / -1;
}

.hnnp-installment-form label > span {
    color: #354052;
    display: block;
    font-size: 12px;
    font-weight: 650;
    margin-bottom: 6px;
}

.hnnp-installment-form input,
.hnnp-installment-form textarea {
    background: #fff;
    border: 1px solid #cfd5df;
    border-radius: 7px;
    box-shadow: none;
    color: #202838;
    font-family: inherit;
    font-size: 13px;
    max-width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    width: 100%;
}

.hnnp-installment-form textarea {
    min-height: 82px;
    resize: vertical;
}

.hnnp-installment-form input:focus,
.hnnp-installment-form textarea:focus {
    border-color: #4A79FF;
    box-shadow: 0 0 0 2px rgba(74, 121, 255, .12);
    outline: 0;
}

.hnnp-installment-form__notice {
    background: #fff2f0;
    border: 1px solid #ffc8c2;
    border-radius: 7px;
    color: #b42318;
    font-size: 12px;
    margin-bottom: 14px;
    padding: 10px 12px;
}

.hnnp-installment-form__trap {
    left: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
}

body .hnnp-installment-form > button {
    background: linear-gradient(180deg, #4A79FF 0%, #2B5ACD 100%) !important;
    border: 0 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 750;
    margin-top: 18px;
    min-height: 48px;
    padding: 10px 18px !important;
    text-transform: none !important;
    width: 100%;
}

.hnnp-installment-page__estimate {
    grid-area: estimate;
    padding: 20px;
    position: sticky;
    top: 14px;
}

.hnnp-installment-page__estimate dl {
    margin: 0;
}

.hnnp-installment-page__estimate dl > div {
    align-items: start;
    border-top: 1px solid #eaedf2;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 10px 0;
}

.hnnp-installment-page__estimate dl > div:first-child {
    border-top: 0;
}

.hnnp-installment-page__estimate dt,
.hnnp-installment-page__estimate dd {
    color: #4b5565;
    font-size: 12px;
    line-height: 1.4;
    margin: 0;
}

.hnnp-installment-page__estimate dd {
    color: #202838;
    font-weight: 700;
    text-align: right;
}

.hnnp-installment-page__estimate .is-highlight dd {
    color: #087443;
}

.hnnp-installment-page__estimate .is-total {
    border-top: 2px solid #dfe3ea;
}

.hnnp-installment-page__estimate .is-total dt,
.hnnp-installment-page__estimate .is-total dd {
    color: #df1f36;
    font-size: 14px;
    font-weight: 800;
}

.hnnp-installment-page__estimate > p {
    background: #fff8e8;
    border-radius: 7px;
    color: #73510c;
    font-size: 11px;
    line-height: 1.5;
    margin: 12px 0 0;
    padding: 9px 10px;
}

.hnnp-installment-page__error,
.hnnp-installment-page__success {
    margin: 50px auto;
    max-width: 620px;
    padding: 32px;
    text-align: center;
}

.hnnp-installment-page__success > span {
    align-items: center;
    background: #eaf8ef;
    border-radius: 50%;
    color: #087443;
    display: inline-flex;
    font-size: 28px;
    height: 58px;
    justify-content: center;
    margin-bottom: 12px;
    width: 58px;
}

.hnnp-installment-page__error h1,
.hnnp-installment-page__success h1 {
    color: #202838;
    font-size: 24px;
    margin: 0 0 12px;
}

.hnnp-installment-page__error p,
.hnnp-installment-page__success p {
    color: #5f6978;
    font-size: 13px;
    line-height: 1.6;
}

.hnnp-installment-page__error a,
.hnnp-installment-page__success a {
    background: #2B5ACD;
    border-radius: 7px;
    color: #fff;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    justify-content: center;
    margin: 6px 4px 0;
    min-height: 42px;
    padding: 10px 16px;
    text-decoration: none;
}

@media (max-width: 900px) {
    .hnnp-installment-page__layout {
        grid-template-areas:
            "product"
            "estimate"
            "form";
        grid-template-columns: 1fr;
    }

    .hnnp-installment-page__estimate {
        position: static;
    }
}

@media (max-width: 575px) {
    .hnnp-purchase-actions.has-installment {
        grid-template-columns: 92px minmax(0, 1fr) 92px;
    }

    body .electron-product-info button.hnnp-installment-trigger {
        padding-inline: 6px !important;
    }

    body .electron-product-info button.hnnp-installment-trigger span {
        font-size: 12px;
    }

    .hnnp-installment-modal {
        align-items: flex-end;
        padding: 0;
    }

    .hnnp-installment-modal__dialog {
        border-radius: 14px 14px 0 0;
        max-height: min(88vh, 760px);
        max-width: none;
    }

    .hnnp-installment-modal__header,
    .hnnp-installment-modal__body {
        padding-left: 14px;
        padding-right: 14px;
    }

    .hnnp-installment-modal__header h2 {
        font-size: 17px;
    }

    .hnnp-installment-benefits {
        grid-template-columns: 1fr;
    }

    .hnnp-installment-summary > div {
        gap: 8px;
        grid-template-columns: minmax(0, 1fr) minmax(125px, .8fr);
    }

    .hnnp-installment-modal__footer {
        padding: 12px 14px max(14px, env(safe-area-inset-bottom));
    }

    .hnnp-installment-page {
        max-width: 100%;
        overflow-x: hidden;
        padding: 18px 10px 40px;
    }

    .hnnp-installment-page__heading h1 {
        font-size: 22px;
    }

    .hnnp-installment-page__product {
        gap: 10px;
        grid-template-columns: 70px minmax(0, 1fr);
        padding: 12px;
    }

    .hnnp-installment-page__product img {
        height: 70px;
        width: 70px;
    }

    .hnnp-installment-form,
    .hnnp-installment-page__estimate {
        padding: 15px 12px;
    }

    .hnnp-installment-form__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hnnp-installment-form label.is-wide {
        grid-column: auto;
    }

    .hnnp-installment-page__error,
    .hnnp-installment-page__success {
        margin: 30px 0;
        padding: 24px 16px;
    }
}
