/* =========================================================
   NUTRITIX - RTL / PERSIAN
   فونت فارسی و اصلاحات عمومی راست‌چین
   ========================================================= */

/* ---------------------------------------------------------
   فونت وزیرمتن (فقط روی متن؛ آیکن‌فونت‌ها دست نمی‌خورند)
   --------------------------------------------------------- */

body,
h1, h2, h3, h4, h5, h6,
p, li, dt, dd, blockquote, label, td, th, caption,
input, textarea, select, button, option,
a:not([class*="icon"]):not([class*="fa-"]),
.elementor-heading-title,
.elementor-button-text,
.elementor-widget-text-editor,
.elementor-icon-list-text,
.woocommerce,
.woocommerce-Price-amount,
.product_title,
.menu-item > a,
.wc-block-components-text-input input,
.wc-block-components-title,
.wc-block-components-radio-control__label,
.wc-block-components-button__text {
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
}

/* فاصله بین حروف، اتصال حروف فارسی را خراب می‌کند */
body :is(h1, h2, h3, h4, h5, h6, p, a, li, span, button, label, .elementor-heading-title) {
    letter-spacing: 0 !important;
}

/* ---------------------------------------------------------
   جهت کلی صفحه
   --------------------------------------------------------- */

html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

/* فیلدهایی که محتوای لاتین دارند (ایمیل، تلفن، آدرس سایت) */
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] input[type="url"],
html[dir="rtl"] input[type="number"],
html[dir="rtl"] input[name*="postcode"],
html[dir="rtl"] input[name*="email"] {
    direction: ltr;
    text-align: right;
}

html[dir="rtl"] input[type="email"]::placeholder,
html[dir="rtl"] input[type="tel"]::placeholder,
html[dir="rtl"] input[type="url"]::placeholder {
    direction: rtl;
}

/* ---------------------------------------------------------
   ووکامرس
   --------------------------------------------------------- */

html[dir="rtl"] .woocommerce .price del,
html[dir="rtl"] .woocommerce-page .price del {
    margin-right: 0;
    margin-left: 6px;
}

/* ستاره‌های امتیاز باید از چپ پر شوند تا درصد درست نمایش داده شود */
html[dir="rtl"] .star-rating {
    direction: ltr;
}

html[dir="rtl"] .woocommerce table.shop_table th,
html[dir="rtl"] .woocommerce table.shop_table td {
    text-align: right;
}

html[dir="rtl"] .woocommerce-message::before,
html[dir="rtl"] .woocommerce-info::before,
html[dir="rtl"] .woocommerce-error::before {
    left: auto;
    right: 1.5em;
}

html[dir="rtl"] .woocommerce-message,
html[dir="rtl"] .woocommerce-info,
html[dir="rtl"] .woocommerce-error {
    padding-left: 2em;
    padding-right: 3.5em;
}
