2026-01-08 14:35:14 +09:00

529 lines
10 KiB
CSS

/* =========================================
Voucher Mall Design System
Theme: White base + Blue accent
========================================= */
:root {
/* Colors */
--color-bg-base: #FFFFFF;
--color-bg-section: #F7F8FA; /* Very light grey for separation */
--color-bg-tint: #EFF6FF; /* Blue tint for badges */
--color-text-primary: #111827;
--color-text-secondary: #6B7280;
--color-text-tertiary: #9CA3AF;
--color-text-white: #FFFFFF;
--color-border: #E5E7EB;
--color-accent-blue: #2563EB;
--color-accent-blue-hover: #1D4ED8;
--color-footer-bg: #0B1220;
--color-footer-text: #E5E7EB;
/* Semantic */
--color-danger: #EF4444;
/* Spacing & Layout */
--container-width: 1280px;
--header-height-desktop: 72px;
--header-height-scroll: 56px;
/* Radius */
--radius-card: 16px;
--radius-pill: 9999px;
--radius-sm: 8px;
/* Shadows */
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
/* Transitions */
--transition-base: 200ms ease-out;
}
/* Base & Reset */
*, *::before, *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
background-color: var(--color-bg-base);
color: var(--color-text-primary);
line-height: 1.5;
-webkit-font-smoothing: antialiased;
}
a {
text-decoration: none;
color: inherit;
transition: color var(--transition-base);
}
ul, li {
list-style: none;
}
button {
font-family: inherit;
border: none;
background: none;
cursor: pointer;
padding: 0;
}
img {
max-width: 100%;
display: block;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border-width: 0;
}
/* Typography */
h1, h2, h3, h4, h5, h6 {
font-weight: 700;
line-height: 1.2;
}
.text-h1 { font-size: 32px; line-height: 40px; }
.text-h2 { font-size: 22px; line-height: 28px; font-weight: 600; }
.text-body { font-size: 16px; }
.text-sm { font-size: 14px; }
.text-xs { font-size: 12px; }
/* Layout Utilities */
.container {
max-width: var(--container-width);
margin: 0 auto;
padding: 0 24px;
}
.grid-cols-12 {
display: grid;
grid-template-columns: repeat(12, 1fr);
gap: 24px;
}
/* Flex Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
/* Components */
/* Buttons */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: var(--radius-pill);
font-weight: 600;
transition: all var(--transition-base);
cursor: pointer;
}
.btn-primary {
background-color: var(--color-accent-blue);
color: white;
padding: 12px 24px;
}
.btn-primary:hover {
background-color: var(--color-accent-blue-hover);
transform: translateY(-1px);
box-shadow: var(--shadow-md);
}
.btn-ghost {
color: var(--color-text-primary);
padding: 8px 16px;
}
.btn-ghost:hover {
color: var(--color-accent-blue);
background-color: var(--color-bg-tint);
}
/* Header */
.site-header {
position: sticky;
top: 0;
z-index: 50;
background-color: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border-bottom: 1px solid var(--color-border);
height: var(--header-height-desktop);
transition: height 0.3s ease;
}
.site-header.scrolled {
height: var(--header-height-scroll);
}
.nav-link {
font-size: 16px;
font-weight: 600;
color: var(--color-text-primary);
}
.nav-link:hover {
color: var(--color-accent-blue);
}
.search-bar {
position: relative;
max-width: 520px;
width: 100%;
}
.search-input {
width: 100%;
height: 44px;
padding: 0 48px 0 20px;
border: 1px solid var(--color-border);
border-radius: var(--radius-pill);
background-color: #F3F4F6;
font-size: 15px;
transition: all 0.2s;
}
.search-input:focus {
outline: none;
border-color: var(--color-accent-blue);
background-color: white;
box-shadow: 0 0 0 2px var(--color-bg-tint);
}
.search-icon {
position: absolute;
right: 16px;
top: 50%;
transform: translateY(-50%);
color: var(--color-text-secondary);
}
/* Hero Carousel */
.hero-slider {
position: relative;
overflow: hidden;
height: 400px;
background-color: var(--color-bg-section);
}
.hero-track {
display: flex;
height: 100%;
transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.hero-slide {
min-width: 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 0 24px;
}
.hero-content {
max-width: 1000px;
width: 100%;
text-align: left;
}
.hero-title {
font-size: 40px;
font-weight: 800;
margin-bottom: 16px;
color: var(--color-text-primary);
}
.hero-desc {
font-size: 18px;
color: var(--color-text-secondary);
margin-bottom: 32px;
}
.dots-container {
position: absolute;
bottom: 24px;
left: 50%;
transform: translateX(-50%);
display: flex;
gap: 8px;
}
.dot {
width: 10px;
height: 10px;
border-radius: 50%;
background-color: rgba(0,0,0,0.2);
cursor: pointer;
transition: all 0.2s;
}
.dot.active {
background-color: var(--color-accent-blue);
transform: scale(1.2);
}
/* Quick Categories */
.category-chips {
display: flex;
gap: 12px;
padding: 32px 0;
overflow-x: auto;
scrollbar-width: none; /* Firefox */
}
.category-chips::-webkit-scrollbar {
display: none;
}
.chip {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 16px;
border: 1px solid var(--color-border);
border-radius: var(--radius-pill);
white-space: nowrap;
font-weight: 500;
font-size: 15px;
color: var(--color-text-primary);
background-color: white;
transition: all 0.2s;
}
.chip:hover {
border-color: var(--color-accent-blue);
background-color: var(--color-bg-tint);
color: var(--color-accent-blue);
}
/* Product Card */
.product-card {
border: 1px solid var(--color-border);
border-radius: var(--radius-card);
overflow: hidden;
background: white;
transition: all 0.2s ease-out;
height: 100%;
display: flex;
flex-direction: column;
position: relative;
cursor: pointer;
}
.product-card:hover {
transform: translateY(-4px);
box-shadow: var(--shadow-lg);
border-color: #BFDBFE;
}
.card-thumb {
width: 100%;
aspect-ratio: 1/1;
background-color: #F3F4F6;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
.card-body {
padding: 16px;
flex: 1;
display: flex;
flex-direction: column;
}
.card-title {
font-size: 16px;
font-weight: 600;
margin-bottom: 8px;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
color: var(--color-text-primary);
height: 48px; /* Fixed for 2 lines */
}
.card-price-area {
margin-top: auto;
}
.price-row {
display: flex;
align-items: baseline;
gap: 8px;
}
.discount {
color: var(--color-accent-blue);
font-weight: 700;
font-size: 18px;
}
.price {
font-size: 20px;
font-weight: 700;
}
.original-price {
text-decoration: line-through;
color: var(--color-text-tertiary);
font-size: 14px;
}
.payment-badge {
display: inline-block;
font-size: 11px;
padding: 2px 8px;
background-color: var(--color-bg-tint);
color: var(--color-accent-blue);
border: 1px solid #DBEAFE;
border-radius: var(--radius-pill);
margin-top: 8px;
font-weight: 600;
}
/* Sections */
.section {
padding: 60px 0;
}
.section-header {
display: flex;
justify-content: space-between;
align-items: flex-end;
margin-bottom: 24px;
}
.section-title h2 {
font-size: 28px;
margin-bottom: 8px;
}
.section-title p {
color: var(--color-text-secondary);
}
/* Snap Carousel (Monthly Deals) */
.snap-carousel {
display: flex;
gap: 24px;
overflow-x: auto;
scroll-snap-type: x mandatory;
padding-bottom: 24px; /* for shadow */
scrollbar-width: none;
}
.snap-carousel::-webkit-scrollbar { display: none; }
.snap-item {
scroll-snap-align: start;
flex: 0 0 280px;
}
/* Filter Tabs */
.filter-tabs {
display: flex;
gap: 8px;
justify-content: center;
margin-bottom: 32px;
}
.tab-btn {
padding: 10px 20px;
border: 1px solid var(--color-border);
border-radius: var(--radius-pill);
background: white;
color: var(--color-text-secondary);
font-weight: 500;
transition: all 0.18s;
}
.tab-btn.active {
background-color: var(--color-accent-blue);
color: white;
border-color: var(--color-accent-blue);
box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}
.tab-btn:hover:not(.active) {
background-color: #F9FAFB;
border-color: #D1D5DB;
}
/* Footer */
.site-footer {
background-color: var(--color-footer-bg);
color: var(--color-footer-text);
padding: 60px 0 40px;
margin-top: 80px;
}
.footer-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 40px;
}
.footer-link {
display: block;
margin-bottom: 12px;
color: #9CA3AF;
}
.footer-link:hover {
color: white;
}
/* Mobile Breakpoint */
@media (max-width: 768px) {
:root {
--header-height-desktop: 60px;
}
.grid-cols-12 {
grid-template-columns: repeat(4, 1fr);
gap: 16px;
}
.hero-title { font-size: 28px; }
.search-bar {
display: none; /* Handle mobile search differently */
}
.footer-grid {
grid-template-columns: 1fr;
gap: 32px;
}
.category-chips, .snap-carousel {
margin-right: -24px;
padding-right: 24px;
}
}