/* ==========================================================================
   Demo viva "channels-sync" (hero de /canales): el mismo producto en 5 canales.
   Se pone precio de oferta en "Editar Producto", se guarda y el cambio viaja a
   todos los canales; luego una venta en el punto de venta baja el stock en todos.
   Markup: resources/views/web/partials/anim/channels-sync.blade.php
   Estados en la raíz:
     data-sync  precio de oferta publicado (pulsos + precios)   data-sold  stock 12 → 11
     data-cursor puntero visible
   Escena de concepto (piezas claras sobre el fondo del sitio): solo halo y sombra en modo oscuro.
   ========================================================================== */

.lla-ch {
  --lla-text: #1e2022;
  --lla-muted: #677788;
  --lla-border: #e7eaf3;
  --lla-primary: #377dff;
  --lla-ok: #16a34a;
  --lla-brand: #db2777;
  --lla-shadow: 0 24px 48px -20px rgba(22, 34, 58, .35), 0 8px 18px -8px rgba(22, 34, 58, .16);
  --lla-glow: rgba(55, 125, 255, .18);
  --lla-line: #c7d2fe;
  --lla-cursor-fill: #1e2022;
  --lla-cursor-edge: #ffffff;
  --lla-cursor-ring: rgba(55, 125, 255, .55);
}
html[data-theme="dark"] .lla-ch {
  --lla-glow: rgba(77, 159, 255, .16);
  --lla-line: rgba(165, 180, 252, .4);
  --lla-shadow: 0 24px 48px -20px rgba(0, 0, 0, .8), 0 8px 18px -8px rgba(0, 0, 0, .5);
}

.lla-ch { max-width: 720px; margin-inline: auto; color: var(--lla-text); line-height: 1.3; text-align: left; }
.lla .lla-ch__stage { --lla-w: 720; --lla-h: 480; }
.lla-ch :where(b, small, strong, em, i, p, s, label) { margin: 0; font-size: inherit; font-style: normal; font-weight: inherit; color: inherit; }
.lla-ch .bi::before { vertical-align: 0; }
.lla-ch__glow { position: absolute; left: 160px; top: 40px; width: 400px; height: 400px; border-radius: 50%; background: radial-gradient(closest-side, var(--lla-glow), transparent); pointer-events: none; }
.lla-ch__lines { position: absolute; inset: 0; width: 720px; height: 480px; }
.lla-ch__lines path { fill: none; stroke: var(--lla-line); stroke-width: 2; stroke-dasharray: 5 6; }
.lla-ch[data-sync] .lla-ch__lines path { animation: lla-ch-dash 1s linear infinite; }

.lla-ch__pulse { position: absolute; left: 354px; top: 234px; z-index: 1; width: 12px; height: 12px; border-radius: 50%; background: var(--lla-primary); box-shadow: 0 0 0 4px rgba(55, 125, 255, .22); opacity: 0; }
.lla-ch[data-sync] .lla-ch__pulse { animation: lla-ch-flow .9s cubic-bezier(.4, 0, .2, 1) var(--d) both; }

