/* 顶部导航 */
.header {
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, #e60012 0%, #b3000d 100%);
  color: white;
  padding: 12px 15px;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.logo {
  font-size: 22px;
  font-weight: bold;
  display: flex;
  align-items: center;
}

.logo i {
  margin-right: 8px;
  font-size: 26px;
}

.actions {
  display: flex;
  gap: 20px;
}

.actions i {
  font-size: 20px;
}

.search-box {
  background: white;
  border-radius: 20px;
  padding: 8px 15px;
  display: flex;
  align-items: center;
}

.search-box input {
  border: none;
  outline: none;
  width: 100%;
  padding: 0 10px;
  font-size: 14px;
}

.search-box i {
  color: #999;
}

/* 分类容器 */
.category-container {
  display: flex;
  height: calc(100vh - 130px);
  overflow: hidden;
}

/* 左侧一级分类 */
.primary-categories {
  width: 100px;
  background: white;
  overflow-y: auto;
  border-right: 1px solid #eee;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
}

.primary-item {
  padding: 18px 10px;
  text-align: center;
  font-size: 14px;
  color: #666;
  position: relative;
  transition: all 0.2s;
}

.primary-item.active {
  color: #e60012;
  font-weight: 500;
  background: #fff8f8;
}

.primary-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #e60012;
}

.primary-icon {
  font-size: 22px;
  margin-bottom: 8px;
  display: block;
}

/* 右侧二级分类 */
.secondary-categories {
  flex: 1;
  overflow-y: auto;
  padding: 15px 12px;
  background: #f8f9fa;
}

.category-banner {
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 15px;
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.category-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-title {
  position: absolute;
  bottom: 15px;
  left: 15px;
  color: white;
  font-size: 18px;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.subcategory-section {
  margin-bottom: 25px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: #333;
}

.section-link {
  font-size: 13px;
  color: #999;
}

.subcategory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.subcategory-item {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  padding: 15px 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s;
}

.subcategory-item:hover {
  transform: translateY(-5px);
}

.subcategory-image {
  width: 60px;
  height: 60px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: #fff8f8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #e60012;
}

.subcategory-name {
  font-size: 13px;
  color: #333;
  font-weight: 500;
  margin-top: 5px;
}

.subcategory-count {
  font-size: 12px;
  color: #999;
  margin-top: 3px;
}

/* 热门推荐 */
.hot-products {
  background: white;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.product-card {
  background: #fafafa;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.product-image {
  height: 120px;
  position: relative;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #e60012;
  color: white;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px;
}

.product-info {
  padding: 10px;
}

.product-title {
  font-size: 13px;
  height: 36px;
  overflow: hidden;
  margin-bottom: 5px;
}

.product-price {
  color: #e60012;
  font-weight: 700;
  font-size: 15px;
}

/* 底部导航 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  display: flex;
  border-top: 1px solid #eee;
  z-index: 100;
}

.nav-item {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 12px;
  color: #666;
}

.nav-item.active {
  color: #e60012;
}

.nav-item i {
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
}

/* 搜索框 */
.search-box {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 8px 15px;
  display: flex;
  align-items: center;
  margin-top: 10px;
}

.search-box input {
  border: none;
  outline: none;
  width: 100%;
  padding: 0 10px;
  font-size: 14px;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-box i {
  color: rgba(255, 255, 255, 0.8);
}
