import React, { useState, useEffect } from 'react'; import { ShoppingCart, Menu, X, Search, Phone, Mail, Instagram, MessageCircle, Send, ChevronDown, ChevronUp, Trash2, Plus, Minus, Filter, Star, MapPin, Clock, Package, Shield, Check, AlertCircle } from 'lucide-react'; // Данные товаров из предоставленного каталога const productsData = [ // Pablo 25mg { id: 1, name: "Pablo Ice Mint 25mg", brand: "Pablo", strength: "25mg", flavor: "Мята", price: 2800, description: "Мятный вкус, освежающий и бодрящий. Подходит для начинающих.", image: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)" }, { id: 2, name: "Pablo Berry Blast 25mg", brand: "Pablo", strength: "25mg", flavor: "Ягодный", price: 2800, description: "Ягодный вкус с лёгкой сладостью и мягким воздействием.", image: "linear-gradient(135deg, #f093fb 0%, #f5576c 100%)" }, { id: 3, name: "Pablo Citrus Fresh 25mg", brand: "Pablo", strength: "25mg", flavor: "Цитрусовый", price: 2800, description: "Цитрусовый вкус, лёгкий и ароматный.", image: "linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%)" }, { id: 4, name: "Pablo Strong Mint 50mg", brand: "Pablo", strength: "50mg", flavor: "Мята", price: 3000, description: "Мощная мята, средняя крепость, для опытных.", image: "linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)" }, { id: 5, name: "Pablo Arctic Berry 50mg", brand: "Pablo", strength: "50mg", flavor: "Ягодный", price: 3000, description: "Ягоды с холодным мятным послевкусием.", image: "linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%)" }, { id: 6, name: "Pablo Lemon Energy 50mg", brand: "Pablo", strength: "50mg", flavor: "Цитрусовый", price: 3000, description: "Лимонный вкус с бодрящим эффектом.", image: "linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%)" }, { id: 7, name: "Pablo Hardcore Mint 100mg", brand: "Pablo", strength: "100mg", flavor: "Мята", price: 3200, description: "Очень сильная мята для профи.", image: "linear-gradient(135deg, #30cfd0 0%, #330867 100%)" }, { id: 8, name: "Pablo Black Ice 100mg", brand: "Pablo", strength: "100mg", flavor: "Ягодный", price: 3200, description: "Ягоды с мятой, экстремально холодный вкус.", image: "linear-gradient(135deg, #434343 0%, #000000 100%)" }, { id: 9, name: "Pablo Citrus Explosion 100mg", brand: "Pablo", strength: "100mg", flavor: "Цитрусовый", price: 3200, description: "Яркий цитрусовый вкус с ударной крепостью.", image: "linear-gradient(135deg, #ff9a56 0%, #ff6a00 100%)" }, { id: 10, name: "Pablo Ultra Mint 200mg", brand: "Pablo", strength: "200mg", flavor: "Мята", price: 3500, description: "Максимальная крепость, ледяная мята.", image: "linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)" }, { id: 11, name: "Pablo Double Ice 200mg", brand: "Pablo", strength: "200mg", flavor: "Мята", price: 3500, description: "Холодный удар, двойная мята.", image: "linear-gradient(135deg, #dfe9f3 0%, #ffffff 100%)" }, { id: 12, name: "Pablo Inferno Citrus 200mg", brand: "Pablo", strength: "200mg", flavor: "Цитрусовый", price: 3500, description: "Цитрусовый взрыв с максимальной дозой никотина.", image: "linear-gradient(135deg, #fa709a 0%, #fee140 100%)" }, { id: 13, name: "Cuba Classic Mint 25mg", brand: "Cuba", strength: "25mg", flavor: "Мята", price: 2800, description: "Классическая мята, мягкий вкус.", image: "linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%)" }, { id: 14, name: "Cuba Sweet Berry 25mg", brand: "Cuba", strength: "25mg", flavor: "Ягодный", price: 2800, description: "Сладкие ягоды, лёгкая крепость.", image: "linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%)" }, { id: 15, name: "Cuba Tropic Fresh 25mg", brand: "Cuba", strength: "25mg", flavor: "Тропический", price: 2800, description: "Тропические фрукты, лёгкий освежающий аромат.", image: "linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%)" }, { id: 16, name: "Cuba Strong Mint 50mg", brand: "Cuba", strength: "50mg", flavor: "Мята", price: 3000, description: "Крепкая мята, освежает и бодрит.", image: "linear-gradient(135deg, #43e97b 0%, #38f9d7 100%)" }, { id: 17, name: "Cuba Berry Ice 50mg", brand: "Cuba", strength: "50mg", flavor: "Ягодный", price: 3000, description: "Ягоды с холодком, средняя сила.", image: "linear-gradient(135deg, #fa709a 0%, #fee140 100%)" }, { id: 18, name: "Cuba Citrus Kick 50mg", brand: "Cuba", strength: "50mg", flavor: "Цитрусовый", price: 3000, description: "Цитрус с кислинкой, умеренная крепость.", image: "linear-gradient(135deg, #fddb92 0%, #d1fdff 100%)" }, { id: 19, name: "Cuba Hardcore Mint 100mg", brand: "Cuba", strength: "100mg", flavor: "Мята", price: 3200, description: "Холодная мята с экстремальной крепостью.", image: "linear-gradient(135deg, #17ead9 0%, #6078ea 100%)" }, { id: 20, name: "Cuba Black Berry 100mg", brand: "Cuba", strength: "100mg", flavor: "Ягодный", price: 3200, description: "Тёмные ягоды, насыщенный вкус.", image: "linear-gradient(135deg, #7f00ff 0%, #e100ff 100%)" }, { id: 21, name: "Iceberg Cool Mint 25mg", brand: "Iceberg", strength: "25mg", flavor: "Мята", price: 2800, description: "Лёгкая мята, приятный холодок.", image: "linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%)" }, { id: 22, name: "Iceberg Berry Fresh 25mg", brand: "Iceberg", strength: "25mg", flavor: "Ягодный", price: 2800, description: "Ягоды, сладковатый вкус.", image: "linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%)" }, { id: 23, name: "Velo Fresh Mint 25mg", brand: "Velo", strength: "25mg", flavor: "Мята", price: 2800, description: "Лёгкий мятный вкус.", image: "linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%)" }, { id: 24, name: "Velo Berry Light 25mg", brand: "Velo", strength: "25mg", flavor: "Ягодный", price: 2800, description: "Ягоды с нежным ароматом.", image: "linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%)" }, { id: 25, name: "Kasta Ice Mint 25mg", brand: "Kasta", strength: "25mg", flavor: "Мята", price: 2800, description: "Мягкая мята, лёгкий вкус.", image: "linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%)" }, ]; const VapeShop = () => { const [currentPage, setCurrentPage] = useState('home'); const [cart, setCart] = useState([]); const [selectedProduct, setSelectedProduct] = useState(null); const [isAgeVerified, setIsAgeVerified] = useState(false); const [isAdminAuth, setIsAdminAuth] = useState(false); const [mobileMenuOpen, setMobileMenuOpen] = useState(false); const [showProductModal, setShowProductModal] = useState(false); const [showCartSidebar, setShowCartSidebar] = useState(false); const [showCheckoutModal, setShowCheckoutModal] = useState(false); const [showOrderSuccess, setShowOrderSuccess] = useState(false); const [showAdminLogin, setShowAdminLogin] = useState(false); const [searchQuery, setSearchQuery] = useState(''); const [filters, setFilters] = useState({ flavors: [], strengths: [], brands: [] }); const [sortBy, setSortBy] = useState('popular'); const [orders, setOrders] = useState([]); const [adminProducts, setAdminProducts] = useState(productsData); const [orderNumber, setOrderNumber] = useState(''); const [faqOpen, setFaqOpen] = useState({}); const [adminPassword, setAdminPassword] = useState(''); const [showToast, setShowToast] = useState(false); const [toastMessage, setToastMessage] = useState(''); const [checkoutForm, setCheckoutForm] = useState({ name: '', phone: '', email: '', address: '', comment: '', payment: 'cash', agree: false }); useEffect(() => { if (!isAgeVerified) { setTimeout(() => { // Age verification modal will be shown }, 500); } }, [isAgeVerified]); const showToastNotification = (message) => { setToastMessage(message); setShowToast(true); setTimeout(() => setShowToast(false), 3000); }; const addToCart = (product, quantity = 1) => { const existingItem = cart.find(item => item.id === product.id); if (existingItem) { setCart(cart.map(item => item.id === product.id ? { ...item, quantity: item.quantity + quantity } : item )); } else { setCart([...cart, { ...product, quantity }]); } showToastNotification(`${product.name} добавлен в корзину`); }; const removeFromCart = (productId) => { setCart(cart.filter(item => item.id !== productId)); showToastNotification('Товар удален из корзины'); }; const updateQuantity = (productId, newQuantity) => { if (newQuantity < 1) { removeFromCart(productId); return; } setCart(cart.map(item => item.id === productId ? { ...item, quantity: newQuantity } : item )); }; const calculateTotal = () => { return cart.reduce((sum, item) => sum + (item.price * item.quantity), 0); }; const getFilteredProducts = () => { let filtered = adminProducts; if (searchQuery) { filtered = filtered.filter(p => p.name.toLowerCase().includes(searchQuery.toLowerCase()) || p.description.toLowerCase().includes(searchQuery.toLowerCase()) ); } if (filters.flavors.length > 0) { filtered = filtered.filter(p => filters.flavors.includes(p.flavor)); } if (filters.strengths.length > 0) { filtered = filtered.filter(p => filters.strengths.includes(p.strength)); } if (filters.brands.length > 0) { filtered = filtered.filter(p => filters.brands.includes(p.brand)); } if (sortBy === 'price-asc') { filtered.sort((a, b) => a.price - b.price); } else if (sortBy === 'price-desc') { filtered.sort((a, b) => b.price - a.price); } return filtered; }; const toggleFilter = (type, value) => { setFilters(prev => { const current = prev[type]; if (current.includes(value)) { return { ...prev, [type]: current.filter(v => v !== value) }; } else { return { ...prev, [type]: [...current, value] }; } }); }; const resetFilters = () => { setFilters({ flavors: [], strengths: [], brands: [] }); setSearchQuery(''); }; const handleCheckout = (e) => { e.preventDefault(); if (!checkoutForm.agree) { showToastNotification('Необходимо согласиться с условиями'); return; } const newOrder = { id: Date.now(), orderNumber: `ORD-${Math.random().toString(36).substr(2, 9).toUpperCase()}`, date: new Date().toLocaleString('ru-RU'), customer: checkoutForm.name, phone: checkoutForm.phone, address: checkoutForm.address, items: [...cart], total: calculateTotal(), status: 'Новый', paymentMethod: checkoutForm.payment }; setOrders([newOrder, ...orders]); setOrderNumber(newOrder.orderNumber); setCart([]); setShowCheckoutModal(false); setShowOrderSuccess(true); setCheckoutForm({ name: '', phone: '', email: '', address: '', comment: '', payment: 'cash', agree: false }); }; const handleAdminLogin = () => { if (adminPassword === 'admin123') { setIsAdminAuth(true); setShowAdminLogin(false); setCurrentPage('admin'); showToastNotification('Успешный вход в админ-панель'); } else { showToastNotification('Неверный пароль'); } }; // Header Component const Header = () => (
{mobileMenuOpen && (
)}
); // Home Page const HomePage = () => (

