/* CHECKOUT */
.checkout-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cart-item:last-child { border-bottom: none; }

.pay-option {
  display: flex; gap: 14px; align-items: center;
  padding: 14px; border: 1.5px solid var(--border); border-radius: var(--radius);
  margin-bottom: 8px; cursor: pointer; transition: all 0.15s;
}
.pay-option:hover { background: var(--bg-2); }
.pay-option.active { border-color: var(--ink); background: rgba(11,37,69,0.04); }
.pay-option input { width: 18px; height: 18px; accent-color: var(--ink); }
.pay-option-body { flex: 1; }

.checkout-summary { position: sticky; top: 90px; }
.sum-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.sum-total { padding-top: 14px; margin-top: 6px; border-top: 1px solid var(--border); font-size: 17px; font-weight: 700; }

/* MODAL SHELL para checkouts */
.modal-shell {
  min-height: 100vh; padding: 40px 20px;
  background: linear-gradient(180deg, rgba(11,37,69,0.65), rgba(11,37,69,0.85));
  display: flex; align-items: flex-start; justify-content: center;
}

/* Mercado Pago window */
.mp-window {
  background: var(--surface); border-radius: var(--radius-xl);
  width: 100%; max-width: 460px; box-shadow: var(--shadow-lg);
  overflow: hidden; margin-top: 40px;
}
.mp-head { padding: 16px 22px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: linear-gradient(180deg, #FFF8E0, #FFFCE8); }
.mp-body { padding: 28px; }

/* ── OXXO window ─────────────────────────────────────────────── */
.oxxo-window {
  background: var(--surface); border-radius: var(--radius-xl);
  width: 100%; max-width: 500px; box-shadow: var(--shadow-lg);
  overflow: hidden; margin-top: 40px;
}
.oxxo-head {
  padding: 14px 22px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  background: #FFF1F1;
}
.oxxo-body { padding: 24px 28px; }

/* Sólo visible al imprimir */
.oxxo-print-header {
  display: none;
  align-items: center; gap: 14px;
  padding-bottom: 14px; margin-bottom: 16px;
  border-bottom: 2px solid #E50000;
}

.oxxo-amount {
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 18px; background: var(--bg-2); border-radius: var(--radius);
  margin-bottom: 14px; text-align: center;
}
.oxxo-amount > span {
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 2px;
}
.oxxo-amount strong {
  font-family: 'Fraunces', serif; font-size: 34px; font-weight: 700; line-height: 1.1;
}

.oxxo-ref {
  padding: 14px; border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius); margin-bottom: 12px;
}

.oxxo-items {
  background: var(--bg-2); border-radius: var(--radius);
  padding: 10px 13px; margin-bottom: 12px;
}
.oxxo-items-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--muted); margin-bottom: 6px;
}
.oxxo-item-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; padding: 4px 0; border-bottom: 1px solid var(--border);
}
.oxxo-item-row:last-child { border-bottom: none; }

/* Pasos numerados */
.oxxo-steps-list {
  margin: 0 0 16px 0; padding-left: 20px;
  font-size: 13px; line-height: 1.6; color: var(--ink-soft);
}
.oxxo-step { margin-bottom: 4px; }

.oxxo-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.oxxo-actions .btn { flex: 1; min-width: 110px; }

/* ── Impresión ────────────────────────────────────────────────── */
@media print {
  body, html { background: white !important; }

  /* Ocultar todo excepto la ficha */
  body > *:not(#root) { display: none !important; }
  header, nav, footer, .tweaks-panel { display: none !important; }

  /* Fondo de la shell transparente */
  .oxxo-print-bg { background: none !important; padding: 0 !important; min-height: unset !important; }
  .oxxo-window { box-shadow: none !important; margin: 0 !important; max-width: 100% !important; border-radius: 0 !important; }
  .oxxo-head { display: none !important; }
  .oxxo-body { padding: 16px !important; }

  /* Mostrar cabecera de impresión */
  .oxxo-print-header { display: flex !important; }

  /* Ocultar botones y elementos de navegación */
  .no-print { display: none !important; }

  /* Ajustes de tamaño para hoja */
  .oxxo-amount strong { font-size: 32px !important; }
  .oxxo-step { background: #f5f5f5 !important; }
  .oxxo-step-num { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .oxxo-ref { border-color: #999 !important; }
}

/* ESTADO CIRCLE */
.estado-circle {
  width: 96px; height: 96px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; font-weight: 700; color: #fff;
  margin: 0 auto;
}
.estado-confirmado { background: var(--green); box-shadow: 0 12px 32px rgba(21,128,61,0.3); }
.estado-pendiente { background: var(--amber); position: relative; }
.estado-spin {
  display: block; width: 44px; height: 44px;
  border: 4px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 999px;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Tablets landscape */
@media (max-width: 880px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-summary { position: static; }
}

/* Tablets portrait + teléfonos grandes */
@media (max-width: 640px) {
  .modal-shell { padding: 16px 12px; align-items: flex-start; }

  .mp-window, .oxxo-window {
    max-width: 100%;
    margin-top: 16px;
    border-radius: var(--radius-lg);
  }
  .mp-body, .oxxo-body { padding: 20px 16px; }

  .oxxo-amount strong { font-size: 30px; }
  .oxxo-actions { flex-direction: column; gap: 8px; }
  .oxxo-body { padding: 20px 16px; }

  .estado-circle { width: 80px; height: 80px; font-size: 36px; }
}

/* Teléfonos pequeños */
@media (max-width: 480px) {
  .modal-shell { padding: 12px; }
  .mp-body, .oxxo-body { padding: 16px 14px; }
  .oxxo-amount strong { font-size: 26px; }
  .estado-circle { width: 68px; height: 68px; font-size: 30px; }
  .pay-option { padding: 12px; gap: 10px; }
  .checkout-summary { position: static; }
}
