// Savings Calc V1 — interactive "what this means in orders" calculator. const SavingsCalcV1 = () => { const [isMobile, setIsMobile] = React.useState(false); React.useEffect(() => { const mq = () => setIsMobile(window.innerWidth < 760); mq(); window.addEventListener("resize", mq); return () => window.removeEventListener("resize", mq); }, []); const [orders, setOrders] = React.useState(3000); const [aov, setAov] = React.useState(150); const COST_PER_CONFIRM = 1.4; // matches the site's own "Cost mediu/confirmare" stat const CONFIRM_RATE = 85; // locked — matches the site's own confirmation-rate stat const confirmed = Math.round(orders * (CONFIRM_RATE / 100)); const value = confirmed * aov; const cost = confirmed * COST_PER_CONFIRM; const costPct = value > 0 ? (cost / value) * 100 : 0; const roas = cost > 0 ? value / cost : 0; const fmt = (n) => Math.round(n).toLocaleString("ro-RO"); const mono = "ui-monospace, SFMono-Regular, Menlo, monospace"; const eyebrow = { fontFamily: mono, fontSize: 10, letterSpacing: "0.1em", textTransform: "uppercase", color: "var(--fg-3)" }; const ROWS = [ { key: "orders", label: "Comenzi confirmate / lună", value: orders, set: setOrders, min: 500, max: 10000, step: 100, fmt: (v) => v.toLocaleString("ro-RO") }, { key: "aov", label: "Valoare medie comandă", value: aov, set: setAov, min: 50, max: 500, step: 10, fmt: (v) => `${v} lei` }, ]; return (