import{u as o,j as e,L as l}from"./components-tSF29mDa.js";import{l as n}from"./index-Bn9V8cCg.js";import{u as c}from"./variants-C3Oc9-dg.js";import{p as d}from"./placeholder-CgrO-6By.js";import{I as x}from"./Image-BWANSFFu.js";import{M as m}from"./Money-CrBKsoq2.js";const N=({data:t})=>[{title:`Durafoam | ${(t==null?void 0:t.collection.title)??""}`}];function w(){const{collection:t}=o();return e.jsxs("div",{className:"collection pb-24",children:[e.jsxs("header",{className:"relative py-12 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(l,{to:"/",className:"hover:text-primary-600 transition-colors",children:"Home"}),e.jsx("span",{className:"text-slate-300",children:"/"}),e.jsx(l,{to:"/collections",className:"hover:text-primary-600 transition-colors",children:"Collections"}),e.jsx("span",{className:"text-slate-300",children:"/"}),e.jsx("span",{className:"text-primary-600 tracking-normal",children:t.title})]}),e.jsx("h1",{className:"text-3xl sm:text-4xl font-extrabold tracking-tight text-slate-900 font-heading",children:t.title}),e.jsx("p",{className:"mt-4 text-base text-slate-600 leading-relaxed max-w-2xl",children:t.description||"Explore our high-quality range of bespoke foam products designed for comfort and durability."})]}),e.jsx("div",{className:"absolute -right-20 -top-20 w-96 h-96 bg-primary-600/5 rounded-full blur-3xl"})]}),e.jsx(n,{connection:t.products,children:({nodes:r,isLoading:s,PreviousLink:a,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(a,{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:s?"Loading...":"↑ Load Previous"})})}),e.jsx(p,{products:r}),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:s?"Loading...":"Load More Products"}),!s&&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 p({products:t}){return e.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-6 lg:gap-8",children:t.map((r,s)=>e.jsx(h,{product:r,loading:s<8?"eager":void 0},r.id))})}function h({product:t,loading:r}){const s=t.variants.nodes[0],a=c(t.handle,s.selectedOptions);return e.jsxs(l,{to:a,className:"group flex flex-col h-full",children:[e.jsxs("div",{className:"relative aspect-square overflow-hidden rounded-[2.5rem] bg-slate-50 border border-slate-100 transition-all duration-500 group-hover:shadow-premium group-hover:border-primary-100",children:[t.featuredImage?e.jsx(x,{data:t.featuredImage,aspectRatio:"1/1",sizes:"(min-width: 45em) 25vw, 50vw",className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-110",loading:r}):e.jsx("img",{src:d,alt:t.title,className:"w-full h-full object-cover opacity-30"}),e.jsx("div",{className:"absolute inset-x-0 bottom-0 p-4 translate-y-4 opacity-0 group-hover:translate-y-0 group-hover:opacity-100 transition-all duration-500 bg-gradient-to-t from-white/95 via-white/50 to-transparent backdrop-blur-sm",children:e.jsx("div",{className:"w-full py-3 bg-brand-dark text-white text-[10px] font-black uppercase tracking-widest text-center rounded-2xl shadow-lg",children:"View Options"})})]}),e.jsx("div",{className:"mt-6 flex-1 px-2",children:e.jsxs("div",{className:"flex justify-between items-start gap-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-slate-900 group-hover:text-primary-600 transition-colors leading-tight",children:t.title}),e.jsxs("p",{className:"mt-1 text-xs font-bold text-slate-400 flex items-center gap-1",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500"}),"In Stock & Ready"]})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("span",{className:"text-xl font-black text-blue-600",children:e.jsx(m,{data:t.priceRange.minVariantPrice})}),e.jsx("span",{className:"block text-[10px] font-bold text-slate-400 uppercase",children:"Start from"})]})]})})]})}export{w as default,N as meta};
