/* ===== Base previa (se mantiene por compatibilidad) ===== */
.edit-modal {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(0,0,0,.45);
  z-index: 9999;
}
.edit-modal-dialog{
  width: 92%;
  max-width: 1200px;
  margin: 3vh auto;
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  position: relative;
}
.edit-close{
  position:absolute;
  top:10px;
  right:12px;
  width:36px;height:36px;
  border:none;border-radius:8px;
  background:#eee; color:#333;
  cursor:pointer;
}
.edit-close:hover{background:#ddd}
.edit-layout{
  display:grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 16px;
  max-height: 64vh;
  overflow:hidden;
}
.edit-col{
  border:2px solid #e6e6e6;
  border-radius:8px;
  background:#fafafa;
  padding:12px;
  overflow-y:auto;
}
.eo-item, .cb-item{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px;
  background:#fff; border:1px solid #eaeaea; border-radius:8px;
  padding:10px; margin-bottom:8px;
  box-shadow:0 1px 2px rgba(0,0,0,.04);
}
.eo-item small{opacity:.7}
.btn, .btn-primary, .edit-save{
  border:none; border-radius:8px; cursor:pointer;
  padding:8px 12px; font-weight:600;
}
.btn-primary{ background:#0d6efd; color:#fff }
.btn-primary:hover{ background:#0a58ca }
.btn-danger{ background:#dc3545; color:#fff }
.btn-danger:hover{ filter:brightness(.95) }
.btn-green{ background:#28a745; color:#fff }
.btn-green:hover{ filter:brightness(.95) }
.eo-qty{ width:60px; text-align:center }
.eo-new{
  border:2px dashed #20c997; background:#f6fffb;
}
.eo-new .badge{ color:#20c997; font-weight:700 }
.eo-group{
  border:2px solid #dedede; border-radius:10px; background:#fff;
  padding:10px; margin-bottom:10px;
}
.eo-group h4{ margin:0 0 8px 0; }
.eo-group ul{ margin:0 0 4px 18px; }
.edit-save{
  width:100%;
  margin-top:10px;
  background:#0d6efd; color:#fff; font-size:16px;
}

/* ====== Builder clásico (se mantiene) ====== */
.edit-modal-dialog.combo{ max-width:1100px }
.combo-layout{
  display:grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap:12px;
  max-height:58vh;
  overflow:hidden;
}
.combo-col{
  border:2px solid #e6e6e6; border-radius:8px; background:#fafafa;
  padding:10px; overflow-y:auto;
}
.combo-footer{
  display:flex; gap:10px; align-items:center; justify-content:flex-end;
  margin-top:10px;
}
.badge{ font-size:12px; background:#eef; padding:2px 6px; border-radius:6px }
.out-btn{ background:#dc3545; color:#fff; border:none; padding:6px 10px; border-radius:6px }

/* =========================================================
   EO 2.0 — Estilo compartido para ambos modales (Editar/Combo)
   ========================================================= */
:root{
  --eo-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.eo-modal-card,
.eo-combo-card{
  width: 96%;
  max-width: 1850px;         /* más alargado horizontalmente */
  margin: 2vh auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--eo-shadow);
  padding: 18px;
  position: relative;
}

.eo-modal-header{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:8px;
}
.eo-modal-title{
  font-size: 22px;
  font-weight: 700;
  color:#1e2a3a;
}
.eo-close{
  width:32px; height:32px; line-height:32px;
  background:#eef2ff; color:#1f2937;
  border:none; border-radius:8px; cursor:pointer;
}
.eo-close:hover{ background:#e2e8f0; }

.eo-grid,
.eo-combo-grid{
  display:grid;
  grid-template-columns: 300px 1fr 520px; /* columnas más anchas */
  gap:16px;
  min-height: 68vh;
}

.eo-panel{
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:12px;
  overflow:auto;
  background:#fff;
}
.eo-panel h3{
  margin:6px 0 12px;
  font-size:16px;
  color:#263248;
}

/* Botón Guardar del modal de edición */
#eo-save-btn{
  display:block; width:100%; margin-top:12px;
  background:#0d6efd; color:#fff; border:none;
  padding:12px; border-radius:10px; font-size:16px; cursor:pointer;
}
#eo-save-btn:hover{ background:#0b5ed7; }

/* Contenedor scrolleable de la derecha (un poco más alto) */
#eo-order-list{
  max-height: calc(88vh - 220px);
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

/* Fila de producto en “Productos Disponibles” */
.product-item{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px;
  border:1px solid #eee; padding:10px; border-radius:8px; margin-bottom:8px;
}
.product-item .eo-meta{
  white-space: nowrap;            /* 1 sola línea */
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-item input[type="number"]{ width:64px; }

.add-product-btn{ background:#28a745; color:#fff; }
.out-of-stock-btn{ background:#dc3545; color:#fff; }

.category-btn{
  display:block; width:100%; margin:8px 0;
  background:#0d6efd; color:#fff; border:none; padding:10px 12px; border-radius:8px; cursor:pointer;
}
.category-btn:hover{ background:#0b5ed7; }

/* Footer del modal de combo */
.eo-footer{
  display:flex; align-items:center; justify-content:flex-end;
  gap:10px; margin-top:12px;
}
.eo-footer input{ width: 90px; }

/* Badges */
.eo-badge{
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  vertical-align:middle;
}
.eo-badge-combo{ background:#e9f7ef; color:#1f7a4d; }

/* Seleccionados en el builder de combo */
#eo-combo-selected .picked{
  display:flex;justify-content:space-between;align-items:center;
  padding:6px 8px;border:1px solid #e5e7eb;border-radius:8px;margin-bottom:6px;
}
#eo-combo-selected .picked .btn{ padding:6px 10px; }
