* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  /* Mesma familia da landing (violeta da linha Essencial), mas quem manda aqui
     e o VERDE: botao, preco, PIX e o foco do campo. O violeta fica na
     identidade (passos, titulos, superficies) e o vermelho so no desconto. */
  --bg: #fbfaff;            /* off-white violeta — igual ao fundo da landing */
  --violet: #6d4d9e;        /* roxo da marca (mesmo --primary da landing) */
  --violet-d: #4a3270;      /* roxo escuro — titulos */
  --violet-tint: #efe6fa;   /* roxo bem claro — fundos sutis */
  --green: #1f9d5b;         /* MESMO verde dos botoes da landing */
  --green-d: #17834a;       /* verde escuro */
  --green-tint: #eaf7f0;    /* verde bem claro */
  --green-ring: rgba(31,157,91,.20);  /* halo do campo em foco */
  --dark: #221a2e;          /* quase-preto violeta */
  --ink: #221a2e;           /* texto */
  --muted: #6d6480;         /* cinza violeta (igual ao da landing) */
  --muted-soft: #a79fb8;    /* cinza claro — riscado, placeholder, icones */
  --line: #ebe5f4;          /* borda (igual a da landing) */
  --red: #e0344f;           /* so desconto/urgencia */
}
body { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2 { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }

/* ===== HEADER ===== */
.ck-top {
  display: flex; align-items: center; gap: 10px;
  max-width: 480px; margin: 0 auto; padding: 14px 16px;
}
.ck-back { font-size: 1.4rem; color: var(--ink); text-decoration: none; line-height: 1; }
.ck-top h1 { flex: 1; text-align: center; font-size: 1.05rem; font-weight: 800; }
.ck-safe { font-size: .76rem; color: var(--muted); font-weight: 600; white-space: nowrap; }

.ck-wrap { max-width: 480px; margin: 0 auto; padding: 6px 16px 70px; }

/* ===== CARD ===== */
.ck-card {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 20px; margin-bottom: 16px; box-shadow: 0 4px 20px -8px rgba(60,40,100,.10);
}

/* ===== RESUMO ===== */
.buy-title { color: var(--violet-d); font-weight: 800; font-size: .95rem; margin-bottom: 14px; }
.buy-row { display: flex; gap: 14px; align-items: center; }
.buy-row img { width: 72px; height: 72px; object-fit: contain; background: var(--violet-tint); border-radius: 12px; flex-shrink: 0; }
.buy-info strong { display: block; font-size: 1rem; font-weight: 800; line-height: 1.2; }
.buy-prices { display: flex; align-items: baseline; gap: 8px; margin: 4px 0; }
.buy-old { color: var(--muted-soft); text-decoration: line-through; font-size: .85rem; }
.buy-now { color: var(--green-d); font-size: 1.3rem; font-weight: 900; }
.buy-save { color: var(--green-d); font-size: .8rem; font-weight: 600; }

/* ===== STEP HEAD (pílula numerada) ===== */
.step-head {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--violet-tint); border-radius: 999px;
  padding: 5px 18px 5px 5px; margin-bottom: 18px;
}
.step-num {
  width: 30px; height: 30px; border-radius: 50%; background: var(--violet);
  color: #fff; font-weight: 800; font-size: .95rem;
  display: grid; place-items: center;
}
.step-title { font-weight: 800; font-size: 1rem; color: var(--ink); }

/* ===== CAMPOS ===== */
.ck-label { display: block; font-size: .85rem; font-weight: 700; margin: 0 0 6px 2px; color: var(--ink); }
.ck-input { position: relative; margin-bottom: 16px; }
.ck-ico {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; fill: none; stroke: var(--muted-soft); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; pointer-events: none;
}
.ck-input input, .ck-input select {
  width: 100%; padding: 14px 14px 14px 44px;
  border: 1.5px solid var(--line); border-radius: 12px;
  font-family: inherit; font-size: .95rem; background: #fff; color: var(--ink);
  transition: border .15s, box-shadow .15s; appearance: none;
}
.ck-input select { cursor: pointer; }
.ck-input input::placeholder { color: var(--muted-soft); }
.ck-input input:focus, .ck-input select:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-ring);
}
.ck-chevron { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted-soft); pointer-events: none; font-size: .9rem; }

/* ===== Validação inline (check verde / erro) ===== */
.ck-input.ok input, .ck-input.ok select { border-color: var(--green); }
.ck-input.bad input, .ck-input.bad select { border-color: var(--red); }
.ck-input.ok input { padding-right: 36px; }
.ck-input.ok:not(:has(select))::after {
  content: "✓"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--green); font-weight: 800; font-size: .95rem; pointer-events: none;
}

