/*
 * RTL corrections for the original Shopify (Dawn-derived) theme chrome.
 *
 * The vendor CSS (header.css, component-mega-menu.css, component-menu-drawer.css,
 * component-search.css, component-list-menu.css) was written LTR-only, with
 * physical left/right values instead of logical start/end ones. Rather than
 * editing those large, unfamiliar files in place, every fix lives here, scoped
 * under [dir="rtl"] so it only ever applies when the Arabic locale is active
 * and never touches the LTR layout. Loaded after the component stylesheets so
 * these selectors win on specificity.
 *
 * NOTE: base.css and section-footer.css were not audited in this pass (over
 * 5,000 lines combined) — a follow-up pass would be needed for full coverage.
 */

/* ---------- header.css ---------- */
html[dir="rtl"] .fabric-finder-button:after {
  left: auto;
  right: 1px;
}
html[dir="rtl"] .header_custom_button {
  margin-right: 0;
  margin-left: 2.6rem;
}
html[dir="rtl"] .header_custom_menu_button {
  padding-right: 15.08px;
  padding-left: 8px;
}
html[dir="rtl"] .header_custom_button_logo {
  margin-right: 0;
  margin-left: 7px;
}
html[dir="rtl"] .block__mega-menu--arar-inner .mega-menu__list {
  padding-right: 0;
  padding-left: 10px;
}
html[dir="rtl"] .block__right-submenu-iiner-project-li {
  padding: 6px 10px 6px 0;
}
html[dir="rtl"] .block__area-left--menus-grid-inner ul li {
  padding-left: 0;
  padding-right: 10px;
}
html[dir="rtl"] .block__sub-menu-by-conten--project-ul .block_sub-menu-by-conten-item {
  padding-right: 0;
  padding-left: 20px;
  border-right: 0;
  border-left: 1px solid #0000001a;
}
html[dir="rtl"] .block_sub-menu-by-conten-item a {
  padding-left: 0;
  padding-right: 10px;
}
html[dir="rtl"] .block__area-left--menus-grid-inner-discover {
  padding-right: 0;
  padding-left: 40px;
  border-right: 0;
  border-left: 1px solid #0000001a;
}
html[dir="rtl"] .block__area-left--menus-grid-discover .block__right-submenu--project li {
  padding-left: 0;
  padding-right: 10px;
}
html[dir="rtl"] ul.block__fabric-type--conten-iiner-project-li {
  left: auto;
  right: 100%;
}
@media screen and (max-width: 1199px) {
  html[dir="rtl"] .mobile--site-header__element--bottom .search-modal__form .field__button.search__button {
    left: unset;
    right: var(--inputs-border-width);
  }
  html[dir="rtl"] .header__icons {
    padding-right: unset;
    padding-left: 0;
  }
  html[dir="rtl"] .header__icon--cart {
    margin-right: unset !important;
    margin-left: 0 !important;
  }
}

/* ---------- component-mega-menu.css ---------- */
html[dir="rtl"] .header--top-center .mega-menu__list > li {
  padding-right: 0;
  padding-left: 2.4rem;
}

/* ---------- component-search.css (icon sits at the "start" of the field) ---------- */
html[dir="rtl"] .search__button {
  left: auto;
  right: var(--inputs-border-width);
}
html[dir="rtl"] .search__input.field__input {
  padding-left: 4.1rem;
  padding-right: 43px;
}
html[dir="rtl"] .template-search__header .search__input.field__input {
  padding: 0 43px;
}
html[dir="rtl"] .search-modal__form .field__label,
html[dir="rtl"] .search-modal__form .field__input:focus ~ .field__label,
html[dir="rtl"] .search-modal__form .field__input:not(:placeholder-shown) ~ .field__label,
html[dir="rtl"] .search-modal__form .field__input:-webkit-autofill ~ .field__label {
  left: auto;
  right: 43px;
}
html[dir="rtl"] .search-modal__form .reset__button,
html[dir="rtl"] .template-search__header .reset__button {
  right: auto;
  left: 0;
}
html[dir="rtl"] .template-search__header .reset__button:not(:focus):after {
  right: unset;
  left: 0;
}

/* ---------- component-list-menu.css ---------- */
html[dir="rtl"] .list-menu--right {
  right: auto;
  left: 0;
}

/* ---------- component-menu-drawer.css (mobile hamburger menu) ---------- */
html[dir="rtl"] .menu-drawer {
  left: auto;
  right: -8px;
  transform: translateX(100%);
}
html[dir="rtl"] .js details[open].menu-opening > .menu-drawer,
html[dir="rtl"] .js details[open].menu-opening > .menu-drawer__submenu {
  transform: translateX(0);
}
@media (min-width: 768px) and (max-width: 1199px) {
  html[dir="rtl"] .menu-drawer {
    left: auto;
    right: 0;
  }
}
html[dir="rtl"] .block_backandclose-button {
  padding-left: 16px;
  padding-right: 20px;
}
html[dir="rtl"] .menu-drawer__menu-item > .svg-wrapper {
  right: auto;
  left: 3rem;
}
html[dir="rtl"] .js .menu-drawer__submenu {
  left: auto;
  right: 0;
  transform: translateX(-100%);
}
html[dir="rtl"] .menu-drawer__close-button {
  padding: 1.2rem 3rem 1.2rem 2.6rem;
  text-align: right;
}
html[dir="rtl"] .menu-drawer__close-button .svg-wrapper {
  margin-right: 0;
  margin-left: 1rem;
}
html[dir="rtl"] .menu-drawer__account account-icon > .svg-wrapper {
  margin-right: 0;
  margin-left: 1rem;
}
html[dir="rtl"] .menu-drawer__account shop-user-avatar {
  margin-right: -0.45rem;
  margin-left: 0.55rem;
}
html[dir="rtl"] .menu-drawer .list-social {
  margin-left: 0;
  margin-right: -1.25rem;
}
@media (max-width: 1199px) {
  html[dir="rtl"] .block_mobile-only-menu .list-menu__item.menu-drawer__menu-item-main > .svg-wrapper,
  html[dir="rtl"] .menu-drawer__menu.has-submenu .menu-drawer__menu-item > .svg-wrapper,
  html[dir="rtl"] .menu-drawer__inner-submenu .menu-drawer__menu-item > .svg-wrapper {
    right: auto;
    left: 0;
  }
  html[dir="rtl"] .block_mobile-only-menu .menu-drawer__close-button {
    padding: 1.2rem 2rem 1.2rem 2.6rem;
  }
  html[dir="rtl"] .block__image-text--menus-text {
    left: auto;
    right: 56%;
  }
  html[dir="rtl"] details.menu-closing > .menu-drawer,
  html[dir="rtl"] details.menu-closing > .menu-drawer__submenu {
    transform: translateX(100%);
  }
}
