import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:hyggecraftery/providers/cart_provider.dart';
import 'package:hyggecraftery/providers/user_provider.dart';
import 'package:hyggecraftery/screens/main_navigation_screen.dart';

void main() {
  runApp(const HyggeCrafteryApp());
}

class HyggeCrafteryApp extends StatelessWidget {
  const HyggeCrafteryApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MultiProvider(
      providers: [
        ChangeNotifierProvider(create: (_) => UserProvider()),
        ChangeNotifierProvider(create: (_) => CartProvider()),
      ],
      child: MaterialApp(
        title: 'HyggeCraftery',
        debugShowCheckedModeBanner: false,
        theme: ThemeData(
          primarySwatch: Colors.brown,
          primaryColor: const Color(0xFF8B6F47),
          colorScheme: ColorScheme.fromSeed(
            seedColor: const Color(0xFF8B6F47),
            primary: const Color(0xFF8B6F47),
            secondary: const Color(0xFFD4A574),
          ),
          scaffoldBackgroundColor: const Color(0xFFFAF7F2),
          appBarTheme: const AppBarTheme(
            backgroundColor: Color(0xFF8B6F47),
            foregroundColor: Colors.white,
            elevation: 0,
          ),
          cardTheme: CardThemeData(
            elevation: 2,
            shape: RoundedRectangleBorder(
              borderRadius: BorderRadius.circular(12),
            ),
          ),
          useMaterial3: true,
        ),
        home: const MainNavigationScreen(),
      ),
    );
  }
}

