/* Checkout CF no desenho do checkout do WooCommerce (réplica da Hubla, scripts/wp-dri-checkout-snippet.php).
   Valores copiados de lá: fundo #F1F1EF, coluna 480, cards brancos com 12px de margem, fonte do sistema 16px/1.4,
   caixa agrupada de campos (52px, só divisória), métodos em grade com ícone em cima, bumps #E5484D/#FAFAFA,
   "Pagar" #060606 44px, Pix #F4F4F5 com barra mono. Nunca overflow-x:hidden no body (Chrome ≥ 148 trava scroll). */
:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Arial, sans-serif;
  color: #111;
  background: #f1f1ef;
  font-size: 16px;
  line-height: 1.4;
  font-synthesis: none;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { overflow-x: clip; }
body { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, summary { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
a { color: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [role="button"]:focus-visible {
  outline: 3px solid #111;
  outline-offset: 2px;
}
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 10px; top: -100px; background: #fff; padding: 12px; z-index: 2; }
.skip:focus { top: 10px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.3; }

.co { max-width: 480px; margin: 0 auto; padding: 0 0 32px; }
.card { background: #fff; margin: 0 12px; }
.loading { text-align: center; padding: 60px 20px; border-radius: 14px; margin-top: 16px; color: #6b7280; }
#fatal { border-radius: 14px; margin-top: 16px; padding: 24px 16px; }
#fatal p { margin: 10px 0 18px; }
.h-title { font-size: 19px; }

.banner { display: block; width: 100%; height: auto; }
@media (min-width: 768px) {
  .banner { display: none !important; }
  .co { padding-top: 24px; }
}

/* produto */
.prod { display: flex; gap: 14px; align-items: flex-start; padding: 20px 16px 12px; border-radius: 14px 14px 0 0; margin-top: -1px; }
.thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; flex: 0 0 72px; }
.prod-name { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.de { color: #6b7280; font-size: 15px; }
.de s { color: #6b7280; }
.por { font-size: 17px; font-weight: 600; }
.avista { font-size: 13px; color: #6b7280; margin-top: 2px; }

.notice { background: #fff6e9; border: 1px solid #e5cda5; border-radius: 10px; padding: 14px 16px; font-size: 14px; margin: 12px 12px 0; }
.notice p { font-size: 13px; margin-top: 6px; }

/* formulário */
.form { border-radius: 0 0 14px 14px; padding: 8px 16px 22px; margin-bottom: 24px; }
.prod + .form, .notice + .form { }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.h-sec, legend.h-sec { font-size: 17px; font-weight: 500; margin: 14px 0 8px; color: #111; padding: 0; display: block; }
.group { border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; }
.g-row + .g-row { border-top: 1px solid #e5e7eb; }
.group input { width: 100%; height: 52px; border: 0; padding: 0 14px; font-size: 16px; background: #fff; outline: none; }
.group input::placeholder, .doc input::placeholder { color: #9ca3af; }
input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px #dc2626; }
.field-error { font-size: 13px; color: #dc2626; margin: 6px 2px 0; }

.methods { margin-top: 18px; }
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.method { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; border: 1px solid #e5e7eb; border-radius: 10px; padding: 14px; font-size: 16px; font-weight: 600; cursor: pointer; background: #fff; min-height: 76px; -webkit-tap-highlight-color: transparent; }
.method input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.method:has(input:checked) { border: 2px solid #111; padding: 13px; }
.method:has(input:focus-visible) { outline: 3px solid #111; outline-offset: 2px; }
.method:has(input:disabled) { opacity: 0.45; cursor: default; }
.pm-ico { display: inline-flex; color: #111; }

.lbl { display: block; font-size: 15px; color: #111; font-weight: 500; margin: 14px 0 6px; }
#card-fields { margin-top: 4px; }
#frame-slot iframe { width: 100%; height: 232px; border: 0; display: block; }
#frame-slot:empty { min-height: 8px; }
.doc input, .parc select { width: 100%; height: 52px; border: 1px solid #e5e7eb; border-radius: 10px; padding: 0 12px; font-size: 16px; background: #fff; color: #111; }
.parc select { padding-right: 40px; -webkit-appearance: none; appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; }
.parc { margin-top: 2px; }
.hint { font-size: 13px; color: #6b7280; line-height: 1.5; margin: 8px 0 0; }

/* bumps */
.bumps { display: flex; flex-direction: column; gap: 14px; margin: 18px 0 6px; }
.bumps.is-busy { opacity: 0.6; pointer-events: none; }
.bump { border: 1px solid #e4e4e7; border-radius: 10px; overflow: hidden; background: #fafafa; cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none; }
.bump-head { background: #e5484d; color: #fff; font-weight: 700; font-size: 14px; line-height: 1.3; padding: 10px 14px; display: flex; gap: 8px; text-transform: uppercase; }
.bump-body { display: flex; gap: 10px; align-items: flex-start; padding: 14px 14px 6px; }
.bump-body input { width: 20px; height: 20px; flex: 0 0 20px; margin: 2px 0 0; accent-color: #111; cursor: pointer; }
.bump-cta { font-weight: 600; font-size: 15px; line-height: 1.35; flex: 1; color: #111; }
.tag { background: #22c55e; color: #fff; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 9px; white-space: nowrap; line-height: 1.4; }
.bump-desc { padding: 0 14px 12px 44px; color: #6b7280; font-size: 14px; line-height: 1.5; }
.bump-prod { display: flex; gap: 10px; align-items: center; border-top: 1px solid #f0f0f0; padding: 10px 14px; }
.bump-prod img { width: 52px; height: 52px; object-fit: cover; border-radius: 6px; }
.bump-name { font-size: 14px; font-weight: 500; color: #111; }
.bump-price { font-size: 14px; color: #111; }

/* resumo (o Woo não mostra total; aqui mostra por decisão do plano §5) */
.sum { border-top: 1px solid #eee; margin: 16px 0 6px; padding-top: 12px; font-size: 14px; color: #374151; }
.sum-l, .sum-t { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.sum-t { font-size: 17px; font-weight: 700; color: #111; padding-top: 8px; }
.sum-detail { font-size: 13px; color: #6b7280; margin-top: 2px; }

/* botões */
.btn, .pay { width: 100%; background: #060606; color: #fff; border: 0; border-radius: 6px; height: 44px; padding: 0 20px; font-size: 18px; font-weight: 500; line-height: 1; display: flex; align-items: center; justify-content: center; white-space: nowrap; position: relative; overflow: hidden; }
.pay { margin-top: 8px; }
.pay:disabled { opacity: 0.6; }
.pay.is-loading { opacity: 0.6; pointer-events: none; }
.pay .prog { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.pay .prog i { position: absolute; inset: 0; background: rgba(255, 255, 255, 0.2); transform: translateX(-100%); transition: transform 0.6s ease-out; }
.pay .spin { width: 16px; height: 16px; flex: 0 0 16px; margin-right: 8px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-secondary { width: 100%; background: #fff; border: 1px solid #d4d4d8; color: #111; border-radius: 8px; min-height: 46px; font-size: 15px; font-weight: 500; padding: 10px 14px; }
.btn-access { height: auto; padding: 15px 16px; border-radius: 8px; background: #09090b; font-size: 16px; font-weight: 600; margin-top: 4px; }
.btn:disabled { opacity: 0.6; }
#turnstile { max-width: 100%; overflow: clip; margin-top: 12px; }
#turnstile:empty { margin: 0; }
.error-summary { background: #fff2f0; color: #9f271e; border: 1px solid #f0cac4; border-radius: 10px; padding: 12px; font-size: 14px; margin: 12px 0 0; }
#quote-retry { margin-top: 12px; }
.secure { display: flex; justify-content: center; align-items: center; gap: 8px; color: #71717a; font-size: 14px; margin-top: 16px; }
.privacy { text-align: center; font-size: 12px; color: #9ca3af; margin: 6px 0 0; line-height: 1.5; }
.privacy a { color: #9ca3af; }
.footer { text-align: center; color: #9ca3af; font-size: 12px; line-height: 1.7; padding: 0 16px; }
.footer a { display: inline-block; padding: 10px 0; }
.footer p { white-space: pre-line; margin-top: 8px; }

/* ===== pedido: Pix e estados ===== */
.order { border-radius: 14px; margin-top: 12px; overflow: hidden; }
.order:has(.pix:not([hidden])) { border-radius: 0 0 12px 12px; margin-top: -1px; }
.pix { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; color: #09090b; line-height: 1.45; }
.pix-bar { background: #f4f4f5; text-align: center; padding: 10px 12px; font: 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #71717a; border-bottom: 1px solid #e4e4e7; }
.pix-bar b { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; color: #09090b; font-weight: 600; margin-left: 4px; }
.pix-prod { display: flex; gap: 14px; align-items: center; padding: 16px 24px; border-bottom: 1px solid #e4e4e7; }
.pix-prod img { width: 50px; height: 50px; object-fit: cover; border-radius: 6px; }
.pix-prod .n { font-size: 16px; color: #09090b; }
.pix-prod .v { font-size: 16px; color: #71717a; }
.pix-h2 { font-size: 24px; font-weight: 600; text-align: center; line-height: 1.3; margin: 24px 24px 18px; color: #09090b; }
.pix-card { margin: 0 24px 16px; border: 1px solid #e4e4e7; border-radius: 10px; background: #fafafa; padding: 16px; }
.pix-card label { display: block; font-size: 15px; font-weight: 500; color: #3f3f46; margin: 0 0 8px; }
.pix-card textarea { display: block; width: 100%; height: 78px; background: #e4e4e7; border: 0; border-radius: 6px; padding: 8px 12px; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #71717a; resize: vertical; word-break: break-all; outline: none; }
.pix-copy { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 40px; margin: 12px 0 14px; background: #18181b; color: #fafafa; border: 0; border-radius: 8px; font-size: 14px; font-weight: 500; padding: 0; }
.pix-card p { font-size: 14px; color: #71717a; line-height: 1.5; }
.pix-info { margin: 0 24px 16px; border: 1px solid #e4e4e7; border-radius: 10px; padding: 16px; display: flex; gap: 12px; align-items: flex-start; }
.pix-info svg { flex: 0 0 20px; margin-top: 2px; }
.pix-info b { display: block; font-size: 15px; font-weight: 500; color: #09090b; }
.pix-info p { margin: 2px 0 0; font-size: 14px; color: #09090b; line-height: 1.45; }
.pix-payee { color: #71717a !important; font-size: 13px !important; margin-top: 8px !important; }
.pix-qr { margin: 0 24px 20px; }
.pix-qr summary { cursor: pointer; font-size: 14px; color: #71717a; text-decoration: underline; padding: 8px 0; }
#pix-qr { display: block; margin: 10px auto 0; max-width: 100%; height: auto; image-rendering: pixelated; }
.order-actions { padding: 0 16px 16px; }
.order:has(.pix:not([hidden])) .order-actions { padding: 0 24px 24px; }
.order-actions .btn-secondary + .btn-secondary, .order-actions .btn-secondary + .btn, .order-actions .btn + .btn-secondary { margin-top: 10px; }

.status { text-align: center; padding: 28px 20px 8px; }
.status-icon { display: inline-flex; width: 48px; height: 48px; border-radius: 50%; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; line-height: 1; background: #f4f4f5; color: #3f3f46; }
.status-icon::before { content: "◷"; }
.status-icon[data-state="paid"] { background: #e4f5ea; color: #16a34a; }
.status-icon[data-state="paid"]::before { content: "✓"; font-size: 28px; }
.status-icon[data-state="on_hold"]::before, .status-icon[data-state="unknown"]::before { content: "…"; }
.status-icon[data-state="failed"], .status-icon[data-state="chargeback"] { background: #fdecea; color: #b42318; }
.status-icon[data-state="failed"]::before, .status-icon[data-state="chargeback"]::before { content: "!"; }
.status-icon[data-state="expired"] { background: #fdecea; color: #b42318; }
.status-icon[data-state="expired"]::before { content: "⌛"; font-size: 22px; }
.status-title { font-size: 22px; font-weight: 600; margin: 12px 0 8px; color: #111; }
.status-text { font-size: 17px; line-height: 1.45; color: #111; margin: 0 0 14px; text-align: left; }
.status-note { font-size: 13px; color: #71717a; text-align: center; margin: 8px 0 6px; }
.access-items { margin: 0 0 18px; padding: 0 0 0 20px; font-size: 15px; line-height: 1.6; text-align: left; }
.protocol { overflow-wrap: anywhere; font-size: 11px; color: #9ca3af; text-align: center; margin-top: 10px; }
#order-message { text-align: center; }

.upsell { margin: 8px 16px 20px; padding: 18px 16px 14px; border: 1px solid #ead9df; background: #fbf7f8; border-radius: 12px; text-align: left; }
.upsell-eyebrow { font-size: 11px; letter-spacing: 0.1em; color: #8a2b4a; margin-bottom: 6px; }
.upsell h3 { font-size: 17px; margin: 0 0 8px; }
.upsell p { font-size: 14px; color: #4f4f58; }
.upsell-price { font-weight: 650; color: #111 !important; margin-top: 8px; }
.upsell-cta { display: flex; align-items: center; justify-content: center; text-decoration: none; margin: 12px 0 8px; }

/* ===== iframe do cartão (cartao.drimartini.com.br/frame) ===== */
.frame-body { background: #fff; margin: 0; }
.frame-form { padding: 2px 2px 4px; }
.frame-form input { width: 100%; height: 48px; border: 1px solid #e5e7eb; border-radius: 8px; padding: 0 12px; font-size: 16px; background: #fff; color: #111; outline: none; }
.frame-form input:focus-visible { outline: 2px solid #111; outline-offset: 1px; }
.frame-form input::placeholder { color: #9ca3af; }
.frame-form input:invalid:not(:placeholder-shown) { box-shadow: inset 0 0 0 2px #dc2626; }
.card-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 10px; }
.frame-form .lbl { margin: 14px 0 6px; }
.frame-form .field-error { margin-top: 8px; }

@media (max-width: 359px) {
  .prod, .form { padding-left: 14px; padding-right: 14px; }
  .pix-h2 { font-size: 22px; margin: 20px 16px 16px; }
  .pix-card, .pix-info, .pix-qr { margin-left: 16px; margin-right: 16px; }
  .pix-prod { padding: 14px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