Премиальные снюсы в Казахстане

Широкий выбор оригинальной продукции с быстрой доставкой по Астане

Популярные товары

{adminProducts.slice(0, 8).map(product => (

{product.name}

{product.description}

{product.price}₸
))}

Быстрая доставка

Доставка по Астане за 1-2 часа

Гарантия качества

Только оригинальная продукция

Работаем 24/7

Круглосуточная поддержка

); // Catalog Page const CatalogPage = () => { const filteredProducts = getFilteredProducts(); return (

Каталог товаров

setSearchQuery(e.target.value)} className="w-full pl-10 pr-4 py-3 bg-slate-800 rounded-lg focus:outline-none focus:ring-2 focus:ring-cyan-500" />
{filteredProducts.length === 0 ? (

Товары не найдены

) : (
{filteredProducts.map(product => (
{product.brand} {product.strength}

{product.name}

{product.description}

{product.price}₸
))}
)}
); }; // About Page const AboutPage = () => (

О нас

SNUS.KZ - Ваш надежный поставщик

Мы являемся официальным дистрибьютором премиальных брендов никотиновых паучей в Казахстане. Наша миссия - предоставлять только качественную и оригинальную продукцию с гарантией подлинности.

Работаем на рынке с 2020 года и имеем тысячи довольных клиентов по всему Казахстану.

