/* --- استایل دکمه‌های سفارش سریع --- */
.wog-whatsapp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    padding: 12px 20px;
    border-radius: 8px;
    line-height: 1.5;
    margin-top: 10px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none !important;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
    position: relative;
    overflow: visible;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* استایل آیکون واتساپ */
.wog-whatsapp-button .wog-whatsapp-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.wog-whatsapp-button .wog-button-text {
    display: inline-block;
}

/* استایل‌های مختلف بر اساس تنظیمات */
.wog-whatsapp-button.wog-btn--primary {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3) !important;
}

.wog-whatsapp-button.wog-btn--primary:hover {
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4) !important;
}

.wog-whatsapp-button.wog-btn--primary:active {
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3) !important;
}

.wog-whatsapp-button.wog-btn--outline {
    background-color: transparent !important;
    color: #25D366 !important;
    border: 2px solid #25D366 !important;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.15) !important;
}

.wog-whatsapp-button.wog-btn--outline:hover {
    background-color: rgba(37, 211, 102, 0.1) !important;
    border-color: #128C7E !important;
    color: #128C7E !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25) !important;
}

.wog-whatsapp-button.wog-btn--dark {
    background: linear-gradient(135deg, #2e3436 0%, #1b1f20 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.wog-whatsapp-button.wog-btn--dark:hover {
    background: linear-gradient(135deg, #1b1f20 0%, #0f1112 100%) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
}

.wog-whatsapp-button.wog-btn--light {
    background-color: #ffffff !important;
    color: #333 !important;
    border: 2px solid #e0e0e0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.wog-whatsapp-button.wog-btn--light:hover {
    background-color: #f8f9fa !important;
    border-color: #25D366 !important;
    color: #25D366 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* تمام عرض */
.wog-whatsapp-button.wog-btn--full {
    display: flex !important;
    width: 100% !important;
    justify-content: center;
}

/* استایل‌های مخصوص برای هر محل نمایش */

/* صفحه محصول (Single Product) */
.wog-whatsapp-button.wog-btn--location-single {
    margin-top: 15px;
    margin-bottom: 10px;
    padding: 14px 24px;
    font-size: 16px;
}

.single-product .wog-whatsapp-button.wog-btn--location-single {
    min-width: 200px;
}

/* آرشیو محصولات (Archive) */
.wog-whatsapp-button.wog-btn--location-archive {
    margin-top: 12px;
    padding: 10px 18px;
    font-size: 14px;
    width: 100%;
    display: flex;
}

.woocommerce ul.products li.product .wog-whatsapp-button.wog-btn--location-archive {
    margin-top: 10px;
    margin-bottom: 5px;
}

/* استایل برای جایگزینی دکمه خرید در آرشیو */
.wog-archive-add-to-cart-replacement {
    margin: 10px 0;
    clear: both;
}

.wog-archive-add-to-cart-replacement .wog-whatsapp-button {
    margin-top: 0;
    margin-bottom: 0;
    width: 100%;
    display: flex !important;
    justify-content: center;
}

/* مخفی کردن دکمه خرید در آرشیو برای محصولات با قیمت صفر */
.woocommerce ul.products li.product:has(.wog-archive-add-to-cart-replacement) a.button.add_to_cart_button,
.woocommerce ul.products li.product:has(.wog-archive-add-to-cart-replacement) .add_to_cart_button,
.woocommerce ul.products li.product:has(.wog-archive-add-to-cart-replacement) .button.add_to_cart_button,
.woocommerce ul.products li.product:has(.wog-archive-add-to-cart-replacement) a.add_to_cart_button {
    display: none !important;
}

/* برای المنتور در آرشیو */
.elementor-widget-woocommerce-products .elementor-widget-container:has(.wog-archive-add-to-cart-replacement) a.button.add_to_cart_button,
.elementor-widget-woocommerce-products .elementor-widget-container:has(.wog-archive-add-to-cart-replacement) .add_to_cart_button {
    display: none !important;
}

/* استایل برای المنتور در آرشیو */
.elementor-widget-woocommerce-products .wog-archive-add-to-cart-replacement {
    width: 100%;
    margin: 10px 0;
}

.elementor-widget-woocommerce-products .wog-archive-add-to-cart-replacement .wog-whatsapp-button {
    width: 100%;
    display: flex !important;
    justify-content: center;
}

/* سبد خرید (Cart) */
.wog-whatsapp-button.wog-btn--location-cart {
    margin-top: 15px;
    margin-bottom: 15px;
    padding: 14px 28px;
    font-size: 16px;
    width: 100%;
    display: flex;
}

.woocommerce-cart .wog-whatsapp-button.wog-btn--location-cart {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35) !important;
}

/* استایل برای جایگزینی دکمه خرید */
.wog-add-to-cart-replacement {
    margin: 20px 0;
    clear: both;
}

.wog-add-to-cart-replacement .wog-whatsapp-button {
    margin-top: 0;
    margin-bottom: 0;
}

/* استایل برای المنتور */
.elementor-widget-woocommerce-product-add-to-cart .wog-whatsapp-button,
.elementor-widget-woocommerce-product-add-to-cart .wog-add-to-cart-replacement {
    width: 100%;
    margin: 15px 0;
}

.elementor-widget-woocommerce-product-add-to-cart .wog-whatsapp-button {
    display: flex !important;
    justify-content: center;
    align-items: center;
}

/* مخفی کردن دکمه خرید برای محصولات با قیمت صفر */
.single-product .wog-btn--replacement {
    display: inline-block !important;
    width: auto;
    min-width: 200px;
}

/* استایل برای جایگزینی دقیق دکمه خرید */
.woocommerce div.product form.cart ~ .wog-add-to-cart-replacement,
.woocommerce div.product .wog-add-to-cart-replacement {
    display: block;
    margin-top: 20px;
}

/* سازگاری با المنتور - جایگزینی دکمه */
.elementor-widget-woocommerce-product-add-to-cart .elementor-widget-container:has(.wog-whatsapp-button) {
    padding: 0;
}

.elementor-widget-woocommerce-product-add-to-cart .wog-whatsapp-button.wog-btn--replacement {
    width: 100%;
    max-width: 100%;
    display: flex !important;
}
}

.woocommerce-cart .wog-whatsapp-button.wog-btn--location-cart:hover {
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%) !important;
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.45) !important;
}

