.checkout-quantity-field {
    display: grid;
    grid-template-columns: minmax(88px, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 4px 0 14px;
    border-bottom: 1px solid #e0e5ea;
}

.checkout-quantity-label {
    margin: 0;
}

.checkout-quantity-control {
    width: max-content;
}

.checkout-quantity-button,
.checkout-quantity-input {
    height: 40px;
    border: 1px solid #c7d0d9;
    background: #fff;
}

.checkout-quantity-button {
    width: 40px;
    color: #17212b;
}

.checkout-quantity-button:first-child {
    border-radius: 12px 0 0 12px;
}

.checkout-quantity-button:last-child {
    border-radius: 0 12px 12px 0;
}

.checkout-quantity-button:hover {
    background: #f4f7f9;
}

.checkout-quantity-input {
    width: 48px;
    margin: 0 -1px;
    border-radius: 0;
    appearance: textfield;
}

.checkout-quantity-input::-webkit-inner-spin-button,
.checkout-quantity-input::-webkit-outer-spin-button {
    margin: 0;
    appearance: none;
}

.checkout-quantity-input:focus {
    position: relative;
    z-index: 1;
    border-color: #00658d;
    box-shadow: 0 0 0 3px rgba(0, 101, 141, 0.12);
}

@media (min-width: 768px) {
    .checkout-product-header {
        padding-bottom: 16px !important;
    }

    .checkout-price-section {
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }

    .checkout-form-shell {
        padding-top: 16px !important;
    }

    .checkout-buy-form > :not([hidden]) ~ :not([hidden]) {
        margin-top: 12px !important;
    }

    .checkout-quantity-field {
        padding-top: 0;
        padding-bottom: 10px;
    }
}

.checkout-submit-area {
    width: 100%;
}

.checkout-subtotal {
    display: flex;
    width: 100%;
    min-height: 34px;
    padding: 5px 12px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid #c7d0d9;
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
    background: #f5fbfd;
    color: #66727f;
}

.checkout-subtotal-label {
    font-size: 0.6875rem;
    font-weight: 500;
}

.checkout-subtotal-amount {
    display: flex;
    min-width: 0;
    align-items: baseline;
    justify-content: flex-end;
    gap: 6px;
    text-align: right;
}

.checkout-subtotal-value {
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.checkout-fee-info {
    color: #b45309;
    font-size: 0.625rem;
    font-weight: 500;
    line-height: 1.3;
}

.checkout-submit-area > button[type='submit'] {
    margin-top: 0 !important;
    border-radius: 0 0 12px 12px;
}

.checkout-coupon {
    border-radius: 12px;
    background: #f4f6fa;
}

.checkout-coupon-summary {
    display: flex;
    min-height: 50px;
    padding: 0 14px;
    align-items: center;
    justify-content: space-between;
    color: #586574;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    list-style: none;
}

.checkout-coupon-summary::-webkit-details-marker {
    display: none;
}

.checkout-coupon-summary > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.checkout-coupon-summary .material-symbols-outlined {
    font-size: 1.1875rem;
}

.checkout-coupon-chevron {
    transition: transform 160ms ease;
}

.checkout-coupon[open] .checkout-coupon-chevron {
    transform: rotate(180deg);
}

.checkout-coupon-body {
    padding: 0 12px 12px;
}

.checkout-coupon-body label {
    display: none;
}

.checkout-coupon-body input {
    min-height: 44px;
    background: #fff;
}

.checkout-payment-label {
    margin-bottom: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
}

.checkout-payment-label .material-symbols-outlined {
    font-size: 0.875rem !important;
}

.checkout-payment-options {
    width: calc(100% - 24px);
    margin-inline: auto;
}

.checkout-preferred-payments {
    display: block !important;
}

.checkout-usdt-group {
    padding: 12px;
    border: 1px solid #bfd0d8;
    border-radius: 14px;
    background: #f6fafb;
}

.checkout-usdt-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    column-gap: 6px;
    row-gap: 4px;
    margin-bottom: 10px;
    color: #17212b;
}

.checkout-usdt-header strong {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 22px;
}

.checkout-badge {
    display: inline-block;
    box-sizing: border-box;
    height: 22px;
    min-height: 22px;
    padding: 0 8px;
    border: 0;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 22px;
    text-align: center;
    white-space: nowrap;
}

.checkout-badge--recommended {
    background: #e6f3f7;
    color: #005b78;
}

.checkout-badge--fee {
    background: #e8f6f1;
    color: #17634e;
}

.checkout-usdt-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
}

