/* 全局样式文件 - 围巾展示网站 */

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

/* 优雅的中文字体设置 */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fafafa;
}

/* 导航栏固定样式 */
.nav-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 链接悬停效果 */
.link-hover {
  transition: color 0.3s ease, transform 0.2s ease;
}

.link-hover:hover {
  color: #8b7355;
  transform: translateY(-1px);
}

/* 图片悬停放大效果 */
.image-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

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

.image-hover img {
  transition: transform 0.3s ease;
}

/* 产品卡片悬停效果 */
.product-card {
  transition: all 0.3s ease;
  border-radius: 8px;
  overflow: hidden;
}

.product-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

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

.btn-hover::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn-hover:hover::before {
  width: 300px;
  height: 300px;
}

.btn-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 页面内容主容器 */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 响应式网格布局 */
.grid-responsive {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* 标题装饰线 */
.title-decoration {
  position: relative;
  padding-bottom: 12px;
}

.title-decoration::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #8b7355, #d4af37);
}

/* 文字渐变效果 */
.text-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

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

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

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

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

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

/* 响应式设计 */
@media (max-width: 768px) {
  .main-container {
    padding: 0 16px;
  }
  
  .grid-responsive {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
  }
  
  .nav-fixed {
    padding: 12px 0;
  }
}

@media (max-width: 480px) {
  .grid-responsive {
    grid-template-columns: 1fr;
  }
}

/* 焦点状态可访问性 */
a:focus,
button:focus {
  outline: 2px solid #8b7355;
  outline-offset: 2px;
}

/* 载入动画 */
.loading-shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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