/* MJT 2026 — RTL (Farsi / فارسی) */

/* ── Foundation ─────────────────────────────────────────────── */
html[dir="rtl"],
html[lang="fa"],
html[lang="fa-IR"],
.mjt-rtl {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"],
html[lang="fa"],
html[lang="fa-IR"] {
  --mjt-font-display: "Vazirmatn", "Tahoma", "Arial", sans-serif;
  --mjt-font-body: "Vazirmatn", "Tahoma", "Arial", sans-serif;
}

html[dir="rtl"] body,
.mjt-rtl {
  letter-spacing: 0;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6,
.mjt-rtl h1,
.mjt-rtl h2,
.mjt-rtl h3,
.mjt-rtl h4,
.mjt-rtl h5,
.mjt-rtl h6 {
  letter-spacing: 0;
}

html[dir="rtl"] .screen-reader-text:focus,
.mjt-rtl .screen-reader-text:focus {
  left: auto;
  right: 0;
}

html[dir="rtl"] .mjt-skip-link:focus,
.mjt-rtl .mjt-skip-link:focus {
  left: auto;
  right: 1rem;
}

html[dir="rtl"] .mjt-btn,
.mjt-rtl .mjt-btn {
  letter-spacing: 0.02em;
}

/* ── Topbar & header ──────────────────────────────────────── */
html[dir="rtl"] .mjt-topbar__left,
.mjt-rtl .mjt-topbar__left {
  justify-self: end;
}

html[dir="rtl"] .mjt-topbar__actions,
.mjt-rtl .mjt-topbar__actions {
  justify-self: start;
}

html[dir="rtl"] .mjt-topbar__message,
.mjt-rtl .mjt-topbar__message {
  text-align: center;
}

html[dir="rtl"] .mjt-brand-logo__img--light,
html[dir="rtl"] .mjt-brand-logo__img--dark,
.mjt-rtl .mjt-brand-logo__img--light,
.mjt-rtl .mjt-brand-logo__img--dark {
  left: auto;
  right: 0;
  object-position: right center;
}

html[dir="rtl"] .mjt-header-search__cat,
.mjt-rtl .mjt-header-search__cat {
  border-left: none;
  border-right: 1px solid var(--mjt-color-border);
}

html[dir="rtl"] .mjt-header-account--woodmart,
.mjt-rtl .mjt-header-account--woodmart {
  padding: 0.45rem 0.55rem 0.45rem 1rem;
}

html[dir="rtl"] .mjt-header-tool__badge,
.mjt-rtl .mjt-header-tool__badge {
  right: auto;
  left: -1px;
}

html[dir="rtl"] .mjt-cart-count,
.mjt-rtl .mjt-cart-count {
  right: auto;
  left: 4px;
}

html[dir="rtl"] .mjt-header-categories__inner,
.mjt-rtl .mjt-header-categories__inner {
  direction: rtl;
}

html[dir="rtl"] .mjt-nav-primary,
.mjt-rtl .mjt-nav-primary {
  direction: rtl;
}

html[dir="rtl"] .mjt-search-close,
.mjt-rtl .mjt-search-close {
  right: auto;
  left: 0;
}

html[dir="rtl"] .mjt-search-overlay__inner,
.mjt-rtl .mjt-search-overlay__inner {
  text-align: right;
}

/* Lang switcher (header.css has partial rules — reinforce) */
html[dir="rtl"] .mjt-lang__dropdown,
.mjt-rtl .mjt-lang__dropdown {
  left: auto;
  right: 0;
}

html[dir="rtl"] .mjt-lang__dropdown-caret,
.mjt-rtl .mjt-lang__dropdown-caret {
  left: auto;
  right: 18px;
}

html[dir="rtl"] .mjt-lang-menu__link,
.mjt-rtl .mjt-lang-menu__link {
  flex-direction: row-reverse;
}

html[dir="rtl"] .mjt-lang-menu__text,
.mjt-rtl .mjt-lang-menu__text {
  text-align: right;
}

html[dir="rtl"] .mjt-lang-menu__check,
.mjt-rtl .mjt-lang-menu__check {
  margin-right: auto;
  margin-left: 0;
}

html[dir="rtl"] .mjt-lang-menu__item.is-active .mjt-lang-menu__link::before,
.mjt-rtl .mjt-lang-menu__item.is-active .mjt-lang-menu__link::before {
  left: auto;
  right: 0;
}

/* Drawers & panels */
html[dir="rtl"] .mjt-mobile-menu,
.mjt-rtl .mjt-mobile-menu {
  left: auto;
  right: 0;
  transform: translateX(100%);
}

html[dir="rtl"] .mjt-mobile-menu.is-active,
.mjt-rtl .mjt-mobile-menu.is-active {
  transform: translateX(0);
}

html[dir="rtl"] .mjt-cart-drawer,
.mjt-rtl .mjt-cart-drawer {
  right: auto;
  left: 0;
  transform: translateX(-100%);
}

html[dir="rtl"] .mjt-cart-drawer.is-active,
.mjt-rtl .mjt-cart-drawer.is-active {
  transform: translateX(0);
}

html[dir="rtl"] .mjt-mini-cart__panel,
.mjt-rtl .mjt-mini-cart__panel {
  right: auto;
  left: 0;
  transform: translateX(-100%);
  border-left: none;
  border-right: 1px solid var(--mjt-color-border);
}

html[dir="rtl"] .mjt-mini-cart.is-open .mjt-mini-cart__panel,
.mjt-rtl .mjt-mini-cart.is-open .mjt-mini-cart__panel {
  transform: translateX(0);
}

html[dir="rtl"] .mjt-mini-cart__remove,
.mjt-rtl .mjt-mini-cart__remove {
  right: auto;
  left: 0;
}

html[dir="rtl"] .mjt-lang-float,
.mjt-rtl .mjt-lang-float {
  right: auto;
  left: 1.25rem;
}

html[dir="rtl"] .mjt-lang-float__dropdown,
.mjt-rtl .mjt-lang-float__dropdown {
  right: auto;
  left: 0;
  transform-origin: bottom left;
}

html[dir="rtl"] .mjt-lang-float__dropdown-caret,
.mjt-rtl .mjt-lang-float__dropdown-caret {
  right: auto;
  left: 20px;
}

/* ── Mega menu ────────────────────────────────────────────── */
html[dir="rtl"] .mjt-mega-menu__inner,
.mjt-rtl .mjt-mega-menu__inner {
  direction: rtl;
}

html[dir="rtl"] .mjt-mega-menu__sidebar,
.mjt-rtl .mjt-mega-menu__sidebar {
  border-right: none;
  border-left: 1px solid var(--mjt-color-border);
}

html[dir="rtl"] .mjt-mega-menu__parent,
.mjt-rtl .mjt-mega-menu__parent {
  text-align: right;
}

html[dir="rtl"] .mjt-mega-menu__parent.is-active,
.mjt-rtl .mjt-mega-menu__parent.is-active {
  box-shadow: inset -3px 0 0 var(--mjt-color-accent);
}

html[dir="rtl"] .mjt-mega-menu__parent:not(.is-active),
.mjt-rtl .mjt-mega-menu__parent:not(.is-active) {
  box-shadow: none;
}

html[dir="rtl"] .mjt-mega-menu__chevron,
.mjt-rtl .mjt-mega-menu__chevron {
  margin-left: 0;
  margin-right: auto;
  transform: scaleX(-1);
}

html[dir="rtl"] .mjt-mega-menu__panel-head,
.mjt-rtl .mjt-mega-menu__panel-head {
  text-align: right;
}

/* ── Home ─────────────────────────────────────────────────── */
html[dir="rtl"] .mjt-hero__content,
html[dir="rtl"] .mjt-hero-slide__copy,
.mjt-rtl .mjt-hero__content,
.mjt-rtl .mjt-hero-slide__copy {
  text-align: right;
}

@media (max-width: 899px) {
  html[dir="rtl"] .mjt-hero-slide__copy,
  .mjt-rtl .mjt-hero-slide__copy {
    text-align: center;
  }
}

html[dir="rtl"] .mjt-hero-slider__arrow--prev,
.mjt-rtl .mjt-hero-slider__arrow--prev {
  left: auto;
  right: clamp(0.75rem, 2vw, 1.5rem);
}

html[dir="rtl"] .mjt-hero-slider__arrow--next,
.mjt-rtl .mjt-hero-slider__arrow--next {
  right: auto;
  left: clamp(0.75rem, 2vw, 1.5rem);
}

html[dir="rtl"] .mjt-hero-slider__arrow svg,
.mjt-rtl .mjt-hero-slider__arrow svg {
  transform: scaleX(-1);
}

html[dir="rtl"] .mjt-cat-tile__cta,
.mjt-rtl .mjt-cat-tile__cta {
  margin-left: 0;
  margin-right: auto;
}

html[dir="rtl"] .mjt-why__list li,
.mjt-rtl .mjt-why__list li {
  padding-left: 0;
  padding-right: 1.5rem;
}

html[dir="rtl"] .mjt-why__list li::before,
.mjt-rtl .mjt-why__list li::before {
  left: auto;
  right: 0;
}

html[dir="rtl"] .mjt-home-brands__lead,
.mjt-rtl .mjt-home-brands__lead {
  justify-self: start;
  text-align: right;
}

@media (min-width: 768px) {
  html[dir="rtl"] .mjt-home-brands__lead,
  .mjt-rtl .mjt-home-brands__lead {
    justify-self: start;
    text-align: right;
  }
}

html[dir="rtl"] .mjt-home-brand-card__watermark,
.mjt-rtl .mjt-home-brand-card__watermark {
  left: auto;
  right: 0.35rem;
}

html[dir="rtl"] .mjt-section-header,
.mjt-rtl .mjt-section-header {
  text-align: right;
}

html[dir="rtl"] .mjt-testimonial-card__quote,
.mjt-rtl .mjt-testimonial-card__quote {
  text-align: right;
}

html[dir="rtl"] .mjt-footer-newsletter__form input,
.mjt-rtl .mjt-footer-newsletter__form input {
  text-align: right;
}

/* ── Products & shop ──────────────────────────────────────── */
html[dir="rtl"] .mjt-product-card__actions,
.mjt-rtl .mjt-product-card__actions {
  direction: rtl;
}

html[dir="rtl"] .mjt-shop-toolbar__left,
html[dir="rtl"] .mjt-shop-toolbar__right,
.mjt-rtl .mjt-shop-toolbar__left,
.mjt-rtl .mjt-shop-toolbar__right {
  flex-direction: row-reverse;
}

html[dir="rtl"] .mjt-shop-sidebar,
.mjt-rtl .mjt-shop-sidebar {
  left: auto;
  right: 0;
  transform: translateX(100%);
}

html[dir="rtl"] .mjt-shop-sidebar.is-open,
.mjt-rtl .mjt-shop-sidebar.is-open {
  transform: translateX(0);
}

html[dir="rtl"] .mjt-breadcrumbs,
.mjt-rtl .mjt-breadcrumbs {
  direction: rtl;
}

html[dir="rtl"] .mjt-search-toolbar__form,
.mjt-rtl .mjt-search-toolbar__form {
  direction: rtl;
}

html[dir="rtl"] .mjt-filter-group__title::after,
.mjt-rtl .mjt-filter-group__title::after {
  margin-left: 0;
  margin-right: auto;
}

/* ── Single product ───────────────────────────────────────── */
html[dir="rtl"] .mjt-single-product__layout,
.mjt-rtl .mjt-single-product__layout {
  direction: rtl;
}

html[dir="rtl"] .mjt-single-product__gallery-col.mjt-gallery--thumbs-left .woocommerce-product-gallery,
.mjt-rtl .mjt-single-product__gallery-col.mjt-gallery--thumbs-left .woocommerce-product-gallery {
  flex-direction: row-reverse;
}

html[dir="rtl"] .mjt-single-product__gallery-col .flex-viewport .mjt-single-product__gallery-badges,
.mjt-rtl .mjt-single-product__gallery-col .flex-viewport .mjt-single-product__gallery-badges {
  left: auto;
  right: 1rem;
}

html[dir="rtl"] .mjt-product-description__bullet-list li,
.mjt-rtl .mjt-product-description__bullet-list li {
  padding-left: 0;
  padding-right: 1.05rem;
}

html[dir="rtl"] .mjt-product-description__bullet-list li::before,
.mjt-rtl .mjt-product-description__bullet-list li::before {
  left: auto;
  right: 0;
}

html[dir="rtl"] .mjt-single-product__tabs .tabs,
.mjt-rtl .mjt-single-product__tabs .tabs {
  direction: rtl;
}

html[dir="rtl"] .mjt-qty-btn--minus,
.mjt-rtl .mjt-qty-btn--minus {
  border-radius: 0 var(--mjt-radius-sm) var(--mjt-radius-sm) 0;
}

html[dir="rtl"] .mjt-qty-btn--plus,
.mjt-rtl .mjt-qty-btn--plus {
  border-radius: var(--mjt-radius-sm) 0 0 var(--mjt-radius-sm);
}

/* ── Cart, checkout, account ──────────────────────────────── */
html[dir="rtl"] .mjt-cart-page__grid,
.mjt-rtl .mjt-cart-page__grid {
  direction: rtl;
}

html[dir="rtl"] .woocommerce table.shop_table th,
html[dir="rtl"] .woocommerce table.shop_table td,
.mjt-rtl .woocommerce table.shop_table th,
.mjt-rtl .woocommerce table.shop_table td {
  text-align: right;
}

html[dir="rtl"] .woocommerce-checkout .col2-set,
.mjt-rtl .woocommerce-checkout .col2-set {
  direction: rtl;
}

html[dir="rtl"] .mjt-trust-mini__list,
.mjt-rtl .mjt-trust-mini__list {
  direction: rtl;
}

html[dir="rtl"] .mjt-checkout-payment-trust,
.mjt-rtl .mjt-checkout-payment-trust {
  text-align: right;
}

html[dir="rtl"] .mjt-account,
.mjt-rtl .mjt-account {
  direction: rtl;
}

html[dir="rtl"] .mjt-account-nav__link,
.mjt-rtl .mjt-account-nav__link {
  text-align: right;
}

html[dir="rtl"] .mjt-points-toast-stack,
.mjt-rtl .mjt-points-toast-stack {
  right: auto;
  left: 1rem;
}

/* ── Interior pages ───────────────────────────────────────── */
html[dir="rtl"] .mjt-page-hero,
html[dir="rtl"] .mjt-page-lead,
.mjt-rtl .mjt-page-hero,
.mjt-rtl .mjt-page-lead {
  text-align: right;
}

html[dir="rtl"] .mjt-steps,
.mjt-rtl .mjt-steps {
  padding-left: 0;
  padding-right: 1.25rem;
}

html[dir="rtl"] .mjt-faq summary,
.mjt-rtl .mjt-faq summary {
  text-align: right;
}

html[dir="rtl"] .mjt-contact-premium__info-list li,
.mjt-rtl .mjt-contact-premium__info-list li {
  padding-left: 0;
  padding-right: 1.5rem;
}

html[dir="rtl"] .mjt-contact-premium__info-list li::before,
.mjt-rtl .mjt-contact-premium__info-list li::before {
  left: auto;
  right: 0;
}

html[dir="rtl"] .mjt-timeline,
.mjt-rtl .mjt-timeline {
  padding-left: 0;
  padding-right: 1.5rem;
  border-left: none;
  border-right: 2px solid var(--mjt-color-beige);
}

html[dir="rtl"] .mjt-timeline__item,
.mjt-rtl .mjt-timeline__item {
  padding: 0 1.75rem 2rem 0;
}

html[dir="rtl"] .mjt-timeline__dot,
.mjt-rtl .mjt-timeline__dot {
  left: auto;
  right: -1.85rem;
}

/* ── Footer ───────────────────────────────────────────────── */
html[dir="rtl"] .mjt-footer,
.mjt-rtl .mjt-footer {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .mjt-footer__widget-title,
.mjt-rtl .mjt-footer__widget-title {
  text-align: right;
}

html[dir="rtl"] .mjt-footer__links,
.mjt-rtl .mjt-footer__links {
  text-align: right;
}

/* ── Auth shell ───────────────────────────────────────────── */
html[dir="rtl"] .mjt-auth-header__inner,
.mjt-rtl .mjt-auth-header__inner {
  direction: rtl;
}

html[dir="rtl"] .mjt-auth-layout,
.mjt-rtl .mjt-auth-layout {
  direction: rtl;
}

html[dir="rtl"] .mjt-auth-form .scu-field__toggle,
.mjt-rtl .mjt-auth-form .scu-field__toggle {
  right: auto;
  left: 0.65rem;
}

html[dir="rtl"] .mjt-auth-form input[type="password"],
.mjt-rtl .mjt-auth-form input[type="password"] {
  padding-right: 0.85rem;
  padding-left: 3rem;
}

/* ── Compare & quick view ─────────────────────────────────── */
html[dir="rtl"] .mjt-compare-bar__text strong,
.mjt-rtl .mjt-compare-bar__text strong {
  margin-left: 0;
  margin-right: 0.35rem;
}

html[dir="rtl"] .mjt-compare-table th,
html[dir="rtl"] .mjt-compare-table td,
.mjt-rtl .mjt-compare-table th,
.mjt-rtl .mjt-compare-table td {
  text-align: right;
}

html[dir="rtl"] .mjt-quick-view__panel,
.mjt-rtl .mjt-quick-view__panel {
  direction: rtl;
  text-align: right;
}

/* ── Forms & inputs ───────────────────────────────────────── */
html[dir="rtl"] input:not([type="checkbox"]):not([type="radio"]),
html[dir="rtl"] textarea,
html[dir="rtl"] select,
.mjt-rtl input:not([type="checkbox"]):not([type="radio"]),
.mjt-rtl textarea,
.mjt-rtl select {
  text-align: right;
}

html[dir="rtl"] input[type="checkbox"],
html[dir="rtl"] input[type="radio"],
.mjt-rtl input[type="checkbox"],
.mjt-rtl input[type="radio"] {
  margin-left: 0.5rem;
  margin-right: 0;
}

html[dir="rtl"] label,
.mjt-rtl label {
  text-align: right;
}

/* ── Misc UI ──────────────────────────────────────────────── */
html[dir="rtl"] .mjt-back-to-top,
.mjt-rtl .mjt-back-to-top {
  right: auto;
  left: 1.25rem;
}

html[dir="rtl"] .mjt-toast-stack,
.mjt-rtl .mjt-toast-stack {
  right: auto;
  left: 1rem;
}

html[dir="rtl"] .mjt-404-actions,
.mjt-rtl .mjt-404-actions {
  direction: rtl;
}

/* WooCommerce notices */
html[dir="rtl"] .woocommerce-message,
html[dir="rtl"] .woocommerce-info,
html[dir="rtl"] .woocommerce-error,
.mjt-rtl .woocommerce-message,
.mjt-rtl .woocommerce-info,
.mjt-rtl .woocommerce-error {
  text-align: right;
}

html[dir="rtl"] .woocommerce-message::before,
html[dir="rtl"] .woocommerce-info::before,
html[dir="rtl"] .woocommerce-error::before,
html[dir="rtl"] ul.woocommerce-error::before,
.mjt-rtl .woocommerce-message::before,
.mjt-rtl .woocommerce-info::before,
.mjt-rtl .woocommerce-error::before,
.mjt-rtl ul.woocommerce-error::before {
  inset-inline-start: 1.1rem;
  inset-inline-end: auto;
}

html[dir="rtl"] .woocommerce-message,
html[dir="rtl"] .woocommerce-info,
html[dir="rtl"] .woocommerce-error,
html[dir="rtl"] ul.woocommerce-error,
.mjt-rtl .woocommerce-message,
.mjt-rtl .woocommerce-info,
.mjt-rtl .woocommerce-error,
.mjt-rtl ul.woocommerce-error {
  padding: 1.1rem calc(var(--mjt-notice-icon-size) + 2rem) 1.05rem 1.35rem !important;
}

/* Pagination */
html[dir="rtl"] .woocommerce-pagination ul,
.mjt-rtl .woocommerce-pagination ul {
  direction: rtl;
}
