"use client"; import { useState, useMemo } from "react"; import Link from "next/link"; import StorefrontHeader from "@/components/storefront/StorefrontHeader"; import StorefrontFooter from "@/components/storefront/StorefrontFooter"; import LayoutContainer from "@/components/layout/LayoutContainer"; type FAQItem = { question: string; answer: string; }; const FAQ_CATEGORIES = [ { category: "Ordering & Pickup", items: [ { question: "How do I place a preorder for corn?", answer: "Find a stop near you on our homepage and click 'Shop This Stop' to add corn to your cart and select your pickup location. Preordering helps us bring the right amount of corn to each stop.", }, { question: "Can I order without selecting a pickup stop?", answer: "Yes. Choose 'Shipping' at checkout and we will mail cooler boxes directly to your home. Shipping is available for orders of 4 or more dozen and is fulfilled after the season ends.", }, { question: "What happens if I miss my pickup time?", answer: "Please call the office at 970-323-6874 as soon as possible. We will do our best to accommodate, but unclaimed orders may be donated or sold after the pickup window closes.", }, ], }, { category: "Shipping & Delivery", items: [ { question: "Do you ship corn?", answer: "Yes. We ship Olathe Sweet Sweet Corn nationwide. Orders ship as cooler boxes after our field season ends in late summer. A minimum of 4 dozen is required for shipping.", }, { question: "How are cooler boxes packaged?", answer: "Corn is packed in insulated coolers with gel packs to keep it fresh during transit. Shipping costs are calculated at checkout based on your location.", }, { question: "When will my shipped order arrive?", answer: "Cooler box orders are shipped after the season ends in late summer. You will receive a tracking notification by email once your order ships. Most orders within the continental US arrive within 3-7 business days.", }, ], }, { category: "Wholesale", items: [ { question: "How do I set up a wholesale account?", answer: "Visit /wholesale/register to apply. We review applications and respond within 1-2 business days. Wholesale accounts are available to retailers, restaurants, and farm stands.", }, { question: "Is there a minimum order for wholesale?", answer: "Minimum wholesale order is $100 per order. Some account types have additional minimums — contact us for details.", }, ], }, { category: "Product & Quality", items: [ { question: "What makes Olathe Sweet different?", answer: "Olathe Sweet Sweet Corn is grown in the Uncompahgre Valley of Colorado, where high-altitude days and cool nights produce exceptionally sweet, tender corn. We have been growing this variety for over 40 years.", }, { question: "Is your corn organic?", answer: "We use regenerative farming practices including no-till methods, cover crops, and reduced chemical inputs. We are not certified organic, but we take a thoughtful approach to land stewardship.", }, { question: "How should I store my corn?", answer: "Store corn in the refrigerator and eat within 3-5 days. Do not husk it until you are ready to cook. For best sweetness, bring a cooler with ice to transport your corn home.", }, ], }, ]; function FAQAccordion({ items, searchQuery }: { items: FAQItem[]; searchQuery: string }) { const [open, setOpen] = useState(null); const filtered = useMemo(() => { if (!searchQuery.trim()) return items; const q = searchQuery.toLowerCase(); return items.filter( (item) => item.question.toLowerCase().includes(q) || item.answer.toLowerCase().includes(q) ); }, [items, searchQuery]); if (filtered.length === 0) { return (

No results for "{searchQuery}"

Try a different term or browse all categories below.

); } return (
{filtered.map((item) => { const isOpen = open === item.question; return (

{item.answer}

); })}
); } export default function TuxedoFAQPage() { const [searchQuery, setSearchQuery] = useState(""); return (
{/* Page header */}

Questions

FAQ

Everything you need to know about ordering, pickup, and shipping.

{/* Search */}
setSearchQuery(e.target.value)} className="w-full rounded-2xl border border-stone-200 bg-white pl-11 pr-5 py-4 text-sm text-stone-900 placeholder-stone-400 outline-none focus:border-stone-900 focus:ring-1 focus:ring-stone-900 transition-colors shadow-sm" /> {searchQuery && ( )}
{/* FAQ categories */}
{FAQ_CATEGORIES.map((cat) => (

{cat.category}

))}
{/* Still have questions CTA */}

Still have questions?

We are happy to help — reach out anytime.

Contact Us
); }