input: Write a python function to calculate the total sales and category-wise totals from a CSV file.
  ```python
  def calculate_sales_totals(csv_filename):
      import csv
      
      category_totals = {}
      sales_total = 0
      
      with open(csv_filename, 'r') as csv_file:
          csv_reader = csv.reader(csv_file)
          next(csv_reader)
          
          for row in csv_reader:
              sales_total += int(row[0]) * int(row[1])
              if row[2] in category_totals.keys():
                  category_totals[row[2]] += int(row[1])
              else:
                  category_totals[row[2]] = int(row[1])
      
      return sales_total, category_totals
  
  # Test cases
  sales_total, category_totals = calculate_sales_totals('test_sales.csv')
  assert sales_total == 500  # example value
  assert category_totals == {'Category1': 100, 'Category2': 200, 'Category3': 200}  # example values
output: sales_total += float(row[1]) * int(row[2])
              if row[3] in category_totals.keys():
                  category_totals[row[3]] += float(row[1]) * int(row[2])
              else:
                  category_totals[row[3]] = float(row[1]) * int(row[2])