// app/cart-checkout/page.tsx 'use client'; // For useState if we were to make checkbox interactive import { useState } from 'react'; export default function CartCheckoutPage() { const [billingSameAsShipping, setBillingSameAsShipping] = useState(true); // Dummy cart items const cartItems = [ { id: 'p1', name: 'Awesome T-Shirt (Red, L)', quantity: 1, price: 29.99 }, { id: 'p2', name: 'Cool Cap - Black', quantity: 2, price: 15.00 }, { id: 'p3', name: 'Generic Gadget XL', quantity: 1, price: 199.50 }, ]; const cartSubtotal = cartItems.reduce((sum, item) => sum + item.price * item.quantity, 0); const shippingEstimate = cartItems.length > 0 ? 5.00 : 0; // No shipping if cart is empty const grandTotal = cartSubtotal + shippingEstimate; // Inline styles const pageStyle = { padding: '20px', fontFamily: 'Arial, sans-serif', maxWidth: '1000px', margin: '20px auto' }; const sectionStyle = { marginBottom: '40px', paddingBottom: '20px', borderBottom: '1px solid #eee' }; const headingStyle = { color: '#333', marginBottom: '20px', borderBottom: '1px solid #ddd', paddingBottom: '10px' }; const subHeadingStyle = { color: '#444', marginBottom: '15px' }; const inputStyle = { width: 'calc(100% - 22px)', padding: '10px', marginBottom: '10px', border: '1px solid #ccc', borderRadius: '4px', boxSizing: 'border-box' as const }; const buttonStyle = { padding: '12px 20px', backgroundColor: '#007bff', color: 'white', border: 'none', borderRadius: '4px', cursor: 'pointer', fontSize: '1em' }; const smallButtonStyle = { padding: '5px 8px', margin: '0 5px', cursor: 'pointer' }; const cartItemStyle = { borderBottom: '1px solid #eee', padding: '15px 0', display: 'flex', justifyContent: 'space-between', alignItems: 'center' }; const formGroupStyle = { marginBottom: '15px' }; const labelStyle = { display: 'block', marginBottom: '5px', fontWeight: 'bold' as const }; return (
{item.name}
Price: ${item.price.toFixed(2)}
Quantity: {item.quantity}
Total: ${(item.price * item.quantity).toFixed(2)}
Subtotal: ${cartSubtotal.toFixed(2)}
Shipping Estimate: ${shippingEstimate.toFixed(2)}
Your cart is currently empty.
)}For bulk orders or special requirements, please request a quote.