// Plantilla REUTILIZABLE de página de producto — misma estructura para todo
// el ecosistema BRITXIA Tech. Agregar un producto nuevo = un objeto más en
// britxia-data.js + un .html de una línea. No se rediseña el sitio.
// Filosofía: comunicar soluciones y utilidad, no tecnología.
(function () {
const BX = window.BX;
const NAVY = BX.navy, ORANGE = BX.orange, CREAM = BX.cream;
const head = '"Poppins", system-ui, sans-serif';
const body = '"Inter", system-ui, sans-serif';
const mono = '"JetBrains Mono", ui-monospace, monospace';
const PANEL = '#13283d';
const PANEL2 = '#0F2030';
function useLang() {
const [, rerender] = React.useState(0);
React.useEffect(() => {
const h = () => rerender(n => n + 1);
window.addEventListener('langchange', h);
return () => window.removeEventListener('langchange', h);
}, []);
}
const ink = (a) => (a.accent === '#9A7B53' ? '#C7A06A' : a.accent);
// ---------- NAV (Header compartido) ----------
const Nav = ({ a }) => ;
const Footer = () => ;
// ---------- Platform badges ----------
const PLAT_ICONS = {
iphone: ,
android: ,
web: ,
watch: ,
};
const PLAT_LABELS = { iphone:'iPhone', android:'Android', web:'Web', watch:'Apple Watch\n& Wear OS' };
const PlatformBadges = ({ platforms, accent }) => {
if (!platforms || !platforms.length) return null;
return (
{platforms.map(p => (
{PLAT_ICONS[p]}
{PLAT_LABELS[p]}
))}
);
};
const SectionHead = ({ eyebrow, title, color, sub }) => (
{eyebrow}
{title}
{sub &&
{sub}
}
);
// ── Inject responsive CSS ──────────────────────────────────────
if (!document.getElementById('bx-prod-responsive')) {
const r = document.createElement('style');
r.id = 'bx-prod-responsive';
r.textContent = `
body{overflow-x:hidden}
*{box-sizing:border-box}
#app{transform:none!important;width:100%!important}
#stage{width:100%!important;height:auto!important}
.pp-root{width:100%!important;max-width:100vw!important}
@media(max-width:1100px){
.pp-hero{padding:60px 40px 72px!important;overflow:hidden!important}
.pp-section{padding:64px 40px!important}
.pp-features{padding:64px 40px!important}
.pp-steps{padding:64px 40px!important}
.pp-integ{padding:64px 40px!important;grid-template-columns:1fr!important}
.pp-dl{padding:56px 40px!important}
.pp-close{padding:48px 40px!important}
}
@media(max-width:900px){
.pp-hero{grid-template-columns:1fr!important}
.pp-feat-grid{grid-template-columns:1fr 1fr!important}
.pp-steps-grid{grid-template-columns:1fr 1fr!important}
}
@media(max-width:768px){
.pp-hero{padding:48px 24px 56px!important}
.pp-hero h1{font-size:clamp(36px,9vw,52px)!important;letter-spacing:-1.5px!important}
.pp-hero h1+div{font-size:16px!important}
.pp-section{padding:52px 24px!important}
.pp-features{padding:52px 24px!important}
.pp-feat-grid{grid-template-columns:1fr!important}
.pp-steps{padding:52px 24px!important}
.pp-steps-grid{grid-template-columns:1fr!important}
.pp-integ{padding:52px 24px!important}
.pp-integ-grid{grid-template-columns:1fr!important;gap:32px!important}
.pp-dl{padding:44px 24px!important}
.pp-dl-btns{flex-direction:column!important;align-items:stretch!important}
.pp-dl-btn{justify-content:center!important}
.pp-close{padding:40px 24px!important}
/* Hero device scaling for laptop products */
.pp-hero .bx-laptop-mk{transform:scale(0.52)!important;transform-origin:top center!important;animation:none!important}
/* Contain hero device area */
.pp-hero > div:last-child{overflow:hidden!important;max-height:380px!important}
}
@media(max-width:640px){
#kleo-video{ padding-left:20px!important; padding-right:20px!important; padding-bottom:52px!important; }
}
@media(max-width:480px){
.pp-hero h1{font-size:clamp(28px,9.5vw,38px)!important}
.pp-section{padding:44px 20px!important}
.pp-features{padding:44px 20px!important}
.pp-steps{padding:44px 20px!important}
.pp-integ{padding:44px 20px!important}
.pp-dl{padding:36px 20px!important}
.pp-close{padding:36px 20px!important}
.pp-feat-item{padding:20px!important}
.pp-hero .bx-laptop-mk{transform:scale(0.44)!important}
.pp-hero > div:last-child{max-height:300px!important}
}
@media(max-width:390px){
.pp-section,.pp-features,.pp-steps,.pp-integ,.pp-dl,.pp-close{padding-left:16px!important;padding-right:16px!important}
.pp-hero{padding:44px 16px 48px!important}
.pp-hero h1{font-size:26px!important}
.pp-hero .bx-laptop-mk{transform:scale(0.38)!important}
.pp-hero .bx-phone-mk{transform:scale(0.82)!important;transform-origin:top center!important}
.pp-hero > div:last-child{max-height:270px!important}
}
@media(max-width:340px){
.pp-hero .bx-laptop-mk{transform:scale(0.34)!important}
.pp-hero .bx-phone-mk{transform:scale(0.74)!important}
.pp-hero > div:last-child{max-height:240px!important}
}
`;
document.head.appendChild(r);
}
// ---------- Página mínima "Próximamente" (productos aún no desarrollados) ----------
function ComingSoon({ a }) {
const T = window.t || (k => k);
const acc = ink(a);
return (
);
}
function ProductPage({ appKey }) {
useLang();
const T = window.t || (k => k);
const a = BX.apps.find((x) => x.key === appKey);
if (a.comingSoon) return ;
const pd = (window.getPD && window.getLang) ? window.getPD(window.getLang(), a.key) : a;
const acc = ink(a);
const Mock = window.Mockups[a.key];
const Field = ({ label, ph, opt }) => (
);
return (
{/* ===== S1 · HERO ===== */}
{a.comingSoon && (
{T('product.coming')}
)}
{a.key === 'KLEO' ? (
) : (
{a.key}
)}
{(pd.estado !== undefined ? pd.estado : a.estado) || (pd.lema !== undefined ? pd.lema : a.lema)}
{(pd.cardBody !== undefined ? pd.cardBody : a.cardBody) || (pd.desc !== undefined ? pd.desc : a.desc)}
{a.key === 'KLEO' && (
{T('kleo.demo_line', '“Ey KLEO, agenda esto.” — así de fácil.')}
)}
{a.key === 'KLEO' ? : (Mock ? : null)}
{/* ===== S3 · ¿QUÉ PUEDE HACER? ===== */
/* id para el enlace desde el hero */}
= 3 ? 'repeat(3, 1fr)' : 'repeat(2, 1fr)', gap: 22 }} className="pp-feat-grid">
{(pd.funciones !== undefined ? pd.funciones : a.funciones).map(([grupo, items, extra]) => (
{grupo}
{extra && extra.intro && (
{extra.intro}
)}
{items.map((it) => {
const isArr = Array.isArray(it);
const title = isArr ? it[0] : it;
const desc = isArr ? it[1] : null;
return (
{title}
{desc && — {desc}}
)})}
{extra && extra.cierre && (
{extra.cierre}
)}
))}
{a.key === 'KLEO' && (
)}
{/* ===== S4 · ¿CÓMO FUNCIONA? ===== */}
{(pd.flujo !== undefined ? pd.flujo : a.flujo).map(([t, d], i) => (
))}
{a.key === 'KLEO' && (
{T('kleo.video_title')}
{T('kleo.video_sub')}
)}
{/* ===== DESCARGA ===== */}
{T('product.dl_title')} {a.key}
{T('product.coming')}
{/* App Store */}
{/* Google Play */}
{/* ===== CIERRE DE PRODUCTO ===== */}
{(pd.pie !== undefined ? pd.pie : a.pie) || ''}
);
}
window.ProductPage = ProductPage;
})();