:root {
    --checkout-primary: #120d78;
    --checkout-navy: #07111f;
    --checkout-text: #171a24;
    --checkout-muted: #6b7280;
    --checkout-border: #dfe3ea;
    --checkout-surface: #ffffff;
    --checkout-bg: #f5f7fa;
    --checkout-success: #139555;
    --checkout-danger: #b42318;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--checkout-text);
    background:
        radial-gradient(circle at 12% 0, rgba(18, 13, 120, .06), transparent 27rem),
        var(--checkout-bg);
    font-family: Montserrat, Arial, sans-serif;
    line-height: 1.5;
}

button,
input {
    font: inherit;
}

.checkout-shell {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
}

.checkout-header {
    color: #fff;
    background: linear-gradient(110deg, var(--checkout-navy), #0d1c30);
}

.checkout-header__inner {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.checkout-brand img {
    display: block;
    width: 145px;
    max-height: 52px;
}

.checkout-security {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.checkout-security__icon {
    font-size: 22px;
    line-height: 1;
}

.checkout-security strong,
.checkout-security small {
    display: block;
}

.checkout-security small {
    margin-top: 2px;
    color: #d6dde8;
}

.checkout-main {
    padding: 34px 0 64px;
}

.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(340px, .9fr);
    gap: 24px;
    align-items: start;
}

.checkout-card {
    border: 1px solid rgba(215, 220, 229, .9);
    border-radius: 16px;
    background: var(--checkout-surface);
    box-shadow: 0 10px 34px rgba(17, 24, 39, .06);
}

.checkout-form-card {
    padding: 30px;
}

.checkout-form-card > h1,
.checkout-result h1 {
    margin: 0;
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.2;
}

.checkout-intro {
    margin: 9px 0 30px;
    color: var(--checkout-muted);
}

.checkout-step + .checkout-step {
    margin-top: 29px;
}

.checkout-step__heading {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 15px;
}

.checkout-step__heading h2,
.checkout-summary h2 {
    margin: 0;
    font-size: 18px;
}

.checkout-step__number {
    display: inline-grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--checkout-primary);
    font-size: 13px;
    font-weight: 800;
}

.checkout-fields {
    display: grid;
    gap: 17px;
}

.checkout-fields label > span {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
}

.checkout-fields label small {
    color: var(--checkout-muted);
    font-weight: 400;
}

.checkout-fields input {
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    border: 1px solid var(--checkout-border);
    border-radius: 8px;
    outline: none;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}

.checkout-fields input:focus {
    border-color: var(--checkout-primary);
    box-shadow: 0 0 0 3px rgba(18, 13, 120, .1);
}

.checkout-consent {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    color: #4b5563;
    font-size: 13px;
}

.checkout-consent input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--checkout-primary);
}

.checkout-consent a,
.checkout-link {
    color: var(--checkout-primary);
    font-weight: 600;
}

.checkout-payment-placeholder,
.checkout-payment-element {
    padding: 18px;
    border: 1px solid var(--checkout-border);
    border-radius: 10px;
    background: #fbfbfd;
}

.checkout-payment-placeholder {
    color: var(--checkout-muted);
    font-size: 13px;
}

.checkout-express {
    margin-top: 18px;
}

.checkout-express[hidden] {
    display: none !important;
}

#express-checkout-element[hidden] {
    display: none !important;
}

.checkout-revolut-button {
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    margin-top: 12px;
    padding: 0 20px;
    border: 1px solid #111318;
    border-radius: 8px;
    color: #fff;
    background: #111318;
    box-shadow: 0 7px 18px rgba(17, 19, 24, .14);
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s, opacity .2s, background-color .2s;
}

.checkout-revolut-button:hover {
    background: #000;
    transform: translateY(-1px);
}

.checkout-revolut-button:disabled {
    cursor: not-allowed;
    opacity: .58;
    transform: none;
}

.checkout-revolut-button[hidden] {
    display: none !important;
}

.checkout-revolut-button__mark {
    display: inline-grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 7px;
    color: #111318;
    background: #fff;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
}

.checkout-payment-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 14px;
    color: var(--checkout-muted);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.checkout-payment-divider::before,
.checkout-payment-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--checkout-border);
}

.checkout-payment-divider span {
    white-space: nowrap;
}

