(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{145:(e,t,s)=>{"use strict";s.d(t,{default:()=>n});var a=s(5155),r=s(5239),l=s(2619),c=s.n(l),i=s(2115);function n(e){let{product:t}=e,[s,l]=(0,i.useState)(!1),n="https://via.placeholder.com/400x400/f3f4f6/9ca3af?text=".concat(encodeURIComponent(t.name));return(0,a.jsx)("div",{className:"group relative",children:(0,a.jsxs)("div",{className:"card hover:scale-105 transition-transform",children:[t.badge&&(0,a.jsx)("div",{className:"absolute top-2 right-2 z-10",children:(0,a.jsx)("span",{className:"bg-red-600 text-white px-2 py-1 rounded-full text-xs font-semibold",children:t.badge})}),(0,a.jsxs)("div",{className:"relative aspect-square bg-gray-100 rounded-lg mb-4 overflow-hidden",children:[(0,a.jsx)(r.default,{src:s?n:t.image,alt:t.name,fill:!0,className:"object-cover group-hover:scale-110 transition-transform duration-300",sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",onError:()=>l(!0)}),!t.inStock&&(0,a.jsx)("div",{className:"absolute inset-0 bg-black/50 flex items-center justify-center",children:(0,a.jsx)("span",{className:"bg-white/90 text-gray-900 px-4 py-2 rounded-lg font-semibold",children:"Out of Stock"})})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("p",{className:"text-xs text-gray-500 uppercase tracking-wide",children:t.category}),(0,a.jsx)("h3",{className:"font-semibold text-lg text-gray-900 line-clamp-2",children:t.name}),(0,a.jsx)("p",{className:"text-sm text-gray-600 line-clamp-2",children:t.description}),(0,a.jsx)("p",{className:"text-red-600 font-bold text-xl",children:t.price})]}),(0,a.jsxs)("div",{className:"mt-4 space-y-2",children:[(0,a.jsx)("button",{className:"w-full py-2 rounded-lg font-semibold transition-colors ".concat(t.inStock?"bg-gray-900 text-white hover:bg-gray-800":"bg-gray-200 text-gray-400 cursor-not-allowed"),disabled:!t.inStock,children:t.inStock?"Add to Cart":"Out of Stock"}),(0,a.jsx)(c(),{href:"/shop/product/".concat(t.id),className:"block text-center text-sm text-gray-600 hover:text-red-600 transition-colors",children:"View Details →"})]})]})})}},7777:(e,t,s)=>{Promise.resolve().then(s.bind(s,145)),Promise.resolve().then(s.t.bind(s,2619,23))}},e=>{e.O(0,[619,239,441,255,358],()=>e(e.s=7777)),_N_E=e.O()}]);