/* 牛只交易首页样式 */
.page-container {
  min-height: 100vh;
  background: #f5f5f5;
}

/* 顶部搜索栏 */
.header-search {
  display: flex;
  align-items: center;
  padding: 20rpx 24rpx;
  background: #2E8B57;
  gap: 16rpx;
}

.search-bar {
  flex: 1;
  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;
}

.publish-btn {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1rpx solid rgba(255, 255, 255, 0.3);
  border-radius: 20rpx;
  padding: 16rpx 24rpx;
  font-size: 26rpx;
  font-weight: 500;
}

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

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

/* 市场统计 */
.market-stats {
  display: flex;
  background: #fff;
  margin: 0 24rpx 20rpx;
  border-radius: 16rpx;
  padding: 32rpx 24rpx;
  box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
}

.stats-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stats-number {
  font-size: 36rpx;
  font-weight: 700;
  color: #2E8B57;
  margin-bottom: 8rpx;
}

.stats-label {
  font-size: 24rpx;
  color: #666;
}

/* 分类导航 */
.category-nav {
  margin: 0 0 20rpx;
}

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

.category-list {
  display: inline-flex;
  padding: 0 24rpx;
  gap: 32rpx;
}

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 120rpx;
}

.category-icon {
  width: 80rpx;
  height: 80rpx;
  background: #fff;
  border-radius: 50%;
  padding: 16rpx;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  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: #2E8B57;
}

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

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

.product-item {
  background: #fff;
  border-radius: 12rpx;
  overflow: hidden;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.product-item:active {
  transform: scale(0.98);
}

.product-image {
  width: 100%;
  height: 240rpx;
}

.product-info {
  padding: 16rpx;
}

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

.product-breed {
  display: block;
  font-size: 22rpx;
  color: #666;
  margin-bottom: 12rpx;
}

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

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

.product-location {
  font-size: 20rpx;
  color: #999;
}

/* 最新商品 */
.recent-products {
  padding: 0 24rpx;
}

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

.recent-item:active {
  transform: scale(0.98);
}

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

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

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

.recent-breed {
  font-size: 24rpx;
  color: #666;
  margin-bottom: 12rpx;
}

.recent-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8rpx;
}

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

.recent-time {
  font-size: 20rpx;
  color: #999;
}

.recent-location {
  font-size: 22rpx;
  color: #999;
}

/* 快捷操作 */
.quick-actions {
  display: flex;
  gap: 16rpx;
  padding: 0 24rpx 40rpx;
}

.action-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32rpx 20rpx;
  border-radius: 16rpx;
  border: none;
  font-size: 26rpx;
  font-weight: 500;
}

.action-btn.primary {
  background: #2E8B57;
  color: #fff;
}

.action-btn.secondary {
  background: #fff;
  color: #333;
  border: 1rpx solid #e9ecef;
}

.action-btn image {
  width: 48rpx;
  height: 48rpx;
  margin-bottom: 12rpx;
}

/* 加载状态 */
.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 #2E8B57;
  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;
  margin-bottom: 32rpx;
}

.btn {
  padding: 20rpx 40rpx;
  border-radius: 24rpx;
  font-size: 28rpx;
  font-weight: 500;
  border: none;
}

.btn-primary {
  background: #2E8B57;
  color: #fff;
}

.mt-3 {
  margin-top: 32rpx;
}

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

/* 响应式适配 */
@media (max-width: 750rpx) {
  .product-grid {
    grid-template-columns: 1fr;
  }
  
  .recent-item {
    flex-direction: column;
  }
  
  .recent-image {
    width: 100%;
    height: 200rpx;
    margin-right: 0;
    margin-bottom: 16rpx;
  }
  
  .quick-actions {
    flex-direction: column;
  }
}