1import{i as m,j as s,L as l,n as r}from"./index-BnW04Gof.js";import{S as c,b as d,B as t}from"./SEOHead-Bqg9biCq.js";import{C as i}from"./card-DCUu0LN_.js";import{S as x}from"./shopping-cart-DHL1MK17.js";import{T as h}from"./trash-2-DtqMf0HG.js";import{M as u,P as p}from"./plus-q-8iU_8A.js";function v(){const{cart:a,updateQuantity:n,removeFromCart:o}=m();return a.itemCount===0?s.jsxs(c,{children:[s.jsx(d,{title:"Shopping Cart",description:"View and manage your IBV Gold shopping cart. Purchase certified gold, silver, and platinum products with secure checkout.",keywords:"gold cart, buy gold online, precious metals checkout",canonicalUrl:"/cart"}),s.jsx("main",{className:"mx-auto max-w-7xl px-4 pb-16",children:s.jsx("div",{className:"mx-auto mt-14 max-w-2xl",children:s.jsxs(i,{className:"rounded-3xl border-transparent bg-secondary/40 p-8 text-center",children:[s.jsx("div",{className:"mx-auto grid h-14 w-14 place-items-center rounded-2xl bg-background",children:s.jsx(x,{className:"h-6 w-6"})}),s.jsx("h1",{className:"mt-6 text-2xl font-extrabold tracking-tight",children:"Your cart is empty"}),s.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Add an item from the shop to see it here."}),s.jsx(t,{asChild:!0,variant:"pill-outline",size:"pill",className:"mt-6",children:s.jsx(l,{to:"/",children:"Return to shop"})})]})})})]}):s.jsxs(c,{children:[s.jsx(d,{title:"Shopping Cart",description:"View and manage your IBV Gold shopping cart.",canonicalUrl:"/cart"}),s.jsx("main",{className:"mx-auto max-w-7xl px-4 pb-16",children:s.jsxs("div",{className:"mt-10",children:[s.jsx("h1",{className:"text-3xl font-extrabold tracking-tight",children:"Shopping Cart"}),s.jsxs("p",{className:"mt-2 text-muted-foreground",children:[a.itemCount," item",a.itemCount!==1?"s":""," in your cart"]}),s.jsxs("div",{className:"mt-8 grid gap-8 lg:grid-cols-[1fr_380px]",children:[s.jsx("div",{className:"space-y-4",children:a.items.map(e=>s.jsx(i,{className:"rounded-2xl border-transparent bg-secondary/40 p-3 sm:p-4",children:s.jsxs("div",{className:"flex gap-3 sm:gap-4",children:[s.jsx(l,{to:`/product/${e.slug}`,className:"h-20 w-20 sm:h-24 sm:w-24 flex-shrink-0 overflow-hidden rounded-xl bg-background",children:s.jsx("img",{src:e.image,alt:e.name,className:"h-full w-full object-contain p-2"})}),s.jsxs("div",{className:"flex flex-1 flex-col min-w-0",children:[s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx(l,{to:`/product/${e.slug}`,className:"font-semibold hover:underline text-sm sm:text-base line-clamp-2",children:e.name}),s.jsxs("p",{className:"mt-0.5 sm:mt-1 text-xs sm:text-sm text-muted-foreground",children:[r(e.price)," each"]})]}),s.jsx(t,{variant:"ghost",size:"icon",className:"h-7 w-7 sm:h-8 sm:w-8 text-muted-foreground hover:text-destructive flex-shrink-0",onClick:()=>o(e.id),children:s.jsx(h,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"mt-auto flex items-center justify-between pt-2 gap-2",children:[s.jsxs("div",{className:"flex items-center gap-1 sm:gap-2",children:[s.jsx(t,{variant:"outline",size:"icon",className:"h-7 w-7 sm:h-8 sm:w-8",onClick:()=>n(e.id,e.quantity-1),disabled:e.quantity<=1,children:s.jsx(u,{className:"h-3 w-3"})}),s.jsx("span",{className:"w-6 sm:w-8 text-center font-medium text-sm",children:e.quantity}),s.jsx(t,{variant:"outline",size:"icon",className:"h-7 w-7 sm:h-8 sm:w-8",onClick:()=>n(e.id,e.quantity+1),children:s.jsx(p,{className:"h-3 w-3"})})]}),s.jsx("div",{className:"font-semibold text-sm sm:text-base",children:r(e.price*e.quantity)})]})]})]})},e.id))}),s.jsx("div",{className:"lg:sticky lg:top-24",children:s.jsxs(i,{className:"rounded-2xl border-transparent bg-secondary/40 p-4 sm:p-6",children:[s.jsx("h2",{className:"text-lg font-bold",children:"Order Summary"}),s.jsxs("div",{className:"mt-4 space-y-3 text-sm",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Subtotal"}),s.jsx("span",{children:r(a.subtotal)})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Shipping"}),s.jsx("span",{className:"text-muted-foreground",children:"Calculated at checkout"})]}),s.jsx("div",{className:"h-px bg-border"}),s.jsxs("div",{className:"flex justify-between text-base font-bold",children:[s.jsx("span",{children:"Total"}),s.jsx("span",{children:r(a.subtotal)})]})]}),s.jsx(t,{variant:"brand",size:"pill",className:"mt-6 w-full justify-center",asChild:!0,children:s.jsx(l,{to:"/checkout",children:"Proceed to Checkout"})}),s.jsx(t,{variant:"pill-outline",size:"pill",className:"mt-3 w-full justify-center",asChild:!0,children:s.jsx(l,{to:"/",children:"Continue Shopping"})})]})})]})]})})]})}export{v as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.