/* Designer-Produkte: Produktseite und Lightbox (tegrafo – Shop-Erweiterungen) */

/* „Gestalten“ ersetzt den Warenkorb-Knopf; FPD klickt ihn nach „Fertig“ selbst. */
.tg-designer-produkt:not(.tg-wegwahl) form.cart .single_add_to_cart_button,
.tg-designer-produkt.tg-weg-designer form.cart .single_add_to_cart_button { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Wegwahl „Datei hochladen / Im Designer gestalten“ (Produktfeld mit Klasse tg-weg; Kacheln in produktfelder.css) */
.tg-wegwahl:not(.tg-weg-designer) #fpd-start-customizing-button,
.tg-wegwahl:not(.tg-weg-designer) .tg-designer-hinweis,
.tg-wegwahl:not(.tg-weg-designer) .tg-designer-preis,
.tg-wegwahl:not(.tg-weg-designer) .tg-designer-waehlen { display: none !important; }
.tg-wegwahl.tg-weg-designer div.product .summary p.price .tg-basis { display: none !important; }
.tg-wegwahl .tg-weg .tgpf-hinweis { margin-top: .4em; }
/* Hinweis, wenn „Gestalten“ ohne Variante geklickt wird */
.tg-designer-produkt .tg-designer-waehlen { display: none; margin: 0 0 .6em; padding: .55em .8em; border-radius: 6px; background: #FFE600; color: var(--wp--preset--color--foreground, #232D37); font-size: var(--wp--preset--font-size--tiny); font-weight: 600; }
.tg-designer-produkt .tg-designer-waehlen.ist-sichtbar { display: block; }
.tg-designer-produkt table.variations.tg-var--fehlt .tg-var__knopf:not(.ist-aktiv) { box-shadow: 0 0 0 2px #FFE600; }
.tg-designer-produkt #fpd-start-customizing-button { display: inline-block; margin: 0; font-size: var(--wp--preset--font-size--small); line-height: 1.2; text-decoration: none; cursor: pointer; }
.tg-designer-produkt #fpd-start-customizing-button.fpd-disabled { opacity: .5; pointer-events: none; }
.tg-designer-produkt .tg-designer-hinweis { margin: .2em 0 .8em; font-size: var(--wp--preset--font-size--tiny); color: var(--wp--preset--color--secondary); }
.tg-designer-produkt .fpd-product-designer-wrapper:empty { display: none; }
/* Leerer Platzhalter des Designers im Produktraster. */
.tg-designer-produkt div.product > .fpd-product-designer-wrapper { grid-column: 1 / -1; margin: 0; }

/* Mengenfeld bleibt, Variantenwahl wie gewohnt; Hinweis zur Pflichtgestaltung von FPD unterdrückt. */
.tg-designer-produkt .fpd-customization-required-notice { display: none; }

/* Lightbox: Schrift und Knöpfe im Shop-Stil */
.fpd-modal-product-designer, .fpd-modal-product-designer .fpd-container, .fpd-container { font-family: Barlow, Arial, sans-serif; }
.fpd-modal-product-designer .fpd-modal-close, .fpd-modal-product-designer .fpd-done { font-family: inherit; }
.fpd-container .fpd-btn, .fpd-container .fpd-primary-btn, .fpd-modal-product-designer .fpd-done { background: var(--wp--preset--color--foreground, #232D37) !important; color: #fff !important; border-radius: 6px !important; font-weight: 500; }
.fpd-container .fpd-btn:hover, .fpd-container .fpd-primary-btn:hover, .fpd-modal-product-designer .fpd-done:hover { background: var(--wp--preset--color--secondary, #555) !important; }

/* Preisblock unter dem Preis: Gesamtpreis mit Druck, aktualisiert beim Gestalten */
.tg-designer-produkt .tg-designer-preis { margin: -.2em 0 1em; }
.tg-designer-produkt .tg-designer-preis__label { display: block; font-size: var(--wp--preset--font-size--tiny); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--wp--preset--color--secondary); }
.tg-designer-produkt .tg-designer-preis__betrag { display: block; font-size: var(--wp--preset--font-size--medium); font-weight: 500; }
.tg-designer-produkt .tg-designer-preis__hinweis { display: block; font-size: var(--wp--preset--font-size--tiny); color: var(--wp--preset--color--secondary); }

/* FPD blendet bei „Gestaltung erforderlich“ jeden Absende-Knopf aus; im Upload-Weg (und vor der Wahl) muss er da sein. */
.tg-wegwahl:not(.tg-weg-designer).single-product.fpd-customization-required .cart .single_add_to_cart_button { display: inline-block !important; }

/* Feinschliff Wegwahl (24.10.2026): Preisblock ohne feste Höhe (die feste Höhe gegen Springen braucht nur der Upload-Weg ohne Wahl). */
.tg-wegwahl.woocommerce div.product .summary p.price, .tg-wegwahl .woocommerce div.product .summary p.price { height: auto !important; margin-bottom: .6em; }
.tg-wegwahl .tg-designer-preis { margin: 0 0 1em; }
