/* -------------------------------------------------------------------------- */
/*                                 基础配置                                   */
/* -------------------------------------------------------------------------- */
:root {
    /* 核心配色方案 */
    --color-bg: #FAFAFA;       /* 珍珠白 */
    --color-text-main: #2C2C2C;/* 深炭灰 */
    --color-text-light: #666666;
    --color-accent: #E3B7A0;   /* 陶土粉 */
    --color-gray: #E8E8E8;     /* 高级灰 */
    --color-warm: #F5F1E8;     /* 暖米色 */
    --color-oat: #D8C4B6;      /* 燕麦色 */

    /* 字体系统 */
    --font-serif: 'Noto Serif SC', "Songti SC", serif;
    --font-sans: 'Noto Sans SC', "PingFang SC", sans-serif;

    /* 布局变量 */
    --nav-height: 80px;
    --transition-speed: 0.6s;
}

/* CSS Reset & 全局样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.7;
    overflow-x: hidden;
    opacity: 0;
    animation: pageFadeIn 1s ease-out forwards;
}

@keyframes pageFadeIn {
    to { opacity: 1; }
}

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--color-text-main);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* -------------------------------------------------------------------------- */
/*                                 组件样式                                   */
/* -------------------------------------------------------------------------- */

/* 导航栏 */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background-color: rgba(250, 250, 250, 0.92);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.02);
    transition: transform 0.3s ease;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 4rem;
}

nav a {
    font-size: 0.95rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    padding: 0.5rem 0;
    color: var(--color-text-main);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background-color: var(--color-accent);
    transition: width 0.3s ease, left 0.3s ease;
}

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

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

/* 图片容器通用交互 */
.image-wrapper {
    overflow: hidden;
    position: relative;
    background-color: var(--color-gray);
}

.image-wrapper img {
    transition: transform var(--transition-speed) ease;
    width: 100%;
    height: 100%;
}

.image-wrapper:hover img {
    transform: scale(1.03);
}

/* 文本区域通用 */
.text-section {
    max-width: 800px;
    margin: 6rem auto;
    text-align: center;
    padding: 0 2rem;
}

.text-section h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.text-section h3::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: var(--color-accent);
    margin: 1rem auto 0;
}

.text-section p {
    font-size: 1.05rem;
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
    text-align: justify;
    text-align-last: center;
}

/* -------------------------------------------------------------------------- */
/*                               页面特定样式                                  */
/* -------------------------------------------------------------------------- */

/* 首页：全屏轮播 */
.hero {
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    background-size: cover;
    background-position: center;
    background-color: var(--color-gray);
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.1);
}

.hero-content {
    position: absolute;
    bottom: 15%;
    left: 8%;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 10;
    max-width: 600px;
}

.hero-content h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.hero-content p {
    font-size: 1.2rem;
    font-family: var(--font-serif);
    font-style: italic;
    letter-spacing: 1px;
}

/* 首页：三列展示 */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 4rem 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

.collection-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.collection-item {
    position: relative;
}

/* 匠心细节页 */
.detail-hero {
    height: 60vh;
    width: 100%;
    margin-top: var(--nav-height);
    overflow: hidden;
    position: relative;
}

.detail-scroll-container {
    padding: 4rem 0;
    background-color: var(--color-warm);
    overflow: hidden;
}

.detail-scroll-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 2rem;
    padding: 0 2rem;
    padding-bottom: 2rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.detail-scroll-track::-webkit-scrollbar {
    display: none;
}

.detail-card {
    min-width: 80vw;
    height: 70vh;
    scroll-snap-align: center;
    background: #fff;
    display: flex;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.detail-card-img {
    flex: 1.5;
    height: 100%;
}

.detail-card-info {
    flex: 1;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.detail-card-info h4 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--color-text-main);
}

.detail-card-info p {
    color: var(--color-text-light);
    line-height: 2;
}

/* 穿搭灵感页 */
.styling-container {
    padding: 2rem;
    padding-top: calc(var(--nav-height) + 2rem);
    max-width: 1800px;
    margin: 0 auto;
    display: flex;
    gap: 2rem;
    min-height: 100vh;
}

.styling-grid {
    flex: 1;
    display: columns;
    column-count: 3;
    column-gap: 2rem;
}

.styling-item {
    break-inside: avoid;
    margin-bottom: 2rem;
    background: #fff;
}

.styling-item .image-wrapper {
    aspect-ratio: auto;
}

.styling-desc {
    padding: 1.5rem 0;
    text-align: center;
}

.styling-desc h5 {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.styling-desc p {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* 侧边栏色板 */
.sidebar-palette {
    width: 250px;
    position: sticky;
    top: calc(var(--nav-height) + 2rem);
    height: fit-content;
    padding: 2rem;
    background: #fff;
    border: 1px solid var(--color-gray);
}

.palette-title {
    font-family: var(--font-serif);
    margin-bottom: 1.5rem;
    text-align: center;
}

.palette-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.color-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
}

.color-name {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* 页脚 */
footer {
    text-align: center;
    padding: 3rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--color-gray);
    font-size: 0.85rem;
    color: #999;
    letter-spacing: 1px;
    background-color: var(--color-bg);
}

/* -------------------------------------------------------------------------- */
/*                                响应式布局                                   */
/* -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .collection-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .styling-grid {
        column-count: 2;
    }
    
    .detail-card {
        min-width: 90vw;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 60px;
    }

    /* 导航栏适配 */
    nav ul {
        gap: 1.5rem;
    }
    nav a {
        font-size: 0.85rem;
    }

    /* 首页适配 */
    .hero-content h2 {
        font-size: 2.5rem;
    }
    .collection-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    /* 细节页适配 */
    .detail-card {
        flex-direction: column;
        height: auto;
        min-width: 85vw;
    }
    .detail-card-img {
        height: 300px;
        flex: none;
    }
    .detail-card-info {
        padding: 2rem;
        text-align: center;
    }

    /* 穿搭页适配 */
    .styling-container {
        flex-direction: column;
        padding-top: var(--nav-height);
    }
    .styling-grid {
        column-count: 1;
    }
    .sidebar-palette {
        width: 100%;
        position: static;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 2rem;
        margin-top: 2rem;
    }
    .palette-row {
        margin-bottom: 0;
    }
}