/* 全局样式文件 - 时尚服饰展示网站 */

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

/* 根变量定义 */
:root {
    --primary-color: #000000;
    --secondary-color: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --background-color: #f5f5f5;
    --card-background: #ffffff;
    --border-color: #e0e0e0;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.12);
    --shadow-hover: rgba(0, 0, 0, 0.16);
    --transition-speed: 0.3s;
}

/* 基础样式 */
body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    overflow-x: hidden;
}

/* 导航栏样式 */
header {
    background-color: var(--secondary-color);
    box-shadow: 0 2px 10px var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-speed);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 1rem;
    margin: 0 2rem;
    position: relative;
    transition: color var(--transition-speed);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-speed);
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

/* 主视觉区样式 */
.hero {
    height: 70vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 100%);
}

.hero-content {
    position: relative;
    text-align: center;
    color: var(--secondary-color);
    z-index: 1;
    animation: fadeInUp 1s ease-out;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 300;
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

/* 内容区域样式 */
.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.section-title {
    text-align: center;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 300;
    margin-bottom: 3rem;
    letter-spacing: 0.1em;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background-color: var(--text-color);
}

/* 网格布局 */
.grid {
    display: grid;
    gap: 2rem;
    margin-top: 3rem;
}

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

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

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

/* 卡片样式 */
.card {
    background-color: var(--card-background);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow-light);
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px var(--shadow-medium);
}

.card-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform var(--transition-speed);
}

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

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    letter-spacing: 0.05em;
}

.card-description {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* 系列页面特殊样式 */
.collection-card {
    position: relative;
    overflow: hidden;
}

.collection-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    padding: 2rem;
    transform: translateY(100%);
    transition: transform var(--transition-speed);
}

.collection-card:hover .collection-overlay {
    transform: translateY(0);
}

.collection-title {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.collection-description {
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
}

/* 单品页面瀑布流布局 */
.masonry {
    column-count: 3;
    column-gap: 1.5rem;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
}

/* 理念页面样式 */
.philosophy-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2rem;
    text-align: center;
}

.philosophy-content {
    font-size: 1.1rem;
    line-height: 2;
    color: var(--text-color);
    margin-bottom: 2rem;
}

.quote {
    font-style: italic;
    font-size: 1.2rem;
    color: var(--text-light);
    border-left: 3px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    text-align: left;
}

/* 页脚样式 */
footer {
    background-color: var(--secondary-color);
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

footer p {
    color: var(--text-light);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
}

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

.fade-in {
    animation: fadeInUp 0.8s ease-out;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .masonry {
        column-count: 2;
    }
    
    .hero {
        height: 60vh;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 1rem;
    }
    
    nav a {
        margin: 0 1rem;
        font-size: 0.9rem;
    }
    
    .content {
        padding: 2rem 1rem;
    }
    
    .hero {
        height: 50vh;
        background-attachment: scroll;
    }
    
    .masonry {
        column-count: 1;
    }
    
    .grid {
        gap: 1.5rem;
    }
    
    .card-content {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav a {
        margin: 0.5rem 1rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
        letter-spacing: 0.1em;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .card-image {
        height: 250px;
    }
}

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

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

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-color);
}