/**
 * TuttyCosas Kids — bundle-deferred.css
 * CSS diferido — carga al final de <body> · cart-recovery + checkout-drawer
 * Sprint 6.2 — 2026-06-11
 *
 * IMPORTANTE: No editar directamente.
 * Editar el archivo fuente en public/css/ y regenerar.
 */

/* ================================================================
   cart-recovery.css
   ================================================================ */
/**
 * TuttyCosas Kids — cart-recovery.css
 * Modal de recuperación de carrito abandonado
 * Sprint 2f — v2.9.0
 */

/* ── OVERLAY ── */
.recovery-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;        /* bottom-sheet en mobile */
  justify-content: center;
  animation: recoveryFadeIn 0.25s ease;
}

@media (min-width: 640px) {
  .recovery-modal {
    align-items: center;        /* centrado en desktop */
  }
}

.recovery-modal.recovery-closing {
  animation: recoveryFadeOut 0.3s ease forwards;
}

.recovery-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  cursor: pointer;
}

/* ── CARD ── */
.recovery-card {
  position: relative;
  z-index: 1;
  background: var(--white, #fff);
  border-radius: 20px 20px 0 0;
  padding: 2rem 1.5rem 2.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.18);
  animation: recoverySlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (min-width: 640px) {
  .recovery-card {
    border-radius: 20px;
    margin: 1rem;
    animation: recoveryScaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
}

/* ── CLOSE BUTTON ── */
.recovery-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--stone-light, #f5f5f0);
  border: none;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--stone, #666);
  cursor: pointer;
  transition: background 0.15s;
}
.recovery-close:hover {
  background: var(--stone, #ddd);
}

/* ── HEADER ── */
.recovery-header {
  text-align: center;
  margin-bottom: 1.25rem;
}
.recovery-emoji {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
  animation: recoveryBounce 0.6s 0.3s ease both;
}
.recovery-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink, #1a1a1a);
  margin: 0 0 0.25rem;
}
.recovery-subtitle {
  color: var(--stone, #666);
  font-size: 0.9rem;
  margin: 0;
}

/* ── ITEMS LIST ── */
.recovery-items {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
  background: var(--cream, #faf9f6);
  border-radius: 10px;
  padding: 0.75rem 1rem;
}
.recovery-items li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--ink, #222);
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.recovery-items li:last-child {
  border-bottom: none;
}
.recovery-items li span {
  font-size: 0.78rem;
  color: var(--stone, #888);
  background: var(--white, #fff);
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 2px 6px;
}
.recovery-more {
  font-size: 0.8rem;
  color: var(--stone, #888);
  justify-content: center !important;
}

/* ── TOTAL ── */
.recovery-total {
  text-align: center;
  font-size: 1rem;
  color: var(--stone, #555);
  margin-bottom: 0.5rem;
}
.recovery-total strong {
  color: var(--ink, #1a1a1a);
  font-size: 1.15rem;
}

/* ── SHIPPING MSG ── */
.recovery-shipping {
  text-align: center;
  font-size: 0.82rem;
  color: var(--green, #2d7a4f);
  background: rgba(45,122,79,0.08);
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  margin-bottom: 1.25rem;
}

/* ── WHATSAPP SECTION ── */
.recovery-whatsapp-section {
  margin-bottom: 1rem;
}
.recovery-cta-text {
  font-size: 0.88rem;
  color: var(--stone, #555);
  text-align: center;
  margin: 0 0 0.75rem;
}

/* ── PHONE INPUT ── */
.recovery-phone-row {
  display: flex;
  align-items: center;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  transition: border-color 0.15s;
}
.recovery-phone-row:focus-within {
  border-color: var(--primary, #ff6b6b);
}
.recovery-prefix {
  background: var(--cream, #f5f5f0);
  padding: 0.7rem 0.9rem;
  font-size: 0.95rem;
  color: var(--stone, #666);
  border-right: 2px solid #e0e0e0;
  user-select: none;
  white-space: nowrap;
}
.recovery-phone-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.7rem 0.9rem;
  font-size: 1rem;
  color: var(--ink, #1a1a1a);
  background: transparent;
  letter-spacing: 0.03em;
}
.recovery-phone-input::placeholder {
  color: #bbb;
}
.recovery-phone-input[aria-invalid="true"] {
  background: rgba(255,80,80,0.05);
}

.recovery-disclaimer {
  font-size: 0.75rem;
  color: #bbb;
  text-align: center;
  margin: 0 0 1rem;
}

/* ── BUTTONS ── */
.recovery-btn-primary {
  display: block;
  width: 100%;
  background: #25D366;   /* WhatsApp green */
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-align: center;
  letter-spacing: 0.01em;
}
.recovery-btn-primary:hover {
  background: #1ebe5a;
  transform: translateY(-1px);
}
.recovery-btn-primary:active {
  transform: translateY(0);
}

.recovery-btn-secondary {
  display: block;
  width: 100%;
  background: transparent;
  color: var(--stone, #888);
  border: none;
  padding: 0.65rem 1rem;
  font-size: 0.88rem;
  cursor: pointer;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-top: 0.25rem;
}
.recovery-btn-secondary:hover {
  color: var(--ink, #333);
}

/* ── ANIMATIONS ── */
@keyframes recoveryFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes recoveryFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@keyframes recoverySlideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
@keyframes recoveryScaleIn {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
@keyframes recoveryBounce {
  0%   { transform: scale(0.5) rotate(-10deg); opacity: 0; }
  70%  { transform: scale(1.15) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg);    opacity: 1; }
}
@keyframes recoveryShake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}
.recovery-shake {
  animation: recoveryShake 0.5s ease;
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  .recovery-modal,
  .recovery-card,
  .recovery-emoji {
    animation: none;
  }
  .recovery-modal {
    opacity: 1;
  }
}

/* ================================================================
   checkout-drawer.css
   ================================================================ */
/* ── CHECKOUT DRAWER — TuttyCosas Kids ── */

.co-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0,0,0,.55);
  animation: coFadeIn .2s ease;
}
.co-drawer-overlay.open { display: block; }

.co-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(480px, 100vw);
  height: 100dvh;
  z-index: 9999;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(0,0,0,.18);
  transition: right .3s cubic-bezier(.4,0,.2,1);
}
.co-drawer.open { right: 0; }

/* Header */
.co-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .875rem 1rem;
  border-bottom: 1px solid #f0ede8;
  background: #fff;
  flex-shrink: 0;
}
.co-drawer-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--forest, #2d4a30);
}
.co-drawer-back,
.co-drawer-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--bark, #6b5744);
  padding: .25rem .5rem;
  border-radius: 8px;
  line-height: 1;
}
.co-drawer-back { visibility: hidden; }

/* Progress */
.co-drawer-progress {
  display: flex;
  gap: 4px;
  padding: .6rem 1rem;
  background: #faf8f5;
  border-bottom: 1px solid #f0ede8;
  flex-shrink: 0;
}
.co-dpill {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
  color: #999;
  background: #f0f0f0;
  white-space: nowrap;
  transition: all .2s;
}
.co-dpill.active {
  background: var(--forest, #2d4a30);
  color: #fff;
}

/* Body scrollable */
.co-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  -webkit-overflow-scrolling: touch;
}

/* Resumen inline */
.co-drawer-summary {
  background: #faf8f5;
  border-radius: 12px;
  padding: .875rem 1rem;
  margin-top: 1rem;
}
.co-drawer-summary--compact {
  margin-bottom: .75rem;
}

/* Botones */
.co-btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--forest,#2d4a30), #1a3320);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: .875rem 1.5rem;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
  margin-top: .5rem;
}
.co-btn-primary:hover { opacity: .92; transform: translateY(-1px); }

.co-btn-secondary {
  background: #f5f5f5;
  color: #333;
  border: none;
  border-radius: 12px;
  padding: .75rem 1.2rem;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s;
}
.co-btn-secondary:hover { background: #ebe8e3; }

.co-pay-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--forest,#2d4a30), #1a3320);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  transition: all .2s;
  margin-top: .75rem;
}
.co-pay-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.co-pay-btn:not(:disabled):hover { opacity: .92; transform: translateY(-1px); }

.co-pay-note {
  font-size: .72rem;
  color: #888;
  text-align: center;
  margin-top: .5rem;
  line-height: 1.5;
}

@keyframes coFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Mobile: drawer ocupa pantalla completa */
@media (max-width: 480px) {
  .co-drawer { width: 100vw; }
}

/* Anti-zoom iOS — inputs nunca bajo 16px */
.co-drawer .co-field input,
.co-drawer .co-field select,
.co-drawer .co-coupon input {
  font-size: 16px;
}

.co-field input.error,
.co-field select.error {
  border-color: #e53e3e;
  background: #fff5f5;
}

.co-field-err {
  display: block;
  font-size: .78rem;
  color: #e53e3e;
  font-weight: 600;
  margin-top: 3px;
  min-height: 1rem;
}
/* Footer sticky — botones siempre en zona del pulgar */
.co-drawer-footer {
  flex-shrink: 0;
  padding: .75rem 1rem;
  padding-bottom: calc(.75rem + env(safe-area-inset-bottom));
  border-top: 1px solid #f0ede8;
  background: #fff;
}

.co-drawer-footer .co-btn-primary,
.co-drawer-footer .co-btn-secondary,
.co-drawer-footer .co-pay-btn {
  margin-top: 0;
}

.co-drawer-footer-row {
  display: flex;
  gap: 8px;
}

.co-drawer-footer-row .co-btn-secondary {
  flex: 0 0 auto;
  padding: .875rem 1rem;
}

.co-drawer-footer-row .co-btn-primary {
  flex: 1;
  margin-top: 0;
}
/* Opciones entrega — una sola fila */
.co-delivery-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1.5px solid #e8e4de;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 8px;
}
.co-delivery-opt input[type="radio"] {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: #2d4a30;
  width: 18px;
  height: 18px;
}
.co-delivery-opt-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.co-delivery-opt-content strong {
  font-size: .9rem;
  color: #1a1a1a;
}
.co-delivery-desc {
  font-size: .78rem;
  color: #888;
}
/* Campos dirección — más espacio y altura */
.co-drawer .co-field {
  margin-bottom: 4px;
}

.co-drawer .co-field input,
.co-drawer .co-field select {
  height: 48px;
  padding: 0 16px;
}

.co-drawer .co-field input#coReferencias {
  height: 72px;
  padding: 12px 16px;
}

.co-drawer .co-field label {
  font-size: .82rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 2px;
}
/* Todos los inputs dirección — 100% ancho sin excepción */
.co-drawer .co-fields {
  grid-template-columns: 1fr;
}

.co-drawer .co-field {
  width: 100%;
}

.co-drawer .co-field input,
.co-drawer .co-field select,
.co-drawer .co-field textarea {
  width: 100%;
}
/* Resumen — espaciado entre label y valor */
.co-drawer-summary .co-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 0;
  font-size: .86rem;
  gap: 8px;
}
.co-drawer-summary .co-total-grand {
  font-size: .95rem;
  font-weight: 700;
  border-top: 1px solid #e8e4de;
  margin-top: 6px;
  padding-top: 8px;
}

/* Step 3 — fondo uniforme oculta gap interno del Brick MP */
#coStep3 {
  background: #fafafa;
  margin: -1rem;
  padding: 1rem;
}
