@font-face {
	font-weight: normal;
	font-style: normal;
	font-family: "woodmart-font";
	src: url("//scinieoil.com/wp-content/themes/woodmart/fonts/woodmart-font-1-400.woff2?v=8.0.6") format("woff2");
}

@font-face {
	font-family: "star";
	font-weight: 400;
	font-style: normal;
	src: url("//scinieoil.com/wp-content/plugins/woocommerce/assets/fonts/star.eot?#iefix") format("embedded-opentype"), url("//scinieoil.com/wp-content/plugins/woocommerce/assets/fonts/star.woff") format("woff"), url("//scinieoil.com/wp-content/plugins/woocommerce/assets/fonts/star.ttf") format("truetype"), url("//scinieoil.com/wp-content/plugins/woocommerce/assets/fonts/star.svg#star") format("svg");
}

@font-face {
	font-family: "WooCommerce";
	font-weight: 400;
	font-style: normal;
	src: url("//scinieoil.com/wp-content/plugins/woocommerce/assets/fonts/WooCommerce.eot?#iefix") format("embedded-opentype"), url("//scinieoil.com/wp-content/plugins/woocommerce/assets/fonts/WooCommerce.woff") format("woff"), url("//scinieoil.com/wp-content/plugins/woocommerce/assets/fonts/WooCommerce.ttf") format("truetype"), url("//scinieoil.com/wp-content/plugins/woocommerce/assets/fonts/WooCommerce.svg#WooCommerce") format("svg");
}

:root {
	--wd-text-font: "Montserrat", Arial, Helvetica, sans-serif;
	--wd-text-font-weight: 400;
	--wd-text-color: #767676;
	--wd-text-font-size: 14px;
	--wd-title-font: "Montserrat", Arial, Helvetica, sans-serif;
	--wd-title-font-weight: 700;
	--wd-title-color: #242424;
	--wd-entities-title-font: "Montserrat", Arial, Helvetica, sans-serif;
	--wd-entities-title-font-weight: 700;
	--wd-entities-title-color: #333333;
	--wd-entities-title-color-hover: rgb(51 51 51 / 65%);
	--wd-alternative-font: "Montserrat", Arial, Helvetica, sans-serif;
	--wd-widget-title-font: "Montserrat", Arial, Helvetica, sans-serif;
	--wd-widget-title-font-weight: 700;
	--wd-widget-title-transform: inherit;
	--wd-widget-title-color: #333;
	--wd-widget-title-font-size: 16px;
	--wd-header-el-font: "Montserrat", Arial, Helvetica, sans-serif;
	--wd-header-el-font-weight: 600;
	--wd-header-el-transform: none;
	--wd-header-el-font-size: 16px;
	--wd-primary-color: rgb(179,81,117);
	--wd-alternative-color: rgb(253,207,148);
	--wd-link-color: rgb(38,38,38);
	--wd-link-color-hover: #242424;
	--btn-default-font-family: "Montserrat", Arial, Helvetica, sans-serif;
	--btn-default-font-weight: 500;
	--btn-default-transform: none;
	--btn-default-bgcolor: rgb(105,114,125);
	--btn-default-bgcolor-hover: rgb(255,255,255);
	--btn-accented-font-weight: 600;
	--btn-accented-transform: none;
	--btn-accented-bgcolor: rgb(105,114,125);
	--btn-accented-bgcolor-hover: rgb(105,114,125);
	--btn-accented-color: rgb(255,255,255);
	--btn-accented-color-hover: rgb(255,255,255);
	--wd-form-brd-width: 1px;
	--notices-success-bg: #459647;
	--notices-success-color: #fff;
	--notices-warning-bg: #E0B252;
	--notices-warning-color: #fff;
}
.wd-popup.wd-age-verify {
	--wd-popup-width: 500px;
}
.wd-popup.wd-promo-popup {
	background-color: #111111;
	background-image: none;
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center center;
	--wd-popup-width: 800px;
	--wd-popup-padding: 15px;
}
.woodmart-woocommerce-layered-nav .wd-scroll-content {
	max-height: 223px;
}
.wd-page-title {
	background-color: rgb(255,255,255);
	background-image: none;
	background-size: cover;
	background-position: center center;
}
.wd-footer {
	background-color: #ffffff;
	background-image: none;
}
html .woocommerce-mini-cart__buttons .checkout {
	font-family: "Montserrat", Arial, Helvetica, sans-serif;
	font-weight: 600;
	font-size: 16px;
	text-transform: none;
	color: rgb(255,255,255);
	background: rgb(179,81,117);
}
html .woocommerce-mini-cart__buttons .checkout:hover {
	color: rgb(36,36,36);
	background: rgb(253,207,148);
}
html .woocommerce-mini-cart__buttons .btn-cart {
	font-family: "Montserrat", Arial, Helvetica, sans-serif;
	font-weight: 600;
	font-size: 16px;
	text-transform: none;
	background: rgb(247,245,237);
}
html .woocommerce-mini-cart__buttons .btn-cart:hover {
	background: rgb(247,245,237);
}
html .wd-empty-mini-cart .btn {
	font-weight: 600;
	font-size: 16px;
	background: rgb(179,81,117);
}
html .wd-empty-mini-cart .btn:hover {
	color: rgb(36,36,36);
	background: rgb(253,207,148);
}
.wd-popup.popup-quick-view {
	--wd-popup-width: 920px;
}
:root{
--wd-container-w: 1222px;
--wd-form-brd-radius: 0px;
--btn-default-color: #333;
--btn-default-color-hover: #333;
--btn-default-brd-radius: 0px;
--btn-default-box-shadow: none;
--btn-default-box-shadow-hover: none;
--btn-default-box-shadow-active: none;
--btn-default-bottom: 0px;
--btn-accented-brd-radius: 5px;
--btn-accented-box-shadow: none;
--btn-accented-box-shadow-hover: none;
--wd-brd-radius: 0px;
}

