/* pages/products/products.wxss */
.container {
  background-color: #f5f5f5;
  min-height: 100vh;
}

/* 搜索栏 */
.search-bar {
  background: #fff;
  padding: 20rpx 30rpx;
  border-bottom: 1px solid #f0f0f0;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: #f8f8f8;
  border-radius: 25rpx;
  padding: 0 20rpx;
}

.search-input {
  flex: 1;
  height: 70rpx;
  font-size: 28rpx;
  padding: 0 20rpx;
}

.search-icon {
  font-size: 32rpx;
  color: #999;
  padding: 10rpx;
}

/* 分类筛选 */
.filter-section {
  background: #fff;
  padding: 20rpx 0;
  border-bottom: 1px solid #f0f0f0;
}

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

.category-list {
  display: flex;
  padding: 0 30rpx;
}

.category-item {
  display: inline-block;
  padding: 15rpx 30rpx;
  margin-right: 20rpx;
  background: #f8f8f8;
  border-radius: 25rpx;
  font-size: 26rpx;
  color: #666;
  transition: all 0.3s;
}

.category-item.active {
  background: #1890ff;
  color: #fff;
}

.category-text {
  font-size: 26rpx;
}

/* 排序选项 */
.sort-section {
  background: #fff;
  padding: 20rpx 30rpx;
  border-bottom: 1px solid #f0f0f0;
}

.sort-options {
  display: flex;
  justify-content: space-around;
}

.sort-item {
  padding: 15rpx 30rpx;
  border-radius: 20rpx;
  font-size: 26rpx;
  color: #666;
  background: #f8f8f8;
  transition: all 0.3s;
}

.sort-item.active {
  background: #e6f7ff;
  color: #1890ff;
}

.sort-text {
  font-size: 26rpx;
}

/* 产品区域 */
.products-section {
  padding: 30rpx;
}

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

.products-count {
  font-size: 28rpx;
  color: #666;
}

.view-toggle {
  display: flex;
  background: #f8f8f8;
  border-radius: 20rpx;
  overflow: hidden;
}

.toggle-item {
  padding: 10rpx 20rpx;
  font-size: 24rpx;
  color: #666;
  background: transparent;
  transition: all 0.3s;
}

.toggle-item.active {
  background: #1890ff;
  color: #fff;
}

/* 列表视图 */
.product-list {
  display: flex;
  flex-direction: column;
  gap: 20rpx;
}

.product-item-list {
  display: flex;
  background: #fff;
  border-radius: 12rpx;
  padding: 30rpx;
  box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.1);
  align-items: center;
}

.product-icon-large {
  font-size: 80rpx;
  width: 120rpx;
  height: 120rpx;
  margin-right: 30rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f8ff;
  border-radius: 12rpx;
}

.product-info {
  flex: 1;
}

.product-name {
  font-size: 32rpx;
  font-weight: bold;
  color: #333;
  margin-bottom: 10rpx;
  display: block;
}

.product-desc {
  font-size: 26rpx;
  color: #666;
  margin-bottom: 15rpx;
  display: block;
  line-height: 1.4;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10rpx;
  margin-bottom: 15rpx;
}

.product-tag {
  background: #e6f7ff;
  color: #1890ff;
  font-size: 20rpx;
  padding: 5rpx 15rpx;
  border-radius: 15rpx;
}

.product-price-row {
  display: flex;
  align-items: baseline;
}

.price-label {
  font-size: 24rpx;
  color: #999;
  margin-right: 10rpx;
}

.price-value {
  font-size: 36rpx;
  color: #ff6b35;
  font-weight: bold;
}

.price-unit {
  font-size: 24rpx;
  color: #999;
  margin-left: 5rpx;
}

.product-actions {
  margin-left: 20rpx;
}

.btn-apply {
  background: #1890ff;
  color: #fff;
  border: none;
  border-radius: 20rpx;
  font-size: 24rpx;
  padding: 15rpx 30rpx;
}

/* 网格视图 */
.product-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20rpx;
}

.product-item-grid {
  width: calc(50% - 10rpx);
}

.product-card {
  background: #fff;
  border-radius: 12rpx;
  padding: 30rpx;
  box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.1);
  text-align: center;
}

.product-icon {
  font-size: 60rpx;
  width: 100rpx;
  height: 100rpx;
  margin: 0 auto 20rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f8ff;
  border-radius: 50%;
}

.product-name {
  font-size: 28rpx;
  font-weight: bold;
  color: #333;
  margin-bottom: 10rpx;
  display: block;
}

.product-desc {
  font-size: 24rpx;
  color: #666;
  margin-bottom: 15rpx;
  display: block;
  line-height: 1.4;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8rpx;
  justify-content: center;
  margin-bottom: 15rpx;
}

.product-tag {
  background: #e6f7ff;
  color: #1890ff;
  font-size: 18rpx;
  padding: 4rpx 12rpx;
  border-radius: 12rpx;
}

.product-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-bottom: 20rpx;
}

.price-label {
  font-size: 22rpx;
  color: #999;
  margin-right: 8rpx;
}

.price-value {
  font-size: 32rpx;
  color: #ff6b35;
  font-weight: bold;
}

/* 加载状态 */
.loading {
  text-align: center;
  padding: 60rpx;
  color: #999;
  font-size: 28rpx;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 100rpx 30rpx;
  color: #999;
}

.empty-icon {
  font-size: 120rpx;
  margin-bottom: 30rpx;
  opacity: 0.5;
}

.empty-text {
  font-size: 32rpx;
  color: #666;
  margin-bottom: 15rpx;
  display: block;
}

.empty-desc {
  font-size: 26rpx;
  color: #999;
  display: block;
}

/* 加载更多 */
.load-more {
  text-align: center;
  padding: 40rpx;
}

.btn-load-more {
  background: #f8f8f8;
  color: #666;
  border: 1px solid #e8e8e8;
  border-radius: 25rpx;
  font-size: 26rpx;
  padding: 20rpx 60rpx;
}