import{u as o,j as e,L as s}from"./components-tSF29mDa.js";import{l as n}from"./index-Bn9V8cCg.js";import{p as d}from"./placeholder-CgrO-6By.js";import{I as c}from"./Image-BWANSFFu.js";function f(){const{collections:t}=o();return e.jsxs("div",{className:"pb-24",children:[e.jsxs("header",{className:"relative py-16 overflow-hidden rounded-[3rem] bg-slate-50 mb-12 px-6 lg:px-20 border border-slate-100",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary-400/5 via-transparent to-blue-400/5"}),e.jsxs("div",{className:"relative z-10 max-w-4xl",children:[e.jsxs("nav",{className:"mb-4 flex space-x-2 text-[10px] font-bold text-slate-400 uppercase tracking-widest",children:[e.jsx(s,{to:"/",className:"hover:text-primary-600 transition-colors",children:"Home"}),e.jsx("span",{className:"text-slate-300",children:"/"}),e.jsx("span",{className:"text-primary-600 tracking-normal",children:"Collections"})]}),e.jsx("h1",{className:"text-3xl sm:text-4xl font-extrabold tracking-tight text-slate-900 font-heading",children:"Our Collections"}),e.jsx("p",{className:"mt-4 text-base text-slate-600 leading-relaxed max-w-2xl",children:"Find exactly what you're looking for with our specialized foam categories, curated for your comfort and projects."})]})]}),e.jsx(n,{connection:t,children:({nodes:a,isLoading:r,PreviousLink:l,NextLink:i})=>e.jsxs("div",{className:"px-4 sm:px-6 lg:px-8",children:[e.jsx("div",{className:"flex justify-center mb-12",children:e.jsx(l,{children:e.jsx("div",{className:"group flex items-center gap-2 px-6 py-3 rounded-2xl bg-white border border-slate-200 text-sm font-bold text-slate-600 hover:border-primary-600 hover:text-primary-600 transition-all cursor-pointer",children:r?"Loading...":"↑ Load Previous"})})}),e.jsx(x,{collections:a}),e.jsx("div",{className:"flex justify-center mt-20",children:e.jsx(i,{children:e.jsxs("div",{className:"group flex flex-col items-center gap-4 px-10 py-5 rounded-[2rem] bg-brand-dark text-white shadow-xl hover:bg-slate-800 transition-all hover:-translate-y-1 cursor-pointer",children:[e.jsx("span",{className:"text-sm font-extrabold uppercase tracking-widest",children:r?"Loading...":"Load More Collections"}),!r&&e.jsx("svg",{className:"w-5 h-5 animate-bounce",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M19 14l-7 7m0 0l-7-7m7 7V3"})})]})})})]})})]})}function x({collections:t}){return e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 lg:gap-8",children:t.map((a,r)=>e.jsx(m,{collection:a,index:r},a.id))})}function m({collection:t,index:a}){return e.jsxs(s,{to:`/collections/${t.handle}`,prefetch:"intent",className:"group relative overflow-hidden rounded-[2.5rem] shadow-sm transition-all duration-500 hover:shadow-premium hover:-translate-y-1 block h-80 sm:h-96",children:[e.jsx("div",{className:"absolute inset-0 bg-slate-100",children:t!=null&&t.image?e.jsx(c,{alt:t.image.altText||t.title,aspectRatio:"4/3",data:t.image,loading:a<3?"eager":void 0,sizes:"(min-width: 1024px) 33vw, (min-width: 768px) 50vw, 100vw",className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"}):e.jsx("img",{src:d,alt:t.title,className:"w-full h-full object-cover opacity-50 bg-slate-50"})}),e.jsxs("div",{className:"absolute inset-0 bg-gradient-to-t from-brand-dark/90 via-brand-dark/20 to-transparent p-8 flex flex-col justify-end",children:[e.jsx("h3",{className:"text-2xl font-bold text-white mb-2 leading-tight group-hover:text-primary-400 transition-colors",children:t.title}),e.jsx("p",{className:"text-white/70 text-sm font-bold uppercase tracking-widest opacity-0 group-hover:opacity-100 transition-all duration-500 translate-y-4 group-hover:translate-y-0",children:"Explore Collection →"})]})]})}export{f as default};
