/* 
 * Project: 风尚艺廊 Fashion Gallery
 * Theme: Minimalist, Modern, Artistic
 * Core Colors: Ivory (#FDFDFD), Light Gray (#F5F5F5), Charcoal (#1A1A1A)
 */

/* =========================================
   1. Global Reset & Base Typography
   ========================================= */
:root {
    --color-bg: #FDFDFD;       /* 象牙白背景 */
    --color-bg-alt: #F5F5F5;   /* 辅助背景 */
    --color-text: #1A1A1A;     /* 主要文字 */
    --color-text-light: #666666; /* 次要文字 */
    --font-primary: 'Helvetica Now', 'Helvetica', 'Arial', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* 防止横向溢出 */
    line-height: 1.6;
}

/* 极简滚动条设计 */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #CCCCCC;
}

/* =========================================
   2. Utility Animations (微交互)
   ========================================= */

/* 淡入向上浮现 */
.fade-in-up {
    animation: fadeInUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

/* 纯淡入 */
.fade-in {
    animation: fadeIn 1.5s ease-out forwards;
    opacity: 0;
}

/* 延迟类 */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-500 { animation-delay: 0.5s; }

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

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* 链接下划线动效 - 从左到右 */
.hover-underline {
    position: relative;
    text-decoration: none;
    display: inline-block;
}

.hover-underline::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: currentColor;
    transform-origin: bottom right;
    transition: transform 0.4s cubic-bezier(0.86, 0, 0.07, 1);
}

.hover-underline:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* 图片容器缩放效果 */
.img-zoom-container {
    overflow: hidden;
    position: relative;
}

.img-zoom {
    transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.5s ease;
    will-change: transform;
}

.group:hover .img-zoom {
    transform: scale(1.05);
}

/* =========================================
   3. Layout Components
   ========================================= */

/* 瀑布流布局 (Masonry) - 用于系列页面 */
.masonry-grid {
    column-count: 1;
    column-gap: 2rem;
}

@media (min-width: 768px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (min-width: 1280px) {
    .masonry-grid {
        column-count: 3;
    }
}

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

/* 全屏轮播图相关 */
.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 0;
}

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

/* 模态框过渡 */
.modal-overlay {
    transition: opacity 0.4s ease;
}

.modal-content {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.modal-hidden .modal-overlay {
    opacity: 0;
    pointer-events: none;
}

.modal-hidden .modal-content {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    pointer-events: none;
}

/* =========================================
   4. Loading State
   ========================================= */
.skeleton {
    background: #f0f0f0;
    background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 隐藏横向滚动条 */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}