/* 全局样式 (Global Styles) */
body {
  font-family: Arial, sans-serif; /* 设置全局字体 */
  background-color: #f4f4f4; /* 设置页面背景颜色 */
  margin: 0; /* 移除 body 默认外边距 */
  padding: 0; /* 移除 body 默认内边距 */
  display: flex; /* 启用 Flexbox 布局 */
  flex-direction: column; /* 设置主轴方向为垂直方向 */
  min-height: 100vh; /* 设置最小高度为视口高度，确保页脚在底部 */
}

/* 导航栏样式 (Navbar Styles) */
.navbar {
  background-color: rgba(255, 255, 255, 0.2); /* 设置半透明背景颜色 */
  backdrop-filter: blur(10px); /* 添加背景模糊效果 */
  border-bottom: 1px solid rgba(255, 255, 255, 0.3); /* 添加底部边框 */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 添加底部阴影 */
}

.nav-list {
  list-style-type: none; /* 移除列表默认的项目符号 */
  margin: 0; /* 移除列表默认外边距 */
  padding: 0; /* 移除列表默认内边距 */
  display: flex; /* 启用 Flexbox 布局 */
  justify-content: space-around; /* 平均分配子元素之间的空间 */
  align-items: center; /* 垂直居中对齐子元素 */
  height: 60px; /* 设置导航栏高度 */
}

.nav-item {
  margin: 0 10px; /* 设置导航项水平外边距 */
}

.nav-link {
  text-decoration: none; /* 移除链接下划线 */
  color: #333; /* 设置链接文字颜色 */
  font-weight: bold; /* 设置链接文字加粗 */
  transition: color 0.3s ease; /* 添加颜色过渡效果 */
}

.nav-link:hover {
  color: #666; /* 鼠标悬停时改变链接文字颜色 */
}

/* 图文双列表样式 (Image-Text List Styles) */
.content {
  flex: 1; /* 占据剩余空间，使内容区域可伸缩 */
  display: flex; /* 启用 Flexbox 布局 */
  justify-content: space-around; /* 平均分配 product-list 之间的空间 */
  align-items: flex-start; /* 垂直顶部对齐 product-list */
  flex-wrap: wrap; /* 允许子元素换行 */
  padding: 20px; /* 设置内容区域内边距 */
}

.product-list {
  width: 45%; /* 设置每个列表的宽度（适用于双列表布局） */
  margin-bottom: 20px; /* 设置列表底部外边距 */
  display: flex; /* 启用 Flexbox 布局 */
  flex-direction: column; /* 设置主轴方向为垂直方向 */
  align-items: center; /* 水平居中对齐 product-item */
}

/* 商品项容器样式 (Product Item Container Styles) */
.product-item {
  background-color: rgba(255, 255, 255, 0.2); /* 设置半透明背景颜色 */
  backdrop-filter: blur(10px); /* 添加背景模糊效果 */
  border-radius: 10px; /* 设置圆角 */
  border: 1px solid rgba(255, 255, 255, 0.3); /* 添加边框 */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 添加阴影 */
  padding: 20px; /* 设置内边距 */
  margin-bottom: 20px; /* 设置底部外边距 */
  text-align: center; /* 文本居中对齐 */
  /* 修改这里来设置容器的尺寸 */
  width: 450px; /* 设置容器宽度为 350px */
  height: 550px; /* 设置容器高度为 450px */
  box-sizing: border-box; /* 盒模型设置为 border-box，内边距和边框包含在设定的宽度和高度内 */
  display: flex; /* 使用 Flexbox 布局 */
  flex-direction: column; /* 设置主轴方向为垂直 */
  align-items: center; /* 水平居中对齐内容 */
  justify-content: flex-start; /* 内容从顶部开始排列 */
}

/* 商品图片样式 (Product Image Styles) */
.product-item img {
  /* 这里的尺寸是图片的实际显示尺寸 */
  width: 400px; /* 设置图片宽度为 300px */
  height: 500px; /* 设置图片高度为 400px */
  object-fit: cover; /* 确保图片填充容器并保持比例，可能会裁剪 */
  border-radius: 5px; /* 设置图片圆角 */
  margin-bottom: 10px; /* 设置图片底部外边距 */
  max-width: 100%; /* 确保图片不会超出其父容器（product-item）的宽度 */
  /* 注意：图片的 300x400 尺寸要小于容器（product-item）减去内边距后的尺寸 (350-2*20)x(450-2*20) = 310x410，这样图片才能完全放在容器内 */
}

/* 同时修改 product-image 类，以防你使用 */
.product-image {
  width: 300px; /* 设置图片宽度为 300px */
  height: 400px; /* 设置图片高度为 400px */
  object-fit: cover; /* 确保图片填充容器并保持比例，可能会裁剪 */
  border-radius: 5px; /* 设置图片圆角 */
  margin-bottom: 10px; /* 设置图片底部外边距 */
  max-width: 100%; /* 确保图片不会超出其父容器宽度 */
}


.product-title {
  margin-top: 0; /* 移除顶部外边距 */
  color: #333; /* 设置标题颜色 */
}

.product-description {
  color: #666; /* 设置描述文字颜色 */
  margin-bottom: 20px; /* 设置描述底部外边距 */
  flex-grow: 1; /* 让描述占据剩余垂直空间，以便按钮到底部（如果容器高度足够） */
}

/* 购买按钮样式 (Buy Button Styles) */
.buy-button {
  background-color: #007bff; /* 设置背景颜色 */
  color: white; /* 设置文字颜色 */
  border: none; /* 移除边框 */
  border-radius: 5px; /* 设置圆角 */
  padding: 10px 20px; /* 设置内边距 */
  cursor: pointer; /* 鼠标悬停时显示手型 */
  transition: background-color 0.3s ease; /* 添加背景颜色过渡效果 */
  display: block; /* 设置为块级元素 */
  margin: 0 auto; /* 水平居中显示 */
}

.buy-button:hover {
  background-color: #0056b3; /* 鼠标悬停时改变背景颜色 */
}