Быстрая доставка

Доставка по Астане за 1-2 часа. По регионам Казахстана - 1-3 дня.

100% оригинал

Вся продукция сертифицирована и имеет гарантию подлинности.

Контакты

+7 (777) 777-77-77 info@snus.kz WhatsApp Telegram Instagram: @snus.kz
г. Астана, ул. Кабанбай батыра, 15
); // FAQ Page const FAQPage = () => { const faqs = [ { q: "Как сделать заказ?", a: "Выберите товары в каталоге, добавьте их в корзину и оформите заказ. Мы свяжемся с вами для подтверждения." }, { q: "Какие способы оплаты доступны?", a: "Мы принимаем оплату наличными при получении, Kaspi QR, банковские карты онлайн и Kaspi рассрочку." }, { q: "Сколько стоит доставка?", a: "Доставка по Астане - 500₸. При заказе от 10000₸ - бесплатно. По регионам - от 1000₸." }, { q: "Как долго доставка?", a: "По Астане - 1-2 часа. По регионам Казахстана - 1-3 рабочих дня." }, { q: "Можно ли вернуть товар?", a: "Возврат возможен в течение 14 дней, если товар не был вскрыт и сохранен товарный вид." }, { q: "Как проверить оригинальность?", a: "Вся наша продукция имеет сертификаты подлинности. На упаковке есть защитные голограммы и QR-коды для проверки." } ]; return (

