/*
 * Mr. Peps — RTL / Arabic stylesheet.
 * Loaded ONLY when is_rtl() is true (e.g. Arabic via Polylang), so it never
 * touches the English (LTR) site. Mirrors the custom UI right-to-left and
 * swaps in Arabic-capable webfonts.
 */

/* ---------- Arabic typography ----------
   The Latin fonts (Barlow/Playfair/IBM Plex Mono) carry no Arabic glyphs, so
   Arabic would fall back to an inconsistent system font. Amiri (elegant serif,
   pairs with Playfair) for headings; Tajawal (clean sans) for body/UI. */
[dir="rtl"] body,
.rtl body,
[dir="rtl"] input, [dir="rtl"] textarea, [dir="rtl"] button, [dir="rtl"] select {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
}
[dir="rtl"] .mp-serif,
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4,
[dir="rtl"] .mp-hero-copy h1, [dir="rtl"] .mp-catalog-head h2,
[dir="rtl"] .mp-page-hero h1, [dir="rtl"] .uagb-heading-text,
[dir="rtl"] .wp-block-heading, [dir="rtl"] .mp-cart-title,
[dir="rtl"] .mp-post-title, [dir="rtl"] .mp-agegate-h {
    font-family: 'Amiri', 'Tajawal', serif;
}

/* Arabic script joins its letters — letter-spacing breaks the joins, and
   uppercase is meaningless. Normalize both across the RTL site. */
[dir="rtl"] * { letter-spacing: normal !important; }
[dir="rtl"] .mp-eyebrow, [dir="rtl"] .mp-btn, [dir="rtl"] .mp-btn--dark, [dir="rtl"] .mp-btn--ghost,
[dir="rtl"] .mp-nav-menu a, [dir="rtl"] .mp-topbar, [dir="rtl"] .mp-post-cat, [dir="rtl"] .mp-post-meta,
[dir="rtl"] .mp-post-more, [dir="rtl"] .mp-ticker-item, [dir="rtl"] .mp-cookie-btn, [dir="rtl"] .mp-auth-tab,
[dir="rtl"] .mp-chat-send, [dir="rtl"] .mp-auth-submit, [dir="rtl"] .mp-agegate-accept, [dir="rtl"] .mp-agegate-eyebrow,
[dir="rtl"] .mp-cart-review, [dir="rtl"] .mp-lang-link, [dir="rtl"] .woocommerce a.button,
[dir="rtl"] .mp-page-content .wp-block-button__link, [dir="rtl"] .mp-page-content .uagb-button__link {
    text-transform: none;
}

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

/* ---------- Header ---------- */
[dir="rtl"] .mp-burger { margin-left: 0; margin-right: -6px; }
[dir="rtl"] .mp-lang { margin-right: 0; margin-left: 6px; }

/* ---------- Hero ---------- */
[dir="rtl"] .mp-hero-copy { padding-right: 0; padding-left: 40px; text-align: right; }
[dir="rtl"] .mp-hero-backdrop { right: auto; left: -10px; }
[dir="rtl"] .mp-hero-shelf { left: auto; right: 14%; }
@media (max-width: 1024px) { [dir="rtl"] .mp-hero-copy { padding-left: 0; } }

/* ---------- Ticker (scroll the other way) ---------- */
[dir="rtl"] .mp-ticker-track { animation-name: mpticker-rtl; }
@keyframes mpticker-rtl { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* ---------- Catalog / product cards / process ---------- */
[dir="rtl"] .mp-catalog-head { text-align: right; }
[dir="rtl"] .mp-rail-nav { }
[dir="rtl"] .mp-step { border-right: none; border-left: 1px solid rgba(251,248,243,.16); }
[dir="rtl"] .mp-step:last-child { border-left: none; }
@media (max-width: 768px) {
    [dir="rtl"] .mp-step { border-left: none; }
}

/* ---------- Shop / archive / PDP ---------- */
[dir="rtl"] .mp-shop-card, [dir="rtl"] .mp-woo-inner, [dir="rtl"] .woocommerce { text-align: right; }
[dir="rtl"] .mp-shop-badge { left: auto; right: 11px; }
[dir="rtl"] .mp-pdp-batch { left: auto; right: 20px; }
[dir="rtl"] .mp-rail-btn.is-next, [dir="rtl"] .mp-rail-btn.is-prev { transform: scaleX(-1); }

/* Catalog rail arrows / any right-pinned control */
[dir="rtl"] [style*="right: 0"], [dir="rtl"] .mp-rail-nav[style] { }

/* ---------- Blog / pages ---------- */
[dir="rtl"] .mp-post-body, [dir="rtl"] .mp-page-content, [dir="rtl"] .mp-page-hero { text-align: right; }
[dir="rtl"] .mp-page-content ul, [dir="rtl"] .mp-page-content ol { padding-left: 0; padding-right: 20px; }
[dir="rtl"] .mp-page-content blockquote { border-left: none; border-right: 3px solid var(--mp-accent); }

/* ---------- Cart & auth panels ---------- */
[dir="rtl"] .mp-cart-head, [dir="rtl"] .mp-cart-body, [dir="rtl"] .mp-auth-inner,
[dir="rtl"] .mp-auth-field span { text-align: right; }
[dir="rtl"] .mp-cart-body ul.cart_list li { padding-right: 0; padding-left: 32px; }
[dir="rtl"] .mp-auth-tab { margin-right: 0; margin-left: 28px; }

/* ---------- Account dropdown (flip to the other edge) ---------- */
[dir="rtl"] .mp-account-menu { right: auto; left: 0; text-align: right; }

/* ---------- Chat contact form ---------- */
[dir="rtl"] .mp-chat-body { text-align: right; }
[dir="rtl"] .mp-chat-bubble, [dir="rtl"] .mp-chat-success { border-radius: 14px 4px 14px 14px; }
[dir="rtl"] .mp-chat-dot { left: auto; right: 44px; }
[dir="rtl"] .mp-chat-send { align-self: flex-start; }

/* ---------- Cookie bar ---------- */
[dir="rtl"] .mp-cookie-inner { text-align: right; }
[dir="rtl"] .mp-cookie-policy { margin-left: 0; margin-right: 4px; }

/* ---------- Age gate ---------- */
[dir="rtl"] .mp-agegate-card { text-align: right; }

/* ---------- Footer ---------- */
[dir="rtl"] .mp-foot-grid, [dir="rtl"] .mp-foot-col, [dir="rtl"] .mp-foot-brand { text-align: right; }
[dir="rtl"] .mp-foot-bottom { text-align: right; }

/* ---------- COA ---------- */
[dir="rtl"] .mp-coa-assay-cell { border-right: none; border-left: 1px solid var(--mp-line); }
[dir="rtl"] .mp-coa-assay-cell:last-child { border-left: none; }

/* ---------- WooCommerce misc alignment ---------- */
[dir="rtl"] .woocommerce table.shop_table,
[dir="rtl"] .woocommerce .cart_totals,
[dir="rtl"] .woocommerce form .form-row { text-align: right; }
