/* ============================================================ SHOP ============================================================ */ function Breadcrumb({ items }){ const { go } = useContext(Nav); return (
{items.map((it,i)=>( {it.page ? { e.preventDefault(); go(it.page,it.params); }}>{it.label} : {it.label}} {i} ))}
); } function ShopPage({ params={} }){ const [cats,setCats] = useState(params.cat ? [params.cat] : []); const [purps,setPurps] = useState(params.purpose ? [params.purpose] : []); const [maxPrice,setMaxPrice] = useState(20000); const [sort,setSort] = useState('featured'); const [openFilter,setOpenFilter] = useState(false); useEffect(()=>{ setCats(params.cat?[params.cat]:[]); setPurps(params.purpose?[params.purpose]:[]); },[params.cat,params.purpose]); const toggle = (arr,set,v)=> set(arr.includes(v)?arr.filter(x=>x!==v):[...arr,v]); let list = RR.PRODUCTS.filter(p=> (cats.length===0 || cats.includes(p.cat)) && (purps.length===0 || p.purposes.some(x=>purps.includes(x))) && p.price<=maxPrice ); if(sort==='low') list=[...list].sort((a,b)=>a.price-b.price); if(sort==='high') list=[...list].sort((a,b)=>b.price-a.price); if(sort==='purpose') list=[...list].sort((a,b)=>a.name.localeCompare(b.name)); const activeCount = cats.length+purps.length+(maxPrice<20000?1:0); const clearAll=()=>{ setCats([]); setPurps([]); setMaxPrice(20000); }; const Filters = (

Category

{RR.CATEGORIES.map(c=>( ))}

Purpose · संकल्प

{RR.PURPOSES.map(pp=>( ))}

Max price

setMaxPrice(+e.target.value)}/>
Up to {RR.fmt(maxPrice)}
Need help choosing?

Tell us your purpose — we'll recommend the right piece, free.

Ask on WhatsApp
); return (
The Collection · संग्रह

Spiritual products, chosen with care

Authentic Rudraksha, gemstones, crystals & Vastu — filter by purpose to find your fit.

{list.length} products
{activeCount>0 && (
{cats.map(c=>)} {purps.map(p=>)} {maxPrice<20000 && }
)}
{list.length>0 ? (
{list.map((p,i)=>)}
) : (

No matches — but we can still help.

Loosen a filter, or tell us what you're looking for and we'll source it.

Ask on WhatsApp
)}
{/* mobile filter sheet */}
setOpenFilter(false)}/>

Filters

{Filters}
); } Object.assign(window, { ShopPage, Breadcrumb });