/* =========================================================
   iFody — Checkout · Mobile-First
   Reaproveita .crumb e .checkout-steps de styles-cart.css
   Prefixo .co- para evitar colisões.
   ========================================================= */

body.has-co-sticky {
  padding-bottom: calc(var(--bottombar-h) + 72px + var(--safe-bottom));
}
@media (min-width: 980px) {
  body.has-co-sticky { padding-bottom: 0; }
}

.checkout-page { padding: 20px 0 40px; }
@media (min-width: 980px) { .checkout-page { padding: 32px 0 80px; } }

.co-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
@media (min-width: 980px) {
  .co-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 40px;
    align-items: start;
  }
}

.co-form-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

/* ============================================
   STEPS (1 step visivel por vez)
   ============================================ */
.co-step {
  display: none;
  flex-direction: column;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
}
@media (min-width: 720px) { .co-step { padding: 28px; } }
.co-step.is-active { display: flex; }

.co-step__head { margin-bottom: 4px; }
.co-step__title {
  font-weight: 800;
  font-size: clamp(22px, 3.5vw, 28px);
  letter-spacing: -.025em;
  line-height: 1.15;
  margin-bottom: 6px;
}
.co-step__sub {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.5;
}

.co-step__cta {
  width: 100%;
  margin-top: 4px;
}

/* Stepper buttons (clickable to navigate back) */
.checkout-steps .cstep {
  border: 0;
  background: none;
  cursor: pointer;
}
.checkout-steps .cstep:disabled { cursor: default; opacity: .5; }

/* Step navigation buttons */
.co-nav {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.co-nav .btn { flex: 1; min-width: 140px; }
.co-nav [data-prev] { flex: 0 1 auto; }

/* ============================================
   STEP 1: AUTH (tabs Login/Cadastro)
   ============================================ */
.co-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 8px;
}
.co-auth-tab {
  padding: 11px 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .25s var(--ease);
}
.co-auth-tab--on {
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
}

.co-auth-panel { display: none; flex-direction: column; gap: 16px; }
.co-auth-panel--on { display: flex; }

/* Botao social */
.btn-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 22px;
  background: white;
  color: #2A1A35;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid rgba(0, 0, 0, .12);
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn-social:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}
.btn-social svg { flex-shrink: 0; }

.co-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
}
.co-divider::before,
.co-divider::after {
  content: '';
  height: 1px;
  background: var(--line);
}

/* Senha com toggle */
.co-pw-input { position: relative; display: block; }
.co-pw-input input {
  width: 100%;
  padding-right: 44px;
}
.co-pw-toggle {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text-3);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.co-pw-toggle:hover { color: var(--text); }

.co-field__hint {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 2px;
}

/* Password strength meter — usado em /entrar/ (signup-form) e em
   /checkout/ (form-login painel signup). Reside aqui porque
   styles-checkout.css é carregado nos dois contextos. */
