This commit is contained in:
Vula Builder
2026-07-26 16:56:17 +00:00
parent 829bf08883
commit ed309e85f9
@@ -0,0 +1,77 @@
'use client'
import { useState } from "react"
import { useEmDashContent } from "@/hooks/useEmDashContent"
import Image from "next/image"
import { Card, CardContent, CardTitle } from "@/components/ui/Card"
export default function VendaSeasonalSpecialsSection() {
const { items, loading } = useEmDashContent("promotions")
const [expandedId, setExpandedId] = useState<string | null>(null)
if (loading) {
return (
<div className="flex justify-center py-16">
<div className="w-8 h-8 rounded-full border-2 border-[#16a34a] border-t-transparent animate-spin" />
</div>
)
}
if (items.length === 0) return null
return (
<section
id="specials"
data-vula-section="vendaseasonalspecials"
data-vula-cms="promotions"
className="py-20 bg-white"
>
<div className="container mx-auto px-4 max-w-7xl">
<h2 className="text-4xl md:text-5xl font-heading text-[#0d2114] mb-4">
Seasonal specials
</h2>
<p className="text-lg text-[#8b5a3c] mb-12 max-w-2xl">
Limited-time packages tied to Venda seasons and celebrations. Book now to secure your place.
</p>
<div className="grid grid-cols-1 md:grid-cols-3 gap-8">
{items.map((item) => {
const d = item.data as { title?: string; description?: string; price?: string; image?: string }
return (
<Card key={item.id} className="bg-[#f4f9f5] border-0 rounded-2xl overflow-hidden shadow-soft hover:shadow-lg transition-all duration-300">
{d.image && (
<div className="relative h-48 overflow-hidden">
<Image
src={d.image}
alt={d.title || "Special offer"}
fill
sizes="(max-width: 768px) 100vw, 33vw"
className="object-cover"
/>
</div>
)}
<CardContent className="p-6">
<CardTitle className="text-xl font-heading text-[#16a34a] mb-2">
{d.title}
</CardTitle>
<p className="text-[#0d2114]/80 mb-4 font-body">{d.description}</p>
{d.price && (
<p className="text-[#d4af37] font-bold text-lg">{d.price}</p>
)}
<button
className="mt-4 px-6 py-2 bg-[#16a34a] text-white rounded-full font-medium hover:bg-[#16a34a]/90 transition-colors"
onClick={() => setExpandedId(expandedId === item.id ? null : item.id)}
>
{expandedId === item.id ? "Show less" : "Book now"}
</button>
{expandedId === item.id && (
<p className="text-sm text-[#8b5a3c] mt-2">Booking link will appear here.</p>
)}
</CardContent>
</Card>
)
})}
</div>
</div>
</section>
)
}