:root {
  --yellow: #fcd002;
  --navy: #0b1d4d;
  --blue: #2f80ed;
  --blue-dark: #2166ca;
  --ink: #172033;
  --muted: #758096;
  --line: #e7ebf2;
  --surface: #ffffff;
  --soft: #f6f8fc;
  --success: #079b67;
  --danger: #b42318;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f8f9fc;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #f8f9fc; }
body { margin: 0; min-height: 100vh; background: #f8f9fc; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .76; }

.topbar { background: var(--yellow); border-bottom: 1px solid rgba(11,29,77,.05); }
.topbar-inner { width: min(1260px, calc(100% - 40px)); min-height: 74px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand-logo { display: block; width: 132px; max-height: 53px; object-fit: contain; object-position: left center; }
.secure-badge { display: flex; align-items: center; gap: 8px; color: var(--navy); font-size: 10px; line-height: 1.1; text-align: left; }
.secure-badge strong { font-size: 11px; }
.lock-icon { width: 18px; height: 18px; display: block; object-fit: contain; }

.checkout-shell { width: min(1260px, calc(100% - 40px)); margin: 22px auto 42px; display: grid; grid-template-columns: minmax(0, 1.34fr) minmax(330px, .86fr); gap: 22px; align-items: start; }
.checkout-column, .summary-card, .testimonials-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 22px rgba(22, 36, 65, .045); }
.checkout-column { padding: 26px; min-height: 680px; }
.sidebar { display: grid; gap: 22px; }
.summary-card, .testimonials-card { padding: 24px; }

.progress-bar { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 27px; color: #a4a9b3; font-size: 11px; }
.progress-step { display: flex; flex: 0 0 auto; flex-direction: column; align-items: center; gap: 7px; min-width: 70px; white-space: nowrap; }
.progress-step b { font-size: 11px; font-weight: 800; }
.progress-icon { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #e1e4ea; border-radius: 50%; color: #aab0bb; background: #eef0f4; }
.progress-icon svg { width: 20px; height: 20px; fill: currentColor; stroke: currentColor; stroke-width: 1.2; stroke-linejoin: round; }
.progress-step.active, .progress-step.complete { color: #111; }
.progress-step.active .progress-icon, .progress-step.complete .progress-icon { border-color: #000; color: #fff; background: #000; }
.progress-line { height: 3px; flex: 1; min-width: 18px; margin-top: 17px; border-radius: 999px; background: #e1e3e7; }
.progress-step.complete + .progress-line { background: #000; }

.checkout-step { animation: fadeIn .22s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.step-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 23px; border-bottom: 1px solid #f0f2f6; }
.step-heading h1 { margin: 4px 0 4px; color: var(--ink); font-size: 23px; letter-spacing: -.02em; }
.step-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.eyebrow { color: var(--blue) !important; font-weight: 800; font-size: 12px !important; }
.step-status { padding: 6px 10px; border: 1px solid #caeedf; color: var(--success); background: #f1fcf7; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.link-button { border: 0; background: none; padding: 5px 0; color: var(--blue); font-size: 12px; font-weight: 700; }
.link-button:hover { text-decoration: underline; }

.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 14px; padding: 25px 0 22px; }
.field { display: flex; flex-direction: column; gap: 7px; color: #27334a; font-size: 12px; font-weight: 700; }
.field input, .field select { width: 100%; min-height: 43px; border: 1px solid #dce2ed; border-radius: 7px; padding: 0 13px; color: var(--ink); background: #fff; outline: none; font-size: 13px; font-weight: 500; transition: border-color .16s, box-shadow .16s; }
.field input::placeholder { color: #a8afbc; }
.field input:focus, .field select:focus { border-color: #76aaf3; box-shadow: 0 0 0 3px rgba(47,128,237,.12); }
.field input.invalid, .field select.invalid { border-color: #d92d20; box-shadow: 0 0 0 3px rgba(217,45,32,.10); }
.field-error { display: block; min-height: 0; margin-top: -2px; color: #b42318; font-size: 11px; font-weight: 700; line-height: 1.25; }
.field-error:empty { display: none; }
.full-width { grid-column: 1 / -1; }
.wide-field { grid-column: span 1; }

.primary-button { width: 100%; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 7px; color: #fff; background: var(--blue); font-weight: 800; transition: background .16s, transform .16s; }
.primary-button:hover:not(:disabled) { background: var(--blue-dark); transform: translateY(-1px); }
.primary-button span { font-size: 18px; line-height: 0; }
.button-spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: white; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.shipping-choice { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 16px; margin: 0 0 21px; border: 1px solid #cdebdc; border-radius: 7px; background: #f6fff9; color: #2e4f40; }
.shipping-choice div { display: flex; flex-direction: column; gap: 4px; }
.shipping-choice strong { font-size: 13px; }
.shipping-choice span { color: #688678; font-size: 12px; }

.delivery-fields { padding: 22px 0 8px; }
.cep-row { display: grid; grid-template-columns: 185px minmax(0, 1fr); align-items: end; gap: 15px; }
.location-status { min-height: 43px; display: flex; align-items: center; padding: 0 12px; color: #657188; font-size: 12px; }
.location-status.loading { color: #7f6b00; }
.location-status.success { color: var(--success); font-weight: 700; }
.location-status.error { color: var(--danger); }
.location-status:empty { min-height: 0; padding: 0; }
.compact-grid { padding: 14px 0 5px; gap: 14px; }
.optional { color: #8b94a3; font-weight: 500; }
.shipping-heading { margin: 18px 0 12px; color: var(--ink); font-size: 15px; font-weight: 800; }
.shipping-options { display: grid; gap: 10px; margin-bottom: 20px; }
.shipping-option { position: relative; display: grid; grid-template-columns: 24px 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 68px; padding: 13px 15px; border: 1px solid #dde4ef; border-radius: 8px; background: #fff; cursor: pointer; transition: border-color .16s, background .16s, box-shadow .16s; }
.shipping-option:hover, .shipping-option.selected { border-color: var(--blue); background: #f8fbff; box-shadow: 0 0 0 1px rgba(47,128,237,.08); }
.shipping-option input { position: absolute; opacity: 0; pointer-events: none; }
.radio-mark { width: 20px; height: 20px; border: 1px solid #6ba6f0; border-radius: 50%; position: relative; }
.shipping-option.selected .radio-mark::after { content: ""; position: absolute; width: 9px; height: 9px; top: 4px; left: 4px; border-radius: 50%; background: var(--blue); }
.shipping-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.shipping-copy strong { color: var(--ink); font-size: 13px; }
.shipping-copy small { color: #8a95a5; font-size: 11px; }
.shipping-cost { color: var(--ink); font-size: 13px; white-space: nowrap; }
.shipping-logo { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.correios-logo { object-fit: contain; }
.mercado-logo { gap: 2px; color: #11a966; font-size: 16px; line-height: 1; }
.mercado-logo b { font-size: 10px; letter-spacing: -.35px; }

.payment-note { margin: 22px 0 16px; color: var(--muted); font-size: 12px; }
.pix-intro-card { padding: 16px 18px 14px; border: 1px solid var(--blue); border-radius: 8px; background: #fff; }
.pix-choice-row { display: flex; align-items: center; gap: 13px; margin-bottom: 24px; color: var(--ink); }
.pix-choice-row > strong { font-size: 13px; }
.pix-choice-row .radio-mark { flex: 0 0 auto; }
.radio-mark.selected::after { content: ""; position: absolute; width: 9px; height: 9px; top: 4px; left: 4px; border-radius: 50%; background: var(--blue); }
.pix-symbol { width: 23px; height: 23px; display: grid; grid-template-columns: repeat(2, 10px); grid-template-rows: repeat(2, 10px); gap: 1px; transform: rotate(45deg); }
.pix-symbol span { display: block; width: 10px; height: 10px; border-radius: 2px; background: #47c9b4; }
.pix-symbol span:nth-child(2), .pix-symbol span:nth-child(3) { background: #32bfae; }
.pix-intro-card p { margin: 0 0 18px 10px; color: #737f92; font-size: 13px; line-height: 1.45; }
.pix-intro-card p strong { color: var(--blue); }
.pix-panel { min-height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; padding: 18px; border: 1px solid #bfe9d8; border-radius: 8px; background: #f7fffb; text-align: center; }
.pix-panel.ready { border-style: solid; border-color: #bfe9d8; background: #f7fffb; }
.pix-placeholder { color: #94a0b4; font-size: 13px; }
.pix-image { display: block; width: 168px; height: 168px; object-fit: contain; }
.pix-panel small { color: #6c7a90; font-size: 11px; }
.copy-row { width: 100%; display: flex; gap: 7px; }
.copy-row input { flex: 1; min-width: 0; height: 39px; border: 1px solid #d5deeb; border-radius: 6px; padding: 0 9px; color: #58667b; background: #fff; font-size: 11px; }
.copy-row button { border: 0; border-radius: 6px; padding: 0 13px; color: #fff; background: var(--blue); font-size: 12px; font-weight: 800; }
.terms-check { display: flex; gap: 8px; align-items: flex-start; margin: 17px 0; color: #758096; font-size: 11px; line-height: 1.4; }
.terms-check input { margin-top: 1px; accent-color: var(--blue); }
.payment-status { margin-top: 12px; border-radius: 7px; padding: 10px 12px; font-size: 12px; font-weight: 700; text-align: center; }
.payment-status.pending { color: #855d00; background: #fff8df; }
.payment-status.success { color: #05734f; background: #e9fbf2; }
.payment-status.error { color: var(--danger); background: #fff1f0; }

.summary-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.summary-card h2 { margin: 0; color: var(--ink); font-size: 16px; }
.summary-heading-total { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.summary-heading-total strong { font-size: 16px; }
.summary-heading-total span { color: #7a8492; font-size: 18px; line-height: 1; }
.summary-break { margin: 20px 0 16px; border-top: 1px solid var(--line); }
.summary-line, .summary-total { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #68758a; font-size: 12px; }
.summary-line { margin: 9px 0; }
.summary-line strong { color: #3a465a; font-size: 12px; }
.summary-total { padding-top: 14px; margin-top: 13px; border-top: 1px solid var(--line); color: var(--ink); font-size: 13px; font-weight: 800; }
.summary-total strong { color: var(--ink); font-size: 16px; }
.product-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.product-row img { width: 58px; height: 58px; object-fit: cover; border: 1px solid #e4e8ef; border-radius: 8px; background: #eef3f9; }
.product-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.product-info strong { overflow: hidden; color: var(--ink); font-size: 12px; line-height: 1.25; text-overflow: ellipsis; }
.product-info span { color: #8792a4; font-size: 11px; }
.quantity { display: flex; align-items: center; gap: 9px; color: #536178; font-size: 12px; }
.quantity button { width: 22px; height: 22px; border: 1px solid #dce2ed; border-radius: 5px; color: #7b879a; background: #fff; line-height: 1; }

.testimonials-title { display: flex; align-items: center; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.testimonials-title > div { display: flex; flex-direction: column; gap: 4px; }
.testimonials-title strong { color: var(--ink); font-size: 13px; }
.testimonials-title span:not(.avatar-stack) { color: #8994a6; font-size: 11px; }
.avatar-stack { display: flex; padding-left: 10px; }
.avatar-stack span { width: 29px; height: 29px; display: grid; place-items: center; margin-left: -10px; border: 2px solid #fff; border-radius: 50%; color: #fff; background: #ef9f9f; font-size: 8px; font-weight: 800; }
.avatar-stack span:nth-child(2) { background: #6f9bd8; }
.avatar-stack span:nth-child(3) { background: #78b38f; }
.testimonial { padding: 17px 0; border-bottom: 1px solid #edf0f5; }
.testimonial:last-child { border-bottom: 0; padding-bottom: 0; }
.testimonial-meta { display: flex; align-items: center; gap: 9px; }
.avatar { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: white; font-size: 9px; font-weight: 800; }
.avatar-pink { background: #c78d88; }.avatar-blue { background: #7899c6; }.avatar-green { background: #72a78c; }.avatar-yellow { background: #ccac61; }.avatar-image { object-fit: cover; object-position: center; border: 1px solid #e8ecf3; }
.testimonial-meta div { display: flex; flex-direction: column; gap: 3px; }
.testimonial-meta strong { color: #344057; font-size: 11px; }
.stars { color: #f4c321; letter-spacing: 2px; font-size: 11px; }
.testimonial p { margin: 10px 0 0 41px; color: #5f6c80; font-size: 11px; line-height: 1.4; }

.alert { margin: -9px 0 18px; padding: 11px 13px; border-radius: 7px; font-size: 12px; font-weight: 700; }
.alert.error { color: var(--danger); background: #fff0ef; border: 1px solid #ffd0cd; }
.alert.success { color: #08724f; background: #ecfbf4; border: 1px solid #c8efdc; }
.hidden { display: none !important; }
.footer { padding: 22px 20px 34px; color: #9aa4b4; text-align: center; font-size: 11px; }

@media (max-width: 900px) {
  .checkout-shell { grid-template-columns: 1fr; }
  .sidebar { grid-row: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .checkout-column { min-height: auto; }
}

@media (max-width: 620px) {
  .topbar-inner, .checkout-shell { width: min(100% - 24px, 510px); }
  .topbar-inner { min-height: 64px; }
  .brand-logo { width: 118px; max-height: 47px; }
  .secure-badge { font-size: 8px; }
  .secure-badge strong { font-size: 9px; }
  .checkout-shell { margin-top: 12px; gap: 12px; }
  .checkout-column, .summary-card, .testimonials-card { border-radius: 7px; }
  .checkout-column { padding: 18px; }
  .progress-bar { gap: 5px; font-size: 10px; }
  .progress-step { gap: 4px; }
  .progress-step span { width: 20px; height: 20px; font-size: 10px; }
  .progress-line { min-width: 7px; }
  .step-heading h1 { font-size: 20px; }
  .step-heading p { font-size: 12px; }
  .step-status { display: none; }
  .field-grid { grid-template-columns: 1fr; gap: 14px; padding-top: 20px; }
  .cep-row { grid-template-columns: 1fr; gap: 7px; }
  .location-status { min-height: auto; padding: 0; }
  .compact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 14px; }
  .compact-grid .full-width { grid-column: 1 / -1; }
  .full-width, .wide-field { grid-column: auto; }
  .sidebar { display: contents; }
  .summary-card { grid-row: 1; grid-column: 1; order: 0; width: 100%; }
  .checkout-column { grid-row: 2; grid-column: 1; order: 1; }
  .testimonials-card { grid-row: 3; grid-column: 1; order: 2; width: 100%; }
  .summary-card, .testimonials-card { padding: 18px; }
  .progress-bar { gap: 5px; }
  .progress-step { min-width: 66px; }
  .progress-icon { width: 34px; height: 34px; }
  .product-row { grid-template-columns: 50px minmax(0, 1fr) auto; }
  .product-row img { width: 50px; height: 50px; }
  .copy-row { flex-direction: column; }
  .copy-row button { min-height: 38px; }
}

/* Página de obrigado */
.thank-you-page { min-height: 100vh; display: flex; flex-direction: column; background: #f4f6fa; }
.thank-you-shell { width: min(680px, calc(100% - 32px)); margin: 46px auto; flex: 1; }
.thank-you-card { position: relative; padding: 42px 38px; border: 1px solid #e0e5ed; border-radius: 14px; background: #fff; box-shadow: 0 12px 34px rgba(28, 45, 74, .08); text-align: center; }
.success-mark { width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 20px; border-radius: 50%; color: #fff; background: #18a879; font-size: 38px; font-weight: 800; }
.thank-you-card .eyebrow { margin-bottom: 10px; color: #2382ed; font-weight: 800; }
.thank-you-card h1 { margin: 0; color: var(--ink); font-size: clamp(28px, 5vw, 40px); line-height: 1.1; }
.thank-you-lead { margin: 14px 0 26px; color: #647188; font-size: 16px; }
.thank-you-message { padding: 18px; border: 1px solid #d6f2e7; border-radius: 9px; background: #f0fcf7; color: #137653; }
.thank-you-message strong { display: block; font-size: 17px; }
.thank-you-message p { margin: 7px 0 0; color: #4a7465; font-size: 14px; }
.thank-you-contact { margin: 24px auto 0; max-width: 480px; color: #58667a; font-size: 14px; line-height: 1.55; }
.thank-you-order { margin: 20px 0 0; color: #7b8798; font-size: 12px; }
.thank-you-button { max-width: 300px; margin: 28px auto 0; text-decoration: none; }
.preview-label { position: absolute; top: 16px; right: 18px; padding: 5px 8px; border-radius: 999px; color: #7a5a00; background: #fff5c7; font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.thank-you-loading { display: grid; place-items: center; min-height: 190px; color: #647188; }
@media (max-width: 620px) {
  .thank-you-shell { width: calc(100% - 24px); margin: 24px auto; }
  .thank-you-card { padding: 38px 20px 26px; }
  .thank-you-card h1 { font-size: 29px; }
  .thank-you-lead { font-size: 14px; }
}