.auth-pw-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.auth-pw-strength__bar {
  flex: 1;
  height: 4px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.auth-pw-strength__fill {
  height: 100%;
  width: 0;
  background: var(--pink);
  border-radius: 999px;
  transition: width .25s var(--ease), background .25s var(--ease);
}
.auth-pw-strength__label {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
}
.auth-pw-strength[data-level="weak"] .auth-pw-strength__fill { width: 25%; background: #FF4D5C; }
.auth-pw-strength[data-level="weak"] .auth-pw-strength__label { color: #FF4D5C; }
.auth-pw-strength[data-level="weak"] .auth-pw-strength__label::after { content: ' fraca'; }
.auth-pw-strength[data-level="medium"] .auth-pw-strength__fill { width: 55%; background: var(--yellow); }
.auth-pw-strength[data-level="medium"] .auth-pw-strength__label { color: var(--yellow); }
.auth-pw-strength[data-level="medium"] .auth-pw-strength__label::after { content: ' média'; }
.auth-pw-strength[data-level="strong"] .auth-pw-strength__fill { width: 85%; background: #00C48C; }
.auth-pw-strength[data-level="strong"] .auth-pw-strength__label { color: #00C48C; }
.auth-pw-strength[data-level="strong"] .auth-pw-strength__label::after { content: ' forte'; }
.auth-pw-strength[data-level="excellent"] .auth-pw-strength__fill { width: 100%; background: #00C48C; }
.auth-pw-strength[data-level="excellent"] .auth-pw-strength__label { color: #00C48C; }
.auth-pw-strength[data-level="excellent"] .auth-pw-strength__label::after { content: ' excelente'; }

.co-auth-extras {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.co-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--pink-light);
}
.co-link:hover { color: var(--pink); }

/* ============================================
   STEP 2: CEP / ENDERECO
   ============================================ */
.co-cep-box {
  background: var(--bg);
  border: 1.5px dashed var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
}
.co-cep-box__field { display: flex; flex-direction: column; gap: 8px; }
.co-cep-row {
  display: flex;
  gap: 8px;
}
.co-cep-row input {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  letter-spacing: .04em;
  outline: none;
  transition: border-color .2s var(--ease);
}
.co-cep-row input:focus { border-color: var(--pink); }
.co-cep-row .btn { padding: 12px 18px; min-height: auto; flex-shrink: 0; }
.co-cep-help { align-self: flex-end; }

/* ============================================
   ENDEREÇOS SALVOS (Casa/Entrega) — seletor no topo do step Entrega.
   Cada card carrega o payload em data-addr (JSON), JS preenche o form e
   recalcula frete on click. Cores espelham `.acc-address` da minha conta,
   ajustadas pro contexto do checkout (mais compacto, com badge de check).
   ============================================ */
.co-saved-addrs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
}
.co-saved-addrs__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.co-saved-addrs__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 640px) {
  .co-saved-addrs__list { grid-template-columns: repeat(2, 1fr); }
}
.co-saved-addr {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  text-align: left;
  font-family: inherit;
  color: var(--text-2);
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.co-saved-addr:hover { border-color: var(--text-3); }
.co-saved-addr.is-selected {
  border-color: var(--pink);
  background: rgba(255, 61, 138, .06);
}
.co-saved-addr__tag {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 3px 9px;
  background: var(--bg);
  border-radius: 999px;
  color: var(--text-2);
  margin-bottom: 4px;
}
.co-saved-addr.is-selected .co-saved-addr__tag {
  background: var(--grad-primary);
  color: #fff;
}
.co-saved-addr__line {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  padding-right: 28px; /* não passa por baixo do check badge */
}
.co-saved-addr__sub {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.4;
}
.co-saved-addr__ref {
  font-size: 11px;
  font-style: italic;
  color: var(--text-3);
  margin-top: 2px;
}
.co-saved-addr__check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.co-saved-addr.is-selected .co-saved-addr__check {
  background: var(--pink);
  border-color: var(--pink);
  color: #fff;
}
.co-saved-addr--new {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: 1.5px dashed var(--line);
  color: var(--text-3);
  font-weight: 600;
  min-height: 70px;
}
.co-saved-addr--new:hover { border-color: var(--pink); color: var(--pink); }

.co-address-found { display: flex; flex-direction: column; gap: 16px; }
.co-address-found[hidden] { display: none; }

.co-address-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  min-width: 0;
}
.co-address-card--found {
  border-color: rgba(0, 196, 140, .35);
  background: rgba(0, 196, 140, .04);
}
.co-address-card__icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.co-address-card__icon .i3d { width: 30px; height: 30px; }
.co-address-card__body { min-width: 0; }
.co-address-card__body strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #00C48C;
  margin-bottom: 4px;
}
.co-address-card__line {
  display: block;
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
}
.co-address-card__line em {
  font-style: normal;
  color: var(--text-2);
}

/* Shipping options dentro do step 2 */
.co-shipping { margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.co-shipping__title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 12px;
}

/* ============================================
   SECTIONS (accordion via <details>)
   ============================================ */
.co-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color .25s var(--ease);
}
.co-section--active { border-color: rgba(255, 61, 138, .35); }

.co-section__head {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 12px;
  user-select: none;
}
.co-section__head::-webkit-details-marker { display: none; }
@media (min-width: 720px) {
  .co-section__head { padding: 20px 22px; }
}

.co-section__num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--line);
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.co-section--active .co-section__num {
  background: var(--grad-primary);
  border-color: transparent;
  color: white;
  box-shadow: 0 0 0 4px rgba(255, 61, 138, .15);
}
.co-section--done .co-section__num {
  background: rgba(0, 196, 140, .15);
  border-color: rgba(0, 196, 140, .5);
  color: #00C48C;
}
.co-section--done .co-section__num::before {
  content: '✓';
  font-size: 14px;
}
.co-section--done .co-section__num > * { display: none; }

.co-section__title-wrap { min-width: 0; }
.co-section__title {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.005em;
  line-height: 1.2;
}
@media (min-width: 720px) { .co-section__title { font-size: 17px; } }
.co-section__sub {
  display: block;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (min-width: 720px) { .co-section__sub { white-space: normal; } }

.co-section__action {
  font-size: 12px;
  font-weight: 600;
  color: var(--pink-light);
  flex-shrink: 0;
}
.co-section--done .co-section__action { display: inline; }
.co-section:not(.co-section--done) .co-section__action { display: none; }

.co-section__body {
  padding: 0 18px 20px;
  border-top: 1px solid var(--line-soft);
  padding-top: 16px;
}
@media (min-width: 720px) {
  .co-section__body { padding: 18px 22px 24px; }
}

/* ============================================
   FORMS
   ============================================ */
.co-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 600px) {
  .co-fields {
    grid-template-columns: repeat(2, 1fr);
  }
  .co-field--full { grid-column: 1 / -1; }
  .co-field--cep { grid-column: 1 / -1; }
}

.co-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.co-field__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: .02em;
}
.co-field__label em {
  font-style: normal;
  color: var(--text-3);
  font-weight: 400;
}
.co-field input,
.co-field select,
.co-select {
  padding: 13px 16px;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .2s var(--ease);
  width: 100%;
  min-width: 0;
}
.co-field input:focus,
.co-field select:focus,
.co-select:focus { border-color: var(--pink); }
.co-field input:disabled { opacity: .6; cursor: not-allowed; }
.co-field input::placeholder { color: var(--text-3); }