/* ---------- Editar Producto ---------- */
.lla-ch__edit { position: absolute; left: 248px; top: 128px; z-index: 2; width: 224px; overflow: hidden; border: 1px solid var(--lla-border); border-radius: 12px; background: #fff; box-shadow: var(--lla-shadow); }
.lla-ch__edit header { padding: 9px 12px; border-bottom: 1px solid var(--lla-border); font-size: 12.5px; font-weight: 600; }
.lla-ch__ebody { display: flex; flex-direction: column; gap: 4px; padding: 9px 12px 12px; font-size: 11px; }
.lla-ch__ebody label { margin-top: 3px; color: #3e4c5c; font-size: 10px; font-weight: 600; }
.lla-ch__in { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px; border: 1px solid #dfe3ea; border-radius: 6px; font-size: 11px; }
.lla-ch__in > i { font-size: 15px; }
.lla-ch__two { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lla-ch__two > span { display: flex; flex-direction: column; gap: 4px; }
.lla-ch__offer { gap: 0; color: var(--lla-ok); font-weight: 700; }
.lla-ch__offer:not(:empty)::before { content: "$"; }
.lla-ch__offer.is-focus { border-color: rgba(55, 125, 255, .5); box-shadow: 0 0 0 3px rgba(55, 125, 255, .12); }
.lla-ch__offer.is-focus::after { content: ""; width: 1px; height: 13px; margin-left: 1px; background: var(--lla-text); animation: lla-ch-caret 1s steps(1) infinite; }
.lla-ch__save { margin-top: 8px; padding: 7px; border-radius: 6px; background: var(--lla-primary); color: #fff; font-size: 11px; font-weight: 600; text-align: center; transition: transform .15s var(--lla-ease), filter .15s; }
.lla-ch__save.is-pressed, .lla-ch__charge.is-pressed { transform: scale(.95); filter: brightness(.9); }

/* ---------- Canales ---------- */
.lla-ch__tile { position: absolute; z-index: 2; width: 218px; padding: 9px 10px 10px; border: 1px solid var(--lla-border); border-radius: 12px; background: #fff; box-shadow: var(--lla-shadow); font-size: 10.5px; }
.lla-ch__tile--store { left: 10px; top: 26px; }
.lla-ch__tile--social { left: 240px; top: 4px; width: 240px; }
.lla-ch__post em .lla-ch__price s { display: none !important; }
.lla-ch__fixed { font-size: 10px; font-weight: 800; }
.lla-ch__tile--pos { left: 492px; top: 26px; }
.lla-ch__tile--wa { left: 10px; top: 334px; }
.lla-ch__tile--bio { left: 492px; top: 334px; }
.lla-ch__chip { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 7px; padding: 2px 8px; border-radius: 999px; background: rgba(55, 125, 255, .1); color: var(--lla-primary); font-size: 9.5px; font-weight: 700; }
.lla-ch__tile--wa .lla-ch__chip { background: rgba(37, 211, 102, .14); color: #128c7e; }
.lla-ch[data-sync] .lla-ch__tile { animation: lla-ch-hit .6s var(--lla-ease) calc(var(--d) + .75s) both; }

.lla-ch__price { display: inline-flex; align-items: baseline; gap: 4px; }
.lla-ch__price s { display: none; color: var(--lla-muted); font-size: .85em; }
.lla-ch__price b { font-weight: 800; }
.lla-ch__price b + b { display: none; color: var(--lla-ok); }
.lla-ch[data-sync] .lla-ch__price s { display: inline; transition-delay: var(--d); }
.lla-ch[data-sync] .lla-ch__price b:first-of-type { display: none; }
.lla-ch[data-sync] .lla-ch__price b + b { display: inline; }
.lla-ch__stock { color: var(--lla-muted); font-size: .92em; }
.lla-ch__stock em + em, .lla-ch[data-sold] .lla-ch__stock em:first-child { display: none; }
.lla-ch[data-sold] .lla-ch__stock em + em { display: inline; color: var(--lla-brand); font-weight: 700; }

.lla-ch__shop { display: flex; gap: 9px; }
.lla-ch__emo { display: grid; flex: none; place-items: center; width: 52px; height: 52px; border-radius: 10px; background: #fdf2f8; font-size: 28px; }
.lla-ch__shop > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.lla-ch__shop b { font-size: 11.5px; font-weight: 700; }
.lla-ch__post { display: flex; align-items: center; gap: 8px; }
.lla-ch__av { display: grid; flex: none; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--lla-brand); color: #fff; font-size: 9px; font-weight: 800; }
.lla-ch__post > span:last-child { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lla-ch__post b { font-size: 10.5px; font-weight: 700; }
.lla-ch__post em { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: rgba(0, 0, 0, .75); color: #fff; font-size: 9.5px; white-space: nowrap; }
.lla-ch__post em .lla-ch__price b + b { color: #86efac; }
.lla-ch__pos { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lla-ch__ptile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border: 1px solid #eef0f3; border-radius: 8px; text-align: center; }
.lla-ch__ptile i { font-size: 20px; }
.lla-ch__ptile b { overflow: hidden; max-width: 100%; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.lla-ch__ptile--dim { opacity: .6; }
.lla-ch__charge { grid-column: 1 / -1; padding: 6px; border-radius: 7px; background: #16a34a; color: #fff; font-size: 10.5px; font-weight: 700; text-align: center; transition: transform .15s var(--lla-ease), filter .15s; }
.lla-ch__bubble { padding: 7px 9px; border-radius: 9px 2px 9px 9px; background: #d9fdd3; font-size: 10px; }
.lla-ch__bubble p + p { margin-top: 4px !important; }
.lla-ch__bubble strong { font-weight: 700; }
.lla-ch__bio { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.lla-ch__lnk { width: 100%; padding: 5px 8px; border: 1px solid #e5e7eb; border-radius: 999px; font-size: 10px; font-weight: 600; text-align: center; }
.lla-ch__lnk--p { display: flex; align-items: center; justify-content: center; gap: 5px; }

/* ---------- Puntero ---------- */
.lla-ch__cursor { position: absolute; top: 0; left: 0; z-index: 10; width: 22px; height: 22px; pointer-events: none; opacity: 0; transform: translate(360px, 450px); transition: transform .6s var(--lla-ease), opacity .3s var(--lla-ease); }
.lla-ch[data-cursor] .lla-ch__cursor { opacity: 1; }
.lla-ch__cursor svg { position: relative; display: block; width: 22px; height: 22px; fill: var(--lla-cursor-fill); stroke: var(--lla-cursor-edge); stroke-width: 1.4; stroke-linejoin: round; }
.lla-ch__cursor-ring { position: absolute; left: -10px; top: -12px; width: 28px; height: 28px; border: 2px solid var(--lla-cursor-ring); border-radius: 50%; opacity: 0; }
.lla-ch__cursor.is-tap svg { animation: lla-ch-press .3s var(--lla-ease); }
.lla-ch__cursor.is-tap .lla-ch__cursor-ring { animation: lla-ch-ripple .5s var(--lla-ease); }

@media (prefers-reduced-motion: reduce) {
  .lla-ch__lines path { animation: none !important; }
}

@keyframes lla-ch-dash { to { stroke-dashoffset: -22; } }
@keyframes lla-ch-flow {
  0% { opacity: 0; transform: translate(0, 0) scale(.6); }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(1); }
}
@keyframes lla-ch-hit { 0%, 100% { box-shadow: var(--lla-shadow); } 40% { box-shadow: 0 0 0 4px rgba(22, 163, 74, .25), var(--lla-shadow); } }
@keyframes lla-ch-caret { 50% { opacity: 0; } }
@keyframes lla-ch-press { 50% { transform: scale(.85); } }
@keyframes lla-ch-ripple {
  0% { opacity: .9; transform: scale(.4); }
  100% { opacity: 0; transform: scale(1.4); }
}
