/* 全局样式 - 现代时尚男装网站 */

/* 色彩系统 */
:root {
  --primary-dark: #2C2C2C;
  --primary-light: #F5F5F5;
  --pure-white: #FFFFFF;
  --accent-blue: #1A3A5F;
  --accent-terracotta: #B85C38;
  --text-primary: #333333;
  --text-secondary: #666666;
  --border-light: rgba(0, 0, 0, 0.1);
}

/* 字体系统 */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
}

/* 标题层级 */
h1 { font-size: 2.5rem; font-weight: 300; line-height: 1.2; }
h2 { font-size: 2rem; font-weight: 300; line-height: 1.3; }
h3 { font-size: 1.5rem; font-weight: 400; }
h4 { font-size: 1.125rem; font-weight: 500; }

/* 响应式布局容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 图片样式 */
img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

/* 按钮基础样式 */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border: 1px solid var(--primary-dark);
  background: transparent;
  color: var(--primary-dark);
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn:hover {
  background: var(--primary-dark);
  color: var(--pure-white);
}

/* 悬停效果 */
.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.02);
}

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

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

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

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

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

/* 卡片阴影 */
.card-shadow {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
}

.card-shadow:hover {
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* 响应式断点 */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  .container { padding: 0 0.75rem; }
}

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

/* 瀑布流布局 */
.masonry {
  column-count: 3;
  column-gap: 1rem;
}

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

@media (max-width: 1024px) {
  .masonry { column-count: 2; }
}

@media (max-width: 640px) {
  .masonry { column-count: 1; }
}

/* 加载动画 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-light);
  border-radius: 50%;
  border-top-color: var(--primary-dark);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 模态框样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  background: var(--pure-white);
  padding: 2rem;
}

/* 关闭按钮 */
.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--text-secondary);
}

.close-btn:hover {
  color: var(--primary-dark);
}

/* 锚点偏移 */
.anchor-offset {
  scroll-margin-top: 80px;
}