/* 
 * 绅士型录 - 全局样式表
 * By HAISNAP for Gentleman Catalog
 * 遵循极简主义设计规范
 */

:root {
    /* 设计规范色调 */
    --primary-color: #2C2C2C;   /* 深灰主色 */
    --bg-color: #F5F5F7;        /* 浅灰背景 */
    --white: #FFFFFF;           /* 纯白 */
    --text-main: #1A1A1A;       /* 哑光黑文本 */
    --text-sub: #666666;        /* 辅助文本 */
    --accent-green: #3A5A40;    /* 墨绿点缀 */
    --accent-blue: #0A2342;     /* 藏青点缀 */
    
    /* 字体系统 */
    --font-cn: 'Source Han Sans CN', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-en: 'Inter', sans-serif;
    
    /* 布局参数 */
    --container-width: 1280px;
    --header-height: 70px;
    --transition-speed: 0.4s;
}

/* === Reset & Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-en), var(--font-cn);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

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

/* 动态槽位预留 */
.content-slot {
    min-height: 0;
    display: contents;
}

/* === Layout Utilities === */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 400;
    color: var(--primary-color);
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.section-header p {
    color: var(--text-sub);
    font-size: 1rem;
}

/* === Header & Navigation === */
header {
    background-color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-height);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
}

header .container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 2px;
    position: relative;
    z-index: 1002;
}

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

.nav-links li a {
    font-size: 0.9rem;
    color: var(--text-main);
    padding: 5px 0;
    position: relative;
    font-weight: 500;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-green);
    transition: width var(--transition-speed);
}

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

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

.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1002;
    padding: 10px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: 0.3s;
}

/* === Main Content Adjustment === */
main {
    padding-top: var(--header-height);
    min-height: calc(100vh - 200px);
}

/* === Home: Hero Slider === */
.slider-container {
    position: relative;
    height: calc(100vh - var(--header-height));
    width: 100%;
    overflow: hidden;
    background-color: #1a1a1a;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.85);
    transform: scale(1.05);
    transition: transform 8s ease; /* Slow zoom effect */
}

.slide.active img {
    transform: scale(1);
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 3;
    width: 90%;
    max-width: 800px;
    color: var(--white);
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.slide-content h2 {
    font-size: 2.8rem;
    font-weight: 300;
    letter-spacing: 4px;
    margin-bottom: 16px;
}

.slide-content p {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.9;
    letter-spacing: 1px;
}

/* === Home: Style Cards === */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.style-card {
    background: var(--white);
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    transition: transform var(--transition-speed);
}

.style-card:hover {
    transform: translateY(-8px);
}

.card-img-wrapper {
    height: 420px;
    overflow: hidden;
}

.card-img-wrapper img {
    height: 100%;
    transition: transform 0.6s ease;
}

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

.card-body {
    padding: 24px;
    text-align: center;
}

.card-body h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--primary-color);
    letter-spacing: 1px;
}

/* === Home: Feature Section === */
.feature-section {
    background-color: var(--white);
}

.feature-container {
    display: flex;
    align-items: center;
    gap: 80px;
}

.feature-content {
    flex: 1;
}

.feature-content h3 {
    font-size: 1.8rem;
    margin-bottom: 24px;
    color: var(--primary-color);
    font-weight: 400;
}

.feature-content p {
    color: var(--text-sub);
    margin-bottom: 32px;
    text-align: justify;
}

.feature-link {
    display: inline-block;
    color: var(--accent-green);
    font-weight: 500;
    border-bottom: 1px solid transparent;
}

.feature-link:hover {
    border-bottom-color: var(--accent-green);
}

.feature-img {
    flex: 1;
    height: 550px;
    overflow: hidden;
    position: relative;
}

.feature-img img {
    height: 100%;
    transition: transform 0.6s ease;
}

.feature-container:hover .feature-img img {
    transform: scale(1.02);
}

/* === Guide Page === */
.filter-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 60px;
}

.filter-btn {
    background: transparent;
    border: 1px solid #E0E0E0;
    padding: 10px 28px;
    font-size: 0.95rem;
    color: var(--text-sub);
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-cn);
    letter-spacing: 1px;
}

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

.guide-item {
    display: flex;
    margin-bottom: 100px;
    gap: 60px;
    align-items: center;
}

.guide-item:nth-child(even) {
    flex-direction: row-reverse;
}

.guide-visual {
    flex: 1.2;
    height: 500px;
    overflow: hidden;
    background-color: #ddd;
}

.guide-visual img {
    height: 100%;
    transition: transform 0.6s ease;
}

.guide-item:hover .guide-visual img {
    transform: scale(1.02);
}

.guide-desc {
    flex: 1;
}

.guide-desc h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-weight: 400;
}

.guide-desc p {
    color: var(--text-sub);
    line-height: 1.8;
}

/* === Items Page (Waterfall) === */
.waterfall-grid {
    column-count: 3;
    column-gap: 30px;
}

.item-block {
    break-inside: avoid;
    margin-bottom: 30px;
    background: var(--white);
    box-shadow: 0 2px 12px rgba(0,0,0,0.02);
    overflow: hidden;
}

.item-img {
    width: 100%;
    display: block;
    transition: transform 0.5s ease;
}

.item-block:hover .item-img {
    transform: scale(1.02);
}

.item-detail {
    padding: 20px;
}

.item-detail h4 {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-weight: 500;
}

.item-detail p {
    font-size: 0.85rem;
    color: var(--text-sub);
    line-height: 1.5;
}

/* === Gallery Page === */
.gallery-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.gallery-card {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    background-color: #eee;
}

.gallery-card img {
    height: 100%;
    transition: transform 0.6s ease;
}

.gallery-card:hover img {
    transform: scale(1.1);
}

.gallery-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-card:hover .gallery-mask {
    opacity: 1;
}

.gallery-tag {
    color: var(--white);
    font-size: 1rem;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(255,255,255,0.8);
    padding-bottom: 4px;
}

/* === Footer === */
footer {
    background-color: var(--white);
    padding: 60px 0 40px;
    text-align: center;
    border-top: 1px solid #EAEAEA;
    margin-top: auto;
}

.footer-slogan {
    font-size: 1.1rem;
    color: var(--text-main);
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.copyright {
    font-size: 0.8rem;
    color: var(--text-sub);
}

.disclaimer-text {
    font-size: 0.75rem;
    color: #999;
    margin-top: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* === Mobile Responsive === */
@media (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .waterfall-grid {
        column-count: 2;
    }
    
    .gallery-wrapper {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .feature-container, 
    .guide-item, 
    .guide-item:nth-child(even) {
        gap: 40px;
    }
}

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

    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: 0;
        overflow: hidden;
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        gap: 0;
        box-shadow: 0 10px 15px rgba(0,0,0,0.05);
        transition: height 0.4s ease;
    }

    .nav-links.nav-active {
        height: 240px;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #f5f5f5;
    }

    .nav-links li a {
        display: block;
        padding: 20px 0;
        font-size: 1rem;
    }

    .nav-links li a::after {
        display: none;
    }

    /* Mobile Typography */
    .slide-content h2 {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 1.6rem;
    }

    /* Mobile Grids */
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .feature-container {
        flex-direction: column-reverse;
        gap: 30px;
    }

    .feature-img {
        height: 300px;
        width: 100%;
    }

    .guide-item, 
    .guide-item:nth-child(even) {
        flex-direction: column;
        margin-bottom: 60px;
        gap: 24px;
    }

    .guide-visual {
        width: 100%;
        height: 300px;
    }

    .waterfall-grid {
        column-count: 1;
    }

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