Часто задаваемые вопросы

{faqs.map((faq, index) => (
{faqOpen[index] && (

{faq.a}

)}
))}

Доставка и Оплата

Доставка

• По Астане: 1-2 часа - 500₸ (бесплатно от 10000₸)

• По Казахстану: 1-3 дня - от 1000₸

• Самовывоз: бесплатно

Способы оплаты

• Наличными при получении

• Kaspi QR

• Банковская карта онлайн

• Kaspi Рассрочка 0-0-3

); }; // Admin Page const AdminPage = () => { if (!isAdminAuth) return null; return (

Панель администратора

Всего заказов

{orders.length}

Сумма продаж

{orders.reduce((sum, order) => sum + order.total, 0)}₸

Товаров

{adminProducts.length}

Средний чек

{orders.length > 0 ? Math.round(orders.reduce((sum, order) => sum + order.total, 0) / orders.length) : 0}₸

Последние заказы

{orders.length === 0 ? (

Заказов пока нет

) : (
{orders.map(order => ( ))}
Номер Дата Клиент Телефон Сумма Статус
{order.orderNumber} {order.date} {order.customer} {order.phone} {order.total}₸ {order.status}
)}
); }; // Cart Sidebar const CartSidebar = () => ( <> {showCartSidebar && ( <>
setShowCartSidebar(false)}>

