/* ================= CHECKOUT — base ================= */
.checkout-body{background:var(--color-bg);}

/* ---- Header minimal (sin navegación, para no distraer del pago) ---- */
.co-header{background:var(--color-bg-elevated);border-bottom:1px solid var(--color-border);padding:1.1rem 0;}
.co-header__inner{display:flex;align-items:center;justify-content:space-between;}
.co-header__logo{display:inline-flex;}
.co-header__logo img{height:34px;width:auto;max-width:none;}
.co-header__secure{
  display:inline-flex;align-items:center;gap:.5rem;
  font-family:var(--font-mono);font-size:var(--text-xs);
  text-transform:uppercase;letter-spacing:.1em;color:var(--color-secondary);font-weight:600;
}
.co-header__secure svg{width:16px;height:16px;flex-shrink:0;}

/* ---- Layout ---- */
.co-main{padding:3rem 0 5rem;}
.co-layout{display:grid;grid-template-columns:0.85fr 1.15fr;gap:2.6rem;align-items:start;}

/* ---- Resumen del pedido ---- */
.co-summary{position:sticky;top:2rem;}
.co-summary__toggle{
  display:none;width:100%;align-items:center;gap:.7rem;
  background:var(--color-bg-elevated);border:1px solid var(--color-border);border-radius:1.2rem;
  padding:1rem 1.2rem;font-family:var(--font-body);font-weight:700;font-size:var(--text-sm);color:var(--color-text);cursor:pointer;
}
.co-summary__toggle-label{display:flex;align-items:center;gap:.6rem;flex:1;text-align:left;}
.co-summary__toggle-label svg{width:20px;height:20px;color:var(--color-secondary);flex-shrink:0;}
.co-summary__toggle-price{font-family:var(--font-mono);color:var(--color-rojo);font-weight:800;}
.co-summary__toggle-chevron{width:18px;height:18px;transition:transform .3s ease;flex-shrink:0;}
.co-summary__toggle[aria-expanded="true"] .co-summary__toggle-chevron{transform:rotate(180deg);}

.co-summary__body{
  display:grid;gap:1.4rem;background:var(--color-bg-elevated);border:1px solid var(--color-border);
  border-radius:1.6rem;padding:1.6rem;box-shadow:0 12px 36px -24px rgba(43,36,24,0.4);
}

.co-product{display:flex;gap:1rem;align-items:center;padding-bottom:1.4rem;border-bottom:1px solid var(--color-border);}
.co-product__img{
  position:relative;width:72px;height:72px;flex-shrink:0;border-radius:1rem;overflow:hidden;
  background:rgba(var(--color-secondary-rgb),0.06);border:1px solid var(--color-border);
  display:flex;align-items:center;justify-content:center;
}
.co-product__img img{width:100%;height:100%;object-fit:contain;}
.co-product__qty{
  position:absolute;top:-6px;right:-6px;width:20px;height:20px;border-radius:50%;
  background:var(--color-secondary);color:#fff;font-size:.65rem;font-weight:800;
  display:grid;place-items:center;border:2px solid var(--color-bg-elevated);
}
.co-product__info{flex:1;}
.co-product__name{font-size:var(--text-sm);}
.co-product__name strong{font-family:var(--font-display);font-weight:700;}
.co-product__sub{font-size:var(--text-xs);color:var(--color-text-muted);margin-top:.2rem;}
.co-product__price{font-family:var(--font-mono);font-size:var(--text-sm);color:var(--color-text-muted);white-space:nowrap;}

