/* Fashion Menswear Gallery - Global Styles */
/* 极简主义设计，高性能CSS3实现 */

/* =========================================
   1. 变量与基础设置 (Variables & Base)
   ========================================= */
:root {
    /* 色彩方案 */
    --color-bg-primary: #FFFFFF;
    --color-bg-secondary: #F9F7F4; /* 浅米色 */
    --color-text-main: #2C3E50;    /* 深灰 */
    --color-text-light: #7F8C8D;   /* 暖灰 */
    --color-accent: #34495E;       /* 深蓝 */
    --color-border: #ECF0F1;       /* 浅灰 */
    
    /* 字体与间距 */
    --font-stack: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --container-width: 1200px;
    --nav-height: 80px;
    --transition-base: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-stack);
    color: var(--color-text-main);
    background-color: var(--color-bg-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

img {
    max-width: 100%;
    display: block;
    height: auto;
}

ul { list-style: none; }

/* =========================================
   2. 排版与通用布局 (Typography & Layout)
   ========================================= */
h1, h2, h3, h4 {
    font-weight: 400;
    line-height: 1.3;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

section { padding: 80px 0; }
.section-bg-alt { background-color: var(--color-bg-secondary); }

.text-center { text-align: center; }
.text-uppercase { text-transform: uppercase; }

.section-title {
    font-size: 32px;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    color: var(--color-text-main);
    text-transform: uppercase;
}

.section-subtitle {
    font-size: 16px;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto 3rem;
    font-weight: 300;
}

/* =========================================
   3. 导航栏 (Navigation)
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 50px;
    z-index: 1000;
    transition: background-color 0.3s ease, padding 0.3s ease;
    background: transparent;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 1px 15px rgba(0,0,0,0.05);
    padding: 0 40px;
}

.logo {
    font-size: 24px;
    font-weight: 500;
    letter-spacing: 3px;
    color: var(--color-text-main);
}

.nav-links { display: flex; gap: 40px; }

.nav-link {
    font-size: 15px;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 5px;
    color: var(--color-text-main);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-text-main);
    transition: width 0.3s ease;
}

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

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--color-text-main);
}

/* =========================================
   4. 首页与轮播 (Hero Section)
   ========================================= */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
}

.hero-slider {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
}

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

.slide.active { opacity: 1; }
.slide::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.25); /* 遮罩增强文字可读性 */
}

.hero-content {
    z-index: 10;
    animation: fadeInUp 1s ease-out;
    padding: 0 20px;
}

.hero-title {
    font-size: 48px;
    letter-spacing: 6px;
    margin-bottom: 20px;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero-text {
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 2px;
}

/* =========================================
   5. 网格系统与卡片 (Grids & Cards)
   ========================================= */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

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

.card {
    background: transparent;
    cursor: pointer;
}

.card-image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/4;
    background: #f0f0f0;
}

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

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

.card-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(44, 62, 80, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover .card-overlay { opacity: 1; }

.card-overlay-text {
    color: #fff;
    font-size: 13px;
    letter-spacing: 2px;
    border: 1px solid #fff;
    padding: 12px 24px;
    text-transform: uppercase;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(2px);
}

.card-info { padding: 20px 0; text-align: center; }
.card-title { font-size: 18px; margin-bottom: 6px; color: var(--color-text-main); }
.card-desc { font-size: 14px; color: var(--color-text-light); }

/* =========================================
   6. 风格指南与工艺 (Guide & Craft)
   ========================================= */
.guide-layout {
    display: flex;
    gap: 60px;
    margin-bottom: 80px;
    align-items: center;
}

.guide-layout:nth-child(even) { flex-direction: row-reverse; }
.guide-image { flex: 1; aspect-ratio: 4/5; object-fit: cover; }
.guide-content { flex: 1; }
.guide-title { font-size: 24px; margin-bottom: 1rem; color: var(--color-text-main); }
.guide-text { color: var(--color-text-light); margin-bottom: 1.5rem; text-align: justify; }

.craft-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 80px;
    align-items: center;
}

