/* ═══ Páginas de producto con el molde del CRM (nov. 2026) ═══
   Gestión de tienda y ERP gastronómico usan las mismas piezas que el CRM
   (oco2.css + js/historia.js: .chero, .story, .punch, .behind, .psteps, .pclose).
   Aquí va solo lo propio de cada una: el gancho, las pantallas del teléfono, las
   maquetas de «Por dentro» y la sección que hace distinto a cada producto.
   js/producto.js le pone .in a cada [data-in] y maneja el video del caso. */

.chero--wide { grid-template-columns: 1.05fr .95fr; }
.o2-title .tn-bad, .o2-title .ln--key em { color: var(--warm); text-shadow: 0 0 40px rgba(255,138,91,.25); }

/* ══ Gancho de la tienda: el cuaderno contra el sistema ══ */
.ledger { position: relative; max-width: 470px; width: 100%; margin-bottom: 120px; }
.ledger__paper { position: relative; padding: 26px 26px 22px 54px; border-radius: 6px; background: #E9E2CF; color: #2b2a24; box-shadow: 0 40px 80px rgba(0,0,0,.55); transform: rotate(-3deg); background-image: repeating-linear-gradient(180deg, transparent 0 33px, rgba(60,90,140,.22) 33px 34px); }
.ledger__paper::before { content: ""; position: absolute; top: 0; bottom: 0; left: 38px; width: 2px; background: rgba(200,70,60,.45); }
.ledger__paper h4 { font: 700 .82rem var(--display); letter-spacing: .08em; text-transform: uppercase; color: #6b6553; margin-bottom: 8px; line-height: 34px; }
.ledger__row { display: flex; justify-content: space-between; align-items: center; height: 34px; font: 500 1.08rem var(--body); opacity: 0; animation: o2-up .5s var(--ease) forwards; }
.ledger__row:nth-of-type(1) { animation-delay: .6s; } .ledger__row:nth-of-type(2) { animation-delay: .8s; } .ledger__row:nth-of-type(3) { animation-delay: 1s; }
.ledger__row b { font: 700 1.2rem var(--display); position: relative; }
.ledger__row--bad b::after { content: ""; position: absolute; left: -6px; right: -6px; top: 50%; height: 3px; border-radius: 3px; background: #d4553f; transform: scaleX(0); transform-origin: left; animation: tn-strike .5s var(--ease) 2.6s forwards; }
@keyframes tn-strike { to { transform: scaleX(1); } }
.ledger__scan { position: absolute; left: 0; right: 0; height: 70px; top: 0; background: linear-gradient(180deg, transparent, rgba(45,202,140,.35), transparent); mix-blend-mode: multiply; opacity: 0; animation: tn-scan 1.4s var(--ease) 1.4s forwards; pointer-events: none; }
@keyframes tn-scan { 0% { top: -20%; opacity: 1; } 100% { top: 100%; opacity: 0; } }
.ledger__sys { position: absolute; right: -24px; top: calc(100% - 46px); width: min(300px, 78%); padding: 16px 18px; border-radius: 18px; background: rgba(13,30,25,.96); border: 1px solid var(--line-hi); box-shadow: 0 30px 70px rgba(0,0,0,.6), 0 0 40px rgba(45,202,140,.12); opacity: 0; transform: translateY(20px) scale(.92); animation: tn-pop .7s var(--pop) 3.1s forwards; }
@keyframes tn-pop { to { opacity: 1; transform: none; } }
.ledger__sys small { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.ledger__sys p { margin: 0; font-weight: 600; }
.ledger__sys ul { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; font-size: .88rem; color: var(--dim); }
.ledger__sys li { display: flex; justify-content: space-between; }
.ledger__sys li b { color: var(--text); font-family: var(--display); }
.ledger__sys li.tot { padding-top: 6px; border-top: 1px solid var(--line); color: var(--text); }
.ledger__sys li.tot b { color: var(--accent-2); }

/* ══ Gancho del ERP: el ticket que se imprime con su costo ══ */
.ticket { position: relative; width: min(360px, 86vw); margin-bottom: 190px; }
.ticket__paper { position: relative; padding: 24px 24px 30px; background: #F1EEE6; color: #23221d; border-radius: 4px 4px 0 0; box-shadow: 0 40px 80px rgba(0,0,0,.55); font: 500 .92rem var(--body); transform: rotate(2deg); transform-origin: top center; clip-path: inset(0 0 100% 0); animation: tk-print 1.6s steps(14) .5s forwards; }
.ticket__paper::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; background: linear-gradient(-45deg, transparent 6px, #F1EEE6 0) 0 0 / 14px 10px, linear-gradient(45deg, transparent 6px, #F1EEE6 0) 0 0 / 14px 10px; }
@keyframes tk-print { to { clip-path: inset(0 0 -12px 0); } }
.ticket__paper h4 { text-align: center; font: 700 .78rem var(--display); letter-spacing: .14em; color: #77725f; margin-bottom: 14px; }
.ticket__line { display: flex; justify-content: space-between; padding: 4px 0; }
.ticket__line--big { font: 700 1.15rem var(--display); padding: 10px 0; border-top: 1px dashed #b9b3a0; border-bottom: 1px dashed #b9b3a0; margin-bottom: 10px; }
.ticket__line small { color: #77725f; }
.ticket__cost { position: absolute; left: -34px; right: 34px; top: 74%; padding: 16px 18px; border-radius: 18px; background: rgba(13,30,25,.96); border: 1px solid var(--line-hi); box-shadow: 0 30px 70px rgba(0,0,0,.6), 0 0 40px rgba(45,202,140,.12); opacity: 0; transform: translateY(20px) scale(.92); animation: tn-pop .7s var(--pop) 2.4s forwards; }
.ticket__cost small { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.ticket__cost div { display: flex; justify-content: space-between; padding: 3px 0; color: var(--dim); font-size: .88rem; }
.ticket__cost div b { color: var(--text); font-family: var(--display); }
.ticket__cost .keep b { color: var(--accent-2); font-size: 1.1rem; }
.ticket__warn { margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(255,138,91,.1); border: 1px solid rgba(255,138,91,.35); color: #FFC2A6; font-size: .78rem; opacity: 0; animation: o2-up .5s var(--ease) 3.4s forwards; }

/* ══ Pantallas del teléfono en la historia (además de .chat, .list y .lock) ══ */
.app { background: #0b1714; display: flex; flex-direction: column; text-align: left; }
.app__head { padding: 52px 14px 12px; border-bottom: 1px solid var(--line); background: #10231d; }
.app__head b { display: block; font: 700 1.05rem var(--display); }
.app__head small { color: var(--dim); font-size: .7rem; }
.app__body { flex: 1; min-height: 0; padding: 12px; display: flex; flex-direction: column; gap: 8px; font-size: .78rem; }
.app [data-at] { opacity: 0; transform: translateY(10px); transition: opacity .35s, transform .45s var(--pop); }
.app [data-at].on { opacity: 1; transform: none; }
.app__search { padding: 10px 12px; border-radius: 12px; background: rgba(234,246,240,.06); border: 1px solid var(--line-hi); color: var(--text); }
.app__search::before { content: "⌕ "; color: var(--accent); }
.app__card { padding: 11px 12px; border-radius: 12px; background: rgba(234,246,240,.04); border: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.app__card small { display: block; color: var(--dim); font-size: .68rem; }
.app__card b { font: 700 1rem var(--display); font-variant-numeric: tabular-nums; }
.app__card--bad { border-color: rgba(255,138,91,.4); background: rgba(255,138,91,.07); }
.app__card--bad b { color: var(--warm); }
.app__card--ok { border-color: var(--line-hi); background: rgba(45,202,140,.08); }
.app__card--ok b { color: var(--accent-2); }
.app__kv { display: flex; justify-content: space-between; padding: 7px 2px; border-bottom: 1px solid rgba(45,202,140,.07); color: var(--dim); }
.app__kv b { color: var(--text); font-variant-numeric: tabular-nums; }
.app__kv--bad b { color: var(--warm); }
.app__kv--ok b { color: var(--accent-2); }
.app__kv s { color: var(--dim); margin-right: 6px; }
.app__note { padding: 9px 11px; border-radius: 10px; font-size: .72rem; background: rgba(255,138,91,.1); border: 1px solid rgba(255,138,91,.35); color: #FFC2A6; }
.app__note--ok { background: rgba(45,202,140,.1); border-color: var(--line-hi); color: var(--accent-2); }
.app .paid { margin-top: auto; }

/* ══ Por dentro: maquetas en HTML en vez de capturas ══ */
.piece__shot--ui { padding: 12px; background: #0b1512; font-family: var(--body); font-size: .74rem; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.piece__shot--ui > * { flex: none; }
.ui-top { display: flex; justify-content: space-between; align-items: center; font: 600 .8rem var(--display); }
.ui-top small { font: 500 .66rem var(--body); color: var(--dim); }
.tn-chip { font: 600 .62rem var(--display); letter-spacing: .04em; padding: 3px 8px; border-radius: 99px; background: rgba(45,202,140,.12); color: var(--accent); }
.tn-chip--warm { background: rgba(255,138,91,.14); color: var(--warm); }

/* Vender */
.pos { display: grid; grid-template-columns: 1fr 120px; gap: 8px; }
.pos__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pos__item { padding: 6px; border-radius: 10px; background: rgba(234,246,240,.04); border: 1px solid var(--line); font-size: .62rem; color: var(--dim); }
.pos__item svg { display: block; width: 100%; height: 26px; margin-bottom: 3px; }
.pos__item b { display: block; color: var(--text); font-size: .64rem; }
.pos__item--tap { border-color: var(--accent); }
.focus .pos__item--tap, .in .pos__item--tap { animation: tn-tap 3.2s ease-in-out 1s infinite; }
@keyframes tn-tap { 0%, 30%, 100% { transform: none; box-shadow: none; } 12% { transform: scale(.94); box-shadow: 0 0 0 4px rgba(45,202,140,.25); } }
.pos__cart { display: flex; flex-direction: column; gap: 5px; padding: 8px; border-radius: 10px; background: rgba(45,202,140,.06); border: 1px solid var(--line); font-size: .64rem; }
.pos__cart div { display: flex; justify-content: space-between; color: var(--dim); }
.pos__total { margin-top: auto; padding-top: 5px; border-top: 1px solid var(--line); color: var(--text) !important; font-weight: 700; }
.pos__pay { text-align: center; padding: 6px; border-radius: 8px; background: var(--accent); color: #071310; font: 700 .66rem var(--display); }

/* Tablas pequeñas */
.mini { width: 100%; border-collapse: collapse; font-size: .7rem; }
.mini th { text-align: right; font: 600 .58rem var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); padding: 0 6px 5px; }
.mini th:first-child, .mini td:first-child { text-align: left; }
.mini td { padding: 6px; border-top: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.mini tr.low td { background: rgba(255,138,91,.07); }
.mini .ok { color: var(--accent-2); font-weight: 700; }
.mini .bad { color: var(--warm); font-weight: 700; }

/* Traslado */
.move { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; border: 1px dashed var(--line-hi); font-size: .7rem; color: var(--dim); }
.move b { color: var(--text); }
.move__track { position: relative; flex: 1; height: 2px; background: var(--line-hi); }
.move__track i { position: absolute; top: -4px; left: 0; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: tn-move 2.6s var(--ease) infinite; }
@keyframes tn-move { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: calc(100% - 10px); opacity: 0; } }

/* Cajas y resultado */
.cash { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.cash__box { padding: 8px 10px; border-radius: 10px; background: rgba(234,246,240,.04); border: 1px solid var(--line); }
.cash__box small { display: block; font-size: .58rem; letter-spacing: .05em; text-transform: uppercase; color: var(--dim); }
.cash__box strong { display: block; margin-top: 2px; font: 700 .9rem var(--display); font-variant-numeric: tabular-nums; }
.cash__box--usd strong { color: #9fd8ff; }
.result { padding: 8px 10px; border-radius: 10px; background: rgba(45,202,140,.06); border: 1px solid var(--line); font-size: .68rem; }
.result div { display: flex; justify-content: space-between; padding: 2px 0; color: var(--dim); }
.result div b { color: var(--text); font-variant-numeric: tabular-nums; }
.result .net { margin-top: 4px; padding-top: 5px; border-top: 1px solid var(--line); color: var(--text); font-weight: 700; }
.result .net b { color: var(--accent-2); }

/* Barras (ERP) */
.bars { display: flex; align-items: flex-end; gap: 5px; height: 70px; }
.bars i { flex: 1; height: var(--h); border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, var(--accent), rgba(45,202,140,.25)); }
.bars i.hi { background: linear-gradient(180deg, #7ff0c2, var(--accent)); box-shadow: 0 0 14px rgba(45,202,140,.4); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.kpis div { padding: 7px 9px; border-radius: 10px; background: rgba(234,246,240,.04); border: 1px solid var(--line); }
.kpis small { display: block; font-size: .56rem; letter-spacing: .05em; text-transform: uppercase; color: var(--dim); }
.kpis b { font: 700 .9rem var(--display); }
.kpis .w b { color: var(--warm); }

/* Ingeniería de menú: cuatro cuadrantes */
.quad { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.quad div { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(234,246,240,.04); font-size: .66rem; color: var(--dim); }
.quad b { display: block; color: var(--text); font: 700 .74rem var(--display); margin-bottom: 2px; }
.quad .star { border-color: var(--line-hi); background: rgba(45,202,140,.08); }
.quad .star b { color: var(--accent-2); }
.quad .dog { border-color: rgba(255,138,91,.35); background: rgba(255,138,91,.06); }
.quad .dog b { color: var(--warm); }

/* ══ Sección propia de cada producto (como «el equipo» del CRM) ══ */
.spot { padding: clamp(90px, 11vw, 140px) clamp(16px, 5vw, 72px); max-width: 1360px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(30px, 5vw, 80px); align-items: center; }
.spot__text > * { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .8s var(--ease); }
.spot.in .spot__text > * { opacity: 1; transform: none; }
.spot.in .spot__text > *:nth-child(2) { transition-delay: .1s; } .spot.in .spot__text > *:nth-child(3) { transition-delay: .2s; } .spot.in .spot__text > *:nth-child(4) { transition-delay: .3s; }
.spot__text p { color: var(--dim); font-size: 1.08rem; max-width: 46ch; margin: 18px 0 0; }
.says { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.says li { padding: 12px 16px; border-radius: 16px 16px 16px 4px; border: 1px solid var(--line); background: rgba(45,202,140,.05); color: var(--text); max-width: 34ch; }
.says li:nth-child(2) { margin-left: 28px; } .says li:nth-child(3) { margin-left: 56px; }

/* El asistente de la tienda, en grande */
.dict { display: grid; gap: 12px; padding: 20px; border-radius: 24px; border: 1px solid var(--line-hi); background: #0b1512; box-shadow: 0 34px 80px rgba(0,0,0,.5); opacity: 0; transform: translateY(40px) scale(.96); transition: opacity .8s, transform 1s var(--ease); }
.spot.in .dict { opacity: 1; transform: none; }
.dict__me { justify-self: end; max-width: 84%; padding: 12px 16px; border-radius: 18px 18px 4px 18px; background: rgba(45,202,140,.14); border: 1px solid var(--line-hi); opacity: 0; }
.spot.in .dict__me { animation: o2-up .5s var(--ease) .6s forwards; }
.dict__me small { display: flex; align-items: center; gap: 6px; color: var(--dim); font-size: .72rem; margin-bottom: 4px; }
.dict__wave { display: inline-flex; gap: 2px; align-items: center; height: 11px; }
.dict__wave i { width: 2px; height: 100%; border-radius: 2px; background: var(--accent); animation: tn-wave .9s ease-in-out infinite; }
.dict__wave i:nth-child(2) { animation-delay: .15s; } .dict__wave i:nth-child(3) { animation-delay: .3s; } .dict__wave i:nth-child(4) { animation-delay: .45s; }
@keyframes tn-wave { 50% { transform: scaleY(.3); } }
.dict__card { padding: 16px; border-radius: 18px; background: rgba(234,246,240,.04); border: 1px solid var(--line); opacity: 0; }
.spot.in .dict__card { animation: o2-up .6s var(--ease) 1.5s forwards; }
.dict__card > small { color: var(--dim); font-size: .76rem; }
.dict__mv { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 10px 0 14px; }
.dict__mv b { font: 700 1.1rem var(--display); color: var(--warm); white-space: nowrap; }
.dict__ok { position: relative; display: block; text-align: center; padding: 12px; border-radius: 12px; background: var(--accent); color: #071310; font: 700 .9rem var(--display); overflow: hidden; }
.dict__ok span + span { position: absolute; inset: 0; display: grid; place-items: center; background: #7ff0c2; transform: translateY(100%); }
.spot.in .dict__ok span + span { animation: tn-done .5s var(--pop) 3s forwards; }
@keyframes tn-done { to { transform: none; } }

/* Tres razones (ERP: el costo no se escribe) */
.why { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.why li { padding: 20px 22px; border-radius: 20px; border: 1px solid var(--line); background: var(--panel); opacity: 0; transform: translateX(30px); transition: opacity .6s, transform .8s var(--pop); }
.spot.in .why li { opacity: 1; transform: none; }
.spot.in .why li:nth-child(2) { transition-delay: .2s; } .spot.in .why li:nth-child(3) { transition-delay: .4s; }
.why h3 { font-size: 1.15rem; margin-bottom: 6px; }
.why p { color: var(--dim); margin: 0; font-size: .95rem; }
.why strong { color: var(--warm); }

/* Salón (ERP) */
.hall { padding: 20px; border-radius: 24px; border: 1px solid var(--line-hi); background: #0b1512; box-shadow: 0 34px 80px rgba(0,0,0,.5); }
.hall__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.hall__t { aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; text-align: center; border: 1px solid var(--line); background: rgba(234,246,240,.04); font-size: .74rem; color: var(--dim); }
.hall__t b { display: block; color: var(--text); font: 700 1rem var(--display); }
.hall__t--busy { border-color: var(--line-hi); background: rgba(45,202,140,.08); }
.hall__t--bill { border-color: rgba(255,138,91,.45); background: rgba(255,138,91,.08); }
.hall__t--free { border-style: dashed; }
.spot.in .hall__t--bill { animation: hall-free 4s ease-in-out 1.5s infinite; }
@keyframes hall-free { 0%, 40% { border-color: rgba(255,138,91,.45); background: rgba(255,138,91,.08); } 55%, 100% { border-color: var(--line); background: rgba(234,246,240,.04); border-style: dashed; } }
.hall__wait { margin-top: 12px; display: flex; justify-content: space-between; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); font-size: .8rem; color: var(--dim); }
.hall__wait b { color: var(--text); }

/* ══ Caso real (tienda) ══ */
.tn-case { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 70px); align-items: center; margin: 0 auto; max-width: 1216px; width: calc(100% - 2 * clamp(16px, 5vw, 72px)); padding: clamp(24px, 4vw, 48px); border-radius: 32px; border: 1px solid var(--line); background: linear-gradient(160deg, rgba(17,38,31,.75), rgba(7,19,16,.55)); opacity: 0; transform: translateY(40px); transition: opacity .8s, transform 1s var(--ease); }
.tn-case.in { opacity: 1; transform: none; }
.tn-case__screen { border-radius: 16px; overflow: hidden; border: 1px solid var(--line-hi); background: #fff; box-shadow: 0 30px 70px rgba(0,0,0,.5); }
.tn-case__screen video { display: block; width: 100%; height: auto; }
.tn-case h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); margin-bottom: 14px; }
.tn-case p { color: var(--dim); font-size: 1.05rem; margin: 0; }

@media (max-width: 900px) {
  .chero--wide { grid-template-columns: 1fr; }
  .ledger { justify-self: center; margin-bottom: 150px; }
  .ledger__sys { right: -6px; }
  .ticket { justify-self: center; margin-bottom: 200px; }
  .ticket__cost { left: -12px; right: 12px; }
  .spot, .tn-case { grid-template-columns: 1fr; }
  .says li:nth-child(2), .says li:nth-child(3) { margin-left: 0; }
  .app__head { padding-top: 40px; }
  .app__body { font-size: .7rem; padding: 10px; gap: 6px; }
}
@media (max-width: 520px) {
  .pos { grid-template-columns: 1fr; }
  .hall__grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .ledger__paper { padding-left: 46px; }
  .ledger__paper::before { left: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .ledger *, .ticket *, .ticket__paper, .spot__text > *, .dict, .dict *, .why li, .tn-case { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; clip-path: none !important; }
  .ledger__row--bad b::after { transform: scaleX(1); }
  .ledger__scan { display: none; }
}
.chero--wide .o2-title { font-size: clamp(2.2rem, 4.1vw, 3.9rem); }
.spot h2 { font-size: clamp(1.9rem, 3.4vw, 3rem); }
.app__card b, .app__kv b { white-space: nowrap; }

/* Las listas de «por qué» entran desde la derecha: antes de entrar asomaban 11 px fuera de la pantalla
   en el celular y la página se podía arrastrar de lado. */
.spot { overflow-x: clip; }
