
import Image from 'next/image';
import { Button } from '@/components/ui/button';
import { Heart, Bed, Bath, Layout } from 'lucide-react';

interface PropertyCard {
  id: number;
  title: string;
  subtitle: string;
  image: string;
  price: string;
  area: number;
  bedrooms: number;
  bathrooms: number;
  floors: number;
  company: string;
  projectsno: string;
  companyLogo: string;
  isFavorite: boolean;
}

export function PropertyProjectCard({
  title,
  subtitle,
  image,
  price,
  area,
  bedrooms,
  bathrooms,
  company,
  projectsno,
  companyLogo,
  isFavorite,
}: PropertyCard) {
  return (
<div className="relative w-full rounded-[24px] overflow-hidden bg-white border border-slate-200 hover:shadow-md transition-all duration-300">
        <div className="absolute inset-0 border-2 border-gray-200 rounded-2xl pointer-events-none" />

<div className="relative h-[320px] overflow-hidden rounded-t-[24px]">
  
     <Image
  src="/placeholder-property.png"
  alt={title}
  fill
  className="object-cover"
  unoptimized
/>

        <div className="absolute bottom-2 left-2 right-2 backdrop-blur-[2px] rounded-xl p-4 flex items-center h-[60px] gap-2">
          <Image
            src={companyLogo}
            alt={company}
            width={40}
            height={40}
            className="bg-white p-2 rounded-full"
          />
          <div className="flex flex-col">
            <span className="font-normal text-white">{company}</span>
            <span className="font-light text-white">{projectsno}</span>
          </div>
        </div>

        <Button
          variant="ghost"
          size="icon"
          className={`absolute top-4 left-4 rounded-full p-2 ${
            isFavorite ? 'text-red-500' : 'text-white'
          } bg-black/20 hover:bg-black/30`}
        >
          <Heart className="h-8 w-8" />
        </Button>
      </div>

      <div className="p-4">

<h3 className="text-[16px] md:text-[20px] font-bold text-[#071938] leading-[1.3] line-clamp-1">
  {title}
  
  </h3>        <p className="text-[11px] text-gray-400">{subtitle}</p>

        <div className="flex flex-wrap gap-2 pt-1">
          <div className="flex items-center gap-1 bg-gray-100 text-gray-700 text-xs px-2 py-1 rounded-full">
            <Bath className="h-4 w-4" />
            {bathrooms} حمامات
          </div>
          <div className="flex items-center gap-1 bg-gray-100 text-gray-700 text-xs px-2 py-1 rounded-full">
            <Bed className="h-4 w-4" />
            {bedrooms} غرف نوم
          </div>
          <div className="flex items-center gap-1 bg-gray-100 text-gray-700 text-xs px-2 py-1 rounded-full">
            <Layout className="h-4 w-4" />
            {area} م²
          </div>
        </div>

        <div className="flex items-center justify-between mt-4">
          <div className="pt-4">
            <p className="text-sm text-gray-500">أسعار تبدأ من</p>
<div className="text-[14px] md:text-[18px] font-bold flex items-center gap-1 text-slate-700">                {price}
              <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clipPath="url(#clip0_4232_4947)">
                <path d="M17.3804 15.2793C17.2981 15.6181 17.1852 15.9469 17.0425 16.2627L11.2056 17.373C11.2879 17.0344 11.4007 16.7054 11.5435 16.3896L17.3804 15.2793Z" fill="#052531" stroke="#052531"/>
              <path d="M17.3851 12.8339C17.7063 12.1968 17.9187 11.5051 18 10.7799L12.7051 11.7875V9.85051L17.385 8.96067C17.7062 8.32356 17.9185 7.63187 17.9998 6.90664L12.7049 7.91339V0.947429C11.8936 1.35503 11.173 1.89758 10.5873 2.53756V8.31625L8.46967 8.71898V0C7.65833 0.407453 6.93778 0.950151 6.35206 1.59013V9.12156L1.61387 10.0224C1.29267 10.6595 1.08019 11.3512 0.998683 12.0765L6.35206 11.0585V13.4978L0.61487 14.5887C0.293664 15.2258 0.0813422 15.9175 0 16.6427L6.00523 15.5008C6.49408 15.4099 6.91425 15.1513 7.18741 14.7954L8.28874 13.3345V13.3342C8.40306 13.1831 8.46967 13.0008 8.46967 12.8045V10.6558L10.5873 10.2531V14.127L17.385 12.8336L17.3851 12.8339Z" fill="#052531"/>
              </g>
              <defs>
              <clipPath id="clip0_4232_4947">
              <rect width="18" height="18" fill="white"/>
              </clipPath>
              </defs>
            </svg>
            </div>
          </div>
        </div>
      </div>
    </div>
  );
}