/* Listaviva - editor de catalogo del proveedor (/catalogo). Usa los tokens de app.css (modo oscuro incluido). Sin estilos en linea. */
.ce-empresa { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s3) var(--s4); margin-bottom: var(--s4); }
.ce-empresa .campo { flex: 1 1 260px; max-width: 420px; }
.ce-empresa-uno { margin: 0; font-weight: 700; font-size: 1.1rem; }
.ce-empresa .btn-sec { min-height: 48px; }

.ce-barra { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s3) var(--s4); margin-bottom: var(--s3); }
.ce-buscar { flex: 1 1 260px; max-width: 420px; }
.ce-intro { flex: 1 1 280px; margin: 0; color: var(--mut); max-width: 62ch; }
.ce-cont { margin-bottom: var(--s4); min-height: 1.4em; }
.ce .pestanas { margin-top: var(--s2); }

/* Formularios en linea (producto, oferta) */
.ce-form { background: var(--surf); border: 1px solid var(--line); border-radius: var(--r2); padding: var(--s4); margin-bottom: var(--s5); max-width: 720px; box-shadow: var(--sombra); }
.ce-form h2 { font-size: 1.3rem; margin-bottom: 0; }
.ce-form-chico { max-width: 520px; }
.ce-textarea { min-height: 96px; }
.ce-bloque { margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--line); }
.ce-bloque h2, .ce-bloque h3 { margin-bottom: var(--s2); }
.ce-bloque > p { max-width: 62ch; }

/* Foto del producto */
.ce-foto-fila { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s3) var(--s4); }
.ce-prev { width: 96px; height: 96px; object-fit: cover; border-radius: var(--r1); border: 1px solid var(--line2); background: var(--surf2); flex: none; }
.ce-prev-vacia { display: grid; place-items: center; text-align: center; color: var(--mut); font-size: .85rem; }
.ce-prev[hidden] { display: none; }
.ce-foto-ctrl { display: grid; gap: var(--s3); flex: 1 1 220px; min-width: 0; }
.ce-foto-ctrl input[type=file] { width: 100%; min-height: 48px; font: inherit; color: var(--ink); }
.ce-foto-ctrl .btn-sec { min-height: 44px; justify-self: start; }

/* Lista de productos y ofertas */
.ce-lista { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); }
.ce-item { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--s3) var(--s4); align-items: start; background: var(--surf); border: 1px solid var(--line); border-radius: var(--r2); padding: var(--s3) var(--s4); }
.ce-item.ce-oculto { border-style: dashed; }
.ce-foto { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r1); background: var(--surf2); border: 1px solid var(--line); }
.ce-foto-ph { display: grid; place-items: center; width: 72px; height: 72px; border-radius: var(--r1); background: var(--surf2); border: 1px dashed var(--line2); color: var(--mut); font-size: .75rem; text-align: center; line-height: 1.15; }
.ce-info { min-width: 0; }
.ce-info h3 { margin: 0 0 var(--s1); font-size: 1.05rem; overflow-wrap: anywhere; }
.ce-precio { margin: 0 0 var(--s1); font-weight: 700; font-size: 1.1rem; }
.ce-datos { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); margin: 0; font-size: .92rem; color: var(--mut); }
.ce-datos > div { display: flex; gap: var(--s1); }
.ce-datos dt { font-weight: 600; }
.ce-datos dt::after { content: ":"; }
.ce-datos dd { margin: 0; }
.ce-item .etiqueta { margin-left: var(--s2); vertical-align: middle; }
.ce-item .acciones { grid-column: 1 / -1; }
.ce-item .acciones .btn-sec { min-height: 44px; padding-inline: var(--s4); }
.ce-promo-txt { margin: 0 0 var(--s1); font-weight: 700; }
.ce-item-promo { grid-template-columns: minmax(0, 1fr); }
.ce-vacio { padding: var(--s5); border: 2px dotted var(--line2); border-radius: var(--r2); background: var(--surf); color: var(--mut); text-align: center; }
.ce-vacio p { margin: 0; }
@media (min-width: 720px) {
  .ce-item { grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; }
  .ce-item .acciones { grid-column: auto; flex-wrap: nowrap; }
  .ce-item-promo { grid-template-columns: minmax(0, 1fr) auto; }
}
@media (max-width: 559px) {
  .ce-barra .btn { width: 100%; }
  .ce-item .acciones .btn-sec { flex: 1 1 120px; }
  .ce-empresa .btn-sec { width: 100%; }
}

/* Vista previa de la planilla */
.ce-tabla { border-collapse: collapse; width: 100%; min-width: 40rem; font-size: .92rem; }
.ce-tabla th, .ce-tabla td { border: 1px solid var(--line); padding: var(--s2) var(--s3); text-align: left; vertical-align: top; }
.ce-tabla th { background: var(--surf2); }
.ce-tabla ul { margin: 0; padding-left: var(--s4); }
.ce-fila-error td { background: var(--err-bg); }
.ce-fila-nuevo td:nth-child(2) { font-weight: 700; color: var(--ok); }
.ce-fila-actualiza td:nth-child(2) { font-weight: 700; }
.ce-fila-error td:nth-child(2) { font-weight: 700; color: var(--err); }
.tabla-scroll:focus-visible { outline: 3px solid var(--foco); }
.ce [hidden] { display: none !important; }
