/* 顶部导航 */
header {
  background-color: #FFEB3B;
  padding: 10px 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 50px;
}

.logo-text {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  margin-left: 5px;
}

/* 搜索栏 */
.search-bar {
  flex: 1;
  max-width: 400px;
  margin: 0 20px;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
}

.search-bar button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
}

/* 用户操作区 */
.header-actions {
  display: flex;
  align-items: center;
}

.header-actions a {
  color: #333;
  margin-left: 15px;
  font-size: 18px;
  text-decoration: none;
  position: relative;
}

.header-actions .cart-count {
  position: absolute;
  top: -5px;
  right: -8px;
  background-color: #e63c3c;
  color: white;
  font-size: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 分类导航 - 作为顶部导航的一部分 */
.category-nav {
  background-color: #FFEB3B;
  padding-bottom: 10px;
}

.category-list {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  justify-content: space-between;
  max-width: 800px;
}

.category-list li {
  margin-right: 15px;
}

.category-list a {
  display: block;
  padding: 5px 0;
  color: #333;
  text-decoration: none;
  font-size: 14px;
}

.category-list a:hover,
.category-list a.active {
  color: #333;
  font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 992px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .product-item {
    padding: 10px;
  }
  
  .product-image {
    height: 120px;
  }
  
  .product-name {
    font-size: 12px;
    height: 34px;
  }
  
  .search-bar {
    display: none;
  }
  
  .header-actions .search-icon {
    display: block !important;
  }
  
  .category-list {
    overflow-x: auto;
    white-space: nowrap;
  }
}