/* ── Platform Checkout CSS ─────────────────────────────── */

/* Promo banner topo */
.co-promo {
  background: linear-gradient(90deg,#dc2626,#991b1b);
  color:#fff;
  padding: 8px 20px;
  display:flex; align-items:center; justify-content:space-between;
  font-size:13px; font-weight:600;
  position:sticky; top:0; z-index:200;
}
.co-promo-timer { font-weight:900; font-variant-numeric:tabular-nums; letter-spacing:1px; }

/* Header colorido */
.co-header {
  padding: 18px 20px 14px;
  text-align:center;
  color:#fff;
}
.co-header-icon { font-size:28px; margin-bottom:4px; display:flex; align-items:center; justify-content:center; }
.co-header-icon img, .co-header-icon svg { width:36px; height:36px; object-fit:contain; }
.co-header h1 { font-size:1.3rem; font-family:'Syne',sans-serif; margin-bottom:2px; }
.co-header p  { font-size:12px; opacity:.85; max-width:480px; margin:0 auto; }

/* Step dots */
.co-steps {
  display:flex; justify-content:center; align-items:center;
  gap:4px; margin: 10px 0 0;
}
.co-step-dot {
  width:26px; height:26px; border-radius:50%;
  background:rgba(255,255,255,.2);
  display:flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:700; color:rgba(255,255,255,.6);
  transition:all .2s; cursor:default;
}
.co-step-dot.active { background:#fff; color:#7C3AED; }
.co-step-dot.done   { background:rgba(16,185,129,.7); color:#fff; }
.co-step-dot-line   { width:24px; height:2px; background:rgba(255,255,255,.2); }

/* Layout principal */
.co-body {
  max-width:1100px; margin:0 auto; padding:16px 20px 24px;
  display:grid; grid-template-columns:1fr 340px; gap:20px;
}
/* Prevent grid children from overflowing their allocated column */
.co-body > * { min-width: 0; }

/* Painel dos passos */
.co-card {
  background:var(--surface); border:1px solid var(--border);
  border-radius:14px; padding:22px;
}
.co-panel-title {
  font-size:18px; font-weight:700; margin-bottom:20px;
  display:flex; align-items:center; gap:10px;
}

/* Passo 1 — perfil */
.co-profile-row {
  display:flex; gap:10px; margin-bottom:16px;
}
.co-profile-row input {
  flex:1; background:var(--bg2); border:1.5px solid var(--border);
  color:var(--text); padding:11px 16px; border-radius:10px;
  font-family:inherit; font-size:14px; outline:none;
  transition:border-color .2s;
}
.co-profile-row input:focus { border-color:var(--primary); }
.co-profile-hint { font-size:12px; color:var(--text3); margin-top:6px; }

/* Instagram — Profile Preview */
.co-ig-preview {
  display:none; margin-top:16px; padding:16px;
  background:var(--bg2); border:1.5px solid var(--border);
  border-radius:12px; animation:coFadeIn .3s ease;
}
.co-ig-preview.visible { display:flex; gap:16px; align-items:center; }
.co-ig-avatar {
  width:72px; height:72px; border-radius:50%; object-fit:cover;
  border:3px solid var(--primary); flex-shrink:0;
}
.co-ig-info { flex:1; min-width:0; }
.co-ig-name {
  font-weight:700; font-size:15px; color:var(--text);
  display:flex; align-items:center; gap:6px;
}
.co-ig-verified { color:#3b82f6; font-size:14px; }
.co-ig-bio { font-size:12px; color:var(--text3); margin:4px 0 10px; line-height:1.4;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.co-ig-stats { display:flex; gap:16px; }
.co-ig-stat {
  text-align:center; font-size:11px; color:var(--text3);
}
.co-ig-stat strong {
  display:block; font-size:15px; color:var(--text); font-weight:700;
}
.co-ig-loading {
  display:none; margin-top:12px; text-align:center;
  font-size:13px; color:var(--text3);
}
.co-ig-loading.visible { display:block; }
@keyframes coFadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

/* Instagram — Media Grid */
.co-ig-media-section { display:none; margin-top:16px; }
.co-ig-media-section.visible { display:block; animation:coFadeIn .3s ease; }
.co-ig-media-title {
  font-size:14px; font-weight:700; color:var(--text);
  margin-bottom:10px; display:flex; align-items:center; gap:6px;
}
.co-ig-media-grid {
  display:grid; grid-template-columns:repeat(4,1fr); gap:8px;
}
@media(max-width:520px) { .co-ig-media-grid { grid-template-columns:repeat(3,1fr); } }
@media(max-width:380px) { .co-ig-media-grid { grid-template-columns:repeat(2,1fr); } }
.co-ig-media-item {
  position:relative; border-radius:8px; overflow:hidden;
  cursor:pointer; border:2px solid transparent;
  transition:all .2s; aspect-ratio:1/1;
}
.co-ig-media-item:hover { border-color:var(--primary); transform:scale(1.03); }
.co-ig-media-item.selected {
  border-color:var(--primary);
  box-shadow:0 0 16px rgba(124,58,237,.35);
}
.co-ig-media-item.selected::after {
  content:'✓'; position:absolute; top:6px; right:6px;
  background:var(--primary); color:#fff; width:22px; height:22px;
  border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:700;
}
.co-ig-media-item img {
  width:100%; height:100%; object-fit:cover; display:block;
}
.co-ig-media-overlay {
  position:absolute; bottom:0; left:0; right:0;
  background:linear-gradient(transparent,rgba(0,0,0,.7));
  padding:6px 8px; font-size:10px; color:#fff;
  display:flex; gap:8px;
}

/* Passo 2 — serviços (3 cards) */
.co-svc-grid {
  display:grid; grid-template-columns:repeat(3,1fr); gap:14px;
  margin-bottom:8px;
}
@media(max-width:520px) { .co-svc-grid { grid-template-columns:1fr; } }
.co-svc-card {
  background:var(--bg2); border:2px solid var(--border);
  border-radius:12px; padding:20px 16px;
  text-align:center; cursor:pointer;
  transition:all .25s;
  display:flex; flex-direction:column; align-items:center; gap:8px;
}
.co-svc-card:hover { border-color:var(--primary); transform:translateY(-3px); }
.co-svc-card.selected {
  border-color:var(--primary);
  background:rgba(124,58,237,.12);
  box-shadow:0 0 20px rgba(124,58,237,.25);
}
.co-svc-icon  { font-size:36px; }
.co-svc-label { font-weight:700; font-size:15px; }
.co-svc-desc  { font-size:12px; color:var(--text3); line-height:1.4; }

/* Passo 3 — quantidade */
.co-qty-display {
  text-align:center; margin-bottom:18px;
}
.co-qty-num {
  font-size:52px; font-weight:900; font-family:'Syne',sans-serif;
  color:var(--primary); line-height:1;
}
.co-qty-unit { font-size:14px; color:var(--text3); margin-top:4px; }
.co-qty-slider {
  width:100%; margin:12px 0;
  -webkit-appearance:none; appearance:none; height:6px;
  border-radius:3px; background:var(--border);
  outline:none; cursor:pointer;
}
.co-qty-slider::-webkit-slider-thumb {
  -webkit-appearance:none; width:22px; height:22px;
  border-radius:50%; background:var(--primary); cursor:pointer;
  box-shadow:0 2px 8px rgba(124,58,237,.5);
}
.co-qty-presets {
  display:flex; flex-wrap:wrap; gap:8px; margin-top:14px;
}
.co-qty-extra { margin-top:16px; display:flex; flex-direction:column; gap:6px; }
.co-qty-extra label { font-size:13px; color:var(--text2); font-weight:600; }
.co-extra-wrap { display:flex; align-items:center; gap:10px; }
.co-extra-wrap input { width:160px; background:var(--bg2); border:1.5px solid var(--border); color:var(--text); padding:9px 12px; border-radius:8px; font-family:inherit; }
.co-extra-hint { font-size:12px; color:var(--text3); }
.co-qty-btn {
  padding:7px 14px; border-radius:20px; border:1.5px solid var(--border);
  background:var(--bg2); color:var(--text2);
  font-size:13px; font-weight:600; cursor:pointer;
  transition:all .2s;
}
.co-qty-btn:hover { border-color:var(--primary); color:var(--primary); }
.co-qty-btn.active {
  background:var(--primary); color:#fff; border-color:var(--primary);
}

/* Passo 4 — dados */
.co-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
@media(max-width:520px) { .co-form-grid { grid-template-columns:1fr; } }

/* Passo 5 — pagamento */
.co-pay-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.co-pay-btn {
  padding:18px; border-radius:12px; border:2px solid var(--border);
  background:var(--bg2); color:var(--text);
  font-size:15px; font-weight:700; cursor:pointer;
  transition:all .2s; text-align:center;
}
.co-pay-btn:hover { border-color:var(--primary); }
.co-pay-btn.selected {
  border-color:var(--primary); background:rgba(124,58,237,.12);
  color:var(--primary);
}

/* Botões de navegação */
.co-nav-row {
  display:flex; gap:10px; margin-top:24px;
}
.co-btn-next {
  flex:1; padding:14px; border-radius:10px; border:none;
  background:linear-gradient(135deg,var(--primary),#A855F7);
  color:#fff; font-size:15px; font-weight:700;
  cursor:pointer; transition:all .2s;
}
.co-btn-next:hover:not(:disabled) { transform:translateY(-2px); box-shadow:0 8px 24px rgba(124,58,237,.4); }
.co-btn-next:disabled { opacity:.5; cursor:not-allowed; }
.co-btn-back {
  padding:14px 20px; border-radius:10px; border:1.5px solid var(--border);
  background:transparent; color:var(--text2);
  font-size:14px; font-weight:600; cursor:pointer; transition:all .2s;
}
.co-btn-back:hover { background:var(--surface2); }

/* Resumo lateral */
.co-summary {
  background:var(--surface); border:1px solid var(--border);
  border-radius:14px; padding:24px;
  height:fit-content; position:sticky; top:60px;
}
.co-summary h3 { font-size:16px; font-weight:700; margin-bottom:18px; }
.co-sum-row {
  display:flex; justify-content:space-between; align-items:center;
  padding:9px 0; border-bottom:1px solid rgba(255,255,255,.05);
  font-size:13px;
}
.co-sum-row:last-of-type { border-bottom:none; }
.co-sum-label { color:var(--text3); }
.co-sum-value {
  font-weight:600;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}
.co-sum-total {
  display:flex; justify-content:space-between; align-items:center;
  margin-top:14px; padding-top:14px;
  border-top:2px solid var(--border);
  font-size:18px; font-weight:800; color:var(--primary);
}
.co-coupon-row {
  display:flex; gap:8px; margin-top:14px;
}
.co-coupon-row input {
  flex:1; background:var(--bg2); border:1.5px solid var(--border);
  color:var(--text); padding:9px 12px; border-radius:8px;
  font-family:inherit; font-size:13px; outline:none;
}
.co-coupon-row button {
  padding:9px 14px; border-radius:8px; border:none;
  background:var(--primary); color:#fff;
  font-size:13px; font-weight:700; cursor:pointer;
}
.co-coupon-hint { font-size:11px; color:var(--text3); margin-top:6px; }

/* Passo 6 — sucesso */
.co-success {
  text-align:center; padding:48px 20px;
}
.co-success-icon { font-size:64px; margin-bottom:16px; }
.co-success h2 { font-size:24px; margin-bottom:10px; }
.co-success p  { color:var(--text2); font-size:15px; margin-bottom:24px; }
.co-pix-box {
  background:var(--bg2); border:1.5px solid var(--border);
  border-radius:12px; padding:20px; margin:20px auto;
  max-width:400px; word-break:break-all;
}

/* ── Responsividade Checkout ─────────────────────────── */

/* Tablet landscape 1024–1100px: sidebar mais estreita */
@media(max-width:1100px) {
  .co-body { padding:20px 16px 48px; gap:16px; grid-template-columns:1fr 300px; }
}

/* Notebook pequeno 960–1024px: sidebar ainda menor */
@media(max-width:1024px) {
  .co-body { grid-template-columns:1fr 260px; gap:14px; }
  .co-summary { padding:18px 16px; }
}

/* Tablet portrait ≤960px: coluna única */
@media(max-width:960px) {
  .co-body { grid-template-columns:1fr; padding:16px 12px 48px; }
  .co-summary { position:static; top:auto; }
  .co-header { padding:14px 16px 10px; }
  .co-header h1 { font-size:1.2rem; }
  .co-header-icon { font-size:24px; }
}

/* Mobile (max 520px) */
@media(max-width:520px) {
  .co-card { padding:18px 14px; }
  .co-panel-title { font-size:15px; }
  .co-header { padding:12px 12px 8px; }
  .co-header h1 { font-size:1.1rem; }
  .co-header-icon { font-size:22px; margin-bottom:2px; }
  .co-step-dot { width:26px; height:26px; font-size:11px; }
  .co-step-dot-line { width:16px; }
  .co-qty-num { font-size:40px; }
  .co-pay-grid { grid-template-columns:1fr; }
  .co-promo { font-size:11px; padding:6px 12px; }
  .co-promo-timer { font-size:12px; }
}

/* Small phones (max 380px) */
@media(max-width:380px) {
  .co-body { padding:12px 8px 40px; gap:12px; }
  .co-card { padding:14px 10px; }
  .co-svc-card { padding:14px 10px; }
  .co-svc-icon { font-size:28px; }
}

/* Override mobile-responsive.css: keep checkout buttons correctly sized */
@media(max-width:480px) {
  .co-qty-btn {
    width: auto; margin: 0;
    padding: 7px 12px; font-size: 12px;
    min-height: auto; border-radius: 20px;
  }
  .co-btn-back {
    width: auto; flex: 0 0 auto;
    padding: 12px 16px;
  }
  .co-btn-next {
    width: auto; flex: 1;
    padding: 12px; border-radius: 10px;
  }
  .co-nav-row { flex-direction: row; }
  .co-pay-btn {
    width: 100%; margin: 0;
    border-radius: 12px;
  }
  .co-btn-finish {
    width: 100%; border-radius: 10px;
  }
  .co-promo { flex-direction: row; }
}

/* Large screens / TV — centrar e limitar largura */
@media(min-width:1400px) {
  .co-body { max-width:1200px; padding:28px 20px 80px; }
  .co-header { padding:22px 20px 16px; }
  .co-header h1 { font-size:1.5rem; }
}

/* ── Alta Conversão — Urgência, Prova Social, Badges ──── */

/* Badge "Perfil localizado com sucesso" */
.co-badge-found {
  background: linear-gradient(135deg, #065F46, #047857);
  color: #34d399;
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 10px;
  font-weight: 700;
  white-space: nowrap;
}

/* Badge "Sistema seguro e automático" */
.co-secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #6ee7b7;
  background: rgba(6, 95, 70, 0.3);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 8px;
  padding: 4px 10px;
  margin-top: 8px;
  font-weight: 600;
}

/* Urgency block */
.co-urgency-block {
  margin-top: 14px;
  border: 1.5px solid rgba(251, 191, 36, 0.3);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(245, 158, 11, 0.05));
  padding: 14px 16px;
  animation: coFadeIn 0.4s ease;
}
.co-urgency-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #fbbf24;
  line-height: 1.5;
}
.co-urgency-inner strong {
  color: #fcd34d;
  font-size: 14px;
}
.co-urgency-inner span:not(.co-urgency-pulse) {
  color: #d1d5db;
  font-size: 12px;
}
.co-urgency-pulse {
  font-size: 22px;
  animation: coUrgencyPulse 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes coUrgencyPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.15); }
}

/* Social proof line */
.co-social-proof {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #34d399;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Media fallback styles */
.co-ig-media-fallback {
  padding: 16px;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: 12px;
}
.co-media-fallback-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.co-media-fallback-text {
  font-size: 13px;
  color: #d1d5db;
  margin-bottom: 4px;
  line-height: 1.5;
}
.co-media-fallback-sub {
  font-size: 12px;
  color: #9ca3af;
}
.co-manual-link-input {
  width: 100%;
  max-width: 400px;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.co-manual-link-input:focus {
  border-color: var(--primary);
}
.co-manual-link-input::placeholder {
  color: var(--text3);
}

/* CTA Button — "Garantir meu pedido agora" */
.co-btn-finish-cta {
  font-size: 16px !important;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}
.co-btn-finish-cta::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -75%;
  width: 50%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: skewX(-20deg);
  animation: coShimmer 3s ease-in-out infinite;
}
@keyframes coShimmer {
  0% { left: -75%; }
  100% { left: 125%; }
}

/* Media counter "Selecionados: 0/3" */
.co-ig-media-counter {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
  padding: 4px 12px;
  background: rgba(124, 58, 237, 0.08);
  border-radius: 8px;
  display: inline-block;
}
.co-content-link-section {
  transition: all .3s ease;
}
