/* Checkout — layout de cartões no padrão TikTok Shop.
   Valores extraídos do DOM real: cards rounded-16 sobre #f5f5f5, header branco
   em fluxo (não fixo), inputs 48px, Pix com botões #fe2c55. */

:root {
  --ck-bg: #f5f5f5;
  --ck-ink: #171717;
  --ck-muted: #737373;
  --ck-line: #e5e5e5;
  --ck-line-soft: #f5f5f5;
  --ck-green: #10b981;
  --ck-green-600: #059669;
  --ck-green-700: #047857;
  --ck-green-soft: #ecfdf5;
  --ck-red: #f43f5e;
  --ck-pink: #fe2c55;
  --ck-ink-900: #161823;
  --ck-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ck-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ck-bg);
  color: var(--ck-ink);
  font-family: var(--ck-font);
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; text-decoration: none; }

/* --------------------------------------------------------------- header */

.ck-header { background: #fff; }

.ck-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
  padding: 12px 16px;
}

.ck-brand { display: flex; align-items: center; gap: 6px; padding-left: 4px; }

.ck-brand img.logo { height: 24px; width: auto; object-fit: contain; display: block; }

.ck-brand img.seal { height: 16px; width: 16px; object-fit: contain; display: block; }

.ck-secure { display: flex; align-items: center; gap: 6px; color: var(--ck-green-600); }

.ck-secure svg { width: 16px; height: 16px; flex: none; }

.ck-secure div { font-size: 10px; font-weight: 700; line-height: 1.15; text-align: right; }

/* ----------------------------------------------------------------- shell */

.ck-shell {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 12px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ck-card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

.ck-body { display: flex; flex-direction: column; gap: 16px; }

/* ---------------------------------------------------------------- carrinho */

.ck-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ck-cart-head .left { display: flex; align-items: center; gap: 8px; }

.ck-cart-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ck-ink-900);
}

.ck-count {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #171717;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.ck-cart-head svg { color: #737373; }

.ck-item { display: flex; align-items: center; gap: 12px; margin-top: 12px; }

.ck-item img {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 6px;
  object-fit: cover;
  background: #f5f5f5;
}

.ck-item .info { flex: 1; min-width: 0; }

.ck-item .name {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ck-ink-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ck-item .sub {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--ck-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ck-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 4px 8px;
  border: 1px solid var(--ck-line);
  border-radius: 999px;
}

.ck-qty button {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.ck-qty button[data-act="qty-minus"] { color: #f43f5e; }

.ck-qty button[data-act="qty-plus"] { color: #10b981; }

.ck-qty span {
  min-width: 14px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--ck-ink-900);
}

.ck-hr { border: 0; border-top: 1px solid var(--ck-line-soft); margin: 12px 0; }

.ck-lines { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }

.ck-lines > div { display: flex; justify-content: space-between; gap: 10px; }

.ck-lines .lbl { color: #525252; }

.ck-lines .val { color: var(--ck-ink-900); }

.ck-lines .free { color: var(--ck-green-600); font-weight: 600; }

.ck-lines .bump { color: var(--ck-green-600); font-weight: 600; }

.ck-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
}

.ck-total span:first-child { font-weight: 600; color: var(--ck-ink-900); }

.ck-total span:last-child { font-weight: 700; color: var(--ck-ink-900); }

/* ----------------------------------------------------------------- etapas */

.ck-steps { padding: 20px 16px; }

.ck-steps-inner { position: relative; display: flex; align-items: flex-start; justify-content: space-between; }

.ck-step { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; }

.ck-step .line {
  position: absolute;
  top: 14px;
  left: 50%;
  width: 100%;
  height: 1px;
  background: #e5e5e5;
}

.ck-step .line.done { background: #171717; }

.ck-step:last-child .line { display: none; }

.ck-step i {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f5f5f5;
  color: #a3a3a3;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.ck-step.on i { background: #171717; color: #fff; }

.ck-step i svg { width: 14px; height: 14px; }

.ck-step b {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 400;
  color: #737373;
}

.ck-step.on b { color: var(--ck-ink-900); font-weight: 600; }

/* ---------------------------------------------------------------- campos */

.ck-field > label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #262626;
}

.ck-input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  font-family: var(--ck-font);
  font-size: 14px;
  color: var(--ck-ink);
  background: #fff;
  border: 1px solid var(--ck-line);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.ck-input::placeholder { color: #a3a3a3; }

.ck-input:focus {
  border-color: var(--ck-green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .12);
}

.ck-input.invalid {
  border-color: var(--ck-red);
  box-shadow: 0 0 0 3px rgba(244, 63, 94, .1);
}

.ck-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.35;
  color: inherit;
}

.ck-hint p {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: inherit;
}

.ck-hint svg {
  width: 12px;
  height: 12px;
  flex: none;
  margin-top: 2px;
  color: currentColor;
}

.ck-field-error {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.35;
  color: #f43f5e;
}

.ck-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.ck-grid-uf { display: grid; grid-template-columns: 1fr 88px; gap: 12px; }

.ck-notice {
  padding: 16px;
  border: 1px dashed #d4d4d4;
  border-radius: 12px;
}

.ck-notice p.title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: #262626;
  text-align: center;
  line-height: 1.35;
}

.ck-notice ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: #404040;
}

.ck-notice li { display: flex; gap: 8px; align-items: flex-start; }

.ck-notice li svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 2px;
  color: #10b981;
}

/* ---------------------------------------------------------------- botões */

/* CTA primário — .ttk-buttons.css da origem sobrepõe o .tt-btn com !important.
   Valores copiados do computed style real: pílula 999px, 52px de altura,
   15/700, gap 8, fundo #fe2c55. */
.ck-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--ck-pink);
  background-image: none;
  color: #fff;
  font-family: var(--ck-font);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.15;
  box-shadow: none;
  cursor: pointer;
  transition: opacity .15s ease, transform .05s ease;
}