.craft-detail img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

/* =========================================
   7. 视觉册 (Lookbook)
   ========================================= */
.lookbook-container {
    height: 100vh;
    width: 100%;
    position: relative;
    background: #1a1a1a;
    overflow: hidden;
}

.lookbook-slide {
    position: absolute;
    width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    display: flex;
    justify-content: center;
}

.lookbook-slide.active { opacity: 1; z-index: 1; }
.lookbook-slide img { height: 100%; width: 100%; object-fit: cover; }

.lookbook-caption {
    position: absolute;
    bottom: 60px;
    left: 60px;
    color: #fff;
    background: rgba(0,0,0,0.4);
    padding: 15px 30px;
    backdrop-filter: blur(4px);
    z-index: 10;
    max-width: 400px;
}

.lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    color: #fff;
    width: 60px; height: 60px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s;
    z-index: 20;
    border: 1px solid rgba(255,255,255,0.2);
}

.lb-nav:hover { background: rgba(255,255,255,0.3); }
.lb-prev { left: 40px; }
.lb-next { right: 40px; }

/* =========================================
   8. 模态框 (Modal)
   ========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.85);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show { opacity: 1; }

.modal-content {
    background-color: #fff;
    margin: 4vh auto;
    width: 90%;
    max-width: 1000px;
    height: 90vh;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.close-modal {
    position: absolute;
    right: 20px; top: 15px;
    font-size: 30px;
    color: var(--color-text-main);
    cursor: pointer;
    z-index: 10;
    opacity: 0.6;
    transition: opacity 0.3s;
}
.close-modal:hover { opacity: 1; }

.modal-img-container { height: 100%; overflow: hidden; background: #f4f4f4; }
.modal-img { width: 100%; height: 100%; object-fit: cover; }
.modal-details { padding: 60px 40px; overflow-y: auto; display: flex; flex-direction: column; justify-content: center; }
.modal-title { font-size: 28px; margin-bottom: 20px; color: var(--color-text-main); }
.modal-desc { color: var(--color-text-light); line-height: 1.8; margin-bottom: 30px; }

/* =========================================
   9. 页脚与动画 (Footer & Animations)
   ========================================= */
footer {
    padding: 50px 0;
    text-align: center;
    color: var(--color-text-light);
    border-top: 1px solid var(--color-border);
    background: #fff;
    font-size: 14px;
    letter-spacing: 1px;
}

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

/* =========================================
   10. 响应式适配 (Responsive)
   ========================================= */
@media (max-width: 1024px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .hero-title { font-size: 36px; }
    .guide-layout, .guide-layout:nth-child(even) { flex-direction: column; gap: 30px; }
    .craft-detail { grid-template-columns: 1fr; gap: 20px; }
    .modal-content { height: auto; margin: 10vh auto; grid-template-columns: 1fr; }
    .modal-img-container { height: 400px; }
}

@media (max-width: 768px) {
    .navbar { padding: 0 20px; background: #fff; }
    .logo { color: var(--color-text-main); }
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0; width: 100%;
        background: #fff;
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
        gap: 0;
    }
    .nav-links.active { display: flex; }
    .nav-link { padding: 15px; width: 100%; text-align: center; border-bottom: 1px solid #f5f5f5; }
    .nav-link::after { display: none; }
    .mobile-menu-btn { display: block; }
    
    .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .hero-title { font-size: 28px; letter-spacing: 3px; }
    .lookbook-caption { left: 20px; right: 20px; bottom: 80px; width: auto; max-width: none; }
    .lb-nav { width: 40px; height: 40px; }
    .lb-prev { left: 10px; } .lb-next { right: 10px; }
    .modal-content { width: 95%; margin: 5vh auto; }
}

/* 动态槽位预留 */
.slot-dynamic { display: contents; }