/* Resetting margin, padding, and box-sizing for all elements */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body styling */
body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  background-color: #f9f9f9;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;  /* 使页面最小高度占满整个屏幕 */
}

/* Main content area */
main {
  flex-grow: 1;  /* 确保页面内容部分占据剩余空间 */
}

/* Header styling */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: rgba(0, 0, 0, 0.7); /* 半透明背景 */
  color: #fff;
  position: relative; /* 保证导航菜单相对定位 */
  justify-content: space-evenly;
  flex-wrap: wrap;
}

.header .logo img {
  width: 100%;
}

.header nav ul {
  list-style: none;
  display: flex;
}

.header nav ul li {
  margin: 0 15px;
}

.header nav ul li a {
  text-decoration: none;
  color: #fff;
  font-weight: 500; /* 中等粗细的字体 */
  text-transform: none; 
  letter-spacing: -1px; /* 增加字母间距 */
}

.header nav ul li a:hover {
  color: #f1f1f1;
  border-bottom: 2px solid #fff; /* 悬停时底部增加细线 */
}

.header-actions {
  display: flex;
  gap: 15px;
}

.cart-button, .search-button {
  background-color: transparent;
  border: 1px solid #fff;
  padding: 10px 20px;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 50px; /* 圆角 */
  transition: all 0.3s ease-in-out; /* 平滑过渡 */
}

.cart-button:hover, .search-button:hover {
  background-color: #f1f1f1; /* 悬停背景色 */
  color: #333; /* 文字颜色反转 */
}

.cart-button:active, .search-button:active {
  transform: scale(0.98); /* 按钮点击时轻微缩小 */
}

/* Hero Banner Section */
.hero-banner {
  display: flex;
  justify-content: center;  /* 确保内容居中 */
  align-items: center;
  padding: 80px 40px;
  background: url('hero-image.jpg') no-repeat center center/cover;
  height: 80vh;
  color: #fff;
  text-align: center;  /* 文本居中 */
}

/* Media Query for Mobile */
@media (max-width: 768px) {
  .hero-banner {
    background: url('hero-image-mobile.jpg') no-repeat center center/cover;
    height: 60vh; /* 可以根据需求调整高度 */
  }
}

.hero-banner .hero-text {
  max-width: 600px;  /* 限制文本宽度 */
}

.hero-banner h1 {
  font-size: 5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.hero-banner p {
  font-size: 1.5rem;
  margin-bottom: 30px;
}

.hero-banner .cta-button {
  background-color: #0071e3;
  color: white;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 50px;
  font-size: 1.5rem;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.hero-banner .cta-button:hover {
  background-color: #e1e1e1;
  color: #333;
  transform: scale(1.05);
}

/* Product Showcase Section */
.product-showcase {
  padding: 60px 40px;
  background-color: #fff;
}

.product-showcase h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 40px;
}

.product-cards {
  display: flex;
  justify-content: space-around;
  gap: 30px;
}

.product-card {
  background-color: #fff;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1); /* 更柔和的阴影 */
  padding: 20px;
  width: 30%;
  text-align: center;
  border-radius: 20px; /* 更圆的角 */
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out; /* 平滑过渡 */
  position: relative;
  overflow: hidden; /* 确保文本和按钮不会超出图片 */
}

.product-card:hover {
  transform: translateY(-10px); /* 鼠标悬停时轻微向上移动 */
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15); /* 增强阴影效果 */
}

.product-card img {
  width: 100%;
  height: auto;
  border-radius: 5px;
}

.product-card h3 {
  font-size: 1.5rem;
  margin-top: 20px;
}

.product-card p {
  font-size: 1.15rem;
  margin-top: 10px;
}

.product-card .cta-button {
  background-color: #0071e3;
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 50px;
  margin-top: 20px;
  display: inline-block;
}

.product-card .cta-button:hover {
  background-color: #005bb5;
}

