{
    "schemaVersion": 2,
    "product": {
        "sku": "CP-SK-S",
        "name": "Gravurschilder für Pokale",
        "type": "engrave-plate",
        "basePrice": 3.49,
        "inclLine": "Gravur inklusive &middot; selbstklebend"
    },
    "canvas": {
        "width": 750,
        "height": 750
    },
    "assetBase": "/media/builder/gravurschild/",
    "layers": [
        {
            "id": "photo",
            "type": "option",
            "category": "color"
        },
        {
            "id": "textCenter",
            "type": "text",
            "category": "customText",
            "hideWhen": {
                "category": "layout",
                "equals": "lb"
            },
            "box": {
                "x": 0.5,
                "y": 0.5,
                "maxWidthPx": 600,
                "maxHeightPx": 300
            },
            "font": {
                "style": "bold",
                "lineHeight": 1.15,
                "familyFrom": "font",
                "defaultFamily": "Roboto Condensed",
                "sizePx": 46,
                "color": "#1a1a1a",
                "align": "center"
            }
        },
        {
            "id": "textLeft",
            "type": "text",
            "category": "customText",
            "hideWhen": {
                "category": "layout",
                "equals": "z"
            },
            "box": {
                "x": 0.5,
                "y": 0.5,
                "maxWidthPx": 600,
                "maxHeightPx": 300
            },
            "font": {
                "style": "bold",
                "lineHeight": 1.15,
                "familyFrom": "font",
                "defaultFamily": "Roboto Condensed",
                "sizePx": 46,
                "color": "#1a1a1a",
                "align": "left"
            }
        }
    ],
    "categories": [
        {
            "id": "size",
            "title": "Größe",
            "type": "radio",
            "default": "4518",
            "defaultCounts": true,
            "alwaysOpen": true,
            "note": "Gravurschild zum Aufkleben, Breite x Höhe",
            "options": [
                {
                    "id": "4518",
                    "label": "45 x 18 mm · 3,49 €",
                    "sku": "CP-SK-S-45x18",
                    "price": 3.49
                },
                {
                    "id": "5020",
                    "label": "50 x 20 mm · 3,69 €",
                    "sku": "CP-SK-S-50x20",
                    "price": 3.69
                },
                {
                    "id": "5522",
                    "label": "55 x 22 mm · 3,79 €",
                    "sku": "CP-SK-S-55x22",
                    "price": 3.79
                },
                {
                    "id": "6020",
                    "label": "60 x 20 mm · 3,89 €",
                    "sku": "CP-SK-S-60x20",
                    "price": 3.89
                },
                {
                    "id": "7030",
                    "label": "70 x 30 mm · 3,99 €",
                    "sku": "CP-SK-S-70x30",
                    "price": 3.99
                }
            ]
        },
        {
            "id": "color",
            "title": "Farbe",
            "type": "swatch-image",
            "default": "gold",
            "defaultCounts": true,
            "alwaysOpen": true,
            "required": true,
            "options": [
                {
                    "id": "gold",
                    "label": "Gold",
                    "sku": "G",
                    "swatch": "linear-gradient(135deg,#f3dc8a 0%,#d4a537 55%,#9a6d1c 100%)",
                    "image": "photos/front-gold.webp"
                },
                {
                    "id": "silber",
                    "label": "Silber",
                    "sku": "S",
                    "swatch": "linear-gradient(135deg,#f2f3f5 0%,#c3c7cc 55%,#8a9096 100%)",
                    "image": "photos/front-silber.webp"
                },
                {
                    "id": "bronze",
                    "label": "Bronze",
                    "sku": "B",
                    "swatch": "linear-gradient(135deg,#e2a98a 0%,#b06a48 55%,#6e3b22 100%)",
                    "image": "photos/front-bronze.webp"
                }
            ]
        },
        {
            "id": "layout",
            "title": "Layout",
            "type": "radio",
            "default": "z",
            "defaultCounts": true,
            "alwaysOpen": true,
            "cartOption": "design",
            "cartLabel": "Layout",
            "options": [
                {
                    "id": "z",
                    "label": "Zentriert",
                    "code": "Z"
                },
                {
                    "id": "lb",
                    "label": "Linksbündig",
                    "code": "LB"
                }
            ]
        },
        {
            "id": "engravingMode",
            "title": "Gravur",
            "type": "radio",
            "alwaysOpen": true,
            "default": "text",
            "defaultCounts": true,
            "note": "Gravur des Wunschtexts inklusive",
            "options": [
                {
                    "id": "text",
                    "label": "mit Wunschtext"
                },
                {
                    "id": "none",
                    "label": "ohne Wunschtext"
                }
            ]
        },
        {
            "id": "font",
            "title": "Schriftart",
            "type": "font-select",
            "visibleWhen": {
                "category": "engravingMode",
                "equals": "text"
            },
            "optionsFrom": "shared/fonts.json",
            "collapseOnSelect": true
        },
        {
            "id": "customText",
            "title": "Wunschtext",
            "type": "textarea",
            "visibleWhen": {
                "category": "engravingMode",
                "equals": "text"
            },
            "maxLength": 90,
            "showCounter": true
        }
    ],
    "cart": {
        "productId": 1589,
        "addUrl": "/checkout/cart/add/product/1589/",
        "uploadUrl": "/cpbuilder/upload/",
        "optionIds": {
            "customText": 6801,
            "font": 6802,
            "preview": 6803,
            "design": 6800,
            "color": 6799
        },
        "superAttribute": {
            "category": "size",
            "attributeId": 218,
            "byOption": {
                "4518": 6046,
                "5020": 6047,
                "5522": 6048,
                "6020": 6049,
                "7030": 6050
            }
        }
    }
}