.co-cep-input { display: flex; flex-direction: column; gap: 6px; }
.co-cep-help {
  font-size: 12px;
  font-weight: 600;
  color: var(--pink-light);
  align-self: flex-end;
}

.co-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.45;
}
.co-toggle input { accent-color: var(--pink); width: 18px; height: 18px; margin-top: 1px; flex-shrink: 0; }
.co-toggle a { color: var(--pink-light); font-weight: 600; }
.co-toggle--big { font-size: 14px; }

/* ============================================
   RADIOS (frete/cartão)
   ============================================ */
.co-radios {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.co-radios--inline { flex-direction: row; flex-wrap: wrap; }

.co-radio {
  display: grid;
  grid-template-columns: auto 40px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease);
  min-width: 0;
}
.co-radio:hover { border-color: var(--text-3); }
.co-radio input { accent-color: var(--pink); width: 18px; height: 18px; }
.co-radio:has(input:checked) {
  border-color: var(--pink);
  background: rgba(255, 61, 138, .06);
}
.co-radio--best {
  border-color: rgba(255, 61, 138, .35);
}

.co-radio__icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.co-radio__icon .i3d { width: 28px; height: 28px; }

.co-radio__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.co-radio__body strong {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}
.co-radio__body span {
  font-size: 11px;
  color: var(--text-3);
}
.co-radio__tag {
  font-style: normal;
  display: inline-block;
  margin-top: 4px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 3px 7px;
  background: var(--grad-primary);
  color: white;
  border-radius: 999px;
  align-self: flex-start;
}
.co-radio__tag--free {
  background: rgba(0, 196, 140, .18);
  color: #00C48C;
}
.co-radio__price {
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.co-radio--inline {
  display: inline-flex;
  align-items: center;
  grid-template-columns: none;
  gap: 8px;
  padding: 10px 14px;
}
.co-radio--inline span { font-size: 13px; }

/* ============================================
   PAGAMENTO: tabs
   ============================================ */
.co-pay-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}
.co-pay-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  cursor: pointer;
  transition: all .2s var(--ease);
  font-family: inherit;
  color: var(--text-2);
}
@media (min-width: 600px) {
  .co-pay-tab {
    flex-direction: row;
    text-align: left;
    padding: 14px 18px;
  }
}
.co-pay-tab:hover { border-color: var(--text-3); }
.co-pay-tab--on {
  border-color: var(--pink);
  background: rgba(255, 61, 138, .06);
  color: var(--text);
}
.co-pay-tab__icon {
  width: 42px; height: 28px;
  background: white;
  border-radius: 6px;
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.co-pay-tab__icon img { max-width: 100%; max-height: 100%; object-fit: contain; }
.co-pay-tab strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
}
.co-pay-tab__off {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: .04em;
}
.co-pay-tab--on .co-pay-tab__off { color: var(--pink-light); }

