.gallery-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.gallery-sidebar-header h2 {
  font-size: var(--text-base);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.gallery-sidebar-close {
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: 600;
}

.gallery-sidebar-close:hover {
  background: var(--color-border);
}

.gallery-filter-group {
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.gallery-filter-group:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.gallery-filter-group h3 {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-soft);
  margin-bottom: var(--space-3);
}

.gallery-search-wrap {
  display: block;
}

.gallery-search-input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-sm);
}

.gallery-search-input:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.gallery-category-list,
.gallery-style-list {
  display: grid;
  gap: var(--space-1);
  list-style: none;
  padding: 0;
  margin: 0;
}

.gallery-filter-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  width: 100%;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.gallery-filter-option:hover {
  background: var(--color-bg-muted);
}

.gallery-filter-option[aria-checked="true"] {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  border-color: var(--color-primary);
  font-weight: 600;
}

.gallery-filter-count {
  font-size: var(--text-xs);
  color: var(--color-text-soft);
  font-variant-numeric: tabular-nums;
}

.gallery-filter-option[aria-checked="true"] .gallery-filter-count {
  color: var(--color-primary);
}

.gallery-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.gallery-checkbox:hover {
  background: var(--color-bg-muted);
}

.gallery-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
  cursor: pointer;
}