/* 全局样式文件 - 衬衫美学网站 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;700&family=Noto+Sans+SC:wght@300;400;500&display=swap');

/* 布料纹理悬停效果 */
.nav-hover-effect {
    position: relative;
    transition: all 0.3s ease;
}

.nav-hover-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(45deg, transparent 25%, rgba(236, 240, 241, 0.1) 25%, 
        rgba(236, 240, 241, 0.1) 50%, transparent 50%, transparent 75%, 
        rgba(236, 240, 241, 0.1) 75%, rgba(236, 240, 241, 0.1));
    background-size: 8px 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 4px;
    z-index: -1;
}

.nav-hover-effect:hover::before {
    opacity: 1;
}

/* 图片淡入淡出效果 */
.image-fade {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.image-fade.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* 页面切换动画 */
.page-transition {
    animation: fadeInUp 0.8s ease;
}

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

/* 自定义字体 */
.font-serif {
    font-family: 'Noto Serif SC', serif;
}

.font-sans {
    font-family: 'Noto Sans SC', sans-serif;
}

/* 布料纹理背景 */
.fabric-texture {
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(44, 62, 80, 0.1) 1px, transparent 0);
    background-size: 20px 20px;
}

/* 按钮悬停效果 */
.btn-hover {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(231, 76, 60, 0.2), transparent);
    transition: left 0.5s;
}

.btn-hover:hover::before {
    left: 100%;
}

/* 图片加载占位符 */
.image-placeholder {
    background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%, 
                transparent 50%, #f0f0f0 50%, #f0f0f0 75%, transparent 75%);
    background-size: 20px 20px;
    animation: placeholder-shimmer 2s infinite linear;
}

@keyframes placeholder-shimmer {
    0% {
        background-position: -40px 0;
    }
    100% {
        background-position: 40px 0;
    }
}

/* 响应式图片容器 */
.responsive-image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* 导航栏激活状态 */
.nav-active {
    position: relative;
    color: #E74C3C;
}

.nav-active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #E74C3C;
    animation: underline 0.3s ease;
}

@keyframes underline {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #ECF0F1;
}

::-webkit-scrollbar-thumb {
    background: #2C3E50;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #34495E;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .nav-hover-effect::before {
        background-size: 6px 6px;
    }
    
    .image-fade {
        transform: translateY(10px);
    }
    
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(15px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* 打印样式 */
@media print {
    .nav-hover-effect::before,
    .btn-hover::before {
        display: none;
    }
    
    .image-fade {
        opacity: 1;
        transform: none;
    }
}