.co-pay-panel { display: none; }
.co-pay-panel--on { display: block; }
.co-pay-panel__note {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, .25);
  border-radius: var(--r);
  font-size: 12px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.5;
}
.co-pay-panel__note .i3d { width: 22px; height: 22px; flex-shrink: 0; }

/* PIX panel */
.co-pix {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}
@media (min-width: 600px) {
  .co-pix {
    flex-direction: row;
    align-items: flex-start;
    gap: 28px;
  }
}
.co-pix__qr {
  position: relative;
  width: 180px;
  height: 180px;
  background: white;
  border-radius: var(--r);
  padding: 14px;
  flex-shrink: 0;
}
.co-pix__qr-grid {
  width: 100%; height: 100%;
  background-image:
    repeating-linear-gradient(0deg, #0F0A1A 0 4px, transparent 4px 8px),
    repeating-linear-gradient(90deg, #0F0A1A 0 4px, transparent 4px 8px);
  mask-image: radial-gradient(circle, black 0%, black 70%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle, black 0%, black 70%, transparent 100%);
  border-radius: 4px;
}
.co-pix__qr-logo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.co-pix__qr-logo img {
  width: 50px; height: 50px;
  background: white;
  padding: 6px;
  border-radius: 8px;
  object-fit: contain;
}

.co-pix__info { min-width: 0; flex: 1; }
.co-pix__info h3 {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
  margin: 8px 0 10px;
}
.co-pix__info h3 strong {
  background: linear-gradient(135deg, #00C48C, #00A876);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}
.co-pix__info p {
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 14px;
}
.co-pix__perks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.co-pix__perks li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
}
.co-pix__perks li strong { color: #00C48C; font-weight: 700; }
.dotg {
  width: 6px; height: 6px;
  background: #00C48C;
  border-radius: 50%;
  flex-shrink: 0;
}

/* CARTÃO panel */
.co-card-input {
  position: relative;
  display: block;
}
.co-card-input input {
  width: 100%;
  padding-right: 110px;
}
.co-card-brands {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 4px;
}
.co-card-brands img {
  width: 28px;
  height: 18px;
  background: white;
  border-radius: 3px;
  padding: 1px;
  object-fit: contain;
}

.co-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238A7B9F' stroke-width='2'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

/* ============================================
   FINALIZAR
   ============================================ */
.co-finalize {
  margin-top: 8px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(255, 61, 138, .08) 0%, rgba(139, 60, 255, .08) 100%);
  border: 1px solid rgba(255, 61, 138, .25);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
@media (min-width: 720px) { .co-finalize { padding: 24px; } }
.co-finalize__cta {
  width: 100%;
  font-size: 14px;
  line-height: 1.2;
}
.co-finalize__cta .i3d { width: 18px; height: 18px; }
.co-finalize__note {
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
  line-height: 1.55;
}

/* ============================================
   RESUMO LATERAL
   ============================================ */
.co-summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (min-width: 980px) {
  .co-summary {
    position: sticky;
    top: calc(var(--header-h) + 16px);
    padding: 24px;
  }
}
.co-summary__title {
  font-weight: 700;
  font-size: 16px;
}

.co-summary__items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.co-summary-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.co-summary-item__img {
  width: 56px; height: 56px;
  border-radius: 10px;
  background-color: var(--bg);
  background-size: cover;
  background-position: center;
  position: relative;
  flex-shrink: 0;
}
.co-summary-item__qty {
  position: absolute;
  top: -6px; right: -6px;
  width: 20px; height: 20px;
  background: var(--text);
  color: var(--bg);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--surface);
}
.co-summary-item__body { min-width: 0; }
.co-summary-item__name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 2px;
}
.co-summary-item__variant {
  font-size: 10px;
  color: var(--text-3);
}
.co-summary-item__price {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.co-summary__edit {
  font-size: 12px;
  color: var(--pink-light);
  font-weight: 600;
}

.co-summary__lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.co-summary__line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-2);
}
.co-summary__line strong { color: var(--text); font-weight: 700; }
.co-summary__line--discount { color: var(--gold); }
.co-summary__line--discount strong { color: var(--gold); }

.co-summary__total {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.co-summary__total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.co-summary__total-row span { font-size: 13px; color: var(--text-2); }
.pix-tag { color: #00C48C !important; font-weight: 700; }
.co-summary__total-pix {
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -.02em;
  background: linear-gradient(135deg, #00C48C, #00A876);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.co-summary__total-alt {
  font-size: 11px;
  color: var(--text-3);
}

.co-summary__trust {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.co-summary__trust li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--text-2);
}
.co-summary__trust .i3d { width: 22px; height: 22px; flex-shrink: 0; }

/* ============================================
   MOBILE STICKY
   ============================================ */
.co-mobile-sticky {
  position: fixed;
  bottom: calc(var(--bottombar-h) + var(--safe-bottom));
  left: 0; right: 0;
  background: rgba(15, 10, 26, .98);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 80;
}
@media (min-width: 980px) { .co-mobile-sticky { display: none; } }
.co-mobile-sticky > div {
  display: flex;
  flex-direction: column;
}
.co-mobile-sticky span {
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: .04em;
}
.co-mobile-sticky strong {
  font-weight: 800;
  font-size: 18px;
  background: linear-gradient(135deg, #00C48C, #00A876);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.co-mobile-sticky .btn { flex: 1; }

/* Stepper line "done" */
.cstep__line--done { background: rgba(0, 196, 140, .5); }

/* =========================================================
   STEP 3 — Payment methods (markup nativo WC com visual de cards)
   ========================================================= */
.co-payment {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.co-payment .wc_payment_methods {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.co-payment__empty {
  background: rgba(255, 80, 80, .08);
  border: 1px solid rgba(255, 80, 80, .3);
  border-radius: var(--r);
  padding: 14px 16px;
  color: var(--text-2);
  font-size: 14px;
}

/* Cada método = card clicável. O radio nativo fica acessível mas
   visualmente escondido — UI fica clean. */
.co-pm {
  position: relative;
  display: block;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  transition: border-color .2s var(--ease), background .2s var(--ease);
  overflow: hidden;
}
.co-pm:hover { border-color: var(--text-3); }
.co-pm--on {
  border-color: var(--pink);
  background: rgba(255, 61, 138, .04);
  box-shadow: 0 0 0 3px rgba(255, 61, 138, .12);
}

.co-pm > input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.co-pm > label {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

.co-pm__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.co-pm__icon img { max-width: 26px; max-height: 26px; }
.co-pm__icon svg { display: block; }

.co-pm__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.co-pm__title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.co-pm__hint {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
}

.co-pm__badge {
  padding: 4px 10px;
  background: rgba(0, 196, 140, .14);
  border: 1px solid rgba(0, 196, 140, .35);
  border-radius: 999px;
  color: #00C48C;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  flex-shrink: 0;
}

/* `.payment_box` é onde o gateway renderiza os fields próprios
   (CPF, doc_type, card form do MP, etc.). Estilizamos pra ficar consistente. */
.co-pm__fields,
.co-payment .payment_box {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}
.co-pm__fields > *:first-child,
.co-payment .payment_box > *:first-child { margin-top: 0; }
.co-pm__fields > *:last-child,
.co-payment .payment_box > *:last-child { margin-bottom: 0; }
.co-pm__fields p,
.co-payment .payment_box p { margin: 0 0 8px; }
.co-pm__fields input[type="text"],
.co-pm__fields input[type="email"],
.co-pm__fields input[type="tel"],
.co-pm__fields select,
.co-payment .payment_box input[type="text"],
.co-payment .payment_box input[type="email"],
.co-payment .payment_box input[type="tel"],
.co-payment .payment_box select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .2s var(--ease);
}
.co-pm__fields input:focus,
.co-pm__fields select:focus,
.co-payment .payment_box input:focus,
.co-payment .payment_box select:focus { border-color: var(--pink); }
.co-pm__fields label,
.co-payment .payment_box label {
  display: block;
  font-size: 12px;
  color: var(--text-2);
  font-weight: 600;
  margin: 8px 0 4px;
}
.co-pm__fields .form-row,
.co-payment .payment_box .form-row {
  margin: 0 0 12px;
  padding: 0;
}
.co-pm__fields .form-row:last-child,
.co-payment .payment_box .form-row:last-child { margin-bottom: 0; }

/* MP plugin renderiza mensagens/banners — corta excesso de margin/padding */
.co-pm__fields .mp-checkout-pix-text,
.co-pm__fields .mp-checkout-text,
.co-payment .payment_box .mp-checkout-text {
  font-size: 13px;
  color: var(--text-2);
  margin: 0 0 10px;
}

/* Pickup payment (`ifody_pickup_payment`) renderiza `payment_fields()` com
   inline styles hardcoded (background-white, border-cinza) que destoam do
   tema escuro. Forçamos override aqui — usamos `!important` porque o gateway
   coloca os estilos como atributo style do elemento. */
.co-payment .ifody-pickup-payment-fields {
  margin-top: 0 !important;
}
.co-payment .ifody-pickup-payment-fields > div {
  background: var(--bg) !important;
  border-radius: 8px !important;
}
.co-payment .ifody-pickup-payment-fields p {
  color: var(--text) !important;
}
.co-payment .ifody-pickup-payment-fields ul li {
  background: var(--surface) !important;
  color: var(--text) !important;
}
.co-payment .ifody-pickup-payment-fields select,
.co-payment .ifody-pickup-payment-fields .input-select {
  background: var(--bg) !important;
  border: 1px solid var(--line) !important;
  color: var(--text) !important;
  border-radius: 8px !important;
}
.co-payment .ifody-pickup-payment-fields label {
  color: var(--text) !important;
}
.co-payment .ifody-pickup-payment-fields #ifody_cash_change_wrapper {
  background: rgba(255, 152, 0, .08) !important;
  border-left-color: #FF9800 !important;
}
.co-payment .ifody-pickup-payment-fields #ifody_cash_change_wrapper label,
.co-payment .ifody-pickup-payment-fields #ifody_change_preview {
  color: var(--text) !important;
  background: var(--bg) !important;
}

/* =========================================================
   TOAST inline (validação dos steps, erros leves)
   ========================================================= */
.co-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(160%);
  background: #FF5050;
  color: white;
  padding: 14px 22px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
  z-index: 9999;
  transition: transform .35s var(--ease);
  max-width: calc(100% - 32px);
  text-align: center;
  pointer-events: none;
}
.co-toast.is-on { transform: translateX(-50%) translateY(0); }
.co-toast[data-type="info"]    { background: var(--text); color: var(--bg); }
.co-toast[data-type="success"] { background: #00C48C; }
@media (max-width: 720px) {
  .co-toast { bottom: calc(var(--bottombar-h, 0px) + 16px); }
}

/* =========================================================
   PAY FOR ORDER (/checkout/order-pay/{id}/)
   ========================================================= */
.checkout-page--order-pay .co-step { display: flex; }

.checkout-page--order-pay .co-summary__items {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.checkout-page--order-pay .co-summary__item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}
.checkout-page--order-pay .co-summary__item-thumb img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.checkout-page--order-pay .co-summary__item-body strong {
  display: block;
  font-weight: 600;
  line-height: 1.3;
}
.checkout-page--order-pay .co-summary__item-body span { color: var(--text-3); }
.checkout-page--order-pay .co-summary__item-price { color: var(--text); font-weight: 700; }

/* =========================================================
   THANK YOU PAGE (/checkout/order-received/{id}/)
   ========================================================= */
.ty-page {
  padding: 32px 0 80px;
}
@media (max-width: 720px) {
  .ty-page { padding: 20px 0 60px; }
}

.ty-container {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* HERO ============================== */
.ty-hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
@media (min-width: 720px) { .ty-hero { padding: 44px 32px; } }

.ty-hero__icon {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  background: rgba(255, 61, 138, .08);
  border: 1px solid rgba(255, 61, 138, .15);
}
.ty-hero__icon .i3d {
  width: 56px;
  height: 56px;
}

.ty-hero--success .ty-hero__icon {
  background: rgba(0, 196, 140, .1);
  border-color: rgba(0, 196, 140, .25);
}
.ty-hero--failed .ty-hero__icon {
  background: rgba(255, 80, 80, .1);
  border-color: rgba(255, 80, 80, .3);
  color: #FF5050;
}
.ty-hero--failed .ty-hero__icon svg { color: #FF5050; }

.ty-hero__title {
  font-weight: 800;
  font-size: clamp(22px, 3.5vw, 30px);
  letter-spacing: -.025em;
  line-height: 1.2;
  margin: 4px 0 0;
}
.ty-hero__sub {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.5;
  max-width: 520px;
}

.ty-hero__status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 16px;
  background: rgba(255, 61, 138, .08);
  border: 1px solid rgba(255, 61, 138, .2);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-2);
}
.ty-hero__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pink);
  animation: ty-pulse 1.5s ease-in-out infinite;
}
@keyframes ty-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.85); }
}

