.elementor-2653 .elementor-element.elementor-element-db1afc6{--display:flex;--flex-direction:column;--container-widget-width:100%;--container-widget-height:initial;--container-widget-flex-grow:0;--container-widget-align-self:initial;--flex-wrap-mobile:wrap}.elementor-2653 .elementor-element.elementor-element-cca81bc{--display:flex;--flex-direction:column;--container-widget-width:100%;--container-widget-height:initial;--container-widget-flex-grow:0;--container-widget-align-self:initial;--flex-wrap-mobile:wrap;--margin-top:50px;--margin-bottom:0px;--margin-left:0px;--margin-right:0px}.elementor-2653 .elementor-element.elementor-element-7ee209f{--display:flex}.elementor-2653 .elementor-element.elementor-element-e37437f{text-align:center}.elementor-2653 .elementor-element.elementor-element-e37437f .elementor-heading-title{font-family:"Source Serif Pro",Sans-serif;word-spacing:3px;color:#0f172a}<script>document.addEventListener('DOMContentLoaded',function(){const params=new URLSearchParams(window.location.search);const preselected=params.get('abonnement');//e.g. "de-kenner" const form=document.querySelector('#giftQuizForm form');if (!form) return;//Prefill abonnement from URL if (preselected){const field=form.querySelector('[name="form_fields[abonnement]"]');if (field){field.value=preselected;field.dispatchEvent(new Event('change'))}}//Handle submit form.addEventListener('submit',function(e){e.preventDefault();const abonnement=form.querySelector('[name="form_fields[abonnement]"]').value;const duration=form.querySelector('[name="form_fields[duration]"]').value;const deliveryType=form.querySelector('[name="form_fields[delivery_type]"]').value;const recipient=form.querySelector('[name="form_fields[recipient]"]').value;const message=form.querySelector('[name="form_fields[message]"]').value;//Map abonnement+duration to WooCommerce product IDs const productMap={'de-ontdekker_1_months':264#,'discovery_6_months':202,'discovery_12_months':203,'prestige_3_months':204,'prestige_6_months':205,'prestige_12_months':206,'connoisseur_3_months':207,'connoisseur_6_months':208,'connoisseur_12_months':209};const key=`${abonnement}_${duration}`;const productId=productMap[key];if (productId){//Redirect to add-to-cart URL and preserve quiz data in sessionStorage sessionStorage.setItem('giftQuizData',JSON.stringify({abonnement,duration,deliveryType,recipient,message}));window.location.href=`/?add-to-cart=${productId}`;}else{alert('No product matches your selections.')}});});</script>