/* Storefront screens: Home, Products, ProductDetail, Cart, Checkout success.
Exposes window.AXScreens. */
(function(){
const { Button, IconButton, Badge, Rating, PriceTag, QuantityStepper, Input, Eyebrow, SectionHeader, ProductCard } = window.AXUI;
const { Newsletter } = window.AXChrome;
const Ic = () => window.AXIcons;
const D = () => window.AX_DATA;
const wrap = { maxWidth:'var(--container-max)', margin:'0 auto', padding:'0 var(--gutter)' };
/* ---------------- HOME ---------------- */
function Hero({ onNav }){
const i=Ic();
const products=D().products;
const heroCards=[
{p:products.find(p=>p.id==='p1'),t:18,l:'8%',w:200,r:3},
{p:products.find(p=>p.id==='p4'),t:120,l:'48%',w:210,r:-4},
{p:products.find(p=>p.id==='p8'),t:236,l:'14%',w:200,r:5},
];
return
{React.createElement(i.Bolt,{size:14,style:{color:'var(--cyan-400)'}})} Photo-Led Fashion, Everyday Value
Fresh fashion drops for everyday outfits
Shop real product photos across graphic tees, hoodies, plaid shirts, caps, Hanfu looks, pants, and outerwear with secure checkout and easy returns.
onNav({type:'products',label:'Best Sellers'})}>Shop Best Sellers
onNav({type:'products',label:'New Arrivals'})}>Explore Collections
{[['4.8★','12k+ reviews'],['50k+','happy customers'],['3–5d','fast delivery']].map(([a,b])=>
{a} {b}
)}
{heroCards.map((c,k)=>
{c.p.image
?
:
{c.p.name.charAt(0)}
}
{c.p.name.split(' ').slice(0,2).join(' ')}
${c.p.price.toFixed(2)}
)}
;
}
function CategoryTiles({ onNav }){
return
{D().collections.map(c=>
{e.preventDefault();onNav({type:'products',label:c.name});}} style={{position:'relative',borderRadius:'var(--radius-xl)',overflow:'hidden',background:c.accent,minHeight:150,padding:22,display:'flex',flexDirection:'column',justifyContent:'flex-end',border:'1px solid var(--border-subtle)',transition:'transform .2s,box-shadow .2s'}}
onMouseEnter={e=>{e.currentTarget.style.transform='translateY(-3px)';e.currentTarget.style.boxShadow='var(--shadow-lg)';}}
onMouseLeave={e=>{e.currentTarget.style.transform='none';e.currentTarget.style.boxShadow='none';}}>
{c.name}
{c.tagline} · {c.count} items
)}
;
}
function ProductRow({ eyebrow, title, items, onAdd, onView, onNav }){
return
onNav({type:'products',label:title})}/>
;
}
const whyItems = [
['Shield','Secure Checkout','256-bit encryption on every order. Your details stay private.'],
['Truck','Fast Shipping','Dispatched in 24h with tracking. Most orders arrive in 3–5 days.'],
['Refresh','Easy Returns','Changed your mind? 30-day no-hassle returns, no questions asked.'],
['Headset','24/7 Support','Real people, any time zone. Reach us by chat or email anytime.'],
];
function WhyChoose(){
const i=Ic();
return
Why AshopNexa
Shopping you can trust
{whyItems.map(([icon,t,b])=>
{React.createElement(i[icon],{size:24})}
{t}
{b}
)}
;
}
function Reviews(){
return
{D().reviews.map((r,k)=>
{r.title}
“{r.body}”
{r.name.charAt(0)}
{r.name}
Verified · {r.product}
)}
;
}
function Home({ onNav, onAdd, onView }){
const all=D().products;
const best=all.filter(p=>p.badge==='Best Seller').concat(all).slice(0,4);
const fresh=all.filter(p=>p.badge==='New').concat(all.filter(p=>p.badge==='Limited')).slice(0,4);
return
;
}
window.AXScreens = { Home };
})();