const NavLinks = [ { label: "Film", href: "#film" }, { label: "Colours", href: "#colours" }, { label: "Finishes", href: "#finishes" }, { label: "Installers", href: "#installers" }, { label: "Shipping", href: "#shipping" }, ]; const Navbar = () => { const { ArrowUpRight } = window; const [open, setOpen] = React.useState(false); const [isMobile, setIsMobile] = React.useState(window.innerWidth < 768); React.useEffect(() => { const handler = () => setIsMobile(window.innerWidth < 768); window.addEventListener('resize', handler); return () => window.removeEventListener('resize', handler); }, []); const glassStyle = { background: 'rgba(255,255,255,0.78)', backdropFilter: 'blur(14px)', WebkitBackdropFilter: 'blur(14px)', boxShadow: 'inset 0 1px 1px rgba(255,255,255,0.4), 0 2px 12px rgba(0,0,0,0.08)' }; return (
{/* Logo */} OVERCUT PPF {/* Desktop nav */} {!isMobile && ( )} {/* Desktop installer portal */} {!isMobile && ( Installer Portal )} {/* Mobile hamburger */} {isMobile && ( )}
{/* Mobile dropdown */} {isMobile && open && (
{NavLinks.map(({label, href}) => ( setOpen(false)} style={{ display:'block', padding:'12px 0', fontSize:'16px', fontWeight:500, color:'#000', textDecoration:'none', borderBottom:'1px solid rgba(0,0,0,0.08)' }}>{label} ))} setOpen(false)} style={{ marginTop:'12px', display:'flex', alignItems:'center', justifyContent:'center', background:'#000', color:'#fff', borderRadius:'9999px', padding:'14px 20px', fontSize:'15px', fontWeight:500, textDecoration:'none' }}>Order Samples setOpen(false)} style={{ display:'block', textAlign:'center', marginTop:'10px', fontSize:'13px', color:'rgba(0,0,0,0.6)', textDecoration:'none' }}>Installer Portal
)}
); }; window.Navbar = Navbar;