/* 全局样式文件 - 高端服装展示网站 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fefefe;
    overflow-x: hidden;
}

/* 导航栏样式 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.nav-link {
    position: relative;
    color: #666;
    font-weight: 400;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #000;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #000;
    transition: width 0.3s ease;
}

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

/* 轮播图样式 */
.carousel-container {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* 图片悬停效果 */
.image-hover {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.image-hover:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* 网格布局 */
.grid-container {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

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

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

/* 响应式设计 */
@media (max-width: 1024px) {
    .masonry-grid {
        column-count: 2;
    }
    
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .masonry-grid {
        column-count: 1;
    }
    
    .grid-container {
        grid-template-columns: 1fr;
    }
    
    .carousel-container {
        height: 70vh;
    }
}

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

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

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

/* 页面过渡动画 */
.page-transition {
    animation: fadeIn 0.6s ease-in-out;
}

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

/* 加载动画 */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #000;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* 工具类 */
.text-balance {
    text-wrap: balance;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 页脚样式 */
.footer {
    background: #f8f8f8;
    border-top: 1px solid #eee;
    padding: 2rem 0;
    text-align: center;
    font-size: 0.875rem;
    color: #666;
}

/* 无障碍支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .nav-link {
        color: #000;
    }
    
    .footer {
        background: #fff;
        border-top: 2px solid #000;
    }
}