/* spinner de busca do CEP */
.ck-input input.loading {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23e7ded3' stroke-width='3'/%3E%3Cpath d='M12 3a9 9 0 0 1 9 9' fill='none' stroke='%23c9752e' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='.7s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

/* ===== PAGAMENTO ===== */
.pay-method {
  display: flex; align-items: center; gap: 14px;
  border: 1.5px solid var(--green); background: var(--green-tint);
  border-radius: 14px; padding: 14px; margin-bottom: 18px;
}
.pix-badge {
  background: var(--green); color: #fff; font-weight: 800; font-size: .85rem;
  width: 50px; height: 50px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
}
.pay-method-info { flex: 1; }
.pay-method-info strong { display: block; font-size: 1rem; }
.pay-method-info span { color: var(--muted); font-size: .85rem; }
.pay-check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--green); color: var(--green); display: grid; place-items: center; font-size: .8rem; font-weight: 800; }

.pay-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; margin-bottom: 20px; }
.pay-trust div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pt-ico { width: 24px; height: 24px; fill: none; stroke: var(--green); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pay-trust strong { font-size: .78rem; }
.pay-trust small { color: var(--muted); font-size: .68rem; }

.pay-total {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--line); padding-top: 16px; margin-bottom: 16px;
}
.pay-total span { color: var(--muted); font-weight: 600; }
.pay-total strong { font-size: 1.5rem; font-weight: 900; color: var(--green-d); }

.ck-pay-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 17px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--green), var(--green-d));
  color: #fff; font-family: inherit; font-weight: 800; font-size: 1.05rem;
  border-radius: 14px; text-decoration: none; letter-spacing: .5px;
  box-shadow: 0 8px 20px -6px rgba(31,157,91,.42); transition: transform .12s;
}
.ck-pay-btn:hover { transform: translateY(-1px); }
.ck-pay-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.qr-ico { font-size: 1.1rem; }

.ck-error { color: var(--red); font-size: .85rem; margin-top: 10px; text-align: center; min-height: 1em; }
.pay-secure { text-align: center; color: var(--muted); font-size: .78rem; margin-top: 12px; }

/* ===== PIX / SUCESSO ===== */
.pix-box, .success-box { text-align: center; }
.pix-box h2 { font-size: 1.35rem; font-weight: 800; }
.pix-sub { color: var(--muted); font-size: .9rem; margin: 8px 0 20px; }
.pix-qr { display: flex; justify-content: center; margin-bottom: 18px; }
.pix-qr img { width: 220px; height: 220px; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #fff; }
.pix-copy-btn { background: var(--dark); color: #fff; border: none; cursor: pointer; font-family: inherit; font-weight: 700; font-size: .95rem; padding: 14px; border-radius: 12px; width: 100%; margin-bottom: 10px; }
.pix-code { width: 100%; border: 1px dashed var(--line); border-radius: 10px; padding: 10px; font-size: .76rem; resize: none; color: var(--muted); font-family: monospace; background: var(--bg); }
.pix-waiting { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; font-weight: 600; font-size: .92rem; }
.pix-waiting strong { color: var(--green-d); }
.pix-hint { color: var(--muted); font-size: .8rem; margin-top: 8px; }
.spinner { width: 18px; height: 18px; border: 3px solid var(--green-ring); border-top-color: var(--green); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.success-check { width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: #fff; font-size: 2rem; font-weight: 800; display: grid; place-items: center; margin: 0 auto 16px; }
.success-box h2 { font-size: 1.5rem; font-weight: 800; }
.success-box p { color: var(--muted); margin: 10px 0 20px; }

/* passo-a-passo de pagamento PIX (additive) */
.pix-steps{counter-reset:pixstep;list-style:none;text-align:left;max-width:330px;margin:0 auto 16px;padding:12px 16px;background:var(--violet-tint);border:1px solid var(--line);border-radius:10px;font-size:.92rem;line-height:1.7;color:var(--ink)}
.pix-steps li{position:relative;padding-left:30px;margin:5px 0}
.pix-steps li::before{counter-increment:pixstep;content:counter(pixstep);position:absolute;left:0;top:1px;width:20px;height:20px;border-radius:50%;background:var(--green);color:#fff;font-size:.78rem;font-weight:700;display:flex;align-items:center;justify-content:center}
.pix-steps strong{color:var(--ink)}

/* ===== RESPONSIVO MOBILE ===== */
@media (max-width: 400px) {
  .ck-wrap { padding: 6px 14px 70px; }
  .ck-top h1 { font-size: 1rem; }
  .buy-row img { width: 64px; height: 64px; }
}
@media (max-width: 345px) {
  html { font-size: 15px; }
  .ck-card { padding: 16px; }
  .pay-trust small { font-size: .62rem; }
}

/* ===== PIX: código tocável para copiar + estado copiado ===== */
.pix-code { cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.pix-code:hover, .pix-code:focus, .pix-code:active { border-color: var(--green-d); background: var(--green-tint); }
.pix-code-hint { text-align: center; font-size: .78rem; font-weight: 600; color: var(--muted); margin: 6px 0 2px; }
.pix-code-hint.ok { color: var(--green-d); }
.pix-copy-btn.copied { background: var(--green-d) !important; }
