{"version":3,"file":"ProductCard_2.BPMjIRPy.mjs","names":["useState","useRef","_Fragment"],"sources":["https:/framerusercontent.com/modules/VtZd7ZsI30Vs01lHGcj4/BGUQuVIvip4epwmKhtxP/ProductCard_2.js"],"sourcesContent":["// Dynamic product card with CMS integration, modern design with chartreuse outline\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,useRef,startTransition}from\"react\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ProductCard(props){const{image={src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Product image\"},title,price,originalPrice,textColor,mobileTextColor,titleFont,priceFont,outlineColor,borderRadius,showOriginalPrice,slug,backgroundColor,titleSize,priceSize,contentPadding,titleMargin}=props;const[isHovered,setIsHovered]=useState(false);const touchStartRef=useRef({x:0,y:0,time:0});const hasMoved=useRef(false);const handleMouseEnter=()=>{startTransition(()=>setIsHovered(true));};const handleMouseLeave=()=>{startTransition(()=>setIsHovered(false));};const handleClick=()=>{if(typeof window!==\"undefined\"&&slug){window.location.href=`/${slug}`;}};const handleTouchStart=e=>{const touch=e.touches[0];touchStartRef.current={x:touch.clientX,y:touch.clientY,time:Date.now()};hasMoved.current=false;};const handleTouchMove=e=>{if(!touchStartRef.current)return;const touch=e.touches[0];const deltaX=Math.abs(touch.clientX-touchStartRef.current.x);const deltaY=Math.abs(touch.clientY-touchStartRef.current.y);// If user has moved more than 10px in any direction, consider it scrolling\nif(deltaX>10||deltaY>10){hasMoved.current=true;}};const handleTouchEnd=()=>{if(!touchStartRef.current||hasMoved.current)return;const touchDuration=Date.now()-touchStartRef.current.time;// Only navigate if it was a quick tap (less than 300ms) and no movement\nif(touchDuration<300&&!hasMoved.current&&slug){if(typeof window!==\"undefined\"){window.location.href=`/${slug}`;}}};return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                    @keyframes neonPulse {\n                        0%, 100% {\n                            box-shadow: \n                                0 0 5px ${outlineColor},\n                                0 0 10px ${outlineColor},\n                                0 0 15px ${outlineColor},\n                                0 0 20px ${outlineColor},\n                                inset 0 0 5px ${outlineColor};\n                        }\n                        50% {\n                            box-shadow: \n                                0 0 10px ${outlineColor},\n                                0 0 20px ${outlineColor},\n                                0 0 30px ${outlineColor},\n                                0 0 40px ${outlineColor},\n                                inset 0 0 10px ${outlineColor};\n                        }\n                    }\n                    \n                    @media (max-width: 768px) {\n                        .product-card {\n                            transform: none !important;\n                            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;\n                        }\n                        .product-card:hover {\n                            transform: scale(1.02) translateY(-2px) !important;\n                            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15) !important;\n                        }\n                        .product-card:active {\n                            transform: scale(0.98) !important;\n                        }\n                        .image-container {\n                            height: 70% !important;\n                        }\n                        .content-container {\n                            opacity: 1 !important;\n                            height: auto !important;\n                            flex: 1 !important;\n                        }\n                        .mobile-text {\n                            color: ${mobileTextColor} !important;\n                        }\n                    }\n                `}),/*#__PURE__*/_jsxs(\"div\",{className:\"product-card\",style:{width:\"100%\",height:\"100%\",backgroundColor:backgroundColor,border:`2px solid ${outlineColor}`,borderRadius,overflow:\"hidden\",position:\"relative\",transition:\"all 0.3s ease\",transform:isHovered?\"translateY(-4px)\":\"translateY(0)\",boxShadow:isHovered?\"0 12px 24px rgba(0, 0, 0, 0.15)\":\"0 4px 12px rgba(0, 0, 0, 0.08)\",display:\"flex\",flexDirection:\"column\",animation:isHovered?\"neonPulse 1.5s ease-in-out infinite\":\"none\",cursor:\"pointer\",touchAction:\"manipulation\"},onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,onClick:handleClick,onTouchStart:handleTouchStart,onTouchMove:handleTouchMove,onTouchEnd:handleTouchEnd,children:[/*#__PURE__*/_jsx(\"div\",{className:\"image-container\",style:{width:\"100%\",height:isHovered?\"100%\":\"70%\",position:\"relative\",overflow:\"hidden\",transition:\"height 0.3s ease\",zIndex:isHovered?10:1},children:/*#__PURE__*/_jsx(\"img\",{src:image.src,alt:image.alt,style:{width:\"100%\",height:\"100%\",objectFit:\"contain\",transition:\"transform 0.3s ease\"}})}),/*#__PURE__*/_jsxs(\"div\",{className:\"content-container\",style:{padding:`${contentPadding}px ${contentPadding+4}px ${contentPadding+4}px ${contentPadding+4}px`,flex:isHovered?0:1,display:\"flex\",flexDirection:\"column\",justifyContent:\"space-between\",opacity:isHovered?0:1,transition:\"all 0.3s ease\",height:isHovered?0:\"auto\",overflow:\"hidden\"},children:[/*#__PURE__*/_jsx(\"h3\",{className:\"mobile-text\",style:{margin:\"0\",color:textColor,...titleFont,fontSize:`${titleSize}px`,overflow:\"hidden\",display:\"-webkit-box\",WebkitLineClamp:2,WebkitBoxOrient:\"vertical\",wordBreak:\"break-word\",hyphens:\"auto\"},children:title.toUpperCase()}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:\"8px\",marginTop:`${titleMargin}px`},children:[/*#__PURE__*/_jsx(\"span\",{className:\"mobile-text\",style:{color:textColor,...priceFont,fontSize:`${priceSize}px`},children:price.toUpperCase()}),showOriginalPrice&&originalPrice&&/*#__PURE__*/_jsx(\"span\",{className:\"mobile-text\",style:{color:textColor,opacity:.6,textDecoration:\"line-through\",fontSize:`${priceSize*.7}px`},children:originalPrice.toUpperCase()})]})]})]})]});}addPropertyControls(ProductCard,{image:{type:ControlType.ResponsiveImage,title:\"Product Image\"},title:{type:ControlType.String,title:\"Product Title\",defaultValue:\"Premium Product\"},price:{type:ControlType.String,title:\"Price\",defaultValue:\"$99.99\"},slug:{type:ControlType.String,title:\"Product Slug\",defaultValue:\"premium-product\"},backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"#FFFFFF\"},showOriginalPrice:{type:ControlType.Boolean,title:\"Show Original Price\",defaultValue:false},originalPrice:{type:ControlType.String,title:\"Original Price\",defaultValue:\"$129.99\",hidden:({showOriginalPrice})=>!showOriginalPrice},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},mobileTextColor:{type:ControlType.Color,title:\"Mobile Text Color\",defaultValue:\"#000000\"},outlineColor:{type:ControlType.Color,title:\"Outline Color\",defaultValue:\"#ADFF2F\"},titleSize:{type:ControlType.Number,title:\"Title Size\",defaultValue:18,min:10,max:32,step:1,unit:\"px\"},priceSize:{type:ControlType.Number,title:\"Price Size\",defaultValue:20,min:10,max:32,step:1,unit:\"px\"},contentPadding:{type:ControlType.Number,title:\"Content Padding\",defaultValue:8,min:0,max:24,step:1,unit:\"px\"},titleMargin:{type:ControlType.Number,title:\"Title Bottom Margin\",defaultValue:4,min:0,max:20,step:1,unit:\"px\"},titleFont:{type:ControlType.Font,title:\"Title Font\",defaultValue:{fontSize:\"18px\",variant:\"Bold\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},priceFont:{type:ControlType.Font,title:\"Price Font\",defaultValue:{fontSize:\"20px\",variant:\"Bold\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:12,min:0,max:32,step:1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ProductCard\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProductCard_2.map"],"mappings":"uUAIG,SAAwB,EAAY,EAAM,CAAC,GAAK,CAAC,QAAM,CAAC,IAAI,sEAAsE,IAAI,gBAAgB,CAAC,QAAM,QAAM,gBAAc,YAAU,kBAAgB,YAAU,YAAU,eAAa,eAAa,oBAAkB,OAAK,kBAAg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