/* 样式重置 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body, html { height: 100%; font-family: Arial, sans-serif; }

/* 导航栏 */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background:rgba(51,51,51,0.8);
  padding: 20px 60px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
}

.logo img {
  height: 40px;
}

.navbar ul {
  list-style: none;
  display: flex;
  gap: 30px;
}

.navbar ul li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}



.lang-search {
  display: flex;
  gap: 14px;
  color:white;
}

.body{
  margin-top: 80px;
}

/* 背景图部分 */
.banner {
  position: relative;
  background: url('http://www.hexibathroom.com/assets/images/banner.png') no-repeat center center;
  background-size: cover;
  height: 100vh;
  
}

.banner-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

.banner-text h1 {
  font-size: 120px;
  font-weight: bold;
}

.banner-text p {
  font-size: 50px;
}

/* 产品展示部分 */
.products-section {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 40px;
  background-color: #f4f4f4;
}

.product-card {
  width: 30%;
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.product-card img {
  width: 100%;
  border-radius: 10px;
}

.product-card h3 {
  margin-top: 20px;
  font-size: 24px;
  font-weight: bold;
}

/* 关于我们部分 */
.about-us {
  padding: 60px 20px;
  background-color: #e4f1f8;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.about-us h2 {
  font-size: 36px;
  text-align: center;
  margin-bottom: 30px;
}

.about-content {
  display: flex;
  gap: 40px;
}

.about-text {
  width: 60%;
  font-size: 18px;
  line-height: 1.6;
}

.about-image img {
  width: 35%;
  border-radius: 10px;
}

/* 底部 */
footer {
  background-color: #333;
  color: white;
  padding: 20px 0;
  text-align: center;
}

footer p {
  font-size: 14px;
}

/* 导航栏新闻样式（小目录以及点击） */
nav ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

nav ul li {
  display: inline-block;
  margin-right: 20px;
}

nav ul li a {
  text-decoration: none;
  color: #fff;  /* 将文字颜色设为白色，与黑色背景形成对比 */
  font-size: 18px;
}

/* 创建尖角向右的小三角形 */
nav ul li.dropdown a .triangle {
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;    /* 透明的上边 */
  border-bottom: 5px solid transparent; /* 透明的下边 */
  border-left: 5px solid #fff;         /* 设置左边为白色，形成尖角效果 */
  margin-left: 5px;
  vertical-align: middle;
}

/* 下拉菜单容器 */
nav ul li.dropdown {
  position: relative;
}

nav ul li .dropdown-content {
  display: none;  /* 默认不显示 */
  position: absolute;
  top: 100%;  /* 确保下拉菜单出现在下方 */
  left: 0;
  background-color: #333;  /* 修改背景颜色 */
  border: 1px solid #444;
  padding: 10px 0;
  min-width: 180px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 1000;  /* 确保菜单在其他内容之上 */
}

nav ul li:hover .dropdown-content {
  display: block;  /* 鼠标悬停时显示下拉菜单 */
}

.dropdown-content a {
  display: block;
  padding: 8px 20px;
  color: #fff;  /* 修改文字颜色为白色 */
  text-decoration: none;
  font-size: 16px;
}

.dropdown-content a:hover {
  background-color: #555;  /* 鼠标悬停时改变背景颜色 */
}

/*about us 样式*/
.about-us-container {
  display: flex;
  justify-content: space-between;
  margin: 20px;
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
}

.about-text {
  flex: 1;
  padding-right: 20px;
}

.about-text h1 {
  font-size: 32px;
  color: #333;
}

.about-text p {
  font-size: 16px;
  color: #555;
  line-height: 1.6;
}

/* 图片样式 */
.about-image {
  flex: 1;
}

.about-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* 整个页面的布局 */
.container {
  display: flex;
  padding: 20px;
}

/* 左侧目录 */
.sidebar {
  width: 20%;
  padding: 20px;
  background-color: #f4f4f4;
  border-right: 1px solid #ddd;
}

.sidebar h3 {
  text-align: center;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar ul li {
  margin: 10px 0;
}

.sidebar ul li a {
  text-decoration: none;
  color: #333;
}

/* product.php页面整体布局 */
/* 让容器使用Flexbox */
.container {
  display: flex; /* 使目录栏和产品区域并排显示 */
  justify-content: flex-start; /* 对齐方式：从左到右排列 */
  gap: 20px; /* 给两列之间增加间距 */
  padding: 20px;
}

/* 左侧目录栏样式 */
.sidebar {
  flex: 0 0 25%; /* 左侧栏固定宽度25% */
  padding: 10px;
  background-color: #f4f4f4;
  border: 1px solid #ccc;
  height: 100%; /* 让目录栏充满整个容器的高度 */
}

/* 目录样式 */
.sidebar ul {
  list-style-type: none;
  padding: 0;
}

.sidebar ul li {
  margin: 10px 0;
}

.sidebar ul li a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
}

/* 右侧产品展示样式 */
.products {
  flex: 1; /* 右侧部分占用剩余空间 */
  padding: 10px;
}

/* 网格布局：每列最小宽度200px，自动填充 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
  gap: 20px;
}

.product-item {
  text-align: center;
}

.product-item img {
  max-width: 100%; /* 确保图片自适应 */
  height: auto;
}

/* 分页样式 */
.pagination {
  text-align: center;
  margin-top: 20px;
}

.pagination a {
  text-decoration: none;
  margin: 0 10px;
  color: #333;
}

.pagination span {
  font-weight: bold;
}