/* Kicker variants */
.kicker--green {
  background: rgba(0, 196, 140, .14);
  border-color: rgba(0, 196, 140, .3);
  color: #00C48C;
}
.kicker--red {
  background: rgba(255, 80, 80, .14);
  border-color: rgba(255, 80, 80, .3);
  color: #FF5050;
}

/* CARDS ============================== */
.ty-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
}
@media (min-width: 720px) { .ty-card { padding: 28px; } }

.ty-card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.ty-card__title {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -.01em;
  margin: 0 0 8px;
}
.ty-card__hint {
  color: var(--text-3);
  font-size: 13px;
  margin: 8px 0 0;
}

/* PIX gateway card — o MP plugin injeta o QR/copia-cola aqui. O HTML do
   MP vem com CSS própria que é light-theme (fundo branco, texto dark). Em
   vez de tentar dark-themar o markup do MP (frágil — mudaria a cada update
   do plugin), apresentamos como "card branco destacado" dentro do nosso
   dark theme. Headers/titulos do MP herdam cor escura naturalmente.       */
.ty-card--gateway {
  padding: 0;
  overflow: hidden;
}
.ty-card--gateway > * {
  background: #FFFFFF;
  color: #1A1A2E;
}
.ty-card--gateway > .ty-pix-tips {
  background: var(--surface);
  color: var(--text-2);
  padding: 18px 24px 22px;
}
.ty-card--gateway > .ty-pix-tips p,
.ty-card--gateway > .ty-pix-tips strong,
.ty-card--gateway > .ty-pix-tips li {
  color: var(--text-2);
}
.ty-card--gateway > .ty-pix-tips ol li strong { color: var(--text); }

