.discount-form{background-color:#fbeee9;padding:20px;border-radius:10px;text-align:center}.discount-form h3{font-size:16px;font-weight:700;margin-bottom:5px}.discount-form h2{font-size:24px;font-weight:700;margin-bottom:10px;color:#e85a4f}.discount-form p{font-size:14px;margin-bottom:20px}.discount-form label{display:block;margin-bottom:5px;font-size:14px;text-align:left}.discount-form .form-control{width:100%;padding:10px;margin-bottom:15px;border-radius:5px;border:1px solid #ccc;box-sizing:border-box}.form-row{display:flex;justify-content:space-between}.form-column{width:48%}.submit-btn{background-color:#b33f3f;color:#fff;padding:10px 20px;border:none;border-radius:5px;cursor:pointer;font-size:16px}.submit-btn:hover{background-color:#a12e2e}function removedefault(){remove_action('flatsome_category_title_alt','woocommerce_result_count',20);remove_action('flatsome_category_title_alt','woocommerce_catalog_ordering',30)}add_action('init','removedefault');function filter_new_giuseart(){if(!is_product()):;?><?php if(!wp_is_mobile()){;?><div class="sort_giuseart"><div class="titlesort">Sắp xếp theo:</div><form id="pricedesc"><div class="range-check"><input class="pt-checkbox" type="checkbox" value="price-desc" id="price-desc" name="orderby" onChange="this.form.submit()" /><label for="price-desc">Giá giảm dần</label></div></form><form id="pricesmall"><div class="range-check"><input class="pt-checkbox" type="checkbox" value="price" id="price" name="orderby" onChange="this.form.submit()" /><label for="price">Giá tăng dần</label></div></form><form id="datecheck"><div class="range-check"><input class="pt-checkbox" type="checkbox" value="date" id="date" name="orderby" onChange="this.form.submit()" /><label for="date">Mới nhất</label></div></form><form id="oldproduct"><div class="range-check"><input class="pt-checkbox" type="checkbox" value="old-product" id="old-product" name="orderby" onChange="this.form.submit()" /><label for="old-product">Cũ nhất</label></div></form></div><?php}else{echo '<div class="sapxep">Sắp xếp: ';woocommerce_catalog_ordering()};endif};add_action('woocommerce_before_main_content','filter_new_giuseart');function add_js(){;?><script type="text/javascript">jQuery(document).ready(function(){if (window.location.href.indexOf("price-desc")>-1){jQuery('#pricedesc input[type="checkbox"]').prop('checked',true)}else if (window.location.href.indexOf("price")>-1){jQuery('#pricesmall input[type="checkbox"]').prop('checked',true)}else if (window.location.href.indexOf("date")>-1){jQuery('#datecheck input[type="checkbox"]').prop('checked',true)}else if (window.location.href.indexOf("old-product")>-1){jQuery('#oldproduct input[type="checkbox"]').prop('checked',true)}});jQuery("a.deselect").each(function(){this.search=""});</script><?php};add_action('wp_footer','add_js');