/* 
Theme Name: Hello Child
Theme URI: https://elementor-site.ir/
Description: 
Author: Elementor Site
Author URI: https://elementor-site.ir/
Template: hello-elementor
Version: 1.0.1
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/
#چپ چین کردن شمارنده تخفیف
.takhfift .jet-countdown-timer {
    direction: ltr !important;
}

/* کد فعال کردن اسکرول اسلایدر */
#infinite-sccorol .swiper-wrapper{
  -webkit-transition-timing-function: linear !important;
  transition-timing-function: linear !important; 
}

.titleproduct .jet-listing-dynamic-field__content{
    overflow: hidden !important;
    width: auto;
    height: 44px !important;
	display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
}

/* دکمه واتزآپ با دیپ */
/* آیکون واتساپ */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    cursor: pointer;
}

.whatsapp-float img {
    width: 60px;
    height: 60px;
    transition: 0.3s;
}

/* مودال */
.whatsapp-modal {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 300px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    padding: 20px;
    z-index: 10000;
}

.whatsapp-modal textarea {
    width: 100%;
    height: 100px;
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: none;
}

.whatsapp-modal button {
    background: #25D366;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}
/* در ادامه کد بالا کد زیر در فایل footer قالب اصلی کپی شود */
/* <!-- افزودن آیکون واتزاپ برا چت در واتزآپ -->
<!-- آیکون واتساپ -->
<div class="whatsapp-float" onclick="openWhatsAppModal()">
    <img src="https://www.impack.ir/wp-content/uploads/2024/11/whatsapp.svg" alt="واتساپ">
</div>

<!-- مودال -->
<div class="whatsapp-modal" id="whatsappModal">
    <h3>ارسال پیام</h3>
    <textarea placeholder="پیام خود را وارد کنید..."></textarea>
    <button onclick="sendMessage()">ارسال</button>
</div>

<script>
// باز کردن مودال
function openWhatsAppModal() {
    document.getElementById("whatsappModal").style.display = "block";
}

// ارسال پیام به واتساپ
function sendMessage() {
    const message = document.querySelector(".whatsapp-modal textarea").value;
    const phone = "989002081030"; // شماره خود را جایگزین کنید (با 98 شروع شود)
    const url = `https://wa.me/${phone}?text=${encodeURIComponent(message)}`;
    
    window.open(url, "_blank");
    document.getElementById("whatsappModal").style.display = "none";
}

// بستن مودال با کلیک خارج از آن
window.onclick = function(event) {
    if (event.target.className === "whatsapp-modal") {
        event.target.style.display = "none";
    }
}
</script>
<!-- پایان کدهای آیکون واتزآپ --> */