.top-footer{background-color:#623778;padding-top:20px;text-align:center}.top-footer h3{color:#FFF;font-size:24px}.top-footer p{color:#FFF;text-align:center;font-size:18px}.top-footer a{color:#FFF;text-decoration:none}.fa-holder{margin:0}.footer-icon-space{margin:0 20px 20px 20px}p.footer-links{margin-bottom:0;padding-bottom:10px;font-size:16px;font-weight:normal;padding-bottom:20px}.top-footer .legalese{font-size:13px;line-height:1.3em;margin-bottom:5%}div.footer-widget{text-align:center}.et_pb_widget{float:none}p.footer-banner-cursive{text-align:center;font-size:36px;font-family:Italianno,cursive;line-height:1;color:#000}.footer-banner-text{text-align:center;color:#000;font-size:18px}.resp-img{display:block;margin:0 auto}.img-rounded{border-radius:25px}.gg-button{text-decoration:none;cursor:pointer;color:#fff!important;background-color:#623778;padding:12px 20px;border-radius:3px}.gg-button:hover{text-decoration:none;cursor:pointer;color:#fff!important;background-color:#990099;padding:12px 20px;border-radius:3px}.text-center{text-align:center}.text-right{text-align:right}.container:before{background-color:transparent!important}.et_pb_widget_area_right{border-left:0!important}.et_pb_widget_area_left{border-right:0!important}.widgettitle{text-align:center;color:#613977;font-weight:bold;padding-top:28px}.gg-header-icon{margin:0 20px 20px 20px;font-size:30px!important}.fluid-width-video-wrapper{margin-top:20px;margin-bottom:20px}@media (max-width:767px){.et_pb_post h2{font-size:26px}}@media only screen and (min-width:981px){.et_pb_posts .et_pb_post img,.et_pb_posts .et_overlay{width:250px;float:left;left:0;margin-right:25px}body.rtl .et_pb_posts .et_pb_post img,body.rtl .et_pb_posts .et_overlay{float:right;right:0;margin-left:25px;margin-right:0}}.pa-bullet-list-1 ul{list-style-type:none!important}.pa-bullet-list-1 ul li:before{content:'e052'!important;color:#2cba6c;font-family:'ETMODULES'!important;margin-right:10px;margin-left:-14px;font-size:1.2em!important}.single-post h2{padding-bottom:20px;padding-top:30px}.et_pb_title_featured_container img{padding-top:10px;padding-bottom:15px}body .gform_wrapper .gform_footer input.button,body .gform_wrapper .gform_page_footer input.button,body div.form_saved_message div.form_saved_message_emailform form input[type=submit]{background-color:#fff;color:#cd497f;border-width:2px;border-color:#cd497f;border-radius:3px;font-family:'inherit',sans-serif;font-size:20px;margin-top:-40px}.et_pb_fullwidth_menu .et_pb_menu__search-input,.et_pb_menu .et_pb_menu__search-input{color:#fff}.et_pb_menu__close-search-button,.et_pb_menu__search input,.et_pb_menu__search input::placeholder,.et_pb_menu__search .et_pb_menu__search-form .et_pb_menu__search-input{color:white!important}.postid-2624 .wp-image-50284{width:219px;margin:auto;display:block;margin-left:auto;margin-right:auto;text-align:center!important}.tss-wrapper .tss-layout3 .item-content-wrapper:before,.tss-wrapper .tss-isotope1 .item-content-wrapper:before,.tss-wrapper .tss-video1 .item-content-wrapper:before,.tss-wrapper .tss-carousel3 .item-content-wrapper:before{content:"F10D";color:#613977;position:absolute;left:0px;top:-15px;font-family:"tss-font",serif;font-size:30px}.custom .et-pb-icon{padding-top:6px!important}.shop-now-button{background-color:#cd497f;color:#fff;padding:0!important;margin-top:-5px!important;margin-bottom:-5px!important;margin-left:4px!important;margin-right:14px!important;border-radius:3px}.shop-now-button a{color:#fff!important;padding:12px 15px 13px 15px!important}.et_pb_post_content .et_pb_row{width:100%!important;max-width:100%!important;margin-left:0!important;margin-right:0!important}section[data-wpshopify-component-type="products"]{max-width:980px!important;margin:0 auto!important;container-type:inline-size}section[data-wpshopify-component-type="products"] ul.wps-items{margin:0!important;padding:0!important}section[data-wpshopify-component-type="products"] ul.wps-items li.swp-item{display:block!important;position:relative!important;padding-left:0!important;min-height:0!important;max-width:980px!important;margin:0 auto!important}section[data-wpshopify-component-type="products"] li.swp-item .swp-variants{display:flex!important;flex-direction:row!important;gap:8px!important;flex-wrap:wrap!important}section[data-wpshopify-component-type="products"] li.swp-item>.swp-component-products-images{position:relative!important;left:auto!important;top:auto!important;width:100%!important;margin:0 0 20px 0!important}section[data-wpshopify-component-type="products"] li.swp-item .swp-product-image-feat-wrapper{width:100%!important;max-width:100%!important;margin:0!important}section[data-wpshopify-component-type="products"] li.swp-item .swp-product-image-feat-wrapper img{width:100%!important;height:auto!important;max-width:100%!important;border-radius:12px;display:block!important}section[data-wpshopify-component-type="products"] li.swp-item .wps-thumbnails-wrapper{display:flex!important;gap:8px!important;margin-top:10px!important;flex-wrap:wrap!important;width:100%!important}section[data-wpshopify-component-type="products"] li.swp-item .swp-product-image-thumb-wrapper{width:60px!important;height:60px!important}section[data-wpshopify-component-type="products"] li.swp-item .swp-product-image-thumb-wrapper img{width:60px!important;height:60px!important;border-radius:6px;border:1.5px solid #ddd;cursor:pointer}section[data-wpshopify-component-type="products"] li.swp-item [data-wps-is-active="true"] .swp-product-image-thumb-wrapper img{border-color:#56326B!important;border-width:2px!important}section[data-wpshopify-component-type="products"] li.swp-item .wps-component-products-title{margin:0 0 8px 0!important;padding:0!important}section[data-wpshopify-component-type="products"] li.swp-item .swp-product-title{font-size:28px!important;color:#56326B!important;font-weight:700!important;margin:0!important;line-height:1.2!important}section[data-wpshopify-component-type="products"] li.swp-item .swp-product-pricing{margin:0 0 16px 0!important}section[data-wpshopify-component-type="products"] li.swp-item .swp-product-price{font-size:20px!important;color:#56326B!important;font-weight:600!important}section[data-wpshopify-component-type="products"] li.swp-item .swp-buy-button-wrapper{margin:0!important}section[data-wpshopify-component-type="products"] li.swp-item .swp-variant-label{font-size:13px!important;color:#56326B!important;font-weight:600!important;margin-bottom:6px!important}section[data-wpshopify-component-type="products"] li.swp-item button.swp-product-variant-button{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:4px!important;border:1.5px solid #ddd!important;border-radius:10px!important;padding:12px 8px!important;font-size:14px!important;font-weight:600!important;background:#ffffff!important;color:#555555!important;margin-right:8px!important;min-width:110px!important;height:auto!important;transition:all 0.15s!important;cursor:pointer!important}section[data-wpshopify-component-type="products"] li.swp-item button.swp-product-variant-button::before{content:''!important;display:block!important;width:80px!important;height:80px!important;background-size:contain!important;background-repeat:no-repeat!important;background-position:center!important;margin-bottom:4px!important}section[data-wpshopify-component-type="products"] li.swp-item button[data-variant-name="30 Days"]::before,section[data-wpshopify-component-type="products"] li.swp-item button[data-variant-name="30 Servings"]::before,section[data-wpshopify-component-type="products"] li.swp-item button[data-variant-name="1 Bag"]::before{background-image:url('https://genesisgold.com/wp-content/uploads/2026/05/Untitled-design.png')!important}section[data-wpshopify-component-type="products"] li.swp-item button[data-variant-name="60 Days"]::before,section[data-wpshopify-component-type="products"] li.swp-item button[data-variant-name="60 Servings"]::before,section[data-wpshopify-component-type="products"] li.swp-item button[data-variant-name="2 Bag"]::before{background-image:url('https://genesisgold.com/wp-content/uploads/2026/05/Untitled-design-1.png')!important}section[data-wpshopify-component-type="products"] li.swp-item button[data-variant-name="90 Days"]::before,section[data-wpshopify-component-type="products"] li.swp-item button[data-variant-name="90 Servings"]::before,section[data-wpshopify-component-type="products"] li.swp-item button[data-variant-name="3 Bag"]::before{background-image:url('https://genesisgold.com/wp-content/uploads/2026/05/Untitled-design-2.png')!important}section[data-wpshopify-component-type="products"] li.swp-item .gg-save-note{display:block!important;font-size:12px!important;font-weight:500!important;color:#888!important;margin-top:2px!important;line-height:1.3!important}section[data-wpshopify-component-type="products"] li.swp-item .gg-save-note s{color:#aaa!important}section[data-wpshopify-component-type="products"] li.swp-item .gg-save-note .gg-save-amt{color:#56326B!important;font-weight:600!important}section[data-wpshopify-component-type="products"] li.swp-item button[data-is-variant-selected="true"] .gg-save-note{color:#56326B!important}section[data-wpshopify-component-type="products"] li.swp-item button.swp-product-variant-button:hover{border-color:#56326B!important}section[data-wpshopify-component-type="products"] li.swp-item button.swp-product-variant-button[data-is-variant-selected="true"]{border:2px solid #56326B!important;background:#f5eef9!important;color:#56326B!important}section[data-wpshopify-component-type="products"] li.swp-item .swp-selling-group{border:1.5px solid #ddd!important;border-radius:12px!important;padding:12px 14px!important;margin-bottom:8px!important;background:#fff!important}section[data-wpshopify-component-type="products"] li.swp-item .swp-selling-group[data-is-selected="true"]{border:2px solid #56326B!important;background:#faf7fc!important}section[data-wpshopify-component-type="products"] li.swp-item .swp-radio-label{color:#56326B!important;font-weight:500!important}section[data-wpshopify-component-type="products"] li.swp-item input[type="radio"]{accent-color:#56326B!important}section[data-wpshopify-component-type="products"] li.swp-item .swp-selling-group[data-is-selected="true"] .swp-radio-label,section[data-wpshopify-component-type="products"] li.swp-item .swp-selling-group[data-is-selected="true"] .swp-price,section[data-wpshopify-component-type="products"] li.swp-item .swp-selling-group[data-is-selected="true"] .swp-final-price,section[data-wpshopify-component-type="products"] li.swp-item .swp-selling-group[data-is-selected="true"] p{color:#613977!important}section[data-wpshopify-component-type="products"] li.swp-item .swp-price{color:#613977!important}section[data-wpshopify-component-type="products"] li.swp-item [data-is-compare-at="true"]{color:#999!important}section[data-wpshopify-component-type="products"] li.swp-item .szh-menu-button{border:1.5px solid #56326B!important;border-radius:8px!important;padding:10px 14px!important;background:#fff!important;color:#56326B!important;font-weight:500!important;width:100%!important;text-align:left!important}section[data-wpshopify-component-type="products"] li.swp-item .swp-btn-add-to-cart{background:#E6C770!important;background-color:#E6C770!important;border:none!important;border-radius:10px!important;padding:14px!important;font-size:15px!important;font-weight:600!important}section[data-wpshopify-component-type="products"] li.swp-item .swp-btn-add-to-cart .swp-add-to-cart-text{color:#56326B!important;font-weight:600!important}section[data-wpshopify-component-type="products"] li.swp-item .swp-btn-add-to-cart:hover{background:#dbb95e!important;background-color:#dbb95e!important}section[data-wpshopify-component-type="products"] li.swp-item .swp-clear-selections{display:none!important}.gg-benefits-injected{display:none;border:1.5px solid #56326B!important;border-radius:10px!important;padding:10px 14px!important;margin-bottom:10px!important;background:#faf7fc!important;box-sizing:border-box}.gg-benefits-injected.moved{display:block!important}.gg-benefits-injected h3{color:#56326B!important;font-size:13px!important;font-weight:600!important;margin:0 0 6px 0!important;padding:0!important}.gg-benefits-injected ul{list-style:none!important;padding:0!important;margin:0!important}.gg-benefits-injected li{font-size:12px!important;color:#555!important;padding:2px 0!important;line-height:1.4!important;list-style:none!important}@container (min-width:860px){section[data-wpshopify-component-type="products"] ul.wps-items li.swp-item{padding-left:440px!important;min-height:460px!important}section[data-wpshopify-component-type="products"] li.swp-item>.swp-component-products-images{position:absolute!important;left:0!important;top:0!important;width:400px!important;margin:0!important}section[data-wpshopify-component-type="products"] li.swp-item .swp-product-image-feat-wrapper{width:400px!important;max-width:400px!important}section[data-wpshopify-component-type="products"] li.swp-item .swp-product-image-feat-wrapper img{width:400px!important;max-width:400px!important}section[data-wpshopify-component-type="products"] li.swp-item .wps-thumbnails-wrapper{width:400px!important}}@container (max-width:859px){section[data-wpshopify-component-type="products"] li.swp-item button.swp-product-variant-button{flex:1!important;min-width:0!important}}.swp-selling-group .swp-radio-text{flex-wrap:wrap;row-gap:2px}.swp-selling-group .swp-save-inline{white-space:nowrap}.swp-variant-label.swp-l-row{flex-direction:row;flex-wrap:wrap;align-items:baseline;column-gap:0}.swp-variant-label .swp-variant-label-value{width:auto;flex:0 0 auto}drives your tagging.// Keep it lowercase-with-hyphens and NEVER change it once live,// or your existing tags stop matching.// podcast=goes in the AC "Podcast" field->used as %PODCAST% in emails// code=goes in the AC "Discount Code" field->%DISCOUNT_CODE%//// To add podcast #7:copy a row,change the four values,done.// No new emails,no new automation branches.//---------------------------------------------------------var SOURCES={// All six slugs below verified live on genesisgold.com (Divi optin->AC list 109)'hertime':{source:'hertime',podcast:‘It’s HERTime',
      code:    'HERTIME10'
    },
    'natalie-tysdal': {
      source:  'natalie-tysdal',
      podcast: 'The Natalie Tysdal Podcast',
      code:    'NATALIE10'
    },
    'the-advisor': {
      source:  'the-advisor',
      podcast: 'The Advisor with Stacey Chillemi',
      code:    'ADVISOR10'
    },
    'the-well-nourished-mama': {
      source:  'well-nourished-mama',
      podcast: 'The Well Nourished Mama',
      code:    'MAMA10'
    },
    // alias: the automation also references genesisgold.com/mama
    'mama': {
      source:  'well-nourished-mama',
      podcast: 'The Well Nourished Mama',
      code:    'MAMA10'
    },

    'ivy-unleashed': {
      source:  'ivy-unleashed',
      podcast: 'Ivy Unleashed',
      code:    'IVY10'
    },
    'delivering-health': {
      source:  'delivering-health',
      podcast: 'Delivering Health Podcast,code:'HEALTH10'}};// PRIMARY MATCH — by ActiveCampaign field ID. Divi names each custom field// input et_pb_signup_custom_field_,so this is exact and can// never grab the wrong field. These five IDs are confirmed live in the// genesisgoldcom account.var FIELD_IDS={'166':'source',// Optin Source ->%OPTIN_SOURCE%'167':'podcast',// Podcast ->%PODCAST%'168':'code',// Discount Code ->%DISCOUNT_CODE%'169':'attribution',// Attribution ->%ATTRIBUTION%'170':'landing' // Landing Page ->%LANDING_PAGE%};// FALLBACK MATCH — by the field's visible label, only used if the input name
  // has no recognisable AC field ID. EXACT match (not substring), so the older
  // "Landing Page or 1GG - ..." fields on other Genesis Gold pages are never
  // touched by this script.
  var FIELD_MAP = {
    'optin source':  'source',
    'podcast':       'podcast',
    'discount code': 'code',
    'attribution':   'attribution',
    'landing page':  'landing'
  };

  var COOKIE      = 'gg_attr';   // first-touch attribution cookie
  var COOKIE_DAYS = 90;
  var DEBUG       = false;       // set true to log detected fields in the console

  /* =========================================================
     No edits needed below
     ========================================================= */

  function log() { if (DEBUG && window.console) console.log.apply(console, ['[GG]'].concat([].slice.call(arguments))); }

  function readCookie(name) {
    var m = document.cookie.match('(^|;)\\s*' + name + '\\s*=\\s*([^;]+)');
    return m ? decodeURIComponent(m.pop()) : null;
  }

  function writeCookie(name, value, days) {
    var d = new Date();
    d.setTime(d.getTime() + days * 864e5);
    document.cookie = name + '=' + encodeURIComponent(value) +
      ';expires=' + d.toUTCString() + ';path=/;SameSite=Lax' +
      (location.protocol === 'https:' ? ';Secure' : '');
  }

  // ---- first-touch attribution (written once, never overwritten) ----
  function buildAttribution() {
    var existing = readCookie(COOKIE);
    if (existing) { log('first-touch already stored', existing); return existing; }

    var q = new URLSearchParams(location.search);
    var parts = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_content', 'utm_term']
      .map(function (k) { return q.get(k) || ''; });

    var ref = '';
    try {
      if (document.referrer && document.referrer.indexOf(location.hostname) === -1) {
        ref = new URL(document.referrer).hostname;
      }
    } catch (e) {}

    // source|medium|campaign|content|term|referrer|landing-path
    var value = parts.concat([ref, location.pathname]).join('|');
    writeCookie(COOKIE, value, COOKIE_DAYS);
    log('first-touch stored', value);
    return value;
  }

  // ---- which optin page are we on? ----
  function resolveSource() {
    // Per-page override wins. Put a Divi Code module on each optin page
    // containing a script tag that sets:  window.GG_OPTIN_SOURCE = 'hertime';
    var key = window.GG_OPTIN_SOURCE;

    if (!key) {
      var segs = location.pathname.replace(/^\/+|\/+$/g, '').split('/');
      key = segs[segs.length - 1] || '';
    }
    return SOURCES[key] || null;
  }

  var VALUES = null;
  function values() {
    if (VALUES) return VALUES;
    var s = resolveSource();
    VALUES = {
      source:      s ? s.source  : 'unknown',
      podcast:     s ? s.podcast : '',
      code:        s ? s.code    : '',
      attribution: buildAttribution(),
      landing:     location.pathname
    };
    log('values', VALUES);
    return VALUES;
  }

  // ---- fill + hide the Divi custom fields ----
  function labelTextFor(input) {
    var wrap = input.closest('.et_pb_newsletter_field') || input.parentNode;
    var label = wrap ? wrap.querySelector('label') : null;
    var raw = (label && label.textContent) || input.placeholder ||
              input.getAttribute('aria-label') || '';
    // strip a trailing colon and any required-marker asterisk
    return raw.toLowerCase().replace(/[*:]/g, '').replace(/\s+/g, ' ').trim();
  }

  function keyFor(input) {
    // 1. exact match on the trailing AC field ID in the input name
    var m = (input.name || '').match(/custom_field_(\d+)/);
    if (m && FIELD_IDS[m[1]]) return FIELD_IDS[m[1]];

    // 2. exact match on the visible label
    var text = labelTextFor(input);
    return Object.prototype.hasOwnProperty.call(FIELD_MAP, text) ? FIELD_MAP[text] : null;
  }

  function fillFields(root) {
    var v = values();
    var inputs = (root || document).querySelectorAll(
      '[name^="et_pb_signup_custom_field_"],[name^="et_pb_signup_"][data-gg-field]'
    );

    Array.prototype.forEach.call(inputs, function (input) {
      var matchedKey = keyFor(input);
      log('found custom field', input.name, '| label:', labelTextFor(input), '| matched:', matchedKey || '(none - left alone)');
      if (!matchedKey) return;

      input.value = v[matchedKey] || '';
      input.setAttribute('readonly', 'readonly');
      input.setAttribute('tabindex', '-1');
      input.setAttribute('aria-hidden', 'true');

      var wrap = input.closest('.et_pb_newsletter_field') || input.parentNode;
      if (wrap) wrap.classList.add('gg-hidden-field');
      log('filled', input.name, '=', input.value);
    });
  }

  // ---- identify the visitor to AC after a successful optin ----
  var lastEmail = '';

  function watchEmail() {
    document.addEventListener('input', function (e) {
      if (e.target && /et_pb_signup_email/.test(e.target.name || e.target.id || '')) {
        lastEmail = (e.target.value || '').trim();
      }
    }, true);
  }

  function identify() {
    if (!lastEmail || !window.vgo) return;
    log('identifying to AC', lastEmail);
    vgo('setEmail', lastEmail);
    vgo('process');
  }

  function watchSubmit() {
    // Divi submits the optin over jQuery AJAX to admin-ajax.php
    if (window.jQuery) {
      jQuery(document).ajaxComplete(function (evt, xhr, settings) {
        var data = (settings && settings.data) || '';
        if (data.indexOf('subscribe_form') === -1 && data.indexOf('et_pb_signup') === -1) return;
        var res = xhr.responseJSON || {};
        if (res.error) { log('optin returned an error,not identifying'); return; }
        identify();
      });
    }

    // Fallback: watch for Divi's success message replacing the formvar obs=new MutationObserver(function (muts){for (var i=0;i < muts.length;i++){var t=muts[i].target;if (t && t.querySelector && t.querySelector('.et_pb_newsletter_success, .et_pb_newsletter_result')){identify();obs.disconnect();return}}});var forms=document.querySelectorAll('.et_pb_newsletter, .et_pb_signup');Array.prototype.forEach.call(forms,function (f){obs.observe(f,{childList:true,subtree:true})})}function init(){watchEmail();fillFields(document);watchSubmit();// Re-fill in case the module renders late (popups,lazy sections)setTimeout(function (){fillFields(document)},1500)}if (document.readyState==='loading'){document.addEventListener('DOMContentLoaded',init)}else{init()}})();.et_pb_newsletter_field.gg-hidden-field{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;overflow:hidden!important}