/* 牛肉商城首页样式 */
.page-container {
  min-height: 100vh;
  background: #f5f5f5;
}

/* 顶部搜索栏 */
.header-search {
  padding: 20rpx 24rpx;
  background: #e74c3c;
}

.search-bar {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 24rpx;
  padding: 0 20rpx;
  height: 72rpx;
}

.search-icon {
  width: 28rpx;
  height: 28rpx;
  margin-right: 12rpx;
}

.search-placeholder {
  flex: 1;
  font-size: 28rpx;
  color: #999;
}

/* 轮播图 */
.banner-swiper {
  height: 320rpx;
  margin: 0 24rpx 20rpx;
  border-radius: 16rpx;
  overflow: hidden;
}

.banner-image {
  width: 100%;
  height: 100%;
}

/* 分类导航 */
.category-nav {
  background: #fff;
  margin: 0 24rpx 20rpx;
  border-radius: 16rpx;
  padding: 24rpx;
  box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24rpx;
}

.category-title {
  font-size: 32rpx;
  font-weight: 600;
  color: #333;
}

.category-more {
  font-size: 24rpx;
  color: #e74c3c;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24rpx;
}

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20rpx;
  border-radius: 12rpx;
  transition: all 0.3s ease;
}

.category-item:active {
  background: #f8f9fa;
}

.category-icon {
  width: 64rpx;
  height: 64rpx;
  margin-bottom: 12rpx;
}

.category-name {
  font-size: 24rpx;
  color: #333;
  text-align: center;
}

/* 区块样式 */
.section {
  margin-bottom: 32rpx;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24rpx 20rpx;
}

.section-title {
  font-size: 32rpx;
  font-weight: 600;
  color: #333;
}

.section-more {
  font-size: 24rpx;
  color: #e74c3c;
}

/* 热门商品 */
.hot-products {
  padding-left: 24rpx;
}

.hot-scroll {
  white-space: nowrap;
}

.hot-list {
  display: inline-flex;
  gap: 16rpx;
  padding-right: 24rpx;
}

.hot-item {
  position: relative;
  width: 280rpx;
  background: #fff;
  border-radius: 12rpx;
  overflow: hidden;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08);
}

.hot-image {
  width: 100%;
  height: 200rpx;
}

.hot-info {
  padding: 16rpx;
  padding-bottom: 60rpx;
}

.hot-title {
  display: block;
  font-size: 26rpx;
  font-weight: 500;
  color: #333;
  margin-bottom: 12rpx;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hot-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hot-price {
  font-size: 28rpx;
  font-weight: 600;
  color: #e74c3c;
}

.hot-sales {
  font-size: 20rpx;
  color: #999;
}

.add-cart-btn {
  position: absolute;
  right: 16rpx;
  bottom: 16rpx;
  width: 56rpx;
  height: 56rpx;
  background: #e74c3c;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  box-shadow: 0 2rpx 8rpx rgba(231, 76, 60, 0.3);
}

.add-cart-btn image {
  width: 24rpx;
  height: 24rpx;
}

/* 新品推荐 */
.new-products {
  padding: 0 24rpx;
}

.new-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16rpx;
}

.new-item {
  position: relative;
  background: #fff;
  border-radius: 12rpx;
  overflow: hidden;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08);
}

.new-image {
  width: 100%;
  height: 200rpx;
}

.new-badge {
  position: absolute;
  top: 12rpx;
  left: 12rpx;
  background: #e74c3c;
  color: #fff;
  font-size: 20rpx;
  padding: 4rpx 12rpx;
  border-radius: 12rpx;
}

.new-info {
  padding: 16rpx;
}

.new-title {
  display: block;
  font-size: 26rpx;
  font-weight: 500;
  color: #333;
  margin-bottom: 8rpx;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.new-desc {
  display: block;
  font-size: 22rpx;
  color: #666;
  margin-bottom: 12rpx;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.new-price-row {
  display: flex;
  align-items: center;
  gap: 12rpx;
}

.new-price {
  font-size: 28rpx;
  font-weight: 600;
  color: #e74c3c;
}

.new-original-price {
  display: flex;
  align-items: center;
}

.original-price {
  font-size: 22rpx;
  color: #999;
  text-decoration: line-through;
}

/* 推荐商品 */
.recommend-products {
  padding: 0 24rpx;
}

.recommend-item {
  display: flex;
  background: #fff;
  border-radius: 12rpx;
  padding: 20rpx;
  margin-bottom: 16rpx;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08);
}

.recommend-image {
  width: 160rpx;
  height: 120rpx;
  border-radius: 8rpx;
  margin-right: 20rpx;
}

.recommend-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.recommend-title {
  font-size: 28rpx;
  font-weight: 500;
  color: #333;
  margin-bottom: 8rpx;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recommend-desc {
  font-size: 24rpx;
  color: #666;
  margin-bottom: 12rpx;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recommend-tags {
  display: flex;
  gap: 8rpx;
  margin-bottom: 12rpx;
}

.recommend-tag {
  font-size: 20rpx;
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
  padding: 4rpx 8rpx;
  border-radius: 8rpx;
}

.recommend-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.recommend-price {
  font-size: 28rpx;
  font-weight: 600;
  color: #e74c3c;
}

.recommend-sales {
  font-size: 20rpx;
  color: #999;
}

.recommend-cart-btn {
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 16rpx;
  padding: 12rpx 20rpx;
  font-size: 22rpx;
  font-weight: 500;
}

/* 加载状态 */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80rpx 40rpx;
  color: #666;
}

.loading-spinner {
  width: 48rpx;
  height: 48rpx;
  border: 3rpx solid #f0f0f0;
  border-top: 3rpx solid #e74c3c;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 24rpx;
}

/* 空状态 */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80rpx 40rpx;
  text-align: center;
}

.empty-icon {
  width: 160rpx;
  height: 160rpx;
  margin-bottom: 32rpx;
  opacity: 0.6;
}

.empty-text {
  font-size: 32rpx;
  font-weight: 500;
  color: #666;
  margin-bottom: 16rpx;
}

.empty-desc {
  font-size: 24rpx;
  color: #999;
  line-height: 1.5;
}

/* 动画 */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 响应式适配 */
@media (max-width: 750rpx) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16rpx;
  }
  
  .new-grid {
    grid-template-columns: 1fr;
  }
  
  .recommend-item {
    flex-direction: column;
  }
  
  .recommend-image {
    width: 100%;
    height: 200rpx;
    margin-right: 0;
    margin-bottom: 16rpx;
  }
}