const cfg = { page: "caso-ecommerce.html", name: "Ecommerce",
  heroPre: "Toda tu operación", heroEm: "ecommerce", heroPost: ", unificada en", heroHl: "tiempo real",
  lede: "P&L por SKU, cashflow con pagos de marketplace, forecast de demanda, reporting automático. Shopify, Amazon, Meta Ads y tu banco en un solo sitio.",
  kpis: [{l:"Revenue 30d",v:"€412k",s:"+12.4%"},{l:"ROAS",v:"4.2x",s:"+0.4"},{l:"Margen neto",v:"38%",s:"+2pts"},{l:"Devoluciones",v:"3.1%",s:"-0.4pts"}],
  dashTitle: "Vista ecommerce unificada", dashKpis: [{l:"GMV semana",v:"€84,200",d:"+8%"},{l:"Pedidos",v:"1,284",d:"+67"},{l:"CAC Meta",v:"€54",d:"-€9"}],
  capabilities: [
    { tag: "01 · Métricas", title: "ROAS, margen y LTV por canal", body: "ROAS real atribuido a pedidos reales. Margen por SKU tras fees, envío y devoluciones. LTV por cohorte de adquisición.", bullets: ["ROAS Meta / Google / TikTok","Margen neto por SKU","LTV por canal","Atribución multi-touch"] },
    { tag: "02 · P&L", title: "Cuenta de resultados por canal", body: "P&L consolidado con revenue, COGS, fees de marketplace, shipping y devoluciones desglosados por canal y producto.", bullets: ["P&L por canal (D2C, Amazon, B2B)","COGS por SKU y lote","Fees Shopify/Amazon/Stripe","Margen de contribución"], hi: true },
    { tag: "03 · Cashflow", title: "Cashflow con payouts reales", body: "Visibilidad de cuándo llega el dinero: Stripe T+2, Amazon 14d, Shopify Payments. Cuadre con saldos bancarios.", bullets: ["Payouts previstos Stripe/Amazon","Cashflow operativo diario","Conciliación con bancos","Previsión de tesorería 90 días"] },
    { tag: "04 · Forecast", title: "Forecast de demanda y stock", body: "Proyección de ventas por SKU con estacionalidad. Alertas de rotura de stock y exceso de inventario.", bullets: ["Demanda por SKU y variante","Días de stock restante","Escenarios Black Friday / Q4","Recomendación de reorder"] },
    { tag: "05 · Reporting", title: "Informe semanal automático", body: "Cada lunes en tu WhatsApp: top SKUs, ROAS por canal, caja, devoluciones. Compartible con inversores.", bullets: ["WhatsApp + Email + Slack","PDF listo para board","Segmentado por tienda","Comparativa YoY automática"] },
    { tag: "06 · Alertas", title: "Alertas cuando algo pasa", body: "ROAS se cae, margen por SKU en rojo, CAC sube, stock crítico. Te avisamos antes de que sea tarde.", bullets: ["ROAS < umbral","Margen SKU negativo","Stock < 7 días","Pico de devoluciones"] }
  ],
  flow: [
    { title: "Conectas fuentes", desc: "Shopify, Amazon, Meta, Google, Stripe, banco — en 15 minutos." },
    { title: "Normalizamos datos", desc: "Pedidos, fees, devoluciones y gasto en ads, todo en un único modelo." },
    { title: "Dashboards en vivo", desc: "ROAS, margen y cashflow al minuto, sin Excel ni cierres." },
    { title: "Decisiones", desc: "Sabes qué SKU impulsar, qué canal pausar y cuándo rellenar stock." }
  ],
  tools: ["Shopify","WooCommerce","Amazon","Meta Ads","Google Ads","Stripe"],
  report: [
    { l: "Revenue semanal", v: "€84,200", d: "+8%", pos: true },
    { l: "Margen neto", v: "38%", d: "+2pts", pos: true },
    { l: "ROAS Meta", v: "4.6x", d: "+0.3", pos: true },
    { l: "CAC medio", v: "€54", d: "-€9", pos: true },
    { l: "Devoluciones", v: "3.1%", d: "-0.4pts", pos: true },
    { l: "Stock crítico", v: "4 SKU", d: "revisar", neg: true }
  ],
  alerts: [
    { k: "neg", t: "Stock crítico · SKU-AL23", s: "Quedan 5 días de venta al ritmo actual" },
    { k: "warn", t: "ROAS Google < 3.0x", s: "Campaña «Verano B2C» bajando 3 días seguidos" },
    { k: "pos", t: "Margen Meta +4pts", s: "Campaña «Retargeting Q2» al 6.1x ROAS" },
    { k: "neg", t: "Devoluciones ↑ SKU-BT11", s: "12% última semana vs. 3% histórico" }
  ],
  ctaTitle: "Ecommerce que decide con margen, no con ingresos.", seed: 4 };

