// ─── Data Model ───────────────────────────────────────────────────────────────

import 'dart:ui';

class GroceryItem {
  final int id;
  final String name;
  final String quantity;
  final String emoji;
  bool inCart;

  GroceryItem({
    required this.id,
    required this.name,
    required this.quantity,
    required this.emoji,
    this.inCart = false,
  });

  factory GroceryItem.fromJson(int id, Map<String, dynamic> json) {
    return GroceryItem(
      id: id,
      name: json['name']?.toString() ?? '',
      quantity: json['quantity']?.toString() ?? '',
      emoji: json['emoji']?.toString() ?? '🛒',
    );
  }
}

class RecommendedItem {
  final String title;
  final String subtitle;
  final String image;
  final Color bgColor;
  final Color accentColor;

  RecommendedItem({
    required this.title,
    required this.subtitle,
    required this.image,
    required this.bgColor,
    required this.accentColor,
  });
}


class ProductItem {
  final String name;
  final String category;
  final String price;
  final String originalPrice;
  final String image;
  final double rating;
  final int reviewCount;
  final bool isFavorite;

  ProductItem({
    required this.name,
    required this.category,
    required this.price,
    required this.originalPrice,
    required this.image,
    required this.rating,
    required this.reviewCount,
    this.isFavorite = false,
  });
}


