/* ==========================================================================
   响应式设计样式表 (Responsive Styles)
   适配策略: Desktop First (默认样式) -> Tablet -> Mobile
   断点: 
   - Large Desktop: > 1200px (默认)
   - Tablet/Laptop: 768px - 1199px
   - Mobile: < 767px
   ========================================================================== */

/* --- Tablet & Small Laptop (1024px以下) --- */
@media screen and (max-width: 1024px) {
    :root {
        --container-padding: 2rem;
        --section-spacing: 80px;
    }

    /* 调整排版 */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    /* 首页: 特色栏目预览从3列变2列 (最后一行居中需在layout中用flex或grid处理) */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 首页: 视觉故事从4列变2列 */
    .visual-story-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Tablet Portrait (768px - 991px) --- */
@media screen and (max-width: 991px) {
    /* 导航栏切换为移动端模式 */
    .nav-toggle {
        display: flex; /* 显示汉堡菜单按钮 */
        z-index: 1001;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--color-bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transform: translateX(100%); /* 默认隐藏 */
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1000;
    }

    .nav-menu.active {
        transform: translateX(0);
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }

    .nav-item a {
        font-size: 1.25rem;
    }

    /* 调整网格间距 */
    .grid-container {
        gap: 1.5rem;
    }
    
    /* 衣橱必备页: 9宫格变3列 */
    .essentials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- Mobile Landscape & Portrait (< 767px) --- */
@media screen and (max-width: 767px) {
    :root {
        --container-padding: 1rem;
        --section-spacing: 60px;
    }

    /* --- 排版优化 --- */
    h1 { font-size: 2rem; line-height: 1.2; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    p { font-size: 0.95rem; line-height: 1.6; }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }

    /* --- 布局堆叠 --- */
    /* 强制所有多列网格变单列 */
    .grid-2, 
    .grid-3, 
    .grid-4, 
    .features-grid,
    .visual-story-grid,
    .style-quadrant {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* 风格指南页: 象限图调整 */
    .style-quadrant {
        display: flex;
        flex-direction: column;
    }
    
    .quadrant-item {
        min-height: 250px;
    }

    /* 衣橱必备页: 变2列 (适合展示单品) */
    .essentials-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    /* 季节趋势页: 时间轴变为垂直列表 */
    .timeline-container {
        flex-direction: column;
        padding-left: 1rem;
        border-left: 2px solid var(--color-border);
    }
    
    .timeline-item {
        margin-bottom: 2rem;
        padding-left: 1rem;
    }

    /* --- 组件调整 --- */
    /* 轮播图高度适配 */
    .hero-slider, .hero-slide {
        height: 60vh; 
        min-height: 400px;
    }

    /* 按钮全宽，便于点击 */
    .btn {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
    }

    /* 隐藏不必要的装饰元素 */
    .decorative-line, .divider-vertical {
        display: none;
    }
    
    /* 图片比例调整 */
    .img-wrapper {
        aspect-ratio: 3/2; /* 统一为横向比例，避免过长 */
    }
}

/* --- Small Mobile (< 375px) --- */
@media screen and (max-width: 375px) {
    h1 { font-size: 1.75rem; }
    
    .essentials-grid {
        grid-template-columns: 1fr; /* 极小屏幕单列展示 */
    }
}