/* 
 * 现代风尚男性着装指南网站 - 全局样式表
 * Modern Menswear Style Guide - Global CSS
 * 遵循极简主义设计原则 (Minimalism)
 */

/* -------------------------------------------------------------------------- */
/* 1. 基础排版与变量 (Typography & Variables) */
/* -------------------------------------------------------------------------- */
:root {
  --font-primary: "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --color-bg-body: #ffffff;
  --color-text-main: #212529;
  --color-text-muted: #6c757d;
  --transition-slow: 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast: 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-bg-body);
  color: var(--color-text-main);
  -webkit-font-smoothing: antialiased; /* macOS 字体平滑 */
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* -------------------------------------------------------------------------- */
/* 2. 交互动效 (Interactions) */
/* -------------------------------------------------------------------------- */

/* 导航链接下划线动画 */
.nav-link {
  position: relative;
  display: inline-block;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: 0;
  left: 50%;
  background-color: var(--color-text-main);
  transition: width 0.3s ease, left 0.3s ease;
}

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

/* 图片悬停微缩放效果 (Zoom Effect) */
.group-hover-zoom {
  overflow: hidden;
  display: block;
  position: relative;
}

.group-hover-zoom img {
  transition: transform var(--transition-slow), filter var(--transition-fast);
  will-change: transform;
}

.group-hover-zoom:hover img {
  transform: scale(1.03);
  filter: brightness(0.95); /* 轻微压暗，增加质感 */
}

/* 按钮点击反馈 */
button:active {
  transform: scale(0.98);
}

/* -------------------------------------------------------------------------- */
/* 3. 组件样式 (Components) */
/* -------------------------------------------------------------------------- */

/* 轮播图淡入淡出 (Carousel Fade) */
.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  z-index: 0;
}

.carousel-slide.active {
  opacity: 1;
  z-index: 10;
}

/* 瀑布流布局 (Masonry Grid Fallback) */
/* 即使在JS未加载时也能保持基本布局 */
.masonry-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* 灯箱效果 (Lightbox) */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background-color: rgba(20, 20, 20, 0.98); /* 深色沉浸式背景 */
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity var(--transition-fast);
  align-items: center;
  justify-content: center;
}

.lightbox-modal.show {
  display: flex;
  opacity: 1;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  animation: zoomIn 0.4s ease forwards;
}

@keyframes zoomIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* -------------------------------------------------------------------------- */
/* 4. 辅助样式 (Utilities) */
/* -------------------------------------------------------------------------- */

/* 隐藏滚动条但允许滚动 (特定区域) */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* 文本阴影增强可读性 */
.text-shadow-sm {
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.text-shadow-md {
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}