Корзина ({cart.length})

{cart.length === 0 ? (

Корзина пуста

) : (
{cart.map(item => (

{item.name}

{item.price}₸

{item.quantity}
))}
)}
{cart.length > 0 && (
Итого: {calculateTotal()}₸
)}
)} ); // Product Modal const ProductModal = () => ( <> {showProductModal && selectedProduct && ( <>
setShowProductModal(false)}>
e.stopPropagation()}>

{selectedProduct.name}

(5.0)

{selectedProduct.price}₸

{selectedProduct.description}

Характеристики

Бренд: {selectedProduct.brand}
Вкус: {selectedProduct.flavor}
Крепость: {selectedProduct.strength}
)} ); // Checkout Modal const CheckoutModal = () => ( <> {showCheckoutModal && ( <>
e.stopPropagation()}>

Оформление заказа

Контактные данные

setCheckoutForm({...checkoutForm, name: e.target.value})} className="w-full px-4 py-3 bg-slate-800 rounded-lg focus:outline-none focus:ring-2 focus:ring-cyan-500" placeholder="Введите ваше имя" />
setCheckoutForm({...checkoutForm, phone: e.target.value})} className="w-full px-4 py-3 bg-slate-800 rounded-lg focus:outline-none focus:ring-2 focus:ring-cyan-500" placeholder="+7 (___) ___-__-__" />
setCheckoutForm({...checkoutForm, email: e.target.value})} className="w-full px-4 py-3 bg-slate-800 rounded-lg focus:outline-none focus:ring-2 focus:ring-cyan-500" placeholder="your@email.com" />
setCheckoutForm({...checkoutForm, address: e.target.value})} className="w-full px-4 py-3 bg-slate-800 rounded-lg focus:outline-none focus:ring-2 focus:ring-cyan-500" placeholder="Улица, дом, квартира" />
{[ { value: 'cash', label: 'Наличными при получении' }, { value: 'kaspi-qr', label: 'Kaspi QR' }, { value: 'card', label: 'Банковская карта' }, { value: 'kaspi-credit', label: 'Kaspi Рассрочка' } ].map(option => ( ))}

Ваш заказ

{cart.map(item => (
{item.name} x{item.quantity} {item.price * item.quantity}₸
))}
Итого: {calculateTotal()}₸
)} ); // Order Success Modal const OrderSuccessModal = () => ( <> {showOrderSuccess && ( <>
e.stopPropagation()}>

Заказ оформлен!

Номер вашего заказа:

{orderNumber}

Мы свяжемся с вами в течение 15 минут для подтверждения заказа

)} ); // Admin Login Modal const AdminLoginModal = () => ( <> {showAdminLogin && ( <>
setShowAdminLogin(false)}>
e.stopPropagation()}>

Вход в админ-панель

setAdminPassword(e.target.value)} onKeyPress={(e) => e.key === 'Enter' && handleAdminLogin()} className="w-full px-4 py-3 bg-slate-800 rounded-lg focus:outline-none focus:ring-2 focus:ring-cyan-500" placeholder="Введите пароль" />

Пароль для демо: admin123

)} ); // Age Verification Modal const AgeVerificationModal = () => ( <> {!isAgeVerified && ( <>

Предупреждение 18+

Данный сайт содержит информацию о никотиновых продуктах.

Вам уже исполнилось 18 лет?

)} ); // Toast Notification const Toast = () => ( <> {showToast && (
{toastMessage}
)} ); // Footer const Footer = () => ( ); return (
{currentPage === 'home' && } {currentPage === 'catalog' && } {currentPage === 'about' && } {currentPage === 'faq' && } {currentPage === 'admin' && }
); }; export default VapeShop;