/* 全局样式文件 - 毛衣展示网站 */
/* 配色方案 */
:root {
    /* 中性温暖色调 */
    --color-cream: #f8f4e9;
    --color-oatmeal: #e8dfd1;
    --color-light-gray: #e8e8e8;
    --color-terracotta: #d17b5a;
    --color-muted-blue: #8aa0b0;
    --color-muted-green: #a8b8a5;
    --color-dark: #333333;
    --color-light: #ffffff;
    
    /* 字体 */
    --font-sans: Helvetica, Arial, sans-serif;
    --font-serif: Georgia, 'Times New Roman', serif;
    
    /* 间距 */
    --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;
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--color-dark);
    background-color: var(--color-light);
}

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

/* 导航栏样式 */
.navbar {
    background-color: var(--color-light);
    border-bottom: 1px solid var(--color-light-gray);
    position: sticky;
    top: 0;
    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-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-terracotta);
    text-decoration: none;
}

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

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

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

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

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background-color: var(--color-terracotta);
    color: var(--color-light);
    text-decoration: none;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: inherit;
}

.btn:hover {
    background-color: var(--color-muted-blue);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--color-terracotta);
    color: var(--color-terracotta);
}

.btn-outline:hover {
    background-color: var(--color-terracotta);
    color: var(--color-light);
}

/* 轮播图样式 */
.hero-slider {
    position: relative;
    height: 70vh;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    bottom: var(--space-xl);
    left: var(--space-xl);
    color: var(--color-light);
    max-width: 50%;
}

.slider-controls {
    position: absolute;
    bottom: var(--space-md);
    right: var(--space-md);
    display: flex;
    gap: var(--space-xs);
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
}

.slider-dot.active {
    background-color: var(--color-light);
}

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

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* 卡片样式 */
.card {
    background: var(--color-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

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

.card-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
    color: var(--color-dark);
}

.card-text {
    color: #666;
    font-size: 0.9rem;
}

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

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

.masonry-item img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

.masonry-caption {
    padding: var(--space-sm);
    background: var(--color-light);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* 版块标题 */
.section-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    text-align: center;
    margin: var(--space-xl) 0 var(--space-md);
    color: var(--color-dark);
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: var(--space-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* 首页特色版块 */
.feature-sections {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    padding: var(--space-xl) 0;
}

.feature-section {
    text-align: center;
    padding: var(--space-lg);
    background: var(--color-cream);
    border-radius: var(--radius-lg);
    transition: transform 0.3s ease;
}

.feature-section:hover {
    transform: translateY(-8px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    color: var(--color-terracotta);
}

.feature-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
}

/* 关于我们页样式 */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-xl) 0;
}

.about-section {
    margin-bottom: var(--space-lg);
}

.about-section h2 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    margin-bottom: var(--space-md);
    color: var(--color-terracotta);
}

.about-section p {
    margin-bottom: var(--space-sm);
    line-height: 1.8;
}

/* 详情页样式 */
.detail-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-sm);
}

.detail-images {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.detail-main-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.detail-thumbnails {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    gap: var(--space-sm);
}

.detail-thumbnail img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.detail-info {
    background: var(--color-cream);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
}

.detail-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    margin-bottom: var(--space-md);
}

.detail-meta {
    margin-bottom: var(--space-lg);
}

.detail-meta p {
    margin-bottom: var(--space-xs);
    color: #666;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .masonry {
        column-count: 2;
    }
    
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .feature-sections {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar-content {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .nav-links {
        gap: var(--space-sm);
    }
    
    .hero-slider {
        height: 50vh;
    }
    
    .slide-content {
        max-width: 80%;
        left: var(--space-md);
        bottom: var(--space-md);
    }
    
    .masonry {
        column-count: 1;
    }
    
    .grid-3, .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .feature-sections {
        grid-template-columns: 1fr;
    }
    
    .detail-images {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        flex-direction: column;
        text-align: center;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

/* 加载动画 */
.fade-in {
    animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.mb-sm {
    margin-bottom: var(--space-sm);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.p-sm {
    padding: var(--space-sm);
}

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

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