@media (min-width: 1239px) {
.platform-Windows .wd-section-stretch > .elementor-container {
margin-left: auto;
margin-right: auto;
}
}

@media (min-width: 1222px) {
html:not(.platform-Windows) .wd-section-stretch > .elementor-container {
margin-left: auto;
margin-right: auto;
}
}


.elementor-widget-wd_checkout_billing_details_form {
	position: relative!important;
	z-index: 99!important;
}
.zen-ui-select__value {
background: #f7f5ed !important;
}
add_action( 'wp_footer', 'force_postcode_required_js' );
function force_postcode_required_js() {
    // Только на странице оформления заказа
    if ( ! is_checkout() ) return;
    ?>
    <script>
    document.addEventListener('DOMContentLoaded', function () {
        document.querySelector('form.checkout').addEventListener('submit', function (e) {
            var postcode = document.querySelector('#billing_postcode');
            if (postcode && postcode.value.trim() === '') {
                e.preventDefault();
                postcode.style.border = '2px solid red';
                alert('Будь ласка, введіть поштовий індекс');
                postcode.focus();
            }
        });
    });
    </script>
    <?php
}
add_filter( 'woocommerce_default_address_fields', 'force_postcode_required_real_final' );
function force_postcode_required_real_final( $fields ) {
$fields['postcode']['required'] = true;
return $fields;
}
add_filter( 'woocommerce_form_field', 'remove_optional_label_globally', 10, 4 );
function remove_optional_label_globally( $field, $key, $args, $value ) {
    $field = str_replace(' (optional)', '', $field);           // English
    $field = str_replace(' (необов’язково)', '', $field);      // Ukrainian
    $field = str_replace(' (необов\'язково)', '', $field);     // Fallback
    return $field;
}
add_action( 'wp_footer', 'force_postcode_required_js' );
function force_postcode_required_js() {
    if ( ! is_checkout() ) return;
    ?>
    <script>
    document.addEventListener('DOMContentLoaded', function () {
        function updatePostcodeRequirement(country) {
            const excluded = ['UA', 'RU', 'BY', 'IR'];
            const postcodeInput = document.querySelector('#billing_postcode');

            if (!postcodeInput) return;

            if (!excluded.includes(country)) {
                postcodeInput.required = true;
                postcodeInput.closest('.form-row').classList.add('validate-required');
                const label = postcodeInput.closest('.form-row').querySelector('label');
                if (label && !label.innerHTML.includes('*')) {
                    label.innerHTML += ' <abbr class="required">*</abbr>';
                }
            } else {
                postcodeInput.required = false;
                postcodeInput.closest('.form-row').classList.remove('validate-required');
                const label = postcodeInput.closest('.form-row').querySelector('label');
                if (label) {
                    label.innerHTML = label.innerHTML.replace(/<abbr class="required">\*<\/abbr>/g, '');
                }
            }
        }

        // начальное значение
        const initialCountry = document.querySelector('#billing_country')?.value;
        if (initialCountry) updatePostcodeRequirement(initialCountry);

        // отслеживаем смену страны
        document.querySelector('#billing_country')?.addEventListener('change', function(e) {
            updatePostcodeRequirement(e.target.value);
        });
    });
    </script>
    <?php
}