const cfgEn = { page: "caso-ecommerce.html", name: "Ecommerce",
  heroPre: "Your full ecommerce", heroEm: "operation", heroPost: ", unified in", heroHl: "real time",
  lede: "P&L by SKU, cashflow with marketplace payouts, demand forecast, automated reporting. Shopify, Amazon, Meta Ads and your bank in one place.",
  kpis: [{l:"Revenue 30d",v:"€412k",s:"+12.4%"},{l:"ROAS",v:"4.2x",s:"+0.4"},{l:"Net margin",v:"38%",s:"+2pts"},{l:"Returns",v:"3.1%",s:"-0.4pts"}],
  dashTitle: "Unified ecommerce view", dashKpis: [{l:"Weekly GMV",v:"€84,200",d:"+8%"},{l:"Orders",v:"1,284",d:"+67"},{l:"Meta CAC",v:"€54",d:"-€9"}],
  capabilities: [
    { tag: "01 · Metrics", title: "ROAS, margin and LTV per channel", body: "Real ROAS attributed to actual orders. Margin per SKU after fees, shipping and returns. LTV by acquisition cohort.", bullets: ["ROAS Meta / Google / TikTok","Net margin per SKU","LTV per channel","Multi-touch attribution"] },
    { tag: "02 · P&L", title: "Income statement per channel", body: "Consolidated P&L with revenue, COGS, marketplace fees, shipping and returns broken down by channel and product.", bullets: ["P&L per channel (D2C, Amazon, B2B)","COGS per SKU and batch","Shopify/Amazon/Stripe fees","Contribution margin"], hi: true },
    { tag: "03 · Cashflow", title: "Cashflow with real payouts", body: "See when the cash actually lands: Stripe T+2, Amazon 14d, Shopify Payments. Reconciled with bank balances.", bullets: ["Forecast Stripe/Amazon payouts","Daily operating cashflow","Bank reconciliation","90-day cash forecast"] },
    { tag: "04 · Forecast", title: "Demand and stock forecast", body: "SKU-level sales projection with seasonality. Alerts for stockouts and overstock.", bullets: ["Demand per SKU and variant","Days of stock left","Black Friday / Q4 scenarios","Reorder recommendations"] },
    { tag: "05 · Reporting", title: "Automated weekly report", body: "Every Monday in your WhatsApp: top SKUs, ROAS per channel, cash, returns. Shareable with investors.", bullets: ["WhatsApp + Email + Slack","Board-ready PDF","Segmented per store","Automatic YoY comparison"] },
    { tag: "06 · Alerts", title: "Alerts when something happens", body: "ROAS drops, SKU margin in the red, CAC rising, critical stock. We let you know before it's too late.", bullets: ["ROAS < threshold","Negative SKU margin","Stock < 7 days","Returns spike"] }
  ],
  flow: [
    { title: "Connect sources", desc: "Shopify, Amazon, Meta, Google, Stripe, bank — in 15 minutes." },
    { title: "We normalize the data", desc: "Orders, fees, returns and ad spend, all in a single model." },
    { title: "Live dashboards", desc: "ROAS, margin and cashflow up to the minute, no spreadsheets, no closes." },
    { title: "Decisions", desc: "Know which SKU to push, which channel to pause and when to restock." }
  ],
  tools: ["Shopify","WooCommerce","Amazon","Meta Ads","Google Ads","Stripe"],
  report: [
    { l: "Weekly revenue", v: "€84,200", d: "+8%", pos: true },
    { l: "Net margin", v: "38%", d: "+2pts", pos: true },
    { l: "Meta ROAS", v: "4.6x", d: "+0.3", pos: true },
    { l: "Avg CAC", v: "€54", d: "-€9", pos: true },
    { l: "Returns", v: "3.1%", d: "-0.4pts", pos: true },
    { l: "Critical stock", v: "4 SKU", d: "review", neg: true }
  ],
  alerts: [
    { k: "neg", t: "Critical stock · SKU-AL23", s: "5 days of sales left at the current pace" },
    { k: "warn", t: "Google ROAS < 3.0x", s: "«Summer B2C» campaign declining 3 days in a row" },
    { k: "pos", t: "Meta margin +4pts", s: "«Retargeting Q2» campaign at 6.1x ROAS" },
    { k: "neg", t: "Returns ↑ SKU-BT11", s: "12% last week vs. 3% historical" }
  ],
  ctaTitle: "Ecommerce that decides on margin, not revenue.", seed: 4 };

ReactDOM.createRoot(document.getElementById("root")).render(<UseCasePage cfg={cfg} cfgEn={cfgEn} />);
