/*
Theme Name: Emall Child
Theme URI: https://demo.theme-sky.com/emall/
Author: Theme Sky Team
Author URI: http://theme-sky.com/
Description: A Premium and Responsive WordPress theme, designed for E-Commerce websites
Template: emall
Version: 1.0.0
License: GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Tags: two-columns, left-sidebar, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready
Text Domain: emall-child
*/

\\     
.woocommerce .ask-question-button {
    display: none !important;
}



.shopping-cart-wrapper {
    display: none !important;
}

/*xem them thu gon */
.term-description {
    position: relative;
    transition: max-height 0.3s ease;
    overflow: visible;
}

.term-description.closed {
    max-height: 200px;
    overflow: hidden;
}

.term-description .more-less-buttons {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 40px 0 0;
    background: linear-gradient(to bottom, transparent 0%, white 80%);
}

.term-description .moreless-button {
    z-index: 1;
}

.entry-content h2,
.post-content h2,
h2,
h2[style] {
    font-size: 14px !important;
    line-height: 1.6em !important;
}

.wp-block-heading h2 {
    font-size: 14px !important;
}

.woocommerce-tabs h2,
.woocommerce-tabs h2[style] {
    font-size: 14px !important;
    line-height: 1.6em !important;
}

document.addEventListener('DOMContentLoaded', function() {
    // Select all H2 inside WooCommerce tabs and force style
    document.querySelectorAll('.woocommerce-tabs .woocommerce-Tabs-panel h2').forEach(function(el) {
        el.style.fontSize = '14px' !important;
        el.style.lineHeight = '1.6em' !important;
    });
});

document.addEventListener('DOMContentLoaded', function() {
    const observer = new MutationObserver(() => {
        document.querySelectorAll('.woocommerce-tabs .woocommerce-Tabs-panel h2').forEach(function(el) {
            el.style.fontSize = '14px' !important;
            el.style.lineHeight = '1.6em' !important;
        });
    });

    observer.observe(document.body, { childList: true, subtree: true });
});

add_action('wp_footer', function() {
    ?>
    <script>
    document.addEventListener('DOMContentLoaded', function() {
        // Apply styles immediately
        document.querySelectorAll('.woocommerce div.product .woocommerce-Tabs-panel h2').forEach(el => {
            el.style.fontSize = '14px' !important;
            el.style.lineHeight = '1.6em' !important;
        });

        // Handle tab switching or dynamic updates
        const observer = new MutationObserver(() => {
            document.querySelectorAll('.woocommerce div.product .woocommerce-Tabs-panel h2').forEach(el => {
                el.style.fontSize = '14px' !important;
                el.style.lineHeight = '1.6em' !important;
            });
        });

        observer.observe(document.body, { childList: true, subtree: true });
    });
    </script>
    <?php
});

<script>
document.addEventListener('DOMContentLoaded', function() {
    document.querySelectorAll('.woocommerce div.product .woocommerce-Tabs-panel h2').forEach(el => {
        el.style.fontSize = '14px'!important;
        el.style.lineHeight = '1.6em'!important;
    });

    const observer = new MutationObserver(() => {
        document.querySelectorAll('.woocommerce div.product .woocommerce-Tabs-panel h2').forEach(el => {
            el.style.fontSize = '14px' !important;
            el.style.lineHeight = '1.6em' !important;
        });
    });

    observer.observe(document.body, { childList: true, subtree: true });
});
</script>

.woocommerce div.product .woocommerce-tabs .panel {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 15.5px !important;
  line-height: 1.6 !important;
  color: #2b2b2b !important;
  padding-top: 10px !important;
  margin: 0 !important;
  letter-spacing: 0.2px !important;
}

/* Đoạn văn trong tab */
.woocommerce div.product .woocommerce-tabs .panel p {
  margin-bottom: 0px !important;
	text-align: justify !important;
	text-justify: inter-word !important;
  font-size: 15.5px !important;
  color: inherit;
}

body.woocommerce .woocommerce-tabs .woocommerce-Tabs-panel h2,
body.woocommerce .woocommerce-tabs .woocommerce-Tabs-panel h2[style],
body.woocommerce .woocommerce-tabs .woocommerce-Tabs-panel h2 span,
body.woocommerce .woocommerce-tabs .woocommerce-Tabs-panel h2 span[style]{
  font-size: 18px !important;
  font-weight: 600 !important;
  margin-top: 22px !important;
  margin-bottom: 0px !important;
  color: #111;
  line-height: 1.6em !important;
}

body.woocommerce .woocommerce-tabs .woocommerce-Tabs-panel h3,
body.woocommerce .woocommerce-tabs .woocommerce-Tabs-panel h4,
body.woocommerce .woocommerce-tabs .woocommerce-Tabs-panel h5{
  font-size: 14px !important;
  margin-top: 0px !important;
    margin-bottom: 0px !important;
  color: #111;
  line-height: 1.4 !important;
}

body.woocommerce .woocommerce-tabs .woocommerce-Tabs-panel ul {
  line-height: 1 !important;   /* chiều cao dòng vừa phải */
	list-style-type: disc !important;
  padding-left: 20px !important;
  margin-bottom: 0px !important;
}

body.woocommerce .woocommerce-tabs .woocommerce-Tabs-panel h2 span,
body.woocommerce .woocommerce-tabs .woocommerce-Tabs-panel span h2{
  font-size: 18px !important;
  font-weight: 600 !important;
  margin-top: 22px !important;
  margin-bottom: 0px !important;
  color: #111;
  line-height: 1.6em !important;
}	

form.woocommerce-ordering select.orderby {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

body.woocommerce .woocommerce-tabs .woocommerce-Tabs-panel h3 span,
body.woocommerce .woocommerce-tabs .woocommerce-Tabs-panel h4 span,
body.woocommerce .woocommerce-tabs .woocommerce-Tabs-panel h5 span,
body.woocommerce .woocommerce-tabs .woocommerce-Tabs-panel span h3,
body.woocommerce .woocommerce-tabs .woocommerce-Tabs-panel span h4,
body.woocommerce .woocommerce-tabs .woocommerce-Tabs-panel span h5 {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #111 !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  padding: 0 !important;
}