/* 导航栏样式 */
header {
  background: #fff;
  box-shadow: 0 2px 8px #0001;
  padding: 0 0 2px 0;
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav-container {
  display: flex;
  align-items: center;
  max-width: 1400px; /* 增加最大宽度 */
  margin: auto;
  padding: 0.8em 1.5em; /* 增加内边距 */
  justify-content: space-between;
}
.logo {
  font-size: 2.2em; /* 增大logo字体 */
  font-weight: bold;
  color: #d97706;
  letter-spacing: 1.2px;
}
nav {
  display: flex;
  gap: 2em; /* 增加导航项之间的间距 */
}
nav a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.2em; /* 增大导航链接字体 */
  transition: color 0.2s;
  padding: 0.3em 0.5em; /* 增加点击区域 */
}
nav a:hover {
  color: #d97706;
}

/* 搜索栏和购物车样式 */
.search-cart {
  display: flex;
  align-items: center;
  gap: 15px; /* 增加元素间距 */
}
#search {
  padding: 10px 16px; /* 增加内边距 */
  border: 1px solid #ddd;
  border-radius: 25px; /* 增大圆角 */
  width: 220px; /* 增加宽度 */
  font-size: 16px; /* 增大字体 */
  outline: none;
  transition: all 0.3s;
}
#search:focus {
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
  width: 240px;
}
#cart-btn {
  display: flex;
  align-items: center;
  font-size: 1.5em; /* 增大购物车图标 */
  color: #333;
  position: relative;
  padding: 5px; /* 增加点击区域 */
}
#cart-count {
  background: #d97706;
  color: white;
  border-radius: 50%;
  width: 24px; /* 增大计数器 */
  height: 24px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -10px;
  right: -10px;
}

/* 后台管理按钮样式 */
.nav-container .btn-outline-secondary {
  border-color: #d97706;
  color: #d97706;
  padding: 8px 16px; /* 增加内边距 */
  font-size: 16px; /* 增大字体 */
  font-weight: 500;
  border-radius: 6px; /* 增大圆角 */
  transition: all 0.3s;
  margin-left: 20px; /* 增加左边距 */
}
.nav-container .btn-outline-secondary:hover {
  background-color: #d97706;
  color: white;
}

/* 响应式样式 */
@media (max-width: 1200px) {
  .nav-container {
    padding: 0.7em 1.2em;
  }
  .logo {
    font-size: 2em;
  }
  nav a {
    font-size: 1.1em;
  }
  #search {
    width: 200px;
  }
}

@media (max-width: 992px) {
  .nav-container {
    flex-wrap: wrap;
  }
  nav {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 12px;
    gap: 1.5em;
  }
  #search {
    width: 180px;
  }
}

@media (max-width: 768px) {
  .logo {
    font-size: 1.6em;
  }
  #search {
    width: 150px;
    padding: 8px 12px;
    font-size: 14px;
  }
  .nav-container .btn-outline-secondary {
    padding: 6px 10px;
    font-size: 14px;
  }
  nav {
    gap: 1em;
    font-size: 0.9em;
  }
  nav a {
    font-size: 1em;
  }
}
