diff --git a/app/acura-parts/[id]/page-client.tsx b/app/acura-parts/[id]/page-client.tsx new file mode 100644 index 0000000..0b125ee --- /dev/null +++ b/app/acura-parts/[id]/page-client.tsx @@ -0,0 +1,309 @@ +'use client' + +import { useState } from 'react' +import { useParams, notFound } from 'next/navigation' +import Link from 'next/link' +import Image from 'next/image' +import { Navbar } from '@/components/navbar' +import { Footer } from '@/components/footer' +import { ShoppingCart, Heart, Phone, Mail, ArrowLeft, Truck, Shield, CheckCircle, AlertTriangle, Package, Tag, Minus, Plus } from 'lucide-react' +import { ACURA_PARTS, getPartById, getPartsByModel, type AcuraPart } from '@/lib/acura-parts-data' +import { useCartStore } from '@/lib/stores/cart-store' +import { useWishlistStore } from '@/lib/stores/wishlist-store' + +export default function AcuraPartDetailPage() { + const params = useParams() + const id = params.id as string + const part = getPartById(id) + + const [quantity, setQuantity] = useState(1) + const [addedToCart, setAddedToCart] = useState(false) + + const addToCart = useCartStore((state) => state.addItem) + const addToWishlist = useWishlistStore((state) => state.addItem) + + if (!part) { + return ( +
+ +
+
+

Part Not Found

+ Back to Acura Parts +
+
+
+ ) + } + + // Get related parts + const relatedParts = getPartsByModel(part.model).filter(p => p.id !== part.id).slice(0, 4) + + const handleAddToCart = () => { + addToCart({ + id: part.id, + name: part.title, + price: part.price, + quantity: quantity, + image: part.image, + make: 'Acura', + partType: part.partType, + }) + setAddedToCart(true) + setTimeout(() => setAddedToCart(false), 3000) + } + + const handleAddToWishlist = () => { + addToWishlist({ + id: part.id, + name: part.title, + price: part.price, + image: part.image, + make: 'Acura', + partType: part.partType, + addedAt: Date.now(), + }) + } + + return ( +
+ +
+ {/* Breadcrumb */} +
+
+
+ Home + / + Acura Parts + / + {part.partType} +
+
+
+ +
+ {/* Back link */} + + + Back to Acura Parts + + +
+ {/* Product Image */} +
+
+ {/* Product Image */} + {part.title} + + {/* USED PARTS Watermark Overlay */} +
+
+ USED PART +
+
+ + {/* Badges */} +
+ + Used Part + + + In Stock + +
+ + {/* Condition indicator */} +
+
+ RECYCLED OEM +
+
+ + {/* Corner badge */} +
+ OEM Quality Recycled +
+ + {/* Diagonal banner */} +
+ Used Parts +
+
+ + {/* Trust indicators */} +
+
+ + Inspected +
+
+ + Fast Ship +
+
+ + OEM Part +
+
+
+ + {/* Product Details */} +
+ {/* Title and badges */} +
+
+ Acura + {part.model} + {part.year} +
+

{part.title}

+

MPN: {part.mpn}

+
+ + {/* Price */} +
+
+ ${part.price.toFixed(2)} + ${part.originalPrice.toFixed(2)} +
+
+ + You save ${(part.originalPrice - part.price).toFixed(2)} (15%) +
+
+ + {/* Used Part Notice */} +
+
+ +
+

Used OEM Part

+

This is a recycled OEM part from a verified salvage yard. Professionally inspected for quality. Please verify VIN and fitment compatibility before ordering.

+
+
+
+ + {/* Description */} +
+

Description

+

{part.description}

+
+ + {/* Quantity and Add to Cart */} +
+
+ Quantity: +
+ + {quantity} + +
+
+ +
+ + +
+ + {/* View Cart Link */} + {addedToCart && ( + + View Cart → + + )} +
+ + {/* Contact CTA */} +
+

Have questions about this part?

+
+ + + (888) 818-5001 + + + + Get Quote + +
+
+
+
+ + {/* Related Parts */} + {relatedParts.length > 0 && ( +
+

More {part.model} Parts

+
+ {relatedParts.map((relatedPart) => ( + +
+
+ A +
+
+

{relatedPart.title}

+
+ ${relatedPart.price.toFixed(2)} + ${relatedPart.originalPrice.toFixed(2)} +
+ + ))} +
+
+ )} +
+
+
+ ) +} diff --git a/app/acura-parts/[id]/page.tsx b/app/acura-parts/[id]/page.tsx index 0b125ee..22f321c 100644 --- a/app/acura-parts/[id]/page.tsx +++ b/app/acura-parts/[id]/page.tsx @@ -1,309 +1,8 @@ -'use client' +import { ACURA_PARTS } from '@/lib/acura-parts-data' +import AcuraPartDetailPage from './page-client' -import { useState } from 'react' -import { useParams, notFound } from 'next/navigation' -import Link from 'next/link' -import Image from 'next/image' -import { Navbar } from '@/components/navbar' -import { Footer } from '@/components/footer' -import { ShoppingCart, Heart, Phone, Mail, ArrowLeft, Truck, Shield, CheckCircle, AlertTriangle, Package, Tag, Minus, Plus } from 'lucide-react' -import { ACURA_PARTS, getPartById, getPartsByModel, type AcuraPart } from '@/lib/acura-parts-data' -import { useCartStore } from '@/lib/stores/cart-store' -import { useWishlistStore } from '@/lib/stores/wishlist-store' - -export default function AcuraPartDetailPage() { - const params = useParams() - const id = params.id as string - const part = getPartById(id) - - const [quantity, setQuantity] = useState(1) - const [addedToCart, setAddedToCart] = useState(false) - - const addToCart = useCartStore((state) => state.addItem) - const addToWishlist = useWishlistStore((state) => state.addItem) - - if (!part) { - return ( -
- -
-
-

Part Not Found

- Back to Acura Parts -
-
-
- ) - } - - // Get related parts - const relatedParts = getPartsByModel(part.model).filter(p => p.id !== part.id).slice(0, 4) - - const handleAddToCart = () => { - addToCart({ - id: part.id, - name: part.title, - price: part.price, - quantity: quantity, - image: part.image, - make: 'Acura', - partType: part.partType, - }) - setAddedToCart(true) - setTimeout(() => setAddedToCart(false), 3000) - } - - const handleAddToWishlist = () => { - addToWishlist({ - id: part.id, - name: part.title, - price: part.price, - image: part.image, - make: 'Acura', - partType: part.partType, - addedAt: Date.now(), - }) - } - - return ( -
- -
- {/* Breadcrumb */} -
-
-
- Home - / - Acura Parts - / - {part.partType} -
-
-
- -
- {/* Back link */} - - - Back to Acura Parts - - -
- {/* Product Image */} -
-
- {/* Product Image */} - {part.title} - - {/* USED PARTS Watermark Overlay */} -
-
- USED PART -
-
- - {/* Badges */} -
- - Used Part - - - In Stock - -
- - {/* Condition indicator */} -
-
- RECYCLED OEM -
-
- - {/* Corner badge */} -
- OEM Quality Recycled -
- - {/* Diagonal banner */} -
- Used Parts -
-
- - {/* Trust indicators */} -
-
- - Inspected -
-
- - Fast Ship -
-
- - OEM Part -
-
-
- - {/* Product Details */} -
- {/* Title and badges */} -
-
- Acura - {part.model} - {part.year} -
-

{part.title}

-

MPN: {part.mpn}

-
- - {/* Price */} -
-
- ${part.price.toFixed(2)} - ${part.originalPrice.toFixed(2)} -
-
- - You save ${(part.originalPrice - part.price).toFixed(2)} (15%) -
-
- - {/* Used Part Notice */} -
-
- -
-

Used OEM Part

-

This is a recycled OEM part from a verified salvage yard. Professionally inspected for quality. Please verify VIN and fitment compatibility before ordering.

-
-
-
- - {/* Description */} -
-

Description

-

{part.description}

-
- - {/* Quantity and Add to Cart */} -
-
- Quantity: -
- - {quantity} - -
-
- -
- - -
- - {/* View Cart Link */} - {addedToCart && ( - - View Cart → - - )} -
- - {/* Contact CTA */} -
-

Have questions about this part?

-
- - - (888) 818-5001 - - - - Get Quote - -
-
-
-
- - {/* Related Parts */} - {relatedParts.length > 0 && ( -
-

More {part.model} Parts

-
- {relatedParts.map((relatedPart) => ( - -
-
- A -
-
-

{relatedPart.title}

-
- ${relatedPart.price.toFixed(2)} - ${relatedPart.originalPrice.toFixed(2)} -
- - ))} -
-
- )} -
-
-
- ) +export function generateStaticParams() { + return ACURA_PARTS.map((part) => ({ id: part.id })) } + +export default AcuraPartDetailPage diff --git a/app/makes/[brand]/page-client.tsx b/app/makes/[brand]/page-client.tsx new file mode 100644 index 0000000..5868f6f --- /dev/null +++ b/app/makes/[brand]/page-client.tsx @@ -0,0 +1,445 @@ +"use client" + +import { useParams } from "next/navigation" +import { Navbar } from "@/components/navbar" +import { Footer } from "@/components/footer" +import { BrandLogosSection } from "@/components/brand-logos" +import { CAR_MAKES, CAR_MODELS, BRAND_COLORS, PART_CATEGORIES, MODEL_YEAR_RANGES, getBrandLogoUrl, getBrandCarImageUrl, PHONE_SALES, PHONE_DISPLAY } from "@/lib/data" +import { ALL_PARTS, getBrandContent } from "@/lib/parts-content" +import { Search, Phone, ArrowLeft, Shield, Clock, Truck, Star, ChevronDown, Package, Undo2, Globe, Headphones } from "lucide-react" +import Link from "next/link" +import Image from "next/image" +import { useState, useMemo } from "react" + +function BrandHeroBanner({ brand, color }: { brand: string; color: string }) { + const logoUrl = getBrandLogoUrl(brand) + const carImageUrl = getBrandCarImageUrl(brand) + const [imgFailed, setImgFailed] = useState(false) + const [carImgFailed, setCarImgFailed] = useState(false) + const initials = brand.split(/[\s-]+/).map(w => w[0]).join("").slice(0, 3).toUpperCase() + + return ( +
+ {carImageUrl && !carImgFailed && ( + {`${brand} setCarImgFailed(true)} priority /> + )} +
+
+
+
+
+
+
+ {logoUrl && !imgFailed ? ( + {`${brand} setImgFailed(true)} priority /> + ) : ( + {initials} + )} +
+
+

{brand}

+

Used Auto Parts

+
+ {[ + { icon: Shield, text: "6-Month Warranty" }, + { icon: Truck, text: "Free Shipping" }, + { icon: Clock, text: "24-HR Response" }, + ].map(({ icon: Icon, text }) => ( +
+ {text} +
+ ))} +
+
+ + Search {brand} Parts + + + Call {PHONE_DISPLAY} + +
+
+
+ ) +} + +function FAQItem({ question, answer }: { question: string; answer: string }) { + const [open, setOpen] = useState(false) + return ( +
+ + {open &&
{answer}
} +
+ ) +} + +function ModelYearBadge({ model, yearRange }: { model: string; yearRange?: [number, number] }) { + const currentYear = new Date().getFullYear() + const start = yearRange?.[0] || 0 + const end = yearRange?.[1] || 0 + const label = start && end ? `${start}--${end}` : start ? `${start}--Present` : "" + const isActive = end === 0 || end >= currentYear + return ( +
+ {model} + {label && ( + + {label} + + )} +
+ ) +} + +export default function BrandPage() { + const params = useParams() + const brandSlug = params.brand as string + const brand = useMemo(() => { + const normalized = brandSlug.toLowerCase().replace(/-/g, " ") + return CAR_MAKES.find(m => m.toLowerCase() === normalized) || + CAR_MAKES.find(m => m.toLowerCase().replace(/\s+/g, "-") === brandSlug) || + brandSlug.split("-").map(w => w.charAt(0).toUpperCase() + w.slice(1)).join(" ") + }, [brandSlug]) + + const models = CAR_MODELS[brand] || [] + const color = BRAND_COLORS[brand] || "#333333" + const yearRanges = MODEL_YEAR_RANGES[brand] || {} + const brandContent = getBrandContent(brand) + + // Generate dynamic FAQ data + const faqItems = useMemo(() => { + const currentYear = new Date().getFullYear() + const activeModels = models.filter(m => { + const yr = yearRanges[m] + return yr && (yr[1] === 0 || yr[1] >= currentYear - 2) + }) + const discontinuedModels = models.filter(m => { + const yr = yearRanges[m] + return yr && yr[1] !== 0 && yr[1] < currentYear - 2 + }) + const modelList = models.join(", ") + const activeList = activeModels.length > 0 ? activeModels.join(", ") : "various models" + const minYear = Object.values(yearRanges).map(r => r[0]).filter(Boolean) + const earliestDecade = minYear.length > 0 ? `${Math.floor(Math.min(...minYear) / 10) * 10}s` : "1990s" + + return [ + { + q: `What ${brand} models do you carry used parts for?`, + a: `We carry used OEM parts for all ${brand} models including: ${modelList}. Our inventory spans parts from the earliest production years to the latest models, sourced from our network of 2,000+ verified auto recycling yards across the USA.`, + }, + { + q: `What year range of ${brand} parts are available?`, + a: `We stock used parts for ${brand} vehicles spanning from the ${earliestDecade} to present day (${currentYear}). Whether you need parts for a classic ${brand} or a late-model vehicle, our nationwide network can source what you need with a 6-month warranty included.`, + }, + { + q: `How do I find the right used part for my ${brand}?`, + a: `Use our search tool at the top of the page -- select your ${brand} model, year, and the specific part you need. You can also call us at ${PHONE_DISPLAY} for personalized assistance. Our specialists will match the correct OEM part number, verify fitment, and provide you with competitive pricing from multiple yards.`, + }, + { + q: `Do you offer warranties on used ${brand} parts?`, + a: `Yes! Every used ${brand} part we sell comes with a minimum 30-day warranty, with most parts covered by our standard 6-month warranty. Engines and transmissions may include extended 90-day to 6-month coverage. All parts are inspected and tested before shipping to ensure quality and proper function.`, + }, + { + q: `Can you ship used ${brand} parts nationwide?`, + a: `Absolutely. We ship used ${brand} parts to all 50 states. Many orders qualify for free shipping, and most parts ship within 1-3 business days. For large components like engines and transmissions, we use freight carriers with full insurance coverage. Expedited shipping is also available upon request.`, + }, + ...(activeModels.length > 0 ? [{ + q: `Which ${brand} models are currently in production?`, + a: `Currently in production ${brand} models include: ${activeList}. We carry the latest OEM parts for these vehicles as well as all prior model years.${discontinuedModels.length > 0 ? ` Discontinued models we also support include: ${discontinuedModels.join(", ")}.` : ""}`, + }] : []), + { + q: `How much do used ${brand} parts cost?`, + a: `Used ${brand} OEM parts typically cost 40-70% less than new dealer parts. Pricing varies by part type, condition, and mileage. For example, a used ${brand} engine may range from $800-$3,500 depending on the model and condition. Request a free quote for exact pricing on the specific part you need.`, + }, + { + q: `What are the most commonly replaced ${brand} parts?`, + a: `The most frequently requested used ${brand} parts include: engines, transmissions, alternators, starter motors, A/C compressors, radiators, control arms, door assemblies, headlight assemblies, and ECU/PCM modules. We maintain deep inventory across all ${PART_CATEGORIES.length} major part categories for every ${brand} model.`, + }, + { + q: `Is it better to buy used or new ${brand} parts?`, + a: `Used OEM ${brand} parts offer the best value for most repairs. They are genuine manufacturer parts with proven durability at 40-70% less cost. For critical safety components, we ensure every part meets OEM specifications. New parts make sense only when used alternatives are unavailable.`, + }, + { + q: `How quickly will I receive my used ${brand} part?`, + a: `After placing your request, you will receive a quote within 24 hours. Once ordered, most parts ship within 1-3 business days. Standard delivery takes 5-7 business days, with expedited options available. Large components like engines may take 7-10 business days via freight.`, + }, + ] + }, [brand, models, yearRanges]) + + const brandExists = CAR_MAKES.some(m => m.toLowerCase() === brand.toLowerCase()) + + if (!brandExists) { + return ( + <> + +
+
+

Brand Not Found

+

The brand "{brand}" was not found in our inventory.

+ View All Brands +
+
+