/* Garante que título/textos do MP sejam legíveis no fundo branco. O
   plugin não seta cor explícita em alguns h2/h3 — herdaria nosso var(--text)
   (claro), invisível em fundo branco. */
.ty-card--gateway h1,
.ty-card--gateway h2,
.ty-card--gateway h3,
.ty-card--gateway h4,
.ty-card--gateway p,
.ty-card--gateway span:not([class*="mp-button"]):not([class*="badge"]),
.ty-card--gateway li,
.ty-card--gateway strong {
  color: #1A1A2E;
}
.ty-card--gateway a { color: #00C48C; }

.ty-card--gateway img {
  max-width: 100%;
  height: auto;
  display: block;
}
.ty-card--gateway .mp-pix-thankyou,
.ty-card--gateway .mp_pix_qr_code {
  max-width: 100%;
}

.ty-pix-tips ol {
  list-style: decimal;
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.6;
}
.ty-pix-tips ol li { margin-bottom: 4px; }

/* Timeline ============================== */
.ty-card--timeline .ty-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}
.ty-card--timeline .ty-timeline::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line);
  border-radius: 1px;
}
.ty-timeline__item {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}
.ty-timeline__dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--surface);
  flex-shrink: 0;
}
.ty-timeline__item--done .ty-timeline__dot {
  background: #00C48C;
  border-color: #00C48C;
  box-shadow: 0 0 0 4px rgba(0, 196, 140, .15);
}
.ty-timeline__item--current .ty-timeline__dot {
  background: var(--grad-primary);
  border-color: transparent;
  box-shadow: 0 0 0 4px rgba(255, 61, 138, .15);
  animation: ty-pulse 1.6s ease-in-out infinite;
}
.ty-timeline__item strong {
  font-weight: 600;
  color: var(--text-2);
  font-size: 14px;
}
.ty-timeline__item--done strong,
.ty-timeline__item--current strong {
  color: var(--text);
}