.ck-btn:hover { background: #e0224a; }

.ck-btn:active { transform: scale(.98); }

.ck-btn:disabled { opacity: .6; cursor: default; }

.ck-btn.ghost {
  height: 40px;
  min-height: 40px;
  border-radius: 12px;
  background: transparent;
  color: #737373;
  font-size: 13px;
  font-weight: 500;
}

.ck-btn.ghost:hover { background: transparent; }

/* Botões do bloco Pix: na origem são estilo inline, raio 8 e 15/800. */
.ck-btn.pink {
  height: 52px;
  border-radius: 8px;
  background: var(--ck-pink);
  font-size: 15px;
  font-weight: 800;
}

.ck-btn.pink:hover { background: #e0224a; }

.ck-actions { display: flex; flex-direction: column; gap: 8px; }

/* ----------------------------------------------------------------- frete */

.ck-shipbox {
  padding: 10px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
}

.ck-shipbox-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.ck-shipbox-head svg { width: 14px; height: 14px; flex: none; color: #262626; }

.ck-shipbox-head h4 { margin: 0; font-size: 13px; font-weight: 700; color: var(--ck-ink-900); }

.ck-ship-list { display: flex; flex-direction: column; gap: 6px; }

.ck-ship {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  background: #fff;
  text-align: left;
  font-family: var(--ck-font);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.ck-ship .radio {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  flex: none;
  border: 2px solid #d4d4d4;
  border-radius: 50%;
}

.ck-ship .radio i { width: 8px; height: 8px; border-radius: 50%; background: transparent; }

.ck-ship img { width: 48px; height: 20px; flex: none; object-fit: contain; }

.ck-ship .txt { flex: 1; min-width: 0; }

.ck-ship .txt strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ck-ink-900);
}

.ck-ship .txt small { display: block; font-size: 11px; line-height: 1.2; color: var(--ck-muted); }

.ck-ship .price { flex: none; font-size: 12px; font-weight: 700; color: var(--ck-ink-900); }

.ck-ship.on { border-color: var(--ck-green-600); background: rgba(236, 253, 245, .6); }

.ck-ship.on .radio { border-color: var(--ck-green-600); }

.ck-ship.on .radio i { background: var(--ck-green-600); }

.ck-ship.on .price { color: var(--ck-green-600); }

.ck-eta {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  border: 1px solid #d1fae5;
  border-radius: 12px;
  background: #ecfdf5;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ck-green-700);
}

.ck-eta svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }

/* ----------------------------------------------------------- order bump */

.ck-bumps box { display: none; }

.ck-bumps { padding: 10px; border: 1px solid #e5e5e5; border-radius: 12px; }

.ck-bumps-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }

.ck-bumps-head svg { width: 14px; height: 14px; flex: none; color: #262626; }

.ck-bumps-head h4 { margin: 0; font-size: 13px; font-weight: 700; color: var(--ck-ink-900); }

.ck-bumps-sub { margin: 0 0 8px; font-size: 11px; color: var(--ck-muted); }

.ck-bump-list { display: flex; flex-direction: column; gap: 6px; }

.ck-bump {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  text-align: left;
  font-family: var(--ck-font);
  cursor: pointer;
  transition: all .15s;
}

.ck-bump .check {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: none;
  border: 2px solid #d1d5db;
  border-radius: 50%;
  background: #fff;
  color: transparent;
  font-size: 12px;
  font-weight: 800;
}

.ck-bump img {
  width: 66px;
  height: 66px;
  flex: none;
  border-radius: 10px;
  object-fit: cover;
  background: #f5f5f5;
}

.ck-bump .info { flex: 1; min-width: 0; }

.ck-bump .b-title { display: block; margin: 0 0 4px; font-size: 13px; font-weight: 700; line-height: 1.25; color: #111; }

.ck-bump .b-desc { display: block; margin: -2px 0 4px; font-size: 11px; line-height: 1.3; color: #6b7280; }

.ck-bump .b-prices { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.ck-bump .b-off { padding: 2px 6px; border-radius: 6px; background: #e11d48; color: #fff; font-size: 10px; font-weight: 800; }

.ck-bump .b-old { font-size: 11px; color: #9ca3af; text-decoration: line-through; }

.ck-bump .b-now { display: block; margin-top: 2px; font-size: 15px; font-weight: 800; color: #059669; }

.ck-bump.on { border-color: #10b981; background: #ecfdf5; }

.ck-bump.on .check { border-color: #10b981; background: #10b981; color: #fff; }

.ck-best {
  position: absolute;
  top: -8px;
  left: 12px;
  overflow: hidden;
  padding: 3px 8px;
  border-radius: 6px;
  background: #e11d48;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .5px;
  box-shadow: 0 4px 12px rgba(225, 29, 72, .35);
  animation: ckTagPulse 2.6s ease-in-out infinite;
}

.ck-best::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .65), transparent);
  animation: ckTagShine 3.2s ease-in-out infinite;
}

@keyframes ckTagPulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-1px) scale(1.035); }
}

@keyframes ckTagShine {
  0% { left: -60%; }
  55%, 100% { left: 130%; }
}

@media (prefers-reduced-motion: reduce) {
  .ck-best, .ck-best::after { animation: none; }
}

/* --------------------------------------------------------------- revisão */

.ck-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f1f2;
}

.ck-review-head strong { font-size: 14px; font-weight: 800; color: var(--ck-ink-900); letter-spacing: -.2px; }

.ck-edit {
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--ck-font);
  font-size: 12px;
  font-weight: 700;
  color: var(--ck-pink);
  cursor: pointer;
}

.ck-review { padding-top: 10px; }

.ck-review-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dashed #f1f1f2;
}

.ck-review-row:last-child { border-bottom: 0; }

.ck-review-row span:first-child {
  font-size: 12px;
  color: #6b7280;
  min-width: 70px;
}

.ck-review-row span:last-child {
  font-size: 13px;
  font-weight: 600;
  color: var(--ck-ink-900);
  text-align: right;
  word-break: break-word;
}

.ck-review-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f6f7f9;
}

