/* 全局样式文件 - 时尚男装展示网站 */

/* 配置 Tailwind CSS 防冲突 */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* 颜色变量定义 */
:root {
  --color-primary-black: #1a1a1a;
  --color-deep-gray: #2d2d2d;
  --color-ivory-white: #faf9f6;
  --color-oat: #e8e4d9;
  --color-sandstone: #b8b5a8;
  --color-moss-green: #5a6b5a;
  --color-text-primary: #1a1a1a;
  --color-text-secondary: #666666;
  --color-border: #e0e0e0;
}

/* 全局重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background-color: var(--color-ivory-white);
  color: var(--color-text-primary);
  line-height: 1.8;
  letter-spacing: 0.02em;
  overflow-x: hidden;
}

/* 排版基础 */
h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 {
  font-size: 3rem;
  letter-spacing: 0.05em;
}

h2 {
  font-size: 2rem;
  letter-spacing: 0.03em;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--color-text-secondary);
}

/* 图片优化 */
img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* 链接样式 */
a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

a:hover {
  opacity: 0.7;
}

/* 按钮基础 */
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  transition: all 0.3s ease;
}

/* 布局容器 */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* 导航栏 */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(250, 249, 246, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--color-border);
}

/* 分割线 */
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 3rem 0;
}

/* 网格系统 */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.25rem;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.8s ease-out;
}

/* 图片悬停效果 */
.img-hover {
  overflow: hidden;
  position: relative;
}

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

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

/* 页脚样式 */
footer {
  margin-top: 5rem;
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}