import { useState, useEffect } from 'react';
import { ShoppingBag, ArrowRight, Menu, X, Globe, Share2, Instagram, Search, ChevronRight, Apple, CreditCard, Box, Zap, Heart } from 'lucide-react';
export default function MinimalTheme({ posts, categories }: { posts?: any[], categories?: any[] }) {
const handleSimulatedAction = (e: React.MouseEvent | React.FormEvent, msg: string) => {
e.preventDefault();
window.alert(`[SaaS Preview] Ação simulada: ${msg}\n\nEsta funcionalidade estará ativa após a publicação da sua loja minimalista.`);
};
const [view, setView] = useState<'home' | 'product'>('home');
const [cartOpen, setCartOpen] = useState(false);
const [scrolled, setScrolled] = useState(false);
useEffect(() => {
const handleScroll = () => setScrolled(window.scrollY > 50);
window.addEventListener('scroll', handleScroll);
return () => window.removeEventListener('scroll', handleScroll);
}, []);
useEffect(() => {
window.scrollTo(0, 0);
}, [view]);
const featured = {
name: "Sonic One Headphones",
price: "$349",
desc: "Pure silence. Pure sound. The new standard in wireless audio.",
img: "https://images.unsplash.com/photo-1505740420928-5e560c06d30e?auto=format&fit=crop&q=80&w=1200"
};
const products = [
{ id: 1, name: "Minimalist Watch v2", price: "$199", img: "https://images.unsplash.com/photo-1523275335684-37898b6baf30?auto=format&fit=crop&q=80&w=800" },
{ id: 2, name: "Smart Speaker Aura", price: "$129", img: "https://images.unsplash.com/photo-1589492477829-5e65395b66cc?auto=format&fit=crop&q=80&w=800" },
{ id: 3, name: "Leather Laptop Sleeve", price: "$89", img: "https://images.unsplash.com/photo-1544333346-64e4fe18274b?auto=format&fit=crop&q=80&w=800" },
{ id: 4, name: "Aluminum Desk Lamp", price: "$159", img: "https://images.unsplash.com/photo-1534073828943-f801091bb18c?auto=format&fit=crop&q=80&w=800" },
];
return (
{/* Super-Clean Header */}
setCartOpen(true)} className="relative group">
1
{view === 'home' ? (
{/* Section 1: Pure Hero */}
{featured.name}
{featured.desc}
setView('product')} className="bg-[#0066cc] text-white px-10 py-4 rounded-full font-bold text-sm hover:bg-[#0077ee] transition-all shadow-xl shadow-blue-500/20">Buy Now
Learn more
{/* Section 2: Product Mosaic */}
{products.map((p, idx) => (
setView('product')}>
{p.name}
Starting from {p.price}
View details
))}
{/* Section 3: Feature Highlight */}
Seamless Integration.
Designed to work perfectly together. Connect your world with a single touch. Experience the future of minimalist technology.
Secure Checkout
Your data is always encrypted and protected by the latest security standards.
Express Shipping
Global delivery within 48 hours for all premium members.
Lifetime Support
Our experts are available 24/7 to help you with anything you need.
) : (
/* --- PRODUCT VIEW --- */
New Arrival
{products[0].name}
The perfect balance of form and function. Designed with premium materials and advanced audio technology.
Design Ethos
Nosso compromisso com o minimalismo vai além da estética. É sobre remover o desnecessário para destacar o essencial. Cada curva e cada material foram escolhidos para proporcionar uma experiência tátil e visual sublime.
Battery Life
Up to 40 Hours
Connectivity
Bluetooth 5.3
setCartOpen(true)} className="w-full bg-[#0066cc] text-white py-6 rounded-full font-bold text-lg hover:bg-[#0077ee] transition-all shadow-2xl shadow-blue-500/30">
Add to Cart
Free Shipping
2-Year Warranty
Easy Returns
{/* Section: Complete the Set */}
Complete the Set
{products.slice(1).map((p) => (
setView('product')}>
{p.name}
{p.price}
))}
)}
{/* Clean Minimal Footer */}
MINIMAL
Crafting the essentials of the modern digital life with a focus on simplicity, quality, and performance.
handleSimulatedAction(e, 'Instagram')} className="text-black/40 hover:text-[#0066cc] transition-colors">
handleSimulatedAction(e, 'Site')} className="text-black/40 hover:text-[#0066cc] transition-colors">
handleSimulatedAction(e, 'Share')} className="text-black/40 hover:text-[#0066cc] transition-colors">
© {new Date().getFullYear()} MINIMAL DESIGN CO. ALL RIGHTS RESERVED.
UNITED STATES / ENGLISH
{/* Glassmorphic Cart */}
{cartOpen && (
setCartOpen(false)}>
Shopping Cart
setCartOpen(false)} className="hover:opacity-50 transition-all">
{products[0].name}
Space Black | 1 Unit
{products[0].price}
Remove
Subtotal
{products[0].price}
Check Out
)}
);
}