import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:google_fonts/google_fonts.dart';

class ExploreCitiesCard extends StatelessWidget {
  final String name;
  final String description;
  final String imageUrl;
  final String individualPrice;
  final String cityCardPrice;
  final String savingsText;

  const ExploreCitiesCard({
    super.key,
    required this.name,
    required this.description,
    required this.imageUrl,
    required this.individualPrice,
    required this.cityCardPrice,
    required this.savingsText,
  });

  @override
  Widget build(BuildContext context) {
    return Container(
      width: 220.w,
      margin: EdgeInsets.only(right: 16.w),
      decoration: BoxDecoration(
        borderRadius: BorderRadius.circular(16.r),
        image: DecorationImage(image: AssetImage(imageUrl), fit: BoxFit.cover),
      ),
      child: Stack(
        children: [
          Container(
            decoration: BoxDecoration(
              borderRadius: BorderRadius.circular(16.r),
              gradient: LinearGradient(
                begin: Alignment.bottomCenter,
                end: Alignment.topCenter,
                colors: [Colors.black.withOpacity(0.2), Colors.transparent],
              ),
            ),
          ),

          Positioned(
            top: 10.h,
            right: 10.w,
            child: Container(
              padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 10.w),
              decoration: BoxDecoration(
                color: const Color(0xffDBFCE7),
                borderRadius: BorderRadius.circular(20.r),
              ),
              child: Text(
                savingsText,
                style: GoogleFonts.poppins(
                  color: const Color(0xFF2C8354),
                  fontWeight: FontWeight.w600,
                  fontSize: 12.sp,
                ),
              ),
            ),
          ),

          // Bottom text
          Positioned(
            bottom: 10.h,
            left: 10.w,
            right: 10.w,
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                Text(
                  name,
                  style: TextStyle(
                    color: Colors.white,
                    fontWeight: FontWeight.w500,
                    fontSize: 16.sp,
                  ),
                ),
                SizedBox(height: 4.h),
                Text(
                  description,
                  style: GoogleFonts.poppins(
                    color: Colors.white,
                    fontWeight: FontWeight.w400,
                    fontSize: 11.sp,
                  ),
                  maxLines: 2,
                  overflow: TextOverflow.ellipsis,
                ),
                SizedBox(height: 8.h),

                // Prices
                Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    Text(
                      "Individual tickets :",
                      style: TextStyle(
                        color: Color(0xffFDCDCE),
                        fontSize: 12.sp,
                      ),
                    ),
                    Text(
                      individualPrice,
                      style: TextStyle(
                        color: Color(0xffFDCDCE),
                        fontSize: 12.sp,
                        decoration: TextDecoration.lineThrough,
                        decorationColor: Color(0xffFDCDCE),
                      ),
                    ),
                  ],
                ),
                Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    Text(
                      "City Card :",
                      style: TextStyle(
                        color: Color(0xffFDCDCE),
                        fontSize: 12.sp,
                      ),
                    ),
                    Text(
                      cityCardPrice,
                      style: TextStyle(
                        color: Color(0xffFDCDCE),
                        fontSize: 12.sp,
                      ),
                    ),
                  ],
                ),
              ],
            ),
          ),
        ],
      ),
    );
  }
}
