/* 全局样式文件 - 现代简约男装展示网站 */

/* 自定义颜色变量 */
:root {
  /* 中性色调 */
  --color-black: #000000;
  --color-white: #ffffff;
  --color-gray-50: #fafafa;
  --color-gray-100: #f5f5f5;
  --color-gray-200: #e5e5e5;
  --color-gray-300: #d4d4d4;
  --color-gray-400: #a3a3a3;
  --color-gray-500: #737373;
  --color-gray-600: #525252;
  --color-gray-700: #404040;
  --color-gray-800: #262626;
  --color-gray-900: #171717;
  
  /* 驼色系 */
  --color-camel-50: #fdf8f3;
  --color-camel-100: #f7eddf;
  --color-camel-200: #ead1c0;
  --color-camel-300: #d4b49c;
  --color-camel-400: #b8947a;
  --color-camel-500: #9c765f;
  --color-camel-600: #805d4c;
  --color-camel-700: #644539;
  --color-camel-800: #4d352a;
  --color-camel-900: #3a241d;
  
  /* 深蓝色系 */
  --color-navy-50: #f0f4f8;
  --color-navy-100: #d9e2ec;
  --color-navy-200: #bcccdc;
  --color-navy-300: #9fb3c8;
  --color-navy-400: #829ab1;
  --color-navy-500: #627d98;
  --color-navy-600: #4a6378;
  --color-navy-700: #36485c;
  --color-navy-800: #243342;
  --color-navy-900: #182230;
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background-color: var(--color-white);
  color: var(--color-gray-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover {
  opacity: 0.7;
}

/* 导航栏样式 */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-gray-900);
  transition: width 0.3s ease;
}

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

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

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

/* 图片悬停效果 */
.image-hover {
  overflow: hidden;
  cursor: pointer;
}

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

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

/* 文字渐显效果 */
.text-fade-in {
  opacity: 0;
  animation: textFadeIn 1s ease-out forwards;
}

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

/* 响应式文字大小 */
.responsive-text {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--color-gray-400);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray-500);
}

/* 页脚样式 */
footer {
  margin-top: auto;
}

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

.aspect-16-9 {
  aspect-ratio: 16/9;
}

.aspect-4-3 {
  aspect-ratio: 4/3;
}

.aspect-3-4 {
  aspect-ratio: 3/4;
}

.aspect-1-1 {
  aspect-ratio: 1/1;
}

/* 打印样式 */
@media print {
  body {
    background: white;
    color: black;
  }
  
  img {
    filter: grayscale(100%);
  }
}

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

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  :root {
    --color-white: #171717;
    --color-gray-900: #ffffff;
  }
}