/* استایل مخصوص برای دکمه در کنار دکمه تسویه حساب */
.woocommerce-cart .wc-proceed-to-checkout .wog-whatsapp-button.wog-btn--location-cart {
    margin-right: 10px;
    margin-left: 0;
}

/* انیمیشن پالس برای جلب توجه */
@keyframes wog-pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    }
}

.wog-whatsapp-button.wog-btn--location-cart {
    animation: wog-pulse 2s ease-in-out infinite;
}


/* استایل برای shortcode */
.wog-whatsapp-button.wog-btn--location-shortcode {
    margin-top: 10px;
    margin-bottom: 10px;
}

/* بهبود نمایش در موبایل */
@media (max-width: 768px) {
    .wog-whatsapp-button {
        padding: 12px 18px;
        font-size: 14px;
    }
    
    .wog-whatsapp-button .wog-whatsapp-icon {
        width: 18px;
        height: 18px;
    }
    
    .wog-whatsapp-button.wog-btn--location-single {
        width: 100%;
        display: flex;
    }
    
    .wog-whatsapp-button.wog-btn--location-archive {
        font-size: 13px;
        padding: 9px 16px;
    }
    
    /* بهبود قیمت کاتالوگ در موبایل */
    .wog-catalog-price {
        font-size: 14px !important;
        line-height: 1.3 !important;
        padding: 3px 0 !important;
    }
    
    .single-product .wog-catalog-price {
        font-size: 16px !important;
        margin: 8px 0 !important;
    }
    
    .elementor-element .wog-catalog-price,
    .elementor-element.elementor-element-811c64e .wog-catalog-price {
        font-size: 14px !important;
        max-width: 100% !important;
        word-break: break-word;
        overflow-wrap: break-word;
        line-height: 1.3 !important;
    }
}

/* --- طراحی جدید و کاربرپسند برای درگاه پرداخت --- */

/* کانتینر اصلی روش پرداخت */
body.woocommerce-checkout .wc_payment_method.payment_method_wog_whatsapp {
    background-color: #f8f9fa !important;
    border-radius: 8px !important;
    border: 1px solid #dee2e6 !important;
    padding: 1.2em !important;
    transition: all 0.2s ease-in-out !important;
    position: relative;
}

/* افکت زیبا در زمان هاور */
body.woocommerce-checkout .wc_payment_method.payment_method_wog_whatsapp:hover {
    border-color: #c8e6c9 !important;
    background-color: #fdfdfd !important;
}

/* استایل در حالت انتخاب شده */
body.woocommerce-checkout .wc_payment_method.payment_method_wog_whatsapp.wc_payment_method--checked {
    background-color: #e8f5e9 !important;
    border-color: #25D366 !important;
    box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.2) !important;
}

/* چینش آیکون و متن با فلکس‌باکس */
body.woocommerce-checkout .wc_payment_method.payment_method_wog_whatsapp label {
    display: flex !important;
    align-items: center !important;
    /* چینش برای زبان فارسی (راست به چپ) */
    flex-direction: row-reverse !important;
    justify-content: space-between !important;
    width: 100% !important;
    cursor: pointer !important;
    font-size: 16px !important;
    font-weight: bold !important;
    color: #333 !important;
}

/* استایل آیکون واتس‌اپ */
body.woocommerce-checkout .wc_payment_method.payment_method_wog_whatsapp label img {
    max-width: 32px !important;
    height: auto !important;
    margin: 0 !important;
}

