/*
 * Mettahemp — Hero Background Image WebP Override
 * Task: 86exatv6x
 *
 * Forces the homepage Greenshift hero rows to fetch WebP variants instead of the
 * original PNGs (3.4 MB hero_young-scaled.png → 104 KB hero_young-scaled.webp,
 * 1.6 MB Bottom_bg_banner.png → 59 KB Bottom_bg_banner.webp).
 *
 * Greenshift inline CSS still parses normally — the !important override wins at the
 * cascade level so the browser only fetches the WebP.
 *
 * Selectors target Greenshift block patterns; if Greenshift updates change class
 * names, these selectors will need to be revisited.
 */

/* Hero (top) row — replace hero_young-scaled.png reference */
[style*="hero_young-scaled.png"],
[style*="hero_young-scaled.jpg"],
[data-bg*="hero_young-scaled"] {
	background-image: url('/wp-content/themes/blaze-blocksy/custom/images/hero_young-scaled.webp') !important;
}

/* Bottom banner row — replace Bottom_bg_banner.png reference */
[style*="Bottom_bg_banner.png"],
[style*="Bottom_bg_banner.jpg"],
[data-bg*="Bottom_bg_banner"] {
	background-image: url('/wp-content/themes/blaze-blocksy/custom/images/Bottom_bg_banner.webp') !important;
}

/* Generic Greenshift block fallback — covers edge cases where the inline style is constructed dynamically */
.gspb_container[style*="hero_young"],
.gspb-container[style*="hero_young"] {
	background-image: url('/wp-content/themes/blaze-blocksy/custom/images/hero_young-scaled.webp') !important;
}

.gspb_container[style*="Bottom_bg_banner"],
.gspb-container[style*="Bottom_bg_banner"] {
	background-image: url('/wp-content/themes/blaze-blocksy/custom/images/Bottom_bg_banner.webp') !important;
}

/* tanbg — desktop sizes use a WebP variant. Mobile is base64-inlined in critical CSS at wp_head priority 1. */
[style*="2023/10/tanbg.jpg"],
[style*="2023/10/tanbg-1.jpg"] {
	background-image: url('/wp-content/themes/blaze-blocksy/custom/images/tanbg.webp') !important;
}