.checkout-payment-options .checkout-pay-card {
    position: relative;
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    min-width: 0;
    min-height: 40px;
    padding: 2px 8px;
    border: 1px solid #d3dbe3;
    border-radius: 9px;
    background: #fff;
    color: #17212b;
    cursor: pointer;
    transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
    -webkit-tap-highlight-color: transparent;
}

.checkout-pay-card:hover {
    border-color: #75b4c8;
}

.checkout-pay-card:focus-visible {
    outline: 3px solid rgba(0, 101, 141, 0.18);
    outline-offset: 2px;
}

.checkout-pay-card.is-selected {
    border-color: #0876d1;
    background: #eef7ff;
    box-shadow: inset 0 0 0 1px #0876d1;
}

.checkout-pay-card.is-selected .checkout-pay-card-name {
    color: #17212b;
}

.checkout-payment-options img.checkout-payment-icon {
    display: block !important;
    width: 22px !important;
    min-width: 22px !important;
    max-width: 22px !important;
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    object-fit: contain !important;
}

.checkout-payment-options .checkout-pay-card--usdt,
.checkout-payment-options .checkout-pay-card--balance {
    min-height: 60px;
    padding: 9px 12px;
    gap: 10px !important;
    border-radius: 13px;
}

.checkout-payment-options .checkout-pay-card--usdt img.checkout-payment-icon,
.checkout-payment-options .checkout-pay-card--balance img.checkout-payment-icon {
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
}

.checkout-pay-card--usdt .checkout-pay-card-name {
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.4;
}

.checkout-pay-card-content {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    gap: 0;
}

.checkout-pay-card-name {
    min-width: 0;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.25;
    font-kerning: normal;
}

.checkout-pay-fee {
    color: #e76600;
    font-size: 0.6875rem;
    font-weight: 500;
    white-space: nowrap;
}

.checkout-pay-card-note {
    color: #768392;
    font-size: 0.6875rem;
    line-height: 1.2;
}

.checkout-pay-card--balance {
    margin-top: 0;
}

.checkout-pay-card--balance .checkout-pay-card-name {
    font-weight: 400;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
}

.checkout-pay-card--usdt .checkout-pay-card-content,
.checkout-pay-card--balance .checkout-pay-card-content {
    gap: 2px;
}

.checkout-pay-card--balance .checkout-badge {
    display: none;
}

.checkout-online-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 4px 6px;
    color: #758290;
    font-size: 0.6875rem;
    text-align: center;
    white-space: nowrap;
}

.checkout-online-divider::before,
.checkout-online-divider::after {
    height: 1px;
    flex: 1 1 auto;
    background: #d5dde4;
    content: '';
}

.checkout-online-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: calc(100% - 32px);
    margin-inline: auto;
    gap: 4px !important;
}

@media (min-width: 768px) {
    .checkout-online-grid {
        gap: 12px !important;
    }
}

.checkout-payment-options .checkout-pay-card--online {
    min-height: 36px;
    padding: 1px 6px;
    justify-content: center;
}

.checkout-payment-options .checkout-pay-card--online img.checkout-payment-icon {
    width: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
}

.checkout-pay-card--online .checkout-pay-card-content {
    flex: 0 1 auto;
}

.checkout-pay-card--online .checkout-pay-card-name {
    font-size: 0.6875rem;
}

.checkout-pay-card--online .checkout-pay-card-note {
    font-size: 0.625rem;
}

.checkout-coupon.is-unavailable .checkout-coupon-body {
    display: none;
}

.checkout-coupon.is-unavailable .checkout-coupon-summary {
    cursor: default;
    pointer-events: none;
}

.checkout-coupon.is-unavailable .checkout-coupon-chevron {
    display: none;
}

@media (min-width: 768px) {
    .checkout-pay-card-name {
        font-size: 0.75rem;
        font-weight: 400;
        line-height: 1.25;
        font-kerning: normal;
    }
}

@media (max-width: 767px) {
    .checkout-product-header {
        padding-bottom: 16px !important;
    }

    .checkout-price-section {
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }

    .checkout-form-shell {
        padding-top: 16px !important;
    }

    .checkout-buy-form > :not([hidden]) ~ :not([hidden]) {
        margin-top: 12px !important;
    }

    .checkout-quantity-field {
        padding-top: 0;
        padding-bottom: 10px;
    }

    .checkout-email-field input {
        min-height: 44px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .checkout-payment-label {
        margin-bottom: 8px;
    }

    .checkout-payment-options {
        width: calc(100% - 16px);
    }

    .checkout-preferred-payments {
        display: block !important;
    }

    .checkout-usdt-group {
        padding: 10px;
        border-radius: 13px;
    }

    .checkout-usdt-header {
        margin-bottom: 8px;
        column-gap: 6px;
        row-gap: 4px;
    }

    .checkout-payment-options .checkout-pay-card {
        min-height: 44px;
        padding: 2px 7px;
        gap: 6px !important;
        border-radius: 9px;
    }

    .checkout-payment-options img.checkout-payment-icon {
        width: 22px !important;
        min-width: 22px !important;
        max-width: 22px !important;
        height: 22px !important;
        min-height: 22px !important;
        max-height: 22px !important;
    }

    .checkout-payment-options .checkout-pay-card--usdt,
    .checkout-payment-options .checkout-pay-card--balance {
        min-height: 58px;
        padding: 8px 10px;
        gap: 8px !important;
        border-radius: 11px;
    }

    .checkout-payment-options .checkout-pay-card--usdt img.checkout-payment-icon,
    .checkout-payment-options .checkout-pay-card--balance img.checkout-payment-icon {
        width: 27px !important;
        min-width: 27px !important;
        max-width: 27px !important;
        height: 27px !important;
        min-height: 27px !important;
        max-height: 27px !important;
    }

    .checkout-pay-card--balance {
        margin-top: 0;
    }

    .checkout-balance-fee {
        display: none !important;
    }

    .checkout-online-divider {
        gap: 8px;
        margin: 6px 2px;
        font-size: 0.6875rem;
    }

    .checkout-online-grid {
        width: calc(100% - 16px);
        gap: 8px !important;
    }

    .checkout-payment-options .checkout-pay-card--online {
        padding: 1px 6px;
    }

    .checkout-pay-card-name {
        font-size: 0.75rem;
        font-weight: 400;
    }

    .checkout-pay-card-note,
    .checkout-pay-fee {
        font-size: 0.625rem;
    }

    .checkout-submit-area > button[type='submit'] {
        min-height: 54px;
    }
}

@media (max-width: 390px) {
    .checkout-quantity-field {
        grid-template-columns: 1fr auto;
    }

    .checkout-payment-options .checkout-pay-card {
        padding: 2px 6px;
        gap: 6px !important;
    }

    .checkout-payment-options img.checkout-payment-icon {
        width: 22px !important;
        min-width: 22px !important;
        max-width: 22px !important;
        height: 22px !important;
        min-height: 22px !important;
        max-height: 22px !important;
    }

    .checkout-payment-options .checkout-pay-card--usdt,
    .checkout-payment-options .checkout-pay-card--balance {
        padding: 7px 8px;
        gap: 7px !important;
    }

    .checkout-payment-options .checkout-pay-card--usdt img.checkout-payment-icon,
    .checkout-payment-options .checkout-pay-card--balance img.checkout-payment-icon {
        width: 26px !important;
        min-width: 26px !important;
        max-width: 26px !important;
        height: 26px !important;
        min-height: 26px !important;
        max-height: 26px !important;
    }

    .checkout-pay-card-name {
        font-size: 0.75rem;
    }
}

@media (max-width: 360px) {
    .checkout-payment-options {
        width: 100%;
    }

    .checkout-payment-options .checkout-pay-card {
        padding: 2px 6px;
    }

    .checkout-payment-options .checkout-pay-card--online {
        padding-inline: 4px;
    }
}

@media (pointer: coarse) {
    .checkout-payment-options .checkout-pay-card {
        min-height: 44px;
    }

    .checkout-payment-options .checkout-pay-card--usdt,
    .checkout-payment-options .checkout-pay-card--balance {
        min-height: 58px;
    }
}
