/* ============================================
   CARRITO - ESTILOS
   ============================================ */

/* Panel lateral */
.carrito-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 8000;
}
.carrito-overlay.active { display: block; }

.carrito-panel {
  position: fixed;
  top: 0;
  right: -440px;
  width: 440px;
  max-width: 100vw;
  height: 100%;
  background: #fff;
  z-index: 8001;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -8px 0 40px rgba(0,0,0,0.2);
}
.carrito-panel.open { right: 0; }

.carrito-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #eee;
  background: #0A0A0A;
}
.carrito-header h3 {
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.carrito-header h3 i { color: var(--color-secondary, #D4890A); }
.btn-cerrar-carrito {
  background: rgba(255,255,255,0.08);
  border: none;
  color: rgba(255,255,255,0.6);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}
.btn-cerrar-carrito:hover { background: rgba(255,255,255,0.15); color: #fff; }

.carrito-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

.carrito-vacio {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #bbb;
  text-align: center;
  gap: 12px;
}
.carrito-vacio i { font-size: 48px; color: #ddd; }
.carrito-vacio p { font-size: 15px; }

.carrito-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}
.carrito-item:last-child { border-bottom: none; }

.ci-img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #1a0a00;
}
.ci-img img { width: 100%; height: 100%; object-fit: cover; }
.ci-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #D4890A;
  font-size: 22px;
}

.ci-info { flex: 1; min-width: 0; }
.ci-nombre { font-size: 13px; font-weight: 600; color: #1a1a1a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-precio { font-size: 12px; color: #888; margin-top: 2px; }

.ci-qty {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f5f5f5;
  border-radius: 20px;
  padding: 4px 8px;
}
.ci-qty span { font-size: 14px; font-weight: 700; min-width: 20px; text-align: center; }
.qty-btn {
  background: none;
  border: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}
.qty-btn:hover { background: var(--color-primary, #E8650A); color: #fff; }

.ci-subtotal { font-size: 14px; font-weight: 700; color: #1a1a1a; min-width: 60px; text-align: right; }

.ci-del {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  transition: 0.2s;
}
.ci-del:hover { color: #e53935; }

.carrito-footer {
  padding: 16px 24px 24px;
  border-top: 1px solid #eee;
  background: #fafafa;
}
.carrito-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.carrito-total-row span { font-size: 14px; color: #666; }
.carrito-total-row strong { font-family: 'Playfair Display', serif; font-size: 24px; color: #0A0A0A; }

.btn-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px;
  background: var(--color-primary, #E8650A);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.btn-checkout:hover { background: #c9540a; }

.btn-vaciar {
  display: block;
  width: 100%;
  padding: 9px;
  background: none;
  border: 1px solid #ddd;
  border-radius: 8px;
  color: #888;
  font-size: 12px;
  cursor: pointer;
  margin-top: 8px;
  transition: 0.2s;
}
.btn-vaciar:hover { border-color: #e53935; color: #e53935; }

/* Boton abrir carrito en header */
.btn-carrito {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}
.btn-carrito:hover { background: rgba(255,255,255,0.14); }
.carrito-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--color-primary, #E8650A);
  color: white;
  font-size: 10px;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
}

/* Modal producto */
.producto-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.producto-modal-overlay.active { display: flex; }

.producto-modal {
  background: #fff;
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.3);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

.pm-img {
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #1a0a00, #3d2000);
  position: relative;
  overflow: hidden;
}
.pm-img img { width: 100%; height: 100%; object-fit: cover; }
.pm-img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 80px; color: #D4890A; }
.pm-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.5);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pm-body { padding: 24px; }
.pm-categoria { font-size: 11px; font-weight: 700; color: var(--color-secondary, #D4890A); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 6px; }
.pm-nombre { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 800; color: #0A0A0A; margin-bottom: 10px; }
.pm-desc { font-size: 14px; color: #666; line-height: 1.6; margin-bottom: 14px; }
.pm-specs { display: flex; gap: 8px; margin-bottom: 20px; }
.pm-spec { background: #f0f0f0; font-size: 11px; font-weight: 600; color: #555; padding: 4px 10px; border-radius: 4px; }

.pm-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
}
.pm-precio { font-family: 'Playfair Display', serif; font-size: 26px; font-weight: 800; color: #0A0A0A; }
.pm-precio small { font-size: 13px; font-weight: 400; color: #999; }

.pm-qty-wrap { display: flex; align-items: center; gap: 12px; }
.pm-qty { display: flex; align-items: center; gap: 8px; background: #f0f0f0; border-radius: 20px; padding: 6px 12px; }
.pm-qty span { font-size: 16px; font-weight: 700; min-width: 28px; text-align: center; }

.btn-agregar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-primary, #E8650A);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}
.btn-agregar:hover { background: #c9540a; transform: translateY(-1px); }

/* Checkout modal */
.checkout-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 9500;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.checkout-overlay.active { display: flex; }

.checkout-modal {
  background: #fff;
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  margin: auto;
  overflow: hidden;
  animation: modalIn 0.25s ease;
}
.checkout-header {
  background: #0A0A0A;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.checkout-header h3 { color: #fff; font-family: 'Playfair Display', serif; font-size: 18px; }
.checkout-body { padding: 24px; }

.checkout-step { display: none; }
.checkout-step.active { display: block; }

.pago-metodo-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.pago-opcion {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 2px solid #eee;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s;
  background: #fff;
}
.pago-opcion:hover { border-color: var(--color-primary, #E8650A); }
.pago-opcion.selected { border-color: var(--color-primary, #E8650A); background: rgba(232,101,10,0.05); }
.pago-opcion input[type="radio"] { display: none; }
.pago-icono { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; flex-shrink: 0; }
.pago-icono.yape { background: #7b2d8b; color: #fff; }
.pago-icono.plin { background: #00aaff; color: #fff; }
.pago-icono.transf { background: #1a6b3c; color: #fff; font-size: 18px; }
.pago-opcion-info h4 { font-size: 15px; font-weight: 700; color: #1a1a1a; }
.pago-opcion-info p { font-size: 12px; color: #999; margin-top: 2px; }

.datos-pago-box {
  background: #f5f5f5;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}
.datos-pago-box h4 { font-size: 13px; font-weight: 700; color: #333; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px; }
.dato-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #ebebeb; font-size: 13px; }
.dato-row:last-child { border-bottom: none; }
.dato-row span:first-child { color: #888; }
.dato-row span:last-child { font-weight: 700; color: #1a1a1a; font-family: monospace; }

.resumen-items { margin-bottom: 16px; }
.resumen-item { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; border-bottom: 1px solid #f5f5f5; }
.resumen-total { display: flex; justify-content: space-between; padding: 12px 0 0; font-weight: 700; font-size: 16px; border-top: 2px solid #eee; margin-top: 4px; }

.upload-captura {
  border: 2px dashed #ddd;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: 0.2s;
  margin-bottom: 14px;
}
.upload-captura:hover { border-color: var(--color-primary, #E8650A); background: rgba(232,101,10,0.03); }
.upload-captura i { font-size: 28px; color: #ccc; margin-bottom: 8px; }
.upload-captura p { font-size: 13px; color: #999; }
.upload-captura.has-file { border-color: #2e7d32; background: #e8f5e9; }
.upload-captura.has-file i, .upload-captura.has-file p { color: #2e7d32; }
#input-captura { display: none; }

.checkout-form-group { margin-bottom: 14px; }
.checkout-form-group label { display: block; font-size: 11px; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.checkout-form-group input { width: 100%; padding: 11px 14px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; font-family: inherit; }
.checkout-form-group input:focus { outline: none; border-color: var(--color-primary, #E8650A); }

.btn-siguiente {
  width: 100%;
  padding: 14px;
  background: var(--color-primary, #E8650A);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.btn-siguiente:hover { background: #c9540a; }
.btn-siguiente:disabled { background: #ccc; cursor: not-allowed; }

.btn-volver {
  width: 100%;
  padding: 10px;
  background: none;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 13px;
  color: #888;
  cursor: pointer;
  margin-top: 8px;
}
.btn-volver:hover { background: #f5f5f5; }

.step-indicator {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
}
.step-dot {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: #eee;
  transition: 0.3s;
}
.step-dot.done { background: var(--color-primary, #E8650A); }

.btn-wa-enviar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px;
  background: #25D366;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}
.btn-wa-enviar:hover { background: #1ebe5d; }

/* Toast */
.mc-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1a1a1a;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  z-index: 99999;
  opacity: 0;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 8px;
}
.mc-toast i { color: #4CAF50; }
.mc-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 768px) {
  .carrito-panel { width: 100%; right: -100%; }
  .pm-footer { flex-wrap: wrap; gap: 12px; }
}

/* ── VARIACIONES DE PRODUCTO ── */
#pm-variaciones-wrap {
  padding: 0 24px 16px;
}
.var-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.var-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 16px;
  border: 2px solid #eee;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  transition: 0.2s;
  gap: 3px;
  min-width: 80px;
}
.var-btn span {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary, #E8650A);
}
.var-btn:hover {
  border-color: var(--color-primary, #E8650A);
  color: var(--color-primary, #E8650A);
}
.var-btn.active {
  border-color: var(--color-primary, #E8650A);
  background: rgba(232,101,10,0.06);
  color: var(--color-primary, #E8650A);
}
