const { Button, CapPill } = window.AbStudioDigitalDesignSystem_cd7db8; const { useState, useEffect, useRef } = React; /* ---------- icons: lucide-style 1.75px strokes (DS recommendation) ---------- */ const Icon = ({ d, size = 20, stroke = "currentColor", ...rest }) => ( ); const IconUser = p => } />; const IconSearch = p => } />; const IconHeart = p => } />; const IconChevron = p => } />; const IconArrow = p => } />; const IconLogout = p => } />; const IconClose = p => } />; const IconMenu = p => } />; const IconWhatsApp = ({ size = 22 }) => ( ); const IconMail = p => } />; const IconInstagram = p => } />; const IconFacebook = p => } />; const IconYouTube = p => } />; /* ================= HEADER ================= */ function MegaMenu({ category }) { return (
{category.children.map(sub => ( {sub.name} ))}
All {category.name.toLowerCase()}
); } function SearchOverlay({ open, onClose }) { const [q, setQ] = useState(""); const results = q.trim().length < 2 ? [] : PRODUCTS.filter(p => (p.name + p.code + p.category + p.subcategory + Object.values(p.customFields).join(" ")).toLowerCase().includes(q.trim().toLowerCase())); const suggestions = ["Mangalsutra", "22K chains", "Solitaire rings", "Silver pooja articles", "Gold coins"]; if (!open) return null; return (
e.stopPropagation()}>
setQ(e.target.value)} placeholder="Search by name, item code or category" aria-label="Search jewellery" />
{q.trim().length < 2 ? (
Popular searches
{suggestions.map(s => )}
) : results.length ? (
{results.length} result{results.length > 1 ? "s" : ""}
) : (
No jewellery found for “{q}”

Try an item code, a metal, or browse the collections above.

)}
); } function Header() { const [openCat, setOpenCat] = useState(null); const [searchOpen, setSearchOpen] = useState(false); const [menuOpen, setMenuOpen] = useState(false); const [mobileCat, setMobileCat] = useState(null); return (
setOpenCat(null)}>
{SITE_CONFIG.brand}
{openCat && c.id === openCat)} />}
{menuOpen && (
setMenuOpen(false)}>
e.stopPropagation()}>
{SITE_CONFIG.brand}
{CATEGORIES.map(c => (
{mobileCat === c.id && (
{c.children.map(s => setMenuOpen(false)}>{s.name})}
)}
))}
)} setSearchOpen(false)} />
); } /* ================= RATE BOARD ================= */ function RateBoard() { const updated = new Date(RATES[0].updatedAt); const stamp = updated.toLocaleDateString("en-IN", { day: "numeric", month: "short" }) + ", " + updated.toLocaleTimeString("en-IN", { hour: "numeric", minute: "2-digit" }); const trackRef = useRef(null); useEffect(() => { const track = trackRef.current; if (!track) return; const t = setInterval(() => { const max = track.scrollWidth - track.clientWidth; if (max <= 0) return; const next = track.scrollLeft >= max - 4 ? 0 : Math.min(track.scrollLeft + track.clientWidth * 0.6, max); track.scrollTo({ left: next, behavior: "smooth" }); }, 2500); return () => clearInterval(t); }, []); return (
Today’s rates Updated {stamp}
{RATES.map(r => (
{r.metal} {r.purity} {inr(r.rate)}/{r.unit}
))}
); } /* ================= BANNER SLIDER ================= */ function BannerSlider() { const [i, setI] = useState(0); const [paused, setPaused] = useState(false); const slides = BANNERS.slice().sort((a, b) => a.order - b.order); useEffect(() => { if (paused) return; const t = setTimeout(() => setI(v => (v + 1) % slides.length), 6000); return () => clearTimeout(t); }, [i, paused, slides.length]); const go = n => setI((n + slides.length) % slides.length); return (
setPaused(true)} onMouseLeave={() => setPaused(false)} aria-label="Promotions">
{slides.map((b, n) => (
{b.eyebrow}

{b.title}

{b.subtitle}

))}
{slides.map((b, n) => (
); } /* ================= INQUIRY MODAL ================= */ function InquiryModal({ product, onClose }) { const [name, setName] = useState(""); const [mobile, setMobile] = useState(""); const [message, setMessage] = useState(product ? `Hi, I'm interested in ${product.name}${product.code ? ` (${product.code})` : ""}. Please share more details.` : "Hi, I'd like to know more about your jewellery collection."); const [sending, setSending] = useState(false); const [error, setError] = useState(""); const [sent, setSent] = useState(false); const submit = async e => { e.preventDefault(); const digits = mobile.replace(/[^0-9]/g, ""); if (digits.length < 10) { setError("Enter a valid mobile number"); return; } setSending(true); setError(""); try { await submitInquiry(product, { name: name.trim(), mobile: mobile.trim(), message: message.trim() }); setSent(true); window.open(whatsappLink(product), "_blank", "noopener"); } catch (err) { setError(err.message); } finally { setSending(false); } }; return (
e.stopPropagation()}> {sent ? (

Thanks, we’ve got your enquiry

Our team will reach out to you shortly on the number you shared.

) : (

{product ? `Enquire about ${product.name}` : "Send an enquiry"}

{product &&

{product.code}

} {error &&
{error}
}