/* استایل توضیحات زیر عنوان */
body.woocommerce-checkout .payment_method_wog_whatsapp .payment_box {
    background-color: transparent !important;
    padding: 10px 0 0 0 !important;
    margin: 10px 0 0 0 !important;
    border-top: 1px solid #e0e0e0;
}

/* مخفی کردن دکمه رادیویی پیش‌فرض */
body.woocommerce-checkout .wc_payment_method.payment_method_wog_whatsapp input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
}


/* --- استایل برای درگاه غیرفعال شده برای مهمان --- */
body.woocommerce-checkout .wc_payment_method.payment_method_wog_whatsapp.wog-disabled-for-guest {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    background-color: #ececec !important;
}

/* ساخت برچسب "فقط برای کاربران" */
body.woocommerce-checkout .wc_payment_method.payment_method_wog_whatsapp.wog-disabled-for-guest label::after {
    content: 'فقط برای کاربران' !important;
    display: inline-block !important;
    background-color: #d32f2f !important;
    color: #ffffff !important;
    padding: 2px 8px !important;
    font-size: 11px !important;
    font-weight: bold !important;
    border-radius: 4px !important;
    /* جابجایی برچسب به سمت چپ */
    order: -1;
    margin-left: 15px;
}

/* استایل برای قیمت حالت کاتالوگ */
.wog-catalog-price {
    display: inline-block;
    font-size: clamp(14px, 2.5vw, 18px);
    font-weight: 600;
    color: #25D366;
    padding: 5px 0;
    line-height: 1.4;
    text-align: right;
    direction: rtl;
}

.single-product .wog-catalog-price {
    font-size: clamp(16px, 3vw, 22px);
    margin: 10px 0;
    color: #128C7E;
    text-align: right;
    direction: rtl;
}

/* استایل برای آرشیو محصولات */
.woocommerce ul.products li.product .wog-catalog-price {
    font-size: clamp(13px, 2vw, 16px);
    margin: 5px 0;
    color: #25D366;
    text-align: right;
    direction: rtl;
}

/* استایل برای المنتور */
.elementor-widget-woocommerce-product-price .wog-catalog-price,
.elementor-element .wog-catalog-price {
    font-size: clamp(14px, 2.5vw, 18px) !important;
    font-weight: 600 !important;
    color: #25D366 !important;
    display: inline-block !important;
    text-align: right !important;
    direction: rtl !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    max-width: 100% !important;
}

/* استایل برای المنتور - جایگزینی متن رایگان */
.elementor-element[data-id*="price"] .wog-catalog-price,
.elementor-widget-woocommerce-product-price .wog-catalog-price,
.elementor-element.elementor-element-811c64e .wog-catalog-price {
    color: #128C7E !important;
    font-weight: 600 !important;
    font-size: clamp(14px, 2.5vw, 18px) !important;
    text-align: right !important;
    direction: rtl !important;
    display: inline-block !important;
    line-height: 1.4 !important;
}

/* مخفی کردن قیمت در المنتور اگر تنظیم شده باشد */
.elementor-widget-woocommerce-product-price.wog-hide-price {
    display: none !important;
}

/* بهبود استایل المنتور برای ریسپانسیو */
.elementor-element.elementor-element-811c64e,
.elementor-element[data-id*="price"] {
    text-align: right !important;
    direction: rtl !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.elementor-element.elementor-element-811c64e .wog-catalog-price,
.elementor-element[data-id*="price"] .wog-catalog-price {
    font-size: clamp(14px, 2.5vw, 18px) !important;
    line-height: 1.4 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    display: inline-block !important;
    max-width: 100% !important;
    text-align: right !important;
    direction: rtl !important;
}

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .wog-catalog-price {
        font-size: 14px !important;
        padding: 3px 0;
    }
    
    .single-product .wog-catalog-price {
        font-size: 16px !important;
        margin: 8px 0;
    }
    
    .elementor-widget-woocommerce-product-price .wog-catalog-price,
    .elementor-element .wog-catalog-price,
    .elementor-element.elementor-element-811c64e .wog-catalog-price {
        font-size: 14px !important;
        line-height: 1.3 !important;
    }
}

/* ریسپانسیو برای تبلت */
@media (min-width: 769px) and (max-width: 1024px) {
    .wog-catalog-price {
        font-size: 16px !important;
    }
    
    .single-product .wog-catalog-price {
        font-size: 18px !important;
    }
    
    .elementor-widget-woocommerce-product-price .wog-catalog-price,
    .elementor-element .wog-catalog-price {
        font-size: 16px !important;
    }
}

/* ریسپانسیو برای دسکتاپ */
@media (min-width: 1025px) {
    .wog-catalog-price {
        font-size: 18px !important;
    }
    
    .single-product .wog-catalog-price {
        font-size: 20px !important;
    }
    
    .elementor-widget-woocommerce-product-price .wog-catalog-price,
    .elementor-element .wog-catalog-price {
        font-size: 18px !important;
    }
}
