/* 卫衣风尚辑 - 全局样式文件 */
/* 遵循极简主义设计，响应式布局 */

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 字体定义 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.loli.net/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* 设计令牌 */
:root {
    /* 颜色系统 */
    --color-primary: #2c2c2c;      /* 深灰 */
    --color-secondary: #f5f5f5;    /* 燕麦色 */
    --color-accent: #1a365d;       /* 宝蓝色 */
    --color-accent-alt: #7f1d1d;   /* 暗红色 */
    --color-white: #ffffff;
    --color-black: #000000;
    
    /* 间距系统 */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 3rem;
    --space-xl: 4rem;
    
    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    
    /* 阴影 */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
    
    /* 字体大小 */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
}

/* 基础样式 */
body {
    font-family: 'Inter', 'Helvetica Neue', 'PingFang SC', sans-serif;
    line-height: 1.6;
    color: var(--color-primary);
    background-color: var(--color-white);
    overflow-x: hidden;
}

/* 容器布局 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-sm);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--space-sm);
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    padding: var(--space-sm) 0;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-sm);
}

.logo {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--space-lg);
}

.nav-links a {
    text-decoration: none;
    color: var(--color-primary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--color-accent);
}

.nav-links a.active {
    color: var(--color-accent);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-accent);
}

/* 英雄区域样式 */
.hero-section {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-white) 100%);
    margin-top: 80px; /* 为固定导航栏留出空间 */
}

.hero-content {
    text-align: center;
    z-index: 2;
    padding: var(--space-xl);
}

.hero-title {
    font-size: var(--text-4xl);
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--color-primary);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: var(--text-lg);
    color: var(--color-primary);
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
}

/* 网格布局系统 */
.grid {
    display: grid;
    gap: var(--space-md);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* 卡片组件 */
.card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .card-image {
    transform: scale(1.05);
}

.card-content {
    padding: var(--space-md);
}

.card-title {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--color-primary);
}

.card-description {
    font-size: var(--text-sm);
    color: var(--color-primary);
    opacity: 0.7;
    line-height: 1.5;
}

/* 筛选组件 */
.filter-container {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.filter-btn {
    padding: var(--space-xs) var(--space-md);
    border: 1px solid var(--color-secondary);
    background: var(--color-white);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: var(--text-sm);
    color: var(--color-primary);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
}

/* 瀑布流布局 */
.masonry-grid {
    column-count: 3;
    column-gap: var(--space-md);
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: var(--space-md);
}

/* 弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: var(--space-md);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    background: none;
    border: none;
    font-size: var(--text-2xl);
    cursor: pointer;
    color: var(--color-primary);
    z-index: 1;
}

.modal-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.modal-body {
    padding: var(--space-lg);
}

/* 页脚样式 */
.footer {
    background: var(--color-primary);
    color: var(--color-white);
    text-align: center;
    padding: var(--space-lg) 0;
    margin-top: var(--space-xl);
}

.footer-content {
    font-size: var(--text-sm);
    opacity: 0.8;
}

/* 工具类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.p-xs { padding: var(--space-xs); }
.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar-content {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .nav-links {
        gap: var(--space-md);
    }
    
    .hero-title {
        font-size: var(--text-3xl);
    }
    
    .masonry-grid {
        column-count: 2;
    }
    
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .filter-container {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .masonry-grid {
        column-count: 1;
    }
    
    .hero-title {
        font-size: var(--text-2xl);
    }
    
    .nav-links {
        flex-direction: column;
        text-align: center;
        gap: var(--space-sm);
    }
    
    .container {
        padding: 0 var(--space-xs);
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* 图片悬停效果 */
.image-hover {
    transition: all 0.3s ease;
}

.image-hover:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* 加载状态 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--color-secondary);
    border-radius: 50%;
    border-top-color: var(--color-accent);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 无障碍支持 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 焦点样式 */
button:focus,
a:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* 打印样式 */
@media print {
    .navbar,
    .footer {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}