.co-bonos{padding-bottom:1.4rem;border-bottom:1px solid var(--color-border);}
.co-bonos__title{font-family:var(--font-mono);font-size:var(--text-xs);text-transform:uppercase;letter-spacing:.1em;color:var(--color-secondary);font-weight:700;margin-bottom:.9rem;}
.co-bonos__list{list-style:none;display:grid;gap:.8rem;}
.co-bonos__list li{display:flex;align-items:center;gap:.8rem;}
.co-bonos__list img{
  width:40px;height:40px;border-radius:.7rem;object-fit:contain;flex-shrink:0;
  background:rgba(var(--color-secondary-rgb),0.06);border:1px solid var(--color-border);
}
.co-bonos__list>li>div{flex:1;display:flex;flex-direction:column;min-width:0;}
.co-bonos__name{font-size:var(--text-sm);font-weight:700;}
.co-bonos__note{font-size:var(--text-xs);color:var(--color-text-muted);}
.co-bonos__free{font-family:var(--font-mono);font-size:var(--text-xs);font-weight:700;color:var(--color-secondary);text-transform:uppercase;white-space:nowrap;}

.co-totals{padding-bottom:1.4rem;border-bottom:1px solid var(--color-border);display:grid;gap:.55rem;}
.co-totals__row{display:flex;justify-content:space-between;font-size:var(--text-sm);color:var(--color-text-muted);}
.co-totals__row s{font-family:var(--font-mono);}
.co-totals__row--discount span:last-child{color:var(--color-secondary);font-weight:700;}
.co-totals__row--total{padding-top:.6rem;border-top:1px dashed var(--color-border);font-size:var(--text-base);color:var(--color-text);}
.co-totals__row--total strong{font-family:var(--font-display);font-size:var(--text-xl);color:var(--color-rojo);font-weight:800;}
.co-totals__note{font-size:var(--text-xs);color:var(--color-text-muted);text-align:right;}

.co-guarantee{display:flex;gap:1rem;align-items:center;}
.co-guarantee img{width:52px;height:52px;object-fit:contain;flex-shrink:0;}
.co-guarantee__title{font-size:var(--text-sm);font-weight:800;margin-bottom:.15rem;}
.co-guarantee__text{font-size:var(--text-xs);color:var(--color-text-muted);}

/* ---- Formulario ---- */
.co-form{
  background:var(--color-bg-elevated);border:1px solid var(--color-border);border-radius:2rem;
  padding:2.4rem;box-shadow:0 12px 36px -24px rgba(43,36,24,0.4);display:grid;gap:1.7rem;
}

.co-fieldset{border:none;padding:0;display:grid;gap:.9rem;}
.co-fieldset__legend{display:flex;align-items:center;gap:.7rem;font-family:var(--font-display);font-size:var(--text-lg);font-weight:700;margin-bottom:.2rem;padding:0;}
.co-fieldset__num{
  width:28px;height:28px;border-radius:50%;color:#fff;font-family:var(--font-mono);font-size:.8rem;font-weight:800;
  display:grid;place-items:center;flex-shrink:0;background:linear-gradient(135deg,var(--color-rojo),var(--color-primary));
}

.co-fields-row{display:grid;gap:.8rem;}
.co-fields-row--2{grid-template-columns:1fr 1fr;}

.co-field{display:grid;gap:.4rem;}
.co-label{font-size:var(--text-sm);font-weight:700;display:flex;align-items:center;gap:.4rem;}
.co-input{
  width:100%;padding:.85rem 1rem;border-radius:.9rem;border:1px solid var(--color-border);
  background:var(--color-bg);color:var(--color-text);font-family:var(--font-body);font-size:var(--text-base);
  transition:border-color .3s ease,box-shadow .3s ease;
}
.co-input::placeholder{color:var(--color-text-muted);opacity:.65;}
.co-input:focus{outline:none;border-color:var(--color-secondary);box-shadow:0 0 0 3px rgba(var(--color-secondary-rgb),0.18);}
.co-input--uppercase{text-transform:uppercase;}

.co-input-wrap{
  display:flex;align-items:center;width:100%;border-radius:.9rem;border:1px solid var(--color-border);
  background:var(--color-bg);transition:border-color .3s ease,box-shadow .3s ease;
}
.co-input-wrap:focus-within{border-color:var(--color-secondary);box-shadow:0 0 0 3px rgba(var(--color-secondary-rgb),0.18);}
.co-stripe-element{flex:1;padding:.95rem 1rem;min-width:0;}

