/* ============================================================
   Checkout · visual de plataforma de pagamento (uma coluna, neutro)
   ============================================================ */
:root {
  --bg: #f3f4f6;
  --card: #ffffff;
  --linha: #e5e7eb;
  --linha2: #d1d5db;
  --txt: #111827;
  --txt2: #4b5563;
  --txt3: #9ca3af;
  --verde: #16a34a;
  --verde2: #15803d;
  --pix: #32BCAD;
  --erro: #dc2626;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--bg); color: var(--txt); font: 15px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img, svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--txt); outline-offset: 2px; }
.ic { width: 18px; height: 18px; flex: none; }
.entra { animation: entra .3s ease both; }
@keyframes entra { from { opacity: 0; transform: translateY(6px); } }

/* estrutura */
.pg { min-height: 100vh; min-height: 100dvh; padding: 40px 16px 48px; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-items: start; }
.pg-card {
  width: 100%; max-width: 560px; min-width: 0; display: flex; flex-direction: column; gap: 18px;
  padding: 28px; border-radius: 14px; background: var(--card); border: 1px solid var(--linha);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .05);
}

/* produto */
.pg-prod { display: flex; align-items: center; gap: 16px; padding-bottom: 4px; }
.pg-prod__img { width: 76px; height: 76px; border-radius: 18px; flex: none; display: grid; place-items: center; background: linear-gradient(180deg, #2a2a2e, #0e0e10); box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.pg-prod h1 { font-size: 19px; font-weight: 600; color: var(--txt2); line-height: 1.25; }
.pg-prod p { margin-top: 2px; font-size: 13.5px; color: var(--txt); }
.pg-prod strong { display: block; margin-top: 4px; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }

/* campos */
.pg-campo { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.pg-rot { font-size: 14.5px; font-weight: 500; color: var(--txt); }
.pg-rot i { font-style: normal; color: var(--erro); margin-left: 2px; }
.pg-caixa { position: relative; display: flex; align-items: center; }
.pg-caixa input, .pg-caixa select {
  width: 100%; height: 50px; padding: 0 14px; border-radius: 10px; outline: none; font-size: 16px;
  border: 1px solid var(--linha2); background: #fff; transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.pg-caixa select { padding-right: 40px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
.pg-caixa input::placeholder { color: var(--txt3); }
.pg-caixa input:focus, .pg-caixa select:focus { border-color: var(--verde); box-shadow: 0 0 0 3px rgba(22, 163, 74, .15); }
.pg-campo.is-erro input { border-color: var(--erro); box-shadow: 0 0 0 3px rgba(220, 38, 38, .1); }
.pg-erro { font-size: 12.5px; color: var(--erro); }
.pg-erro:empty { display: none; }
.pg-band { position: absolute; right: 10px; width: 38px; height: 24px; }
.pg-sugestao { align-self: flex-start; padding: 5px 10px; border-radius: 8px; background: #fef9c3; font-size: 13px; color: #713f12; }
.pg-sugestao b { text-decoration: underline; text-underline-offset: 2px; }

.pg-sep { width: 100%; height: 1px; margin: 4px 0; border: 0; background: var(--linha2); }

/* métodos */
.pg-metodos { display: flex; gap: 12px; }
.pg-metodo {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 140px; height: 96px;
  border-radius: 14px; border: 2px solid var(--linha); background: #fff; font-size: 13.5px; font-weight: 600; color: var(--txt2);
  transition: border-color .15s, background-color .15s, color .15s, transform .2s;
}
.pg-metodo .ic { width: 26px; height: 26px; color: var(--txt); }
.pg-metodo .pg-metodo__pix { color: var(--pix); }
.pg-metodo:hover { border-color: var(--linha2); transform: scale(1.03); }
.pg-metodo[aria-checked="true"] { border-color: var(--verde); background: #f0fdf4; color: var(--txt); }

.pg-area:empty { display: none; }
.pg-carregando { display: flex; justify-content: center; gap: 6px; padding: 18px 0; }
.pg-carregando span { width: 8px; height: 8px; border-radius: 50%; background: var(--txt3); animation: pulinho 1s ease-in-out infinite; }
.pg-carregando span:nth-child(2) { animation-delay: .15s; }
.pg-carregando span:nth-child(3) { animation-delay: .3s; }
@keyframes pulinho { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-5px); opacity: 1; } }
.pg-campos { display: grid; gap: 14px; }
.pg-campos--dois { grid-template-columns: 1fr 1fr; }
.pg-largo { grid-column: 1 / -1; }
.pg-nota { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--txt2); }
.pg-nota__pix { width: 16px; height: 16px; color: var(--pix); }

/* ofertas */
.pg-bumps { display: flex; flex-direction: column; gap: 10px; }
.pg-bump {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; cursor: pointer;
  border: 1.5px dashed var(--linha2); background: #fafafa; transition: border-color .15s, background-color .15s;
}
.pg-bump:hover { border-color: #9ca3af; }
.pg-bump input { position: absolute; opacity: 0; pointer-events: none; }
.pg-bump__check { width: 22px; height: 22px; border-radius: 6px; flex: none; display: grid; place-items: center; border: 2px solid var(--linha2); background: #fff; color: #fff; transition: .15s; }
.pg-bump__check .ic { width: 14px; height: 14px; opacity: 0; transform: scale(.5); transition: .15s; }
.pg-bump img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; }
.pg-bump__txt { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.pg-bump__txt strong { font-size: 14px; font-weight: 600; }
.pg-bump__txt small { margin-top: 2px; font-size: 12.5px; color: var(--txt2); }
.pg-bump__preco { font-size: 14.5px; font-weight: 700; color: var(--verde2); white-space: nowrap; }
.pg-bump.is-on { border-style: solid; border-color: var(--verde); background: #f0fdf4; }
.pg-bump.is-on .pg-bump__check { background: var(--verde); border-color: var(--verde); }
.pg-bump.is-on .pg-bump__check .ic { opacity: 1; transform: none; }
.pg-bump input:focus-visible + .pg-bump__check { outline: 2px solid var(--txt); outline-offset: 2px; }

/* resumo */
.pg-resumo h2 { margin-bottom: 12px; font-size: 18px; font-weight: 700; }
.pg-resumo__caixa { padding: 6px 18px; border-radius: 12px; background: #f3f4f6; }
.pg-resumo__linha { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; font-size: 15px; color: var(--txt2); }
.pg-resumo__linha + .pg-resumo__linha { border-top: 1px solid var(--linha); }
.pg-resumo__linha span:last-child { white-space: nowrap; color: var(--txt); }
.pg-resumo__total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 0 12px; border-top: 1.5px solid var(--linha2); font-size: 18px; font-weight: 700; }
.pg-resumo__total span:last-child { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.pg-resumo__total small { font-size: 12.5px; font-weight: 500; color: var(--txt2); }

/* botões */
.pg-pagar {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px; padding: 0 18px; border-radius: 10px;
  background: var(--verde); color: #fff; font-size: 16.5px; font-weight: 600; transition: background-color .15s, transform .2s, opacity .2s;
}
.pg-pagar .ic { width: 19px; height: 19px; }
.pg-pagar:not(:disabled):hover { background: var(--verde2); transform: scale(1.01); }
.pg-pagar:not(:disabled):active { transform: scale(.99); }
.pg-pagar:disabled { cursor: default; opacity: .4; }
.pg-spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.pg-sec { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; border-radius: 10px; border: 1px solid var(--linha2); font-size: 15px; font-weight: 600; transition: background-color .15s; }
.pg-sec:hover { background: #f9fafb; }

/* rodapé */
.pg-rodape { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px 18px; padding-top: 4px; }
.pg-selo { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 99px; background: #000; color: #fff; font-size: 14.5px; font-weight: 500; }
.pg-selo .ic { width: 20px; height: 20px; }
.pg-bandeiras { display: flex; align-items: center; gap: 6px; }
.pg-bandeiras svg { width: 34px; height: 22px; }
.pg-bandeiras__pix { width: 34px; height: 22px; border-radius: 4px; display: grid; place-items: center; background: #fff; border: 1px solid #e3e3e3; color: var(--pix); }
.pg-bandeiras__pix .ic { width: 15px; height: 15px; }

/* texto miúdo */
.pg-legal { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 14px; border-top: 1px solid var(--linha); text-align: center; font-size: 11.5px; line-height: 1.55; color: var(--txt3); }
.pg-legal a { color: var(--txt2); text-decoration: underline; text-underline-offset: 2px; }
.pg-legal a:hover { color: var(--txt); }
.pg-processado { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--txt2); }
.pg-cakto { width: auto; height: 24px; }

/* telas finais */
.pg-fim { align-items: center; text-align: center; gap: 12px; max-width: 440px; }
.pg-pixlogo { display: inline-flex; align-items: center; gap: 8px; color: var(--pix); font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.pg-pixlogo .ic { width: 30px; height: 30px; }
.pg-status { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 99px; background: #fef9c3; color: #854d0e; font-size: 13px; font-weight: 600; }
.pg-status i { width: 8px; height: 8px; border-radius: 50%; background: #eab308; animation: pisca 1.2s ease-in-out infinite; }
@keyframes pisca { 50% { opacity: .3; } }
.pg-fim__valor { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.pg-prazo { font-size: 13.5px; color: var(--txt2); }
.pg-prazo b { color: var(--txt); font-variant-numeric: tabular-nums; }
.pg-fim__qr { width: 200px; margin: 6px 0; padding: 10px; border-radius: 14px; border: 1px solid var(--linha); }
.pg-qr { width: 100%; height: auto; }
.pg-copia { width: 100%; padding: 10px 12px; border-radius: 10px; background: #f3f4f6; border: 1px dashed var(--linha2); }
.pg-copia code { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 12px/1.3 ui-monospace, Menlo, Consolas, monospace; color: var(--txt2); }
.pg-fim__ajuda { font-size: 14px; line-height: 1.55; color: var(--txt2); overflow-wrap: anywhere; }
.pg-ok { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--verde); color: #fff; box-shadow: 0 0 0 10px #dcfce7; animation: pop .5s cubic-bezier(.3, 1.6, .5, 1); }
.pg-ok .ic { width: 36px; height: 36px; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
.pg-fim__titulo { margin-top: 10px; font-size: 24px; font-weight: 700; }
.pg-recibo { width: 100%; text-align: left; margin: 6px 0; }
.pg-comprovante { gap: 10px; }
.pg-dados { width: 100%; margin-top: 8px; padding: 6px 16px; border-radius: 12px; background: #f9fafb; border: 1px solid var(--linha); text-align: left; }
.pg-dados div { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 8px 0; font-size: 13.5px; }
.pg-dados span { color: var(--txt2); flex: none; }
.pg-dados b { font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.pg-dados .pg-dados__sep { height: 1px; padding: 0; margin: 4px 0; background: var(--linha); }
.pg-dados__total { margin-top: 2px; border-top: 1.5px solid var(--linha2); padding-top: 10px !important; font-size: 15px !important; }
.pg-dados__total span { color: var(--txt) !important; font-weight: 700; }
.pg-dados__total b { font-weight: 800 !important; }
.pg-miudo { font-size: 11.5px; color: var(--txt3); }
.pg-proximo { width: 100%; padding: 14px 16px; border-radius: 12px; background: #f0fdf4; border: 1px solid #bbf7d0; text-align: left; }
.pg-proximo strong { display: block; font-size: 14.5px; color: #14532d; }
.pg-proximo p { margin-top: 4px; font-size: 13.5px; line-height: 1.5; color: #166534; }
.pg-fim__contato { font-size: 12.5px; color: var(--txt2); }
.pg-fim__contato a { text-decoration: underline; text-underline-offset: 2px; }
.pg-comprovante .pg-processado { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--linha); width: 100%; justify-content: center; }

/* celular */
@media (max-width: 600px) {
  .pg { padding: 0; }
  .pg-card { max-width: none; min-height: 100dvh; padding: 22px 16px 28px; border-radius: 0; border: 0; box-shadow: none; }
  .pg-fim { min-height: 100dvh; justify-content: center; }
  .pg-prod__img { width: 64px; height: 64px; border-radius: 16px; }
  .pg-prod__img img { width: 34px; height: 34px; }
  .pg-prod h1 { font-size: 17px; }
  .pg-prod strong { font-size: 20px; }
  .pg-metodos { display: grid; grid-template-columns: 1fr 1fr; }
  .pg-metodo { width: auto; height: 84px; }
  .pg-bump { padding: 11px 12px; gap: 10px; }
  .pg-bump img { width: 48px; height: 48px; }
  .pg-bump__txt small { display: none; }
}
@media (max-width: 360px) {
  .pg-campos--dois { grid-template-columns: 1fr; }
  .pg-bump__txt strong { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============ PRÓXIMO PASSO (liberar acesso) ============ */
.pg-passo { width: 100%; margin-top: 4px; padding: 14px 16px; border-radius: 12px; background: #f9fafb; border: 1px solid var(--linha); border-left: 3px solid var(--verde); text-align: left; }
.pg-passo__link { font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--verde2); }
.pg-passo__txt { margin-top: 4px; font-size: 14px; line-height: 1.55; color: var(--txt); }
.pg-passo__txt a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }.pg-processado--fim { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--linha); width: 100%; justify-content: center; }
/* ============ ALERTA DE PAGAMENTO / SÓ PIX ============ */
.pg-alerta { padding: 12px 14px; border-radius: 10px; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; font-size: 14px; line-height: 1.5; text-align: center; }
.pg-metodos--um { grid-template-columns: 1fr !important; }
.pg-fim__qr img.pg-qr { width: 100%; height: auto; image-rendering: pixelated; }


/* ============ DESCONTO DO LINK DA PLATAFORMA ============ */
.pg-prod__de { margin-top: 6px !important; font-size: 13px !important; color: var(--txt3) !important; }
.pg-prod__de s, .pg-riscado { color: var(--txt3); font-weight: 500; text-decoration-thickness: 1.5px; }
.pg-prod__de + strong { margin-top: 0; color: var(--verde2); }
.pg-desconto { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 5px 11px; border-radius: 99px; background: #dcfce7; color: var(--verde2); font-size: 12.5px; font-weight: 700; }
.pg-desconto .ic { width: 14px; height: 14px; }
.pg-resumo__economia span:first-child { color: var(--verde2); }
.pg-resumo__economia span:last-child { color: var(--verde2) !important; font-weight: 700; }
.pg-dados__economia span, .pg-dados__economia b { color: var(--verde2); }