.checkout-alert {
    margin: 14px 0;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.checkout-alert--error {
    color: var(--checkout-danger);
    background: #fff0ee;
}

.checkout-button {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 24px;
    border: 0;
    border-radius: 9px;
    color: #fff;
    background: linear-gradient(100deg, var(--checkout-primary), #3858dc);
    box-shadow: 0 9px 22px rgba(18, 13, 120, .18);
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s, opacity .2s;
}

.checkout-button:hover {
    transform: translateY(-1px);
}

.checkout-button:disabled {
    cursor: not-allowed;
    opacity: .58;
    transform: none;
}

.checkout-button--wide {
    width: 100%;
    margin-top: 24px;
}

.checkout-powered {
    margin: 12px 0 0;
    color: var(--checkout-muted);
    font-size: 12px;
    text-align: center;
}

.checkout-spinner {
    width: 19px;
    height: 19px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: checkout-spin .8s linear infinite;
}

@keyframes checkout-spin {
    to { transform: rotate(360deg); }
}

.checkout-summary {
    position: sticky;
    top: 22px;
    display: grid;
    gap: 20px;
}

.checkout-summary .checkout-card {
    padding: 25px;
}

.checkout-product {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin-top: 20px;
}

.checkout-product img,
.checkout-product__placeholder {
    width: 76px;
    height: 94px;
    border-radius: 8px;
    object-fit: cover;
    background: #e9eaf3;
}

.checkout-product__placeholder {
    display: grid;
    place-items: center;
    color: var(--checkout-primary);
    font-size: 13px;
    font-weight: 900;
}

.checkout-product__info {
    min-width: 0;
}

.checkout-product__info strong,
.checkout-product__info small {
    display: block;
}

.checkout-product__info strong {
    font-size: 14px;
}

.checkout-product__info small {
    margin-top: 5px;
    color: var(--checkout-muted);
    font-size: 12px;
}

.checkout-product__price {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.checkout-total {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 22px;
    padding-top: 19px;
    border-top: 1px solid var(--checkout-border);
}

.checkout-total strong:last-child {
    color: var(--checkout-success);
}

.checkout-benefits ul {
    display: grid;
    gap: 15px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
}

.checkout-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
}

.checkout-benefits li span {
    color: var(--checkout-primary);
    font-size: 19px;
    font-weight: 800;
    line-height: 1;
}

.checkout-guarantee {
    margin-top: 26px;
    padding: 18px;
    border: 1px solid var(--checkout-border);
    border-radius: 11px;
}

.checkout-guarantee strong {
    font-size: 13px;
}

.checkout-guarantee p {
    margin: 9px 0 16px;
    color: var(--checkout-muted);
    font-size: 12px;
}

.checkout-payment-brands {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: #737986;
    font-size: 12px;
    font-weight: 800;
}

.checkout-result {
    width: min(680px, 100%);
    margin: 50px auto;
    padding: 44px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(17, 24, 39, .08);
    text-align: center;
}

.checkout-result__icon {
    display: grid;
    width: 68px;
    height: 68px;
    place-items: center;
    margin: 0 auto 20px;
    border-radius: 50%;
    color: #fff;
    background: var(--checkout-success);
    font-size: 34px;
    font-weight: 800;
}

.checkout-result p {
    margin: 17px auto 26px;
    color: var(--checkout-muted);
}

.checkout-result__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.checkout-hp {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
}

@media (max-width: 900px) {
    .checkout-layout {
        display: flex;
        flex-direction: column;
    }

    .checkout-summary {
        position: static;
        order: -1;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .checkout-shell {
        width: min(100% - 24px, 1240px);
    }

    .checkout-header__inner {
        min-height: 68px;
    }

    .checkout-brand img {
        width: 116px;
    }

    .checkout-security small {
        display: none;
    }

    .checkout-main {
        padding: 18px 0 40px;
    }

    .checkout-form-card,
    .checkout-summary .checkout-card,
    .checkout-result {
        padding: 20px;
        border-radius: 13px;
    }

    .checkout-product {
        grid-template-columns: 62px minmax(0, 1fr);
    }

    .checkout-product img,
    .checkout-product__placeholder {
        width: 62px;
        height: 78px;
    }

    .checkout-product__price {
        grid-column: 2;
    }

    .checkout-result__actions {
        flex-direction: column;
    }
}
