/* ============================================
   草本酒坊 - 产品列表页样式
   ============================================ */

/* ── 筛选区 ── */
.filter-section {
  padding: var(--space-5) 0 0;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  position: sticky;
  top: 72px;
  z-index: var(--z-sticky);
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding-bottom: var(--space-4);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  flex-shrink: 0;
  padding: 0.5rem 1.25rem;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out-quart);
  white-space: nowrap;
}

.filter-tab:hover {
  color: var(--text-primary);
  border-color: var(--border-default);
  background: oklch(93% 0.01 80 / 0.06);
}

.filter-tab.active {
  color: var(--bg-base);
  background: var(--color-accent);
  border-color: var(--color-accent);
  font-weight: var(--weight-semibold);
}

/* ── 排序栏 ── */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) 0;
  border-top: 1px solid var(--border-subtle);
}

.filter-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-right: var(--space-2);
}

.filter-sort {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.sort-btn {
  padding: 0.35rem 0.75rem;
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out-quart);
}

.sort-btn:hover {
  color: var(--text-primary);
  background: oklch(93% 0.01 80 / 0.06);
}

.sort-btn.active {
  color: var(--text-accent);
  background: oklch(75% 0.15 85 / 0.08);
  font-weight: var(--weight-semibold);
}

.filter-result-count {
  font-size: var(--text-xs);
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ── 商品区 ── */
.products-section {
  padding-top: var(--space-6);
}

/* ── 空状态 ── */
.empty-state {
  text-align: center;
  padding: var(--space-16) 0;
  color: var(--text-muted);
  font-size: var(--text-base);
}

/* ── 响应式 ── */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .filter-section {
    top: 72px;
  }

  .filter-tabs {
    padding-bottom: var(--space-3);
    gap: var(--space-1);
  }

  .filter-tab {
    padding: 0.4rem 1rem;
    font-size: var(--text-xs);
  }

  .filter-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .filter-sort {
    flex-wrap: wrap;
    gap: 0;
  }

  .sort-btn {
    padding: 0.3rem 0.6rem;
    font-size: 11px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: var(--space-3) !important;
  }

  .filter-result-count {
    font-size: 11px;
  }
}