/* Retry card ============================== */
.ty-card--retry {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}
@media (min-width: 720px) {
  .ty-card--retry { flex-direction: row; justify-content: center; }
  .ty-card--retry .btn { min-width: 200px; }
}

/* Summary ============================== */
.ty-summary__items {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}
.ty-summary__item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
}
.ty-summary__item-thumb img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.ty-summary__item-body strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.ty-summary__item-body span {
  font-size: 12px;
  color: var(--text-3);
}
.ty-summary__item-price {
  font-size: 13px;
  font-weight: 700;
}
.ty-summary__lines {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ty-summary__lines li {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-2);
}
.ty-summary__lines li strong { color: var(--text); font-weight: 700; }
.ty-summary__pix {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(0, 196, 140, .08);
  border: 1px solid rgba(0, 196, 140, .25);
  border-radius: var(--r);
  margin-top: 8px;
  font-size: 14px;
}
.ty-summary__pix strong {
  font-weight: 800;
  font-size: 18px;
  background: linear-gradient(135deg, #00C48C, #00A876);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Info card (endereço + pagamento) ============================== */
.ty-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 720px) {
  .ty-info-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}
.ty-info-grid p {
  margin: 0 0 4px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.5;
}
.ty-info-grid p strong { color: var(--text); }

/* CTAs row ============================== */
.ty-cta-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
@media (min-width: 720px) {
  .ty-cta-row { flex-direction: row; justify-content: center; }
  .ty-cta-row .btn { min-width: 200px; }
}
