/* 全局样式文件 - 短袖T恤展示网站 */
/* 定义极简主义设计风格 */

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

/* 字体定义 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

body {
    font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
}

/* 布局容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 500;
    color: #2c3e50;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #555;
    font-weight: 400;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #2c3e50;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #2c3e50;
    transition: width 0.3s ease;
}

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

.nav-links a.active {
    color: #2c3e50;
    font-weight: 500;
}

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

/* 汉堡菜单（移动端） */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* 主内容区域 */
.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 160px);
}

/* 轮播图样式 */
.hero-slider {
    position: relative;
    height: 70vh;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    text-align: center;
    color: white;
    background: rgba(0, 0, 0, 0.4);
    padding: 2rem;
    border-radius: 10px;
    max-width: 600px;
}

.slide-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

/* 卡片样式 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 4rem 0;
}

.card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.card p {
    color: #666;
    font-size: 0.9rem;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: #2c3e50;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: inherit;
}

.btn:hover {
    background: #34495e;
}

.btn-outline {
    background: transparent;
    border: 2px solid #2c3e50;
    color: #2c3e50;
}

.btn-outline:hover {
    background: #2c3e50;
    color: white;
}

/* 筛选标签 */
.filter-tags {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.filter-tag {
    padding: 0.5rem 1.5rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tag.active, .filter-tag:hover {
    background: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

/* 瀑布流布局 */
.masonry-grid {
    column-count: 3;
    column-gap: 1rem;
    margin: 2rem 0;
}

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

.masonry-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.modal-img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.modal-caption {
    position: absolute;
    bottom: -40px;
    left: 0;
    color: white;
    font-size: 1.1rem;
}

/* 页脚 */
.footer {
    background: #f8f9fa;
    padding: 2rem 0;
    text-align: center;
    color: #666;
    margin-top: 4rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    .masonry-grid {
        column-count: 2;
    }
    
    .slide-content h1 {
        font-size: 2rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .masonry-grid {
        column-count: 1;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .slide-content h1 {
        font-size: 1.5rem;
    }
}

/* 工具类 */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.p-1 { padding: 1rem; }
.p-2 { padding: 2rem; }

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.8s ease;
}

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

/* 加载状态 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2c3e50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}