@keyframes bounce {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Features Section */
.features {
  display: flex;
  justify-content: space-between;
  padding: 60px 40px;
  background-color: #f9f9f9;
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 30%;
  text-align: center;
}

.feature img {
  width: 100%;
  height: auto;
  border-radius: 15px;
  margin-bottom: 20px;
}

.feature h3 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature p {
  font-size: 1.1rem;
  color: #555;
}

/* Footer Section */
.footer {
  background-color: #111;
  color: #fff;
  text-align: center;
  padding: 30px 40px;
  font-size: 1rem;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);  /* 底部轻微阴影 */
  margin-top: auto;  /* 保证footer始终贴在底部 */
}

.footer-links {
  margin-bottom: 10px;
}

.footer-links a {
  color: #fff;
  margin: 0 1.5%;
  text-decoration: none;
}

.footer-links a:hover {
  color: #0071e3;
  text-decoration: underline;
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
  .hero-banner {
    flex-direction: column;
    height: auto;
    padding: 40px 20px;
  }

  .hero-banner .hero-text {
    text-align: center;
    margin-bottom: 30px;
  }

  .product-cards {
    flex-direction: column;
    align-items: center;
  }

  .product-card {
    width: 80%; /* 在小屏幕上让卡片变宽 */
  }

  .cta-button {
    font-size: 1.2rem;
  }

  .product-card .cta-button {
    position: static;
    bottom: 20px;
    left: 50%;
    ###transform: translateX(-50%);
    background-color: #0071e3;
    color: #fff;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.2rem;
  }

  .product-card .cta-button:hover {
    background-color: #005bb5;
  }

  .product-card img::after {
    content: attr(alt);
    position: absolute;
    bottom: 10px;
    left: 10px;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 5px 10px;
    font-size: 1.1rem;
    border-radius: 5px;
  }

  /* 修复特性部分文字挤压和堆叠问题 */
  .features {
    flex-direction: column;
    align-items: center;
  }

  .feature {
    width: 90%; /* 确保每个特性项在小屏幕上合适的宽度 */
    margin-bottom: 20px; /* 增加间距避免挤压 */
  }

  .feature img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
  }

  .feature h3 {
    font-size: 1.5rem; /* 在小屏幕上减少标题字体大小 */
  }

  .feature p {
    font-size: 1rem; /* 在小屏幕上减少描述文字的字体大小 */
  }
}

/* Privacy Policy Section */
.privacy-policy {
  padding: 40px;
  background-color: #fff;
}

.policy-header {
  text-align: center;
  margin-bottom: 40px;
}

.policy-header h1 {
  font-size: 3rem;
  margin-bottom: 20px;
}

.policy-header p {
  font-size: 1.2rem;
  color: #555;
}

.policy-content {
  display: flex;
  flex-direction: column;
  align-items: center; /* 水平居中 */
  justify-content: center; /* 垂直居中 */
  max-width: 800px; /* 设置最大宽度，避免内容过宽 */
  margin: 0 auto; /* 居中内容 */
  padding: 20px;
  text-align: left; /* 保证文本内容对齐 */
}

.policy-content h2 {
  font-size: 2rem;
  margin-top: 30px;
  color: #333;
}

.policy-content p {
  font-size: 1.2rem;
  color: #555;
  line-height: 1.8;
  margin-top: 10px;
}

/* Footer Section */
.footer {
  background-color: #111;
  color: #fff;
  text-align: center;
  padding: 30px 40px;
  font-size: 1rem;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
}

.footer-links {
  margin-bottom: 10px;
}

.footer-links a {
  color: #fff;
  margin: 0 1.5%;
  text-decoration: none;
}

.footer-links a:hover {
  color: #0071e3;
  text-decoration: underline;
}

html, body {
  overflow-x: hidden; /* 防止页面出现水平滚动条 */
}

@media (max-width: 332px) {
  .header {
    display: flex;
    flex-direction: column; /* 在小屏幕下改为纵向排列 */
    align-items: stretch; /* 确保子元素宽度为100% */
  }

  .header nav ul {
    display: flex;
    flex-direction: column; /* 在小屏幕下改为纵向排列 */
    align-items: center; /* 居中对齐 */
  }
}

