/* Unified sticky product filter bar — sits below site header */

.filter-bar {
  position: sticky;
  top: var(--site-header-height, 128px) !important;
  z-index: 900;
  width: 100%;
  background: #ffffff;
  padding: 16px 5%;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

body.dark .filter-bar {
  background: #1f2937;
  border-color: #374151;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.filter-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ftab {
  background: #f3f4f6;
  color: #4b5563;
  border: 1.5px solid #e5e7eb;
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  font-family: inherit;
}

body.dark .ftab {
  background: #374151;
  color: #d1d5db;
  border-color: #4b5563;
}

.ftab:hover,
.ftab.active {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: #fff;
  border-color: transparent;
}

.filter-count {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
  white-space: nowrap;
}

body.dark .filter-count {
  color: #9ca3af;
}

@media (max-width: 768px) {
  .filter-bar {
    padding: 14px 4%;
  }

  .filter-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .filter-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding-bottom: 4px;
    scrollbar-width: none;
    max-width: 100%;
  }

  .filter-tabs::-webkit-scrollbar {
    display: none;
  }

  .ftab {
    flex-shrink: 0;
    font-size: 12px;
    padding: 7px 14px;
  }

  .filter-count {
    text-align: center;
    white-space: normal;
    font-size: 12px;
  }
}
