'use client'; import Link from 'next/link'; import { useState, useEffect } from 'react'; /* ═══════════════════════════════════════════════════ DESIGN TOKEN — 인테리어 페이지와 완전히 다른 팔레트 No gold, no cream, no warm amber. Editorial B&W + cool stone. ═══════════════════════════════════════════════════ */ const T = { ink: '#0C0B09', paper: '#F4F2EF', sand: '#E9E5DF', stone: '#7C7870', chalk: '#B8B3AB', white: '#FAFAF8', } as const; const BANNER_H = 40; const NAV_H = 56; /* ═══════════════════════════════════════════════════ UNSPLASH FASHION IMAGES ═══════════════════════════════════════════════════ */ const IMG = { hero: 'https://images.unsplash.com/photo-1558618666-fcd25c85cd64?auto=format&fit=crop&w=900&q=85', p1: 'https://images.unsplash.com/photo-1515886657613-9f3515b0c78f?auto=format&fit=crop&w=600&q=80', p2: 'https://images.unsplash.com/photo-1509631179647-0177331693ae?auto=format&fit=crop&w=600&q=80', p3: 'https://images.unsplash.com/photo-1445205170230-053b83016050?auto=format&fit=crop&w=600&q=80', p4: 'https://images.unsplash.com/photo-1487222477894-8943e31ef7b2?auto=format&fit=crop&w=600&q=80', p5: 'https://images.unsplash.com/photo-1469334031218-e382a71b716b?auto=format&fit=crop&w=600&q=80', p6: 'https://images.unsplash.com/photo-1434389677669-e08b4cac3105?auto=format&fit=crop&w=600&q=80', p7: 'https://images.unsplash.com/photo-1503342564405-cf0c5f9d5c79?auto=format&fit=crop&w=600&q=80', p8: 'https://images.unsplash.com/photo-1525507119028-ed4ccf09e210?auto=format&fit=crop&w=600&q=80', edit1: 'https://images.unsplash.com/photo-1490481651871-ab68de25d43d?auto=format&fit=crop&w=1400&q=85', feat1: 'https://images.unsplash.com/photo-1558171813-0022efd9b40d?auto=format&fit=crop&w=700&q=80', feat2: 'https://images.unsplash.com/photo-1542060748-10c28b62716f?auto=format&fit=crop&w=700&q=80', lb1: 'https://images.unsplash.com/photo-1441986300917-64674bd600d8?auto=format&fit=crop&w=500&q=80', lb2: 'https://images.unsplash.com/photo-1469334031218-e382a71b716b?auto=format&fit=crop&w=500&q=80', lb3: 'https://images.unsplash.com/photo-1503342564405-cf0c5f9d5c79?auto=format&fit=crop&w=500&q=80', lb4: 'https://images.unsplash.com/photo-1434389677669-e08b4cac3105?auto=format&fit=crop&w=500&q=80', lb5: 'https://images.unsplash.com/photo-1525507119028-ed4ccf09e210?auto=format&fit=crop&w=500&q=80', } as const; /* ═══════════════════════════════════════════════════ DATA ═══════════════════════════════════════════════════ */ type Cat = '전체' | '아우터' | '상의' | '하의' | '액세서리'; const products = [ { id: 1, name: 'Structured Blazer', kr: '스트럭처드 블레이저', price: 328000, cat: '아우터' as Cat, img: IMG.p1, isNew: true }, { id: 2, name: 'Cocoon Coat', kr: '코쿤 코트', price: 498000, cat: '아우터' as Cat, img: IMG.p2, isBest: true }, { id: 3, name: 'Slip Midi Dress', kr: '슬립 미디 드레스', price: 218000, cat: '상의' as Cat, img: IMG.p3, isNew: true }, { id: 4, name: 'Relaxed Oxford', kr: '릴랙스드 옥스포드', price: 145000, cat: '상의' as Cat, img: IMG.p4 }, { id: 5, name: 'Wide Trousers', kr: '와이드 트라우저', price: 185000, cat: '하의' as Cat, img: IMG.p5 }, { id: 6, name: 'Barrel Denim', kr: '배럴 데님', price: 198000, cat: '하의' as Cat, img: IMG.p6, isBest: true }, { id: 7, name: 'Leather Mini Bag', kr: '레더 미니백', price: 278000, cat: '액세서리' as Cat, img: IMG.p7, isNew: true }, { id: 8, name: 'Square Sunglasses', kr: '스퀘어 선글라스', price: 128000, cat: '액세서리' as Cat, img: IMG.p8 }, ]; const reviews = [ { quote: '입고 나서 동료가 어디서 샀냐고 계속 물어봐요. 핏이 정말 완벽합니다.', name: '하윤서', city: '서울', item: 'Structured Blazer' }, { quote: '코쿤 코트, 사진보다 실물이 훨씬 좋아요. 소재감이 기대 이상입니다.', name: '이서진', city: '제주', item: 'Cocoon Coat' }, { quote: '슬립 드레스를 받았는데 바느질 하나하나에서 정성이 느껴져요.', name: '박도현', city: '부산', item: 'Slip Midi Dress' }, ]; /* ═══════════════════════════════════════════════════ MAIN PAGE ═══════════════════════════════════════════════════ */ export default function ShoppingPage() { const [activeCat, setActiveCat] = useState('전체'); const [scrolled, setScrolled] = useState(false); const [showTop, setShowTop] = useState(false); const [cart, setCart] = useState(0); useEffect(() => { const sc: HTMLElement = (document.querySelector('.main-content') as HTMLElement | null) ?? document.documentElement; const onScroll = () => { setScrolled(sc.scrollTop > 40); setShowTop(sc.scrollTop > 500); }; sc.addEventListener('scroll', onScroll, { passive: true }); /* reveal */ const obs = new IntersectionObserver( (entries) => entries.forEach(e => { if (e.isIntersecting) e.target.classList.add('ml-in'); }), { threshold: 0.07, root: sc === document.documentElement ? null : sc } ); document.querySelectorAll('.ml-reveal').forEach(el => obs.observe(el)); return () => { sc.removeEventListener('scroll', onScroll); obs.disconnect(); }; }, []); const cats: (Cat | '전체')[] = ['전체', '아우터', '상의', '하의', '액세서리']; const filtered = activeCat === '전체' ? products : products.filter(p => p.cat === activeCat); const scrollTop = () => { const sc = (document.querySelector('.main-content') as HTMLElement | null) ?? document.documentElement; sc.scrollTo({ top: 0, behavior: 'smooth' }); }; return (
{/* ── FONTS + GLOBAL ── */}