{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "product-card2",
  "type": "registry:item",
  "title": "Product Card 2",
  "description": "Mobile product card with centered image, floating heart icon, and product name with badge. Features circular color swatches with checkmarks, size selection buttons, and bottom row with price and 'Add to cart' button.",
  "dependencies": [
    "@mui/icons-material",
    "@mui/material",
    "@emotion/react",
    "@emotion/styled"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "components/product-card2/product-card2.tsx",
      "target": "src/mui-treasury/components/product-card2/product-card2.tsx",
      "content": "'use client';\n\nimport React, { useState } from 'react';\n\nimport { Check, Favorite, FavoriteBorder } from '@mui/icons-material';\nimport {\n  Box,\n  Button,\n  Card,\n  IconButton,\n  Stack,\n  ToggleButton,\n  ToggleButtonGroup,\n  Typography,\n} from '@mui/material';\n\ninterface ProductCard2Props {\n  productName?: string;\n  productModel?: string;\n  price?: number;\n  sizes?: string[];\n  colors?: { name: string; value: string }[];\n  imageUrl?: string;\n  onFavorite?: (favorited: boolean) => void;\n  onAddToCart?: (selectedSize: string, selectedColor: string) => void;\n}\n\nexport function ProductCard2({\n  productName = 'React Running',\n  productModel = 'Shoe 2',\n  price = 120,\n  sizes = ['9', '9.5', '10', '10.5', '11'],\n  colors = [\n    { name: 'Black colorway', value: '#1a1a1a' },\n    { name: 'Light colorway', value: '#e5e5e5' },\n    { name: 'Clay colorway', value: '#8B7355' },\n    { name: 'Cream colorway', value: '#F5F5DC' },\n  ],\n  imageUrl = 'https://placehold.co/280x200',\n  onFavorite,\n  onAddToCart,\n}: ProductCard2Props) {\n  const [selectedSize, setSelectedSize] = useState<string>('');\n  const [selectedColor, setSelectedColor] = useState<string>(\n    colors[0]?.value || '',\n  );\n  const [isFavorited, setIsFavorited] = useState(false);\n  const [isLoading, setIsLoading] = useState(false);\n\n  const handleSizeChange = (\n    _event: React.MouseEvent<HTMLElement>,\n    newSize: string,\n  ) => {\n    if (newSize !== null) {\n      setSelectedSize(newSize);\n    }\n  };\n\n  const handleColorChange = (colorValue: string) => {\n    setSelectedColor(colorValue);\n  };\n\n  const handleFavoriteToggle = () => {\n    const newFavoriteState = !isFavorited;\n    setIsFavorited(newFavoriteState);\n    onFavorite?.(newFavoriteState);\n  };\n\n  const handleAddToCart = async () => {\n    if (!selectedSize) return;\n\n    setIsLoading(true);\n    try {\n      const selectedColorName =\n        colors.find((c) => c.value === selectedColor)?.name || '';\n      onAddToCart?.(selectedSize, selectedColorName);\n    } finally {\n      setIsLoading(false);\n    }\n  };\n\n  return (\n    <Card\n      sx={(theme) => ({\n        maxWidth: 360,\n        mx: 'auto',\n        borderRadius: 3,\n        overflow: 'hidden',\n        boxShadow: theme.shadows[8],\n        ...theme.applyStyles('dark', {\n          bgcolor: 'grey.900',\n        }),\n      })}\n    >\n      <Box\n        sx={{\n          position: 'relative',\n          p: 0.5,\n          pb: 0,\n          display: 'flex',\n          justifyContent: 'center',\n          alignItems: 'center',\n          minHeight: 200,\n        }}\n      >\n        <Box\n          component=\"img\"\n          src={imageUrl}\n          alt={`${productName} ${productModel} sneaker`}\n          sx={{\n            borderRadius: 2.5,\n            width: '100%',\n            height: '100%',\n            objectFit: 'contain',\n          }}\n        />\n        <IconButton\n          aria-label={\n            isFavorited ? 'Remove from favorites' : 'Add to favorites'\n          }\n          onClick={handleFavoriteToggle}\n          sx={{\n            position: 'absolute',\n            top: 12,\n            right: 12,\n            zIndex: 1,\n          }}\n        >\n          {isFavorited ? (\n            <Favorite sx={{ color: 'error.icon' }} />\n          ) : (\n            <FavoriteBorder />\n          )}\n        </IconButton>\n      </Box>\n      {/* Product details */}\n      <Stack spacing={2} sx={{ p: 3 }}>\n        {/* Product title */}\n        <Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>\n          <Typography\n            variant=\"h4\"\n            component=\"h1\"\n            sx={{ fontWeight: 600, lineHeight: 1.2 }}\n          >\n            {productName}\n          </Typography>\n          <Box\n            component=\"span\"\n            sx={(theme) => ({\n              bgcolor: 'grey.200',\n              color: 'text.secondary',\n              px: 1,\n              py: 0.5,\n              borderRadius: 1,\n              fontSize: '0.75rem',\n              fontWeight: 600,\n              textTransform: 'uppercase',\n              letterSpacing: 0.5,\n              ...theme.applyStyles('dark', {\n                bgcolor: 'grey.800',\n              }),\n            })}\n          >\n            {productModel}\n          </Box>\n        </Box>\n\n        {/* Color variants */}\n        <Box>\n          <Stack direction=\"row\" spacing={1}>\n            {colors.map((color) => (\n              <IconButton\n                key={color.value}\n                aria-label={color.name}\n                onClick={() => handleColorChange(color.value)}\n                sx={(theme) => ({\n                  width: 32,\n                  height: 32,\n                  color: `${color.value} !important`,\n                  bgcolor: `${color.value} !important`,\n                  border: selectedColor === color.value ? 2 : 1,\n                  borderColor:\n                    selectedColor === color.value ? 'primary.main' : 'divider',\n                  borderRadius: '50%',\n                  '&:hover': {\n                    transform: 'scale(1.1)',\n                  },\n                  ...theme.applyStyles('dark', {\n                    borderColor:\n                      selectedColor === color.value\n                        ? 'primary.light'\n                        : 'grey.600',\n                  }),\n                })}\n              >\n                {selectedColor === color.value && (\n                  <Check sx={{ filter: 'invert(1) contrast(20)' }} />\n                )}\n              </IconButton>\n            ))}\n          </Stack>\n        </Box>\n\n        {/* Size selection */}\n        <Box>\n          <Typography variant=\"body1\" sx={{ mb: 1, fontWeight: 500 }}>\n            Size\n          </Typography>\n          <ToggleButtonGroup\n            size=\"small\"\n            value={selectedSize}\n            exclusive\n            onChange={handleSizeChange}\n            aria-label=\"shoe size selection\"\n            sx={{\n              gap: 1,\n              '& .MuiToggleButton-root': {\n                border: 1,\n                borderColor: 'divider',\n                borderRadius: 2,\n                px: 2,\n                py: 1,\n                '&.Mui-selected': {\n                  bgcolor: 'primary.main',\n                  color: 'primary.contrastText',\n                  borderColor: 'primary.main',\n                  '&:hover': {\n                    bgcolor: 'primary.dark',\n                  },\n                },\n              },\n            }}\n          >\n            {sizes.map((size) => (\n              <ToggleButton key={size} value={size} aria-label={`Size ${size}`}>\n                {size}\n              </ToggleButton>\n            ))}\n          </ToggleButtonGroup>\n        </Box>\n\n        {/* Price and add to cart */}\n        <Box\n          sx={{\n            display: 'flex',\n            justifyContent: 'space-between',\n            alignItems: 'center',\n            pt: 1,\n          }}\n        >\n          <Box>\n            <Typography\n              variant=\"body2\"\n              sx={{\n                color: 'text.secondary',\n                mb: 0.5,\n              }}\n            >\n              Price\n            </Typography>\n            <Typography variant=\"h5\" sx={{ fontWeight: 600 }}>\n              ${price}\n            </Typography>\n          </Box>\n          <Button\n            variant=\"contained\"\n            disabled={!selectedSize || isLoading}\n            onClick={handleAddToCart}\n            sx={(theme) => ({\n              borderRadius: 3,\n              px: 3,\n              py: 1.5,\n              textTransform: 'none',\n              fontWeight: 600,\n              '&:disabled': {\n                bgcolor: 'action.disabledBackground',\n                color: 'action.disabled',\n              },\n              ...theme.applyStyles('dark', {\n                '&:disabled': {\n                  bgcolor: 'grey.800',\n                  color: 'grey.600',\n                },\n              }),\n            })}\n          >\n            {isLoading ? 'Adding...' : 'Add to cart'}\n          </Button>\n        </Box>\n      </Stack>\n    </Card>\n  );\n}\n",
      "type": "registry:item"
    },
    {
      "path": "components/product-card2/index.ts",
      "target": "src/mui-treasury/components/product-card2/index.ts",
      "content": "export * from './product-card2';\n",
      "type": "registry:item"
    }
  ],
  "meta": {
    "screenshot": "/og/product-card2.png",
    "category": "block",
    "exportName": "ProductCard2",
    "subcategory": "ecommerce"
  }
}