/**
 * Theme Name: Baron Boutique Child
 * Theme URI: https://baronboutique.com/
 * Description: Baron Boutique child theme (parent: Goya). Carries the redesigned Baron Boutique UI as a CSS layer (assets/css/baronboutique-design.css) loaded immediately after the Goya core/shop styles, plus the site's functional performance and WooCommerce fixes. Page content and injected components stay in the Code Snippets plugin and WordPress pages. Image lazy-load is included but OFF by default (LiteSpeed handles it).
 * Author: Baron Boutique
 * Template: goya
 * Version: 1.3.2
 * Requires PHP: 7.4
 * Text Domain: baronboutique-child
 */


/*
 * Fix: et-icon font-display — prevents FCP blocking
 * Using 'optional' over 'swap' to avoid icon flash on first load
 */
@font-face {
  font-family: 'et-icon';
  src: url('/wp-content/themes/goya/assets/icons/theme-icons/fonts/et-icon.woff2') format('woff2'),
         url('/wp-content/themes/goya/assets/icons/theme-icons/fonts/et-icon.woff') format('woff'),
         url('/wp-content/themes/goya/assets/icons/theme-icons/fonts/et-icon.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: optional;
}


/*
 * Fix: WCPA skeleton loader — hides non-composited animations
 * Eliminates 143 PageSpeed warnings, form still loads normally
 */
.wcpat_skeleton_loader_area {
  display: none !important;
}

/*
 * Fix: Product image CLS — unsized image element
 * Prevents 0.152 layout shift on product pages
 * Aspect ratio matches uploaded image dimensions 860x1318
 */
.woocommerce div.product div.images img.wp-post-image {
  width: 100%;
  height: auto;
  aspect-ratio: 860 / 1318;
  display: block;
}

/*
 * Fix: Catalog thumbnail CLS
 * Matches WooCommerce thumbnail width 450 uncropped
 */
.woocommerce ul.products li.product a img {
  width: 100%;
  height: auto;
  aspect-ratio: 860 / 1318;
  display: block;
}


/* FIX 2: Remove transition on the gallery image itself 
   (currently has 0.25s cubic-bezier transition which delays paint) */
.woocommerce-product-gallery__image img.wp-post-image {
    transition: none !important;
}


/* Override flexslider's JS-set inline styles only on the first slide before init */
.woocommerce-product-gallery:not(.flexslider-enabled) .woocommerce-product-gallery__image:first-child {
  display: block;
  width: 100%;
  float: none;
}


.woocommerce-product-gallery:not(.flexslider-enabled) .woocommerce-product-gallery__wrapper {
  width: 100%;
}


/*
 * Fix: CLS 0.199 on product-information div
 * Reserves space for the entire product info column
 * preventing font-swap reflow from shifting page content
 */
/*.single-product div.col-12.col-lg-6.product-information {
    min-height: max(600px, 60vh);
}*/



/*
 * Fix: CLS 0.007 on star rating summary
 * Reserves space before WooCommerce rating renders
 */
.et-pro-summary-top {
    min-height: 80px;
}

/*
 * Fix: Product title font swap CLS
 * font-display: optional prevents swap reflow entirely
 */
.product-information .product_title {
    font-synthesis: none;
    text-rendering: optimizeSpeed;
}



/*
 * Hide reCAPTCHA badge - cross browser compatible
 * 
 */
 
.grecaptcha-badge {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    z-index: -1 !important;
}



/* ============================================
   Native CSS sticky for right panel
   Disables sticky_kit JS conflict
   ============================================ */
   

@media (min-width: 769px) {
    
     body.single-product #wrapper {
    overflow: visible; /* allows position:sticky to work */
    /*Override overflow: clip in parent theme core css on #wrapper for product pages:*/
  }
  
  .et-product-detail:not(.et-product-layout-showcase):not(.et-product-layout-full-width) .summary.entry-summary {
        position: -webkit-sticky;
        position: sticky;
        top: 100px;
        align-self: flex-start;
        height: auto !important;

    }
    
      .et-product-detail .product-showcase {
        align-items: flex-start;
    }
    
      .woocommerce-product-gallery {
        overflow: visible !important;
    }
    
}

.summary.entry-summary.no-sticky-kit {
    position: sticky !important;
    top: 100px;
}