.co-field__hint{font-size:var(--text-xs);color:var(--color-text-muted);}
.co-field__error{font-size:var(--text-xs);color:var(--color-rojo);}
.co-field__error:empty{display:none;}

.co-card-icons{display:flex;gap:.4rem;padding-right:.9rem;flex-shrink:0;}
.co-card-icon{width:30px;height:20px;border-radius:3px;opacity:.25;filter:grayscale(1);transition:opacity .3s ease,filter .3s ease;}
.co-card-icon--active{opacity:1;filter:none;}

.co-cvv-help{background:none;border:none;color:var(--color-text-muted);cursor:pointer;display:inline-flex;padding:0;line-height:0;}
.co-cvv-help svg{width:16px;height:16px;}
.co-cvv-tooltip{
  font-size:var(--text-xs);color:var(--color-text-muted);background:rgba(var(--color-secondary-rgb),0.08);
  border:1px solid var(--color-border);padding:.6rem .8rem;border-radius:.6rem;margin-top:-.1rem;
}

/* ---- Submit ---- */
.co-submit{display:grid;gap:1rem;}
.co-submit__btn{width:100%;}
.co-submit__spinner{width:18px;height:18px;animation:coSpin .8s linear infinite;}
.co-submit__spinner[hidden]{display:none;}
@keyframes coSpin{to{transform:rotate(360deg);}}
.btn-primary:disabled{opacity:.65;cursor:not-allowed;transform:none !important;}

.co-form-error{
  display:flex;gap:.6rem;align-items:flex-start;font-size:var(--text-sm);color:var(--color-rojo);
  background:rgba(var(--color-rojo-rgb),0.08);border:1px solid rgba(var(--color-rojo-rgb),0.25);
  border-radius:.8rem;padding:.8rem 1rem;
}
.co-form-error svg{width:18px;height:18px;flex-shrink:0;}
.co-form-error[hidden]{display:none;}

.co-trust-row{
  display:flex;flex-wrap:wrap;gap:1.2rem;justify-content:center;
  font-family:var(--font-mono);font-size:var(--text-xs);text-transform:uppercase;letter-spacing:.1em;color:var(--color-text-muted);
}
.co-trust-row span{display:inline-flex;align-items:center;gap:.4rem;}
.co-trust-row svg{width:15px;height:15px;color:var(--color-secondary);}

.co-cards-row{display:flex;align-items:center;justify-content:center;gap:.6rem;}
.co-cards-row svg{width:34px;height:22px;border-radius:3px;}
.co-cards-row__ssl{display:inline-flex;align-items:center;gap:.3rem;font-family:var(--font-mono);font-size:.65rem;color:var(--color-text-muted);}
.co-cards-row__ssl svg{width:14px;height:14px;}

/* ---- Footer minimal ---- */
.co-footer{padding:2.4rem 0 3rem;}
.co-footer__legal{max-width:760px;margin:0 auto 1rem;text-align:center;font-size:var(--text-xs);color:var(--color-text-muted);line-height:1.6;}
.co-footer__legal a{color:var(--color-secondary);}
.co-footer__copy{text-align:center;font-size:var(--text-xs);color:var(--color-text-muted);font-family:var(--font-mono);}

/* ================= RESPONSIVE ================= */
@media(max-width:980px){
  .co-layout{grid-template-columns:1fr;gap:1.4rem;}
  .co-summary{position:static;}
  .co-summary__toggle{display:flex;}
  .co-summary__body{display:none;}
  .co-summary__body.is-open{display:grid;}
}
@media(max-width:768px){
  .co-main{padding:1.6rem 0 3.5rem;}
  .co-form{padding:1.6rem;}
  .co-header__secure{font-size:.6rem;}
}
@media(max-width:560px){
  .co-fields-row--2{grid-template-columns:1fr;}
}
