import{H as d,a3 as c,ab as x,V as e,T as m,k as h}from"./index-DxAX-4zq.js";import{h as p}from"./hero-DplHLYeN.js";import{S as g}from"./shield-check-BWxc50i2.js";import{A as u}from"./arrow-right-1vxd_A9O.js";const b=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],j=d("layers",b);function y(){const{data:a}=c(),{data:r}=x(),t={};for(const s of r??[])t[s.categoryId]=(t[s.categoryId]??0)+1;const l=r?.length??0,o=a?.length??0;return e.jsxs(e.Fragment,{children:[e.jsxs("section",{className:"relative overflow-hidden",children:[e.jsxs("div",{className:"absolute inset-0",children:[e.jsx("img",{src:p,alt:"",className:"h-full w-full object-cover",width:1600,height:600}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-brand/95 via-brand/80 to-brand/30"}),e.jsx("div",{className:"absolute inset-0 bg-tooth-pattern-light opacity-60"})]}),e.jsx("div",{className:"relative container mx-auto px-4 py-14 md:px-6 md:py-20",children:e.jsxs("div",{className:"max-w-2xl text-brand-foreground",children:[e.jsxs("span",{className:"inline-flex items-center gap-2 rounded-full border border-white/20 bg-white/10 px-3 py-1 text-xs font-medium backdrop-blur",children:[e.jsx(j,{className:"h-3.5 w-3.5"}),"Shop by Speciality"]}),e.jsx("h1",{className:"mt-4 font-display text-3xl font-extrabold leading-tight md:text-4xl lg:text-5xl",children:"Browse by Category"}),e.jsxs("p",{className:"mt-3 max-w-lg text-sm text-white/85 md:text-base",children:[o," categories, ",l," products — everything your practice needs, organised by speciality and delivered nationwide."]}),e.jsxs("div",{className:"mt-5 flex flex-wrap items-center gap-x-5 gap-y-2 text-xs text-white/80",children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx(g,{className:"h-3.5 w-3.5"})," Authentic stock"]}),e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx(m,{className:"h-3.5 w-3.5"})," Nationwide delivery"]})]})]})})]}),e.jsxs("section",{className:"container mx-auto px-4 py-12 md:px-6 md:py-16",children:[e.jsx("header",{className:"max-w-2xl",children:e.jsx("p",{className:"text-muted-foreground",children:"Everything your practice needs — organised by speciality."})}),e.jsx("div",{className:"mt-10 grid gap-4 sm:grid-cols-2 md:gap-6 lg:grid-cols-3",children:(a??[]).map((s,n)=>{const i=t[s.id]??0;return e.jsxs(h,{to:"/categories/$slug",params:{slug:s.slug},className:"group relative overflow-hidden rounded border border-border bg-card shadow-[var(--shadow-card)] transition hover:-translate-y-0.5 hover:shadow-[var(--shadow-elevated)]",children:[e.jsxs("div",{className:"relative aspect-[4/3] overflow-hidden",children:[e.jsx("img",{src:s.image,alt:s.name,loading:"lazy",width:1024,height:768,className:"h-full w-full object-cover transition duration-500 group-hover:scale-105"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-brand/85 via-brand/20 to-transparent"}),e.jsx("p",{className:"absolute left-5 top-5 text-xs font-semibold uppercase tracking-wider text-white/80",children:String(n+1).padStart(2,"0")}),e.jsxs("div",{className:"absolute inset-x-0 bottom-0 p-5 text-white",children:[e.jsx("h2",{className:"text-xl font-bold",children:s.name}),e.jsxs("p",{className:"mt-1 line-clamp-2 text-sm text-white/85",children:[s.metaDescription.split(".")[0],"."]}),e.jsxs("p",{className:"mt-1 text-xs text-white/70",children:[i," ",i===1?"product":"products"]})]})]}),e.jsxs("div",{className:"flex items-center justify-between px-5 py-4",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Explore range"}),e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-sm font-semibold text-brand-bright transition group-hover:gap-2",children:["Browse ",e.jsx(u,{className:"h-4 w-4"})]})]})]},s.id)})})]})]})}export{y as component};