.ck-review-note svg { width: 14px; height: 14px; flex: none; stroke: var(--ck-pink); }

.ck-review-note span { font-size: 11.5px; font-weight: 500; color: #4b5563; }

/* ------------------------------------------------------------------- pix */

.ck-pix-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f1f2;
}

.ck-pix-head img { height: 16px; width: auto; object-fit: contain; }

.ck-pix-head span { font-size: 14px; font-weight: 700; color: var(--ck-ink-900); letter-spacing: -.2px; }

.ck-pix-expire {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 0 10px;
}

.ck-pix-expire .lbl { font-size: 12px; font-weight: 600; color: #6b7280; }

.ck-pix-expire .time {
  padding: 4px 8px;
  border-radius: 8px;
  background: #fff1f3;
  color: var(--ck-pink);
  font-family: var(--ck-mono);
  font-size: 12.5px;
  font-weight: 700;
}

.ck-pix-amount {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 0 0 12px;
}

.ck-pix-amount .lbl { font-size: 12px; font-weight: 600; color: #6b7280; }

.ck-pix-amount .value { font-size: 24px; font-weight: 800; color: var(--ck-ink-900); letter-spacing: -.6px; }

.ck-qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.ck-qr-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 172px;
  min-height: 172px;
  padding: 10px;
  background: #fff;
  border: 1px solid #ececee;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(16, 24, 40, .06);
}

.ck-qr-frame canvas, .ck-qr-frame img { display: block; }

.ck-qr-caption { font-size: 11px; font-weight: 600; color: #8a8b91; }

.ck-pix-code {
  margin-top: 12px;
  padding: 11px;
  max-height: 88px;
  overflow: auto;
  border: 1px solid #ececee;
  border-radius: 8px;
  background: #fafafa;
  font-family: var(--ck-mono);
  font-size: 11.5px;
  line-height: 1.55;
  color: #52525b;
  word-break: break-all;
  user-select: all;
}

.ck-pix-copy { margin-top: 10px; }

.ck-pix-footnote {
  margin: 12px 0 0;
  text-align: center;
  font-size: 11.5px;
  color: #8a8b91;
}

.ck-pix-wait {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ck-green-700);
  text-align: center;
}

.ck-pix-wait .spin {
  width: 12px;
  height: 12px;
  flex: none;
  border: 2px solid var(--ck-green-600);
  border-top-color: transparent;
  border-radius: 50%;
  animation: ckSpin 1s linear infinite;
}

@keyframes ckSpin { to { transform: rotate(360deg); } }

.ck-pay-again {
  width: 100%;
  height: 40px;
  margin-top: 10px;
  border: 1px solid #ececee;
  border-radius: 8px;
  background: #fff;
  color: #52525b;
  font-family: var(--ck-font);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.ck-pay-again:disabled { opacity: .6; cursor: default; }

.ck-error { margin: 0; font-size: 12px; color: #f43f5e; }

/* ---------------------------------------------------------------- rodapé */

.ck-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 0 26px;
  text-align: center;
}

.ck-foot .pay-label { margin: 0 0 8px; font-size: 13px; color: #525252; }

.ck-foot .pix-logo { height: 24px; width: auto; object-fit: contain; }

/* O <img> dentro de .pix-logo não herdava tamanho e estourava o rodapé. */
.ck-foot .pix-logo img {
  display: block;
  height: 100%;
  width: auto;
  max-height: 24px;
  object-fit: contain;
}

.ck-wordmark { white-space: nowrap; }

.ck-foot .copyright {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--ck-muted);
}

.ck-foot .copyright img { width: 10px; height: 10px; object-fit: contain; }

.ck-foot .safe {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid #eef0f3;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  font-size: 12px;
  color: #262626;
}

.ck-foot .safe svg { width: 14px; height: 14px; color: #10b981; }

/* -------------------------------------------------------------- sucesso */

.ck-done { text-align: center; padding: 8px 4px 4px; }

.ck-done .mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #ecfdf5;
  color: var(--ck-green-600);
}

.ck-done h1 { margin: 0 0 8px; font-size: 20px; font-weight: 800; color: var(--ck-ink-900); }

.ck-done p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--ck-muted); }

.ck-order {
  display: inline-block;
  margin-top: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #f5f5f5;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
}

.ck-help {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--ck-muted);
}

.ck-help li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.5; }

.ck-help b {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  background: #171717;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.ck-note { margin: 0; font-size: 12px; line-height: 1.55; color: var(--ck-muted); }

.ck-h3 { margin: 0 0 12px; font-size: 15px; font-weight: 700; color: var(--ck-ink-900); }

@media (max-width: 400px) {
  .ck-grid-2, .ck-grid-uf { grid-template-columns: 1fr; }
  .ck-bump img { width: 48px; height: 48px; }
}
