/* 衬衫展示网站自定义样式 */
/* 使用Tailwind.css作为基础，仅添加必要自定义样式 */

/* 页面过渡动画 */
.page-transition {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.page-slide-up {
    transform: translateY(100vh);
}

.page-slide-down {
    transform: translateY(-100vh);
}

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

.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;
    filter: blur(10px);
    transition: filter 1.5s ease-in-out;
}

.carousel-image.loaded {
    filter: blur(0);
}

/* 图片渐进加载效果 */
.image-progressive {
    position: relative;
    overflow: hidden;
}

.image-progressive::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    z-index: 1;
}

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

.image-progressive.loaded::before {
    display: none;
}

/* 按钮布料纹理效果 */
.btn-fabric {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

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

/* 分类卡片悬停效果 */
.category-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* 悬浮文字效果 */
.floating-text {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* 面料成分图表 */
.fabric-chart {
    position: relative;
    height: 200px;
}

.chart-segment {
    position: absolute;
    bottom: 0;
    transition: height 0.8s ease;
}

/* 工艺图标动画 */
.process-icon {
    transition: transform 0.3s ease;
}

.process-icon:hover {
    transform: scale(1.1);
}

/* 响应式断点调整 */
@media (max-width: 768px) {
    .carousel-container {
        height: 60vh;
    }
    
    .category-card:hover {
        transform: translateY(-4px);
    }
    
    .floating-text {
        animation: float 8s ease-in-out infinite;
    }
}

@media (max-width: 1024px) {
    .carousel-container {
        height: 80vh;
    }
}

/* 自定义字体加载 */
@font-face {
    font-family: 'SourceHanSerif';
    src: url('https://fonts.loli.net/css2?family=Source+Han+Serif+CN:wght@300;400;600&display=swap');
    font-display: swap;
}

@font-face {
    font-family: 'AlibabaPuHuiTi';
    src: url('https://fonts.loli.net/css2?family=Alibaba+PuHui+Ti&display=swap');
    font-display: swap;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

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

/* 焦点样式改进 */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}

/* 加载状态 */
.loading-spinner {
    border: 2px solid #f3f4f6;
    border-top: 2px solid #4f46e5;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* 无障碍改进 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 打印样式 */
@media print {
    .no-print {
        display: none !important;
    }
    
    .carousel-container {
        height: auto;
    }
}