.checkout-page { min-height: 100vh; color: var(--ink); background: #f5f8ff; }
.checkout-shell { width: min(calc(100% - 28px), 1120px); margin-inline: auto; }
.checkout-header { position: sticky; z-index: 50; top: 0; border-bottom: 1px solid #e4eaf4; background: rgba(255,255,255,.96); backdrop-filter: blur(16px); }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 12px; color: #fff; background: linear-gradient(145deg, #0b63f6, #071a46); font-size: 1.05rem; font-weight: 900; box-shadow: 0 10px 26px rgba(11,99,246,.22); }
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1; }
.brand strong { font-size: .78rem; letter-spacing: .14em; }
.brand small { margin-top: 5px; color: #526075; font-size: .57rem; font-weight: 800; letter-spacing: .14em; }
.secure-label { display: flex; align-items: center; gap: 9px; }
.secure-label > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--green); background: var(--soft-green); font-size: 1rem; font-weight: 900; }
.secure-label div { display: none; }
.secure-label strong, .secure-label small { display: block; }
.secure-label strong { font-size: .75rem; }
.secure-label small { margin-top: 3px; color: var(--muted); font-size: .67rem; }

.checkout-main { padding: 24px 0 54px; }
.checkout-layout { display: flex; flex-direction: column; gap: 22px; }
.checkout-content { min-width: 0; }
.back-link { display: inline-flex; align-items: center; gap: 8px; margin: 2px 0 22px; color: #526075; font-size: .9rem; font-weight: 750; text-decoration: none; }
.back-link:hover { color: var(--green); }
.checkout-intro { margin-bottom: 22px; }
.checkout-eyebrow, .step-kicker { margin-bottom: 10px; color: var(--green); font-size: .84rem; font-weight: 850; text-transform: uppercase; letter-spacing: .13em; }
.checkout-intro h1, .quick-checkout h1 { max-width: 650px; margin-bottom: 13px; font-size: clamp(2rem, 9.5vw, 3.35rem); line-height: 1.02; letter-spacing: -.05em; }
.checkout-intro > p:last-child, .quick-lead { max-width: 620px; margin-bottom: 0; color: var(--muted); font-size: 1rem; line-height: 1.62; }

.funnel-progress { margin-bottom: 14px; padding: 0 2px; }
.funnel-progress > div:first-child { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; color: #485469; font-size: .82rem; font-weight: 750; }
.funnel-progress b { color: var(--green); }
.progress-track { height: 6px; overflow: hidden; border-radius: 99px; background: #dfe7f5; }
.progress-track i { display: block; width: 17%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #071a46, #0b63f6); transition: width .3s ease; }

#checkout-form { padding: 22px; border: 1px solid #e0e7f2; border-radius: 24px; background: #fff; box-shadow: 0 22px 60px rgba(7,26,70,.08); }
.checkout-step { min-height: 365px; animation: step-in .25s ease; }
.checkout-step[hidden] { display: none !important; }
.checkout-step h2 { max-width: 620px; margin-bottom: 12px; font-size: clamp(1.65rem, 7.7vw, 2.5rem); line-height: 1.08; letter-spacing: -.04em; }
.step-help { max-width: 610px; margin-bottom: 28px; color: var(--muted); font-size: 1rem; line-height: 1.55; }

.field { display: grid; gap: 9px; }
.field > span { color: #283246; font-size: .94rem; font-weight: 780; }
.field > span em { color: #748096; font-size: .82rem; font-style: normal; font-weight: 550; }
.field input { width: 100%; min-height: 62px; padding: 15px 16px; border: 1px solid #cfd9e9; border-radius: 14px; color: var(--ink); background: #fbfcff; font-size: 1.06rem; transition: border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.field input::placeholder { color: #939eb0; }
.field input:focus { border-color: var(--green); background: #fff; box-shadow: 0 0 0 4px rgba(11,99,246,.1); outline: 0; }
.field small { color: #68758a; font-size: .86rem; line-height: 1.5; }
.field-hero { max-width: 610px; margin-top: 12px; }
.field-hero input { min-height: 68px; font-size: 1.12rem; }
.field-full { grid-column: 1 / -1; }

.payment-options { display: grid; gap: 12px; }
.payment-option { position: relative; display: grid; grid-template-columns: 48px 1fr auto 21px; align-items: center; gap: 12px; min-height: 94px; padding: 15px; border: 1px solid #d5deec; border-radius: 17px; background: #fff; cursor: pointer; transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease; }
.payment-option:hover { transform: translateY(-1px); }
.payment-option.selected { border-color: var(--green); background: #f7faff; box-shadow: 0 0 0 3px rgba(11,99,246,.09); }
.payment-option input { position: absolute; opacity: 0; pointer-events: none; }
.payment-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; color: #fff; background: var(--ink); font-size: 1.15rem; }
.pix-icon { color: var(--green); background: var(--soft-green); }
.payment-copy strong, .payment-copy small, .payment-price b, .payment-price small { display: block; }
.payment-copy strong { margin-bottom: 5px; font-size: 1.04rem; }
.payment-copy small { color: var(--muted); font-size: .82rem; }
.payment-price { text-align: right; }
.payment-price b { font-size: 1.04rem; }
.payment-price small { margin-top: 4px; color: var(--green); font-size: .8rem; font-weight: 800; }
.radio-dot { width: 20px; height: 20px; border: 2px solid #aeb9ca; border-radius: 50%; box-shadow: inset 0 0 0 4px #fff; }
.selected .radio-dot { border-color: var(--green); background: var(--green); }
.pix-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 15px; border-radius: 14px; background: var(--soft-green); }
.pix-note > span { display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; color: #fff; background: var(--green); font-size: .72rem; font-weight: 900; }
.pix-note p { margin: 1px 0 0; color: #30415e; font-size: .88rem; line-height: 1.5; }

.sensitive-notice { display: flex; align-items: flex-start; gap: 10px; max-width: 610px; margin-bottom: 20px; padding: 14px; border: 1px solid #dce6f6; border-radius: 13px; background: #f7faff; }
.sensitive-notice > span { color: var(--green); font-size: 1rem; font-weight: 900; }
.sensitive-notice p { margin: 0; color: #4e5b70; font-size: .88rem; line-height: 1.5; }
.input-with-badge { position: relative; }
.input-with-badge input { padding-right: 104px; }
.input-with-badge i { position: absolute; right: 13px; top: 50%; padding: 6px 9px; border-radius: 7px; color: #fff; background: var(--ink); font-size: .68rem; font-style: normal; font-weight: 800; transform: translateY(-50%); }
.expiry-grid, .address-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 610px; }
.expiry-grid { grid-template-columns: 1fr 1fr; }
.expiry-grid .field:last-child { grid-column: 1 / -1; }

.review-card { display: grid; gap: 0; margin: 0 0 18px; overflow: hidden; border: 1px solid #dce4f1; border-radius: 16px; }
.review-card > div { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 15px; border-bottom: 1px solid #e8edf5; }
.review-card > div:last-child { border-bottom: 0; background: #f6f9ff; }
.review-card span { color: var(--muted); font-size: .86rem; }
.review-card strong { max-width: 65%; font-size: .9rem; text-align: right; overflow-wrap: anywhere; }
.review-card > div:last-child strong { color: var(--green); font-size: 1.13rem; }
.terms-check, .save-card-check { display: flex; align-items: flex-start; gap: 12px; margin-top: 14px; padding: 15px; border: 1px solid #d9e2f0; border-radius: 14px; color: #3f4a5d; background: #fff; font-size: .91rem; line-height: 1.5; cursor: pointer; }
.terms-check input, .save-card-check input { position: absolute; opacity: 0; }
.check-box { display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; border: 1.5px solid #aeb9ca; border-radius: 7px; color: transparent; background: #fff; font-size: .82rem; font-weight: 900; }
.terms-check input:checked + .check-box, .save-card-check input:checked + .check-box { color: #fff; border-color: var(--green); background: var(--green); }
.terms-check a, .save-card-check a { color: var(--green-dark); font-weight: 800; }
.save-card-check { border-color: #cbdcf8; background: #f5f9ff; }
.save-card-check strong, .save-card-check small { display: block; }
.save-card-check strong { color: #17243a; }
.save-card-check small { margin-top: 4px; color: #63718a; font-size: .87rem; line-height: 1.5; }

.form-error { margin: 16px 0 0; padding: 14px 16px; border: 1px solid #f0c7c7; border-radius: 12px; color: #8d2525; background: #fff5f5; font-size: .91rem; font-weight: 700; line-height: 1.45; }
.funnel-actions { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; margin-top: 22px; padding-top: 20px; border-top: 1px solid #e8edf5; }
.step-back, .step-next { min-height: 58px; border-radius: 14px; cursor: pointer; font-size: .98rem; font-weight: 820; }
.step-back { padding: 12px 8px; border: 0; color: #526075; background: transparent; }
.step-next { grid-column: 2; padding: 14px 22px; border: 0; color: #fff; background: var(--ink); }
.step-next:hover { background: #071a46; }
.pay-button { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; width: 100%; min-height: 62px; padding: 15px 18px 15px 22px; border: 0; border-radius: 14px; color: #fff; background: var(--green); cursor: pointer; font-size: .98rem; font-weight: 850; box-shadow: 0 14px 32px rgba(11,99,246,.22); transition: transform .2s ease, background .2s ease; }
.pay-button[hidden] { display: none !important; }
.funnel-actions .pay-button { grid-column: 2; }
.pay-button:hover { background: var(--acid-strong); transform: translateY(-2px); }
.pay-button:disabled { cursor: wait; opacity: .75; transform: none; }
.button-spinner { position: absolute; right: 18px; display: none; width: 19px; height: 19px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.pay-button.loading .submit-arrow { opacity: 0; }
.pay-button.loading .button-spinner { display: block; }
.payment-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px 16px; margin-top: 18px; color: #68758a; font-size: .84rem; font-weight: 680; }

.order-summary { order: -1; }
.summary-card { padding: 16px; border: 1px solid #dee6f2; border-radius: 19px; background: #fff; box-shadow: 0 15px 40px rgba(7,26,70,.06); }
.summary-label { margin-bottom: 13px; color: #68758a; font-size: .72rem; font-weight: 850; text-transform: uppercase; letter-spacing: .13em; }
.summary-product { display: flex; align-items: center; gap: 12px; }
.summary-thumb { position: relative; display: block; flex: 0 0 46px; width: 46px; height: 58px; overflow: hidden; border-radius: 9px; background: linear-gradient(150deg, #071a46, #0b63f6); }
.summary-thumb::before { content: ""; position: absolute; width: 32px; height: 32px; left: 8px; top: 9px; border: 1px solid rgba(255,255,255,.4); border-radius: 50%; }
.summary-thumb i { position: absolute; left: 50%; top: 18px; width: 0; height: 0; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 10px solid #fff; transform: translateX(-35%); }
.summary-thumb b { position: absolute; left: 5px; bottom: 5px; padding: 3px 5px; border-radius: 4px; color: #fff; background: rgba(8,10,15,.72); font-size: .53rem; }
.summary-product strong, .summary-product small { display: block; }
.summary-product strong { margin-bottom: 5px; font-size: .92rem; }
.summary-product small { color: var(--muted); font-size: .77rem; line-height: 1.4; }
.summary-card dl, .summary-footnote { display: none; }
.summary-total { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 15px; padding-top: 14px; border-top: 1px solid #e6ebf3; }
.summary-total span, .summary-total small { display: block; }
.summary-total span { font-size: .82rem; font-weight: 780; }
.summary-total small { margin-top: 4px; color: var(--muted); font-size: .72rem; }
.summary-total > strong { color: var(--green); font-size: 1.35rem; letter-spacing: -.03em; }
.summary-help { display: none; }

.quick-checkout { padding: 23px; border: 1px solid #dbe5f4; border-radius: 24px; background: #fff; box-shadow: 0 24px 70px rgba(7,26,70,.09); }
.quick-badge { width: fit-content; margin: 0 0 28px auto; padding: 8px 12px; border-radius: 99px; color: var(--green-dark); background: var(--soft-green); font-size: .72rem; font-weight: 850; }
.saved-card { position: relative; min-height: 205px; margin: 28px 0 18px; padding: 23px; overflow: hidden; border-radius: 22px; color: #fff; background: radial-gradient(circle at 85% 0, rgba(11,99,246,.95), transparent 42%), linear-gradient(145deg, #111827, #05070b); box-shadow: 0 25px 55px rgba(5,7,11,.25); }
.saved-card::after { content: ""; position: absolute; right: -55px; bottom: -86px; width: 210px; height: 210px; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; }
.saved-card-top { display: flex; align-items: center; justify-content: space-between; }
.saved-card-chip { width: 38px; height: 29px; border-radius: 7px; background: linear-gradient(135deg, #d9e4f5, #8997aa); }
.saved-card-top b { font-size: .88rem; }
.saved-card-number { margin-top: 43px; font-size: 1.08rem; letter-spacing: .12em; }
.saved-card-owner { position: absolute; left: 23px; right: 23px; bottom: 20px; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.saved-card-owner span { font-size: .86rem; font-weight: 750; }
.saved-card-owner small { color: rgba(255,255,255,.56); font-size: .54rem; letter-spacing: .1em; }
.quick-summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 14px 0; padding: 16px 0; border-top: 1px solid #e7ecf4; border-bottom: 1px solid #e7ecf4; }
.quick-summary span { color: #445168; font-size: .91rem; }
.quick-summary strong { color: var(--green); font-size: 1.25rem; }
.quick-consent { margin: 14px 4px 0; color: #69758a; font-size: .78rem; line-height: 1.5; text-align: center; }
.quick-consent a { color: var(--green-dark); font-weight: 800; }
.quick-actions { display: flex; justify-content: center; gap: 18px; margin-top: 16px; }
.quick-actions button { padding: 8px 0; border: 0; color: #516078; background: transparent; cursor: pointer; font-size: .79rem; font-weight: 740; text-decoration: underline; text-underline-offset: 3px; }

.payment-result { padding: 28px 22px; border: 1px solid #dce5f2; border-radius: 24px; background: #fff; text-align: center; box-shadow: var(--shadow); }
.result-icon { display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto 20px; border-radius: 18px; color: var(--green); background: var(--soft-green); font-size: 1.55rem; }
.result-icon.success { color: #fff; border-radius: 50%; background: var(--green); }
.payment-result h2 { margin-bottom: 12px; font-size: clamp(1.8rem, 8vw, 2.7rem); letter-spacing: -.04em; }
.payment-result > p:not(.checkout-eyebrow) { max-width: 520px; margin: 0 auto 24px; color: var(--muted); font-size: .98rem; line-height: 1.6; }
.pix-result { max-width: 540px; margin: 0 auto; }
.qr-frame { width: min(260px, 100%); margin: 0 auto 20px; padding: 13px; border: 1px solid #dce4f0; border-radius: 18px; background: #fff; }
.copy-field { display: grid; gap: 8px; text-align: left; }
.copy-field > span { font-size: .85rem; font-weight: 800; }
.copy-field > div { display: flex; overflow: hidden; border: 1px solid #ccd7e7; border-radius: 12px; }
.copy-field input { min-width: 0; flex: 1; padding: 14px; border: 0; color: #46536a; background: #f7f9fd; font-size: .8rem; }
.copy-field button { padding: 10px 16px; border: 0; color: #fff; background: var(--ink); cursor: pointer; font-size: .8rem; font-weight: 800; }
.waiting-payment { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 24px auto; }
.waiting-payment > span { width: 19px; height: 19px; border: 2px solid #ccd5e2; border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
.waiting-payment p { margin: 0; text-align: left; }
.waiting-payment strong, .waiting-payment small { display: block; }
.waiting-payment strong { font-size: .86rem; }
.waiting-payment small { margin-top: 3px; color: var(--muted); font-size: .72rem; }
.payment-result .button { margin-top: 8px; }

.checkout-footer { padding: 26px 0; border-top: 1px solid #e0e6f0; background: #fff; }
.checkout-footer .checkout-shell { display: flex; flex-direction: column; align-items: center; gap: 12px; color: #69758a; font-size: .78rem; }
.checkout-footer nav { display: flex; gap: 18px; }
.checkout-footer a { font-weight: 700; text-decoration: none; }

@keyframes step-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 520px) {
  .secure-label div { display: block; }
  .checkout-shell { width: min(calc(100% - 40px), 1120px); }
  #checkout-form, .quick-checkout { padding: 32px; }
  .checkout-step { min-height: 390px; }
  .expiry-grid { grid-template-columns: 1fr 1fr 1fr; }
  .expiry-grid .field:last-child { grid-column: auto; }
  .checkout-footer .checkout-shell { flex-direction: row; justify-content: space-between; }
}

@media (min-width: 900px) {
  .checkout-main { padding: 42px 0 75px; }
  .checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 48px; }
  .order-summary { position: sticky; top: 102px; order: initial; }
  .summary-card { padding: 24px; border-radius: 22px; }
  .summary-card dl { display: grid; gap: 12px; margin: 22px 0 0; padding: 20px 0; border-top: 1px solid #e6ebf3; border-bottom: 1px solid #e6ebf3; }
  .summary-card dl > div { display: flex; justify-content: space-between; gap: 14px; }
  .summary-card dt { color: var(--muted); font-size: .76rem; }
  .summary-card dd { margin: 0; font-size: .76rem; font-weight: 760; text-align: right; }
  .summary-total { margin-top: 0; padding-top: 18px; border-top: 0; }
  .summary-footnote { display: block; margin: 16px 0 0; color: #7b8698; font-size: .68rem; line-height: 1.5; }
  .summary-help { display: flex; align-items: center; gap: 11px; margin-top: 14px; padding: 15px; }
  .summary-help > span { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border: 1px solid #cbd5e4; border-radius: 50%; color: var(--green); font-size: .8rem; font-weight: 850; }
  .summary-help p { margin: 0; }
  .summary-help strong, .summary-help a { display: block; font-size: .76rem; }
  .summary-help a { margin-top: 3px; color: var(--green-dark); font-weight: 760; }
  #checkout-form, .quick-checkout { padding: 38px; }
  .checkout-step { min-height: 420px; }
  .funnel-actions { grid-template-columns: 120px 1fr; }
  .step-next, .funnel-actions .pay-button { justify-self: end; width: min(100%, 310px); }
  .saved-card { max-width: 430px; }
}

@media (max-width: 430px) {
  .payment-option { grid-template-columns: 43px 1fr 21px; }
  .payment-icon { width: 43px; height: 43px; }
  .payment-price { grid-column: 2; text-align: left; }
  .radio-dot { grid-column: 3; grid-row: 1 / span 2; }
  .funnel-actions { grid-template-columns: 88px 1fr; }
  .step-back { font-size: .88rem; }
  .step-next, .pay-button { padding-inline: 14px; font-size: .91rem; }
  .address-grid { grid-template-columns: 1fr; }
  .address-grid .field-full { grid-column: auto; }
  .quick-actions { flex-direction: column; gap: 2px; }
}
