/* POS web · Línea, catálogo avanzado y restaurante (pos-lineas.js). Ventanas compactas como las de Windows: filas de una línea, botones de 38 px, sin franjas de color.
   Todo con prefijo pl- para no chocar con los demás módulos. Responsivo: en celular las filas pasan a dos líneas y los botones ocupan el ancho. */

/* ---------- ticket: insignias de promoción dentro de la línea ---------- */
.lin-fila .nom.pl-nom { display: flex; align-items: center; gap: 6px; }
.lin-fila .nom .pl-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: inherit; flex: 0 1 auto; }
.pl-chip { flex: none; font-style: normal; font-size: 10.5px; font-weight: 800; line-height: 1; padding: 3px 6px; border-radius: 4px; background: var(--exito-suave); color: var(--exito); white-space: nowrap; }
.pl-chip.vol { background: color-mix(in srgb, var(--primario) 24%, transparent); color: var(--aviso); }
.pl-chip.pie { background: var(--superficie2); color: var(--suave); }
.celular .lin-fila .nom.pl-nom { display: block; }
.celular .pl-chip { display: inline-block; margin-left: 4px; vertical-align: 1px; }
/* ---------- catálogo: insignia en la esquina de la tarjeta y en los resultados ---------- */
.pl-insig { position: absolute; top: 4px; right: 4px; z-index: 1; background: #d8372a; color: #fff; font-size: 10.5px; font-weight: 800; line-height: 1; padding: 3px 6px; border-radius: 4px; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); white-space: nowrap; }
.pl-insig.sm { position: static; display: inline-block; margin-right: 6px; padding: 2px 5px; font-size: 10px; vertical-align: 1px; box-shadow: none; }

/* ---------- piezas comunes de las ventanas ---------- */
.pl-prod { display: flex; flex-direction: column; margin-bottom: 4px; }
.pl-prod b { font-size: 16px; overflow-wrap: anywhere; }
.pl-prod small, .pl-datos small { color: var(--suave); font-size: 12px; }
.pl-sup { color: var(--aviso); font-weight: 700; font-size: 10.5px; }
.pl-grande { font-size: 24px; min-height: 52px; text-align: right; font-weight: 700; }
.pl-teclas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 8px; }
.pl-teclas .btn { min-height: 52px; font-size: 22px; font-weight: 500; padding: 0; }
.pl-vista { min-height: 1.3em; margin-top: 6px; color: var(--exito); font-weight: 600; }
.pl-nota { color: var(--suave); font-size: 12px; padding: 6px 2px 0; }
.pl-series { resize: vertical; min-height: 64px; padding: 8px 12px; font-family: var(--mono); }
.pl-chk { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-weight: 600; }
.pl-chk input { width: 18px; height: 18px; }
.pl-ren { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.pl-res { min-height: 1.4em; margin-top: 10px; font-weight: 600; color: var(--exito); }
.pl-res.mal { color: var(--peligro); }
select.campo { appearance: auto; }

/* filas de una línea (precios, existencias, lotes) */
.pl-sec { margin: 10px 0 2px; padding: 0 2px 3px; font-size: 11.5px; font-weight: 800; letter-spacing: .3px; color: var(--primario); border-bottom: 2px solid var(--btn); }
.pl-fila { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 34px; padding: 0 4px; border-bottom: 1px solid var(--borde); }
.pl-fila span { min-width: 0; overflow-wrap: anywhere; }
.pl-fila.suave { color: var(--suave); }
.pl-fila b.mal, .pl-ex.mal { color: var(--peligro); }

/* ---------- ficha de consulta ---------- */
.pl-coinc { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0; max-height: 82px; overflow-y: auto; }
.pl-coinc .btn { min-height: 30px; padding: 0 10px; font-size: 13px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-ficha { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; margin-top: 10px; align-items: start; }
.pl-foto { width: 104px; height: 104px; border-radius: 6px; background: #d6e4ff; display: grid; place-items: center; overflow: hidden; color: #33445c; font-size: 36px; font-weight: 600; }
.pl-foto img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.pl-datos { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.pl-nombre { font-size: 17px; overflow-wrap: anywhere; }
.pl-et { margin-top: 6px; font-size: 10.5px; font-weight: 800; color: var(--suave); letter-spacing: .4px; }
.pl-precio { font-size: 30px; font-weight: 700; color: var(--primario); line-height: 1.1; }
.pl-ex { margin-top: 4px; font-weight: 700; }
.pl-prom { margin-top: 8px; padding: 6px 10px; background: var(--exito-suave); color: var(--exito); border-radius: 6px; font-weight: 600; font-size: 13px; }
.pl-acc { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pl-acc .btn { min-height: 34px; padding: 0 12px; font-size: 13px; }

/* ---------- variantes (tallas y colores) ---------- */
.pl-vars { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; margin-top: 8px; }
.pl-var { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; padding: 4px 6px; text-align: center; }
.pl-var b { font-size: 15px; } .pl-var small { font-size: 11px; font-weight: 400; color: var(--suave); }
.pl-var.agotada { opacity: .45; }

/* ---------- mesas y cuenta separada ---------- */
.pl-ahora { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; margin-bottom: 8px; background: var(--exito-suave); color: var(--exito); border-radius: 6px; flex-wrap: wrap; }
.pl-mesa { border: 1px solid var(--btn); border-radius: 7px; margin-bottom: 6px; background: var(--superficie2); }
.pl-mesa-cab { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 12px; min-height: 46px; }
.pl-mesa-cab b { font-size: 15px; }
.pl-libre { color: var(--suave); font-size: 12px; }
.pl-cta { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 22px; min-height: 44px; border-top: 1px solid var(--borde); background: var(--superficie); }
.pl-cta small { color: var(--suave); }
.pl-mesa .btn, .pl-ahora .btn { min-height: 34px; padding: 0 12px; }
.pl-sep { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; min-height: 40px; padding: 0 6px; border-bottom: 1px solid var(--borde); cursor: pointer; }
.pl-sep input { width: 18px; height: 18px; }
.pl-sep span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-sep small { color: var(--suave); }

/* ---------- celular y reloj ---------- */
.celular .pl-cta, .celular .pl-mesa-cab { flex-wrap: wrap; row-gap: 2px; padding-left: 10px; }
.celular .pl-ficha { grid-template-columns: 76px minmax(0, 1fr); gap: 8px; }
.celular .pl-foto { width: 76px; height: 76px; font-size: 28px; }
.celular .pl-precio { font-size: 26px; }
.celular .pl-ren { grid-template-columns: minmax(0, 1fr); }
.celular .pl-sep { grid-template-columns: 22px minmax(0, 1fr) auto; } .celular .pl-sep small { display: none; }
.celular .pl-vars { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
@media (max-width: 300px) { .pl-acc .btn, .pl-coinc .btn { flex: 1 1 100%; } .pl-fila { flex-wrap: wrap; gap: 0 8px; } }
