/*
 * DigiShop Pro — rtl.css
 * ينشّط تلقائياً عند تفعيل اللغة العربية أو أي لغة RTL
 */

/* الاتجاه الأساسي */
html[dir="rtl"], body.is-rtl {
  direction: rtl;
  text-align: right;
  font-family: 'Cairo', 'Tajawal', 'Noto Sans Arabic', sans-serif;
}

/* Header */
html[dir="rtl"] .ds-header__inner      { flex-direction: row-reverse; }
html[dir="rtl"] .ds-header__actions    { margin-left: 0; margin-right: auto; flex-direction: row-reverse; }
html[dir="rtl"] .ds-logo               { flex-direction: row-reverse; }
html[dir="rtl"] .ds-search__wrap       { flex-direction: row-reverse; }
html[dir="rtl"] .ds-search__wrap input { text-align: right; }

/* Language Dropdown */
html[dir="rtl"] .ds-lang__drop         { right: auto; left: 0; }
html[dir="rtl"] .ds-lang__btn          { flex-direction: row-reverse; }
html[dir="rtl"] .ds-lang__check        { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .ds-lang__item         { flex-direction: row-reverse; }

/* Notification Bar */
html[dir="rtl"] .ds-notif__close       { right: auto; left: 1rem; }

/* Hero */
html[dir="rtl"] .ds-hero__inner        { flex-direction: row-reverse; }

/* Sidebar */
html[dir="rtl"] .ds-sidebar__item      { flex-direction: row-reverse; }
html[dir="rtl"] .ds-sidebar__item::before {
  left: auto; right: 0;
  border-radius: 2px 0 0 2px;
}
html[dir="rtl"] .ds-sidebar__icon      { margin-right: 0; margin-left: .65rem; }

/* Slider */
html[dir="rtl"] .ds-slide__body        { text-align: right; }
html[dir="rtl"] .ds-slide__overlay {
  background: linear-gradient(225deg, rgba(26,32,44,.85) 0%, rgba(26,32,44,.3) 100%);
}
html[dir="rtl"] .ds-slide__price--old  { margin-right: 0; margin-left: .5rem; }
html[dir="rtl"] .ds-slider__nav--prev  { left: auto; right: 1rem; }
html[dir="rtl"] .ds-slider__nav--next  { right: auto; left: 1rem; }

/* Flash Sale */
html[dir="rtl"] .ds-flash__head        { flex-direction: row-reverse; }
html[dir="rtl"] .ds-countdown          { flex-direction: row-reverse; margin-left: 0; margin-right: auto; }

/* Section Head */
html[dir="rtl"] .ds-section-head       { flex-direction: row-reverse; }

/* Cards */
html[dir="rtl"] .ds-card__badges       { left: auto; right: .75rem; }
html[dir="rtl"] .ds-card__wish         { right: auto; left: .75rem; }
html[dir="rtl"] .ds-card__price-row    { flex-direction: row-reverse; }
html[dir="rtl"] .ds-card__rating       { flex-direction: row-reverse; }
html[dir="rtl"] .ds-card__dl           { flex-direction: row-reverse; }
html[dir="rtl"] .ds-card__overlay-actions { flex-direction: row-reverse; }
html[dir="rtl"] .ds-icon-btn__badge    { right: auto; left: -5px; }

/* Footer */
html[dir="rtl"] .ds-footer__grid       { direction: rtl; }
html[dir="rtl"] .ds-footer__bottom     { flex-direction: row-reverse; }
html[dir="rtl"] .ds-footer__social     { flex-direction: row-reverse; }
html[dir="rtl"] .ds-footer__pay        { flex-direction: row-reverse; }
html[dir="rtl"] .ds-footer__col ul li a:hover { padding-left: 0; padding-right: .35rem; }

/* Back to Top */
html[dir="rtl"] #dsBackTop             { right: auto; left: 1.75rem; }

/* Banners */
html[dir="rtl"] .ds-banner {
  background-position: right center;
}

/* Forms */
html[dir="rtl"] input[type="text"],
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="search"],
html[dir="rtl"] textarea {
  text-align: right; direction: rtl;
}
html[dir="rtl"] input::placeholder { text-align: right; }

/* Newsletter */
html[dir="rtl"] .ds-newsletter__form { flex-direction: row-reverse; }

/* Numbers — always LTR */
html[dir="rtl"] .ds-card__price,
html[dir="rtl"] .ds-countdown__num,
html[dir="rtl"] .ds-slide__price {
  direction: ltr;
  unicode-bidi: embed;
  display: inline-block;
}

/* WooCommerce */
html[dir="rtl"] .woocommerce .products { direction: rtl; }
html[dir="rtl"] .woocommerce ul.products li.product .price { text-align: right; }
html[dir="rtl"] .woocommerce-cart table.cart th,
html[dir="rtl"] .woocommerce-cart table.cart td { text-align: right; }

/* Typography */
html[dir="rtl"] body { letter-spacing: 0; line-height: 1.9; }
html[dir="rtl"] h1, html[dir="rtl"] h2,
html[dir="rtl"] h3, html[dir="rtl"] h4 { font-weight: 800; line-height: 1.5; }

@media (max-width: 768px) {
  html[dir="rtl"] .ds-hero__inner    { flex-direction: column; }
  html[dir="rtl"] .ds-newsletter__form { flex-direction: column; }
}
