@font-face {
    font-family: Manrope;
    src: url('assets/fonts/manrope-latin.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: Inter;
    src: url('assets/fonts/inter-latin.woff2') format('woff2');
    font-display: swap;
}

:root {
    --ink: #11111b;
    --muted: #727786;
    --line: #e5e7ec;
    --orange: #e75912;
    --orange-light: #fd8925;
    --navy: #171937;
    --surface: #ffffff;
    --background: #f7f8fb;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--background);
    font-family: Inter, Arial, sans-serif;
    line-height: 1.5;
}

.checkout-header {
    display: flex;
    width: min(1240px, calc(100% - 48px));
    min-height: 92px;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto;
}

.checkout-header img { display: block; width: 150px; height: auto; }
.back-link { color: var(--muted); font-size: 14px; text-decoration: none; }
.back-link:hover { color: var(--orange); }

.checkout-page { width: min(1100px, calc(100% - 48px)); margin: 0 auto 72px; }
.checkout-intro { max-width: 700px; margin: 40px auto 36px; text-align: center; }
.eyebrow { margin: 0 0 12px; color: var(--orange); font-size: 12px; font-weight: 700; letter-spacing: .14em; }
.checkout-intro h1 { margin: 0 0 12px; font-family: Manrope, Arial, sans-serif; font-size: clamp(32px, 5vw, 48px); letter-spacing: -.05em; line-height: 1.1; }
.checkout-intro p:last-child { max-width: 570px; margin: 0 auto; color: var(--muted); }
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr); align-items: start; gap: 24px; }
.checkout-panel, .order-summary, .success-panel { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 14px 40px rgba(22, 27, 49, .06); }
.checkout-panel { padding: 34px; }
.form-panel { width: 100%; }
.checkout-page.payment-started .checkout-grid { grid-template-columns: minmax(0, 1fr); }
.checkout-page.payment-started .form-panel { max-width: 760px; margin: 0 auto; }
.panel-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 28px; }
.step-number { display: inline-flex; width: 32px; height: 32px; flex: 0 0 32px; align-items: center; justify-content: center; color: #fff; background: var(--orange); border-radius: 50%; font-size: 14px; font-weight: 700; }
.panel-heading h2 { margin: 0; font-family: Manrope, Arial, sans-serif; font-size: 24px; letter-spacing: -.03em; }
.panel-heading p { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.field { min-width: 0; margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label, .radio-field legend { display: block; margin-bottom: 7px; color: #303342; font-size: 13px; font-weight: 600; }
.field label span, .radio-field legend span { color: var(--orange); }
.field input, .field textarea { display: block; width: 100%; padding: 13px 14px; color: var(--ink); border: 1px solid #dfe2e8; border-radius: 8px; outline: 0; background: #fff; font: inherit; font-size: 14px; transition: border .2s, box-shadow .2s; }
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(231, 89, 18, .12); }
.field-hint { display: block; margin-top: 6px; color: #8b909d; font-size: 11px; }
.field input[readonly] { color: #656a78; background: #f8f9fb; }
.radio-field { padding: 0; border: 0; }
.radio-field label { display: inline-flex; align-items: center; margin: 0 20px 0 0; color: #4f5462; font-weight: 400; cursor: pointer; }
.radio-field input { width: 16px; height: 16px; margin: 0 7px 0 0; accent-color: var(--orange); }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .2s, filter .2s; }
.primary-button { width: 100%; min-height: 52px; margin-top: 5px; color: #fff; background: linear-gradient(110deg, #cb3d32, var(--orange-light)); }
.primary-button:hover, .secondary-button:hover { filter: brightness(1.06); transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: .75; }
.secondary-button { min-height: 44px; padding: 0 18px; color: var(--orange); border: 1px solid rgba(231, 89, 18, .35); background: #fff; }
.privacy-note { margin: 12px 0 0; color: #9a9eaa; font-size: 12px; text-align: center; }
.button-spinner { width: 18px; height: 18px; margin-left: 10px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-error { margin: 0 0 18px; padding: 12px 14px; color: #a52c25; border: 1px solid #f3c7c4; border-radius: 8px; background: #fff4f3; font-size: 14px; }
.order-summary { position: sticky; top: 20px; overflow: hidden; color: #eef1f7; background: var(--navy); border-color: var(--navy); }
.checkout-page.payment-started > .order-summary { position: static; width: min(100%, 760px); margin: 24px auto 0; }
.order-summary > * { margin-right: 28px; margin-left: 28px; }
.summary-label { padding-top: 30px; color: #abb0c2; font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.order-summary h2 { margin-top: 18px; margin-bottom: 7px; font-family: Manrope, Arial, sans-serif; font-size: 23px; }
.order-summary > p:not(.summary-label) { min-height: 44px; color: #aeb3c4; font-size: 13px; }
.summary-line, .summary-total { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.12); }
.summary-line { margin-top: 28px; padding: 20px 0; color: #aeb3c4; font-size: 13px; }
.summary-line strong { color: #fff; font-size: 12px; }
.summary-total { margin-right: 0 !important; margin-left: 0 !important; padding: 20px 28px 24px; background: rgba(0, 0, 0, .22); }
.summary-total span { color: #c7cad5; font-size: 14px; }
.summary-total strong { color: #fff; font-family: Manrope, Arial, sans-serif; font-size: 30px; }
.order-summary ul { margin: 0; padding: 25px 28px 30px; list-style: none; }
.order-summary li { display: flex; gap: 9px; margin: 10px 0; color: #aeb3c4; font-size: 12px; }
.order-summary li span { color: #ff9a42; font-weight: 700; }
.payment-panel { margin-top: 24px; }
.payment-content { display: flex; align-items: center; gap: 34px; padding: 4px 0 2px 46px; }
.qr-wrapper { display: flex; width: 220px; height: 220px; flex: 0 0 220px; align-items: center; justify-content: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.qr-wrapper img { display: block; width: 100%; height: 100%; object-fit: contain; }
.pix-details { max-width: 540px; flex: 1; }
.payment-status { margin: 0 0 22px; color: var(--orange); font-size: 15px; font-weight: 700; }
.pix-details label { display: block; margin-bottom: 7px; color: #303342; font-size: 13px; font-weight: 600; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { min-width: 0; flex: 1; padding: 12px; color: #626775; border: 1px solid var(--line); border-radius: 8px; background: #f8f9fb; font: inherit; font-size: 12px; }
.expiration { margin: 12px 0 0; color: #9296a2; font-size: 12px; }
.voucher-box { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.voucher-box label { display: block; margin-bottom: 8px; color: #303342; font-size: 13px; font-weight: 600; }
.voucher-row { display: flex; gap: 8px; }
.voucher-row input { min-width: 0; flex: 1; padding: 12px; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; outline: 0; background: #fff; font: inherit; font-size: 13px; }
.voucher-row input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(231, 89, 18, .12); }
.voucher-feedback { margin: 9px 0 0; color: #a52c25; font-size: 12px; font-weight: 600; }
.order-summary .voucher-box { margin: 0 28px; padding: 18px 0 20px; border-top-color: rgba(255, 255, 255, .12); }
.order-summary .voucher-box label { color: #c7cad5; }
.order-summary .voucher-row input { padding: 10px 11px; color: #fff; border-color: rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08); }
.order-summary .voucher-row input::placeholder { color: #abb0c2; }
.order-summary .voucher-row input:focus { border-color: var(--orange-light); box-shadow: 0 0 0 3px rgba(253, 137, 37, .16); }
.order-summary .voucher-feedback { color: #ffb5a6; }
.summary-prices { margin: 0 28px; }
.summary-prices .summary-line { margin-top: 0; padding: 13px 0; }
.summary-line--pricing strong { font-size: 13px; }
.summary-line--discount strong { color: #8de0b5; }
.summary-line--pricing small { color: #ff9a42; font-size: 11px; font-weight: 700; }
.success-panel { max-width: 700px; margin: 24px auto 0; padding: 58px 40px; text-align: center; }
.success-panel:not([hidden]) { animation: success-panel-in .6s ease-out both; }
.success-icon { position: relative; display: flex; width: 58px; height: 58px; align-items: center; justify-content: center; margin: 0 auto 22px; color: #fff; background: #2ca875; border-radius: 50%; font-size: 30px; box-shadow: 0 10px 24px rgba(44, 168, 117, .25); animation: payment-confirmed-pop .7s cubic-bezier(.22, 1.25, .36, 1) .1s both; }
.success-icon::after { content: ''; position: absolute; inset: -8px; border: 2px solid rgba(44, 168, 117, .35); border-radius: 50%; animation: payment-confirmed-ring .9s ease-out .16s both; }
.success-panel h2 { margin: 0 0 12px; font-family: Manrope, Arial, sans-serif; font-size: 34px; letter-spacing: -.04em; }
.success-panel p:not(.eyebrow) { max-width: 500px; margin: 0 auto 28px; color: var(--muted); }

@keyframes success-panel-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes payment-confirmed-pop {
    0% { opacity: 0; transform: scale(.55); }
    70% { opacity: 1; transform: scale(1.08); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes payment-confirmed-ring {
    from { opacity: .8; transform: scale(.7); }
    to { opacity: 0; transform: scale(1.35); }
}

@media (prefers-reduced-motion: reduce) {
    .success-panel:not([hidden]), .success-icon, .success-icon::after { animation: none; }
}

.payment-choice-field { padding: 0; border: 0; }
.payment-choice-field legend, .card-type-choice legend { display: block; margin-bottom: 9px; color: #303342; font-size: 13px; font-weight: 600; }
.payment-choice-field legend span, .card-type-choice legend span { color: var(--orange); }
.payment-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.payment-choice { display: flex; min-height: 64px; align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid #dfe2e8; border-radius: 10px; cursor: pointer; transition: border-color .2s, box-shadow .2s, background .2s; }
.payment-choice:has(input:checked) { border-color: var(--orange); background: #fff9f5; box-shadow: 0 0 0 3px rgba(231, 89, 18, .1); }
.payment-choice input { margin: 0; accent-color: var(--orange); }
.payment-choice span { display: grid; gap: 1px; }
.payment-choice strong { color: var(--ink); font-size: 14px; }
.payment-choice small { color: var(--muted); font-size: 11px; }
.card-fields { margin: 3px 0 25px; padding: 22px 0 0; border-top: 1px solid var(--line); }
.card-type-choice { padding: 0; border: 0; }
.card-type-choice label { display: inline-flex; align-items: center; margin: 0 18px 0 0; color: #4f5462; font-size: 13px; font-weight: 400; cursor: pointer; }
.card-type-choice input { margin: 0 7px 0 0; accent-color: var(--orange); }
.credit-card-preview { width: min(100%, 410px); aspect-ratio: 1.58; margin: 4px auto 26px; color: #fff; border-radius: 16px; background: #171937; box-shadow: 0 20px 35px rgba(23, 25, 55, .2); overflow: hidden; position: relative; perspective: 1000px; transform-style: preserve-3d; transition: transform .75s cubic-bezier(.2, .75, .25, 1); }
.credit-card-preview.is-flipped { transform: rotateY(180deg); }
.credit-card-preview__face { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 24px 26px 20px; border-radius: 16px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.credit-card-preview__face--front { background: linear-gradient(135deg, #171937 0%, #292d5e 55%, #e75912 145%); }
.credit-card-preview__face--front::after { content: ''; position: absolute; width: 190px; height: 190px; right: -70px; bottom: -90px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; box-shadow: 0 0 0 24px rgba(255,255,255,.05), 0 0 0 48px rgba(255,255,255,.04); }
.credit-card-preview__face--back { background: linear-gradient(145deg, #111329 0%, #202449 62%, #8d3219 150%); transform: rotateY(180deg); }
.credit-card-preview__top, .credit-card-preview__bottom { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; }
.credit-card-preview__top strong { font-size: 12px; letter-spacing: .08em; }
.credit-card-chip { width: 42px; height: 30px; border: 1px solid rgba(255,255,255,.6); border-radius: 6px; background: linear-gradient(135deg, #f3c969, #c88c26); box-shadow: inset 0 0 0 2px rgba(255,255,255,.18); }
.credit-card-preview__number { position: relative; z-index: 1; margin-top: auto; margin-bottom: 20px; font-family: 'Courier New', monospace; font-size: clamp(17px, 3vw, 23px); letter-spacing: .08em; white-space: nowrap; }
.credit-card-preview__bottom { align-items: flex-end; gap: 20px; }
.credit-card-preview__bottom div { display: grid; gap: 3px; min-width: 0; }
.credit-card-preview__bottom small { color: rgba(255,255,255,.65); font-size: 8px; letter-spacing: .12em; }
.credit-card-preview__bottom strong { max-width: 230px; overflow: hidden; font-size: 11px; letter-spacing: .06em; text-overflow: ellipsis; white-space: nowrap; }
.credit-card-preview__magnetic-strip { height: 48px; margin: 22px -26px 0; background: rgba(4, 7, 25, .8); }
.credit-card-preview__back-content { display: grid; gap: 7px; margin-top: auto; padding: 0 5px; }
.credit-card-preview__back-content small { color: rgba(255,255,255,.7); font-size: 8px; letter-spacing: .12em; }
.credit-card-preview__back-content strong { display: block; padding: 10px 12px; color: #171937; border-radius: 4px; background: #fff; font: 700 15px 'Courier New', monospace; text-align: right; letter-spacing: .18em; }
.card-security-note { margin: -2px 0 0; color: #7c8190; font-size: 12px; }
.card-processing-state { width: 100%; padding: 48px 20px; text-align: center; }
.card-processing-icon { display: flex; width: 66px; height: 66px; align-items: center; justify-content: center; margin: 0 auto 18px; color: #fff; border-radius: 50%; background: var(--orange); font-weight: 800; letter-spacing: .12em; animation: card-processing-pulse 1.2s ease-in-out infinite; }
.card-processing-state p { margin: 0 0 6px; color: var(--ink); font-family: Manrope, Arial, sans-serif; font-size: 22px; font-weight: 700; }
.card-processing-state span { display: block; color: var(--muted); font-size: 13px; }

@keyframes card-processing-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(231, 89, 18, .25); }
    50% { transform: scale(1.06); box-shadow: 0 0 0 12px rgba(231, 89, 18, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .card-processing-icon { animation: none; }
}

[hidden] { display: none !important; }

@media (max-width: 780px) {
    .checkout-header, .checkout-page { width: min(100% - 32px, 620px); }
    .checkout-header { min-height: 76px; }
    .checkout-header img { width: 125px; }
    .back-link { font-size: 12px; }
    .checkout-intro { margin-top: 30px; }
    .checkout-grid { grid-template-columns: 1fr; }
    .checkout-panel { padding: 24px 20px; }
    .field-row { grid-template-columns: 1fr; gap: 0; }
    .payment-choice-grid { grid-template-columns: 1fr; }
    .payment-content { flex-direction: column; align-items: stretch; padding: 0; }
    .qr-wrapper { width: min(220px, 100%); margin: 0 auto; }
    .pix-details { max-width: none; }
    .copy-row { flex-direction: column; }
    .success-panel { padding: 44px 20px; }
    .credit-card-preview__face { padding: 19px 20px 16px; }
    .credit-card-preview__magnetic-strip { margin-right: -20px; margin-left: -20px; }
}
