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

/* 自定义 Tailwind 配置 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --ivory-white: #FFFFF0;
  --light-gray: #E8E8E8;
  --taupe: #D4C5B9;
  --dark-red: #8B1A1A;
  --navy-blue: #1A3A52;
  --text-primary: #2C2C2C;
  --text-secondary: #666666;
}

body {
  font-family: 'Noto Sans SC', sans-serif;
  font-weight: 400;
  color: var(--text-primary);
  background-color: var(--ivory-white);
  line-height: 1.8;
  overflow-x: hidden;
}

/* 页面加载淡入动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* 导航栏样式 */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.3s ease;
  background-color: rgba(255, 255, 240, 0.95);
  backdrop-filter: blur(10px);
}

nav.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
  font-weight: 300;
  letter-spacing: 2px;
}

h1 {
  font-size: 3rem;
  line-height: 1.2;
}

h2 {
  font-size: 2.5rem;
  line-height: 1.3;
}

h3 {
  font-size: 1.8rem;
  line-height: 1.4;
}

/* 图片悬停效果 */
.image-hover {
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.image-hover img {
  transition: transform 0.5s ease;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.image-hover .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: white;
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.image-hover:hover .overlay {
  transform: translateY(0);
}

/* 轮播图样式 */
.carousel {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

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

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.carousel-controls {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 2;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: 2px solid white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot.active {
  background-color: white;
  transform: scale(1.2);
}

/* 网格布局 */
.grid-layout {
  display: grid;
  gap: 30px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

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

.masonry-item {
  break-inside: avoid;
  margin-bottom: 30px;
}

/* 图片放大模态框 */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.modal-content {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from {
    transform: scale(0.5);
  }
  to {
    transform: scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 40px;
  color: white;
  font-size: 40px;
  font-weight: 300;
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: var(--light-gray);
}

/* 页脚样式 */
footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
  font-size: 12px;
  letter-spacing: 1px;
  border-top: 1px solid var(--light-gray);
}

/* 响应式设计 */
@media (max-width: 1199px) {
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .masonry {
    column-count: 2;
  }
}

@media (max-width: 767px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.3rem;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .masonry {
    column-count: 1;
  }
  
  .carousel {
    height: 60vh;
  }
  
  .modal-close {
    top: 10px;
    right: 20px;
    font-size: 30px;
  }
}

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

::-webkit-scrollbar-track {
  background: var(--ivory-white);
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--taupe);
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border: 2px solid var(--text-primary);
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  cursor: pointer;
  background-color: transparent;
  font-family: 'Noto Sans SC', sans-serif;
  font-weight: 400;
}

.btn:hover {
  background-color: var(--text-primary);
  color: var(--ivory-white);
}

/* 文字动画 */
.text-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.text-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 容器样式 */
.container-custom {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 分隔线 */
.divider {
  width: 60px;
  height: 2px;
  background-color: var(--dark-red);
  margin: 30px auto;
}