/* Yazdfoam multilingual direction overrides – 2026-10-20
   Loaded AFTER the original CSS. Do not mirror Bootstrap columns, offsets,
   pagination, or vendor widgets: the original Bootstrap is already LTR capable.
   The custom store theme is RTL-first, so only its RTL-specific rules are fixed.
*/
:root { text-size-adjust: 100%; }
html[lang="fa"],html[lang="ar"] {direction:rtl;}
html[lang="en"] {direction:ltr;}
html[lang="en"] body {direction:ltr; text-align:left; font-family:system-ui,-apple-system,"Segoe UI",Arial,sans-serif;}
html[lang="ar"] body {direction:rtl; font-family:Tahoma,Arial,sans-serif;}
html[lang="en"] .product-outer,html[lang="en"] .mobile-page-inner,
html[lang="en"] .product-detail,html[lang="en"] .dropdown-menu,
html[lang="en"] .user-dropdown,html[lang="en"] .filters-wrapper,
html[lang="en"] .search-autocomplete,html[lang="en"] #search-autocomplete,
html[lang="en"] #categories-menu,html[lang="en"] .modal-content,
html[lang="en"] .toast-message,html[lang="en"] .select2-container,
html[lang="en"] .select2-dropdown {direction:ltr; text-align:left;}
/* Never override .text-center or children of centered buttons. */
html[lang="en"] .text-right, html[lang="en"] .text-left {text-align:left!important;}
html[lang="en"] input:not([dir]),html[lang="en"] textarea:not([dir]),
html[lang="en"] select:not([dir]),html[lang="en"] .form-control:not([dir]),
html[lang="en"] input::placeholder,html[lang="en"] textarea::placeholder
{direction:ltr;text-align:left;}
html[lang="en"] [dir="rtl"] input:not([dir]),html[lang="en"] [dir="rtl"] textarea:not([dir]) {direction:rtl;text-align:right;}
/* Telephone, tracking IDs and codes read left-to-right in every language. */
html[lang="fa"] input[type="tel"],html[lang="ar"] input[type="tel"],
html[lang="fa"] input[name="phone"],html[lang="ar"] input[name="phone"],
input[type="email"],input[name="postal_code"],input[name="tracking_code"] {direction:ltr;text-align:left;}
/* Physical spacing used by RTL-only storefront classes (not Bootstrap utilities). */
html[lang="en"] header #header-menu #right-menu>li {margin-left:0;margin-right:25px;}
html[lang="en"] header #header-menu #right-menu>li i {margin-right:0;margin-left:10px;}
html[lang="en"] header #header-menu #left-menu>li {margin-right:0;margin-left:25px;}
html[lang="en"] header #header-menu #left-menu>li i {margin-left:0;margin-right:10px;}
html[lang="en"] .product-outer .product__footer {margin-right:0;margin-left:-25px;}
html[lang="en"] .product-outer .product__actions div a:last-child {margin-right:0;margin-left:10px;}
html[lang="en"] .basket-product__body,html[lang="en"] .buy-request__product__body {padding-right:0;padding-left:15px;}
html[lang="en"] .order-product__body {padding-right:0;padding-left:50px;}
html[lang="en"] .ticket-product__body {padding-right:0;padding-left:1.5rem;}
html[lang="en"] .basket-product .remove {right:auto;left:.5rem;}
html[lang="en"] .compare-product .remove {right:auto;left:15px;}
html[lang="en"] .compare-product .product__footer a i {margin-left:0;margin-right:15px;}
html[lang="en"] .user-dropdown {right:auto;left:0;}
html[lang="en"] .search-filter input {padding-left:15px;padding-right:35px;}
html[lang="en"] .search-filter button {left:auto;right:15px;}
html[lang="en"] header #search-input-wrapper form i {left:auto;right:15px;}
html[lang="en"] #product-card #product-images {border-left:0;border-right:1px solid var(--border-color);}
html[lang="en"] #product-card #product-images #product-actions div i {margin-left:0;margin-right:20px;}
html[lang="en"] section.compare-info .card .col-lg-3 {border-left:0;border-right:1px solid var(--border-color);}
html[lang="en"] section.compare-info .card .col-lg-3:last-child {border-right:0;}
html[lang="en"] .pagination-wrapper ul li a {margin-left:0;margin-right:10px;}
html[lang="en"] .cart-counter {margin-right:0;margin-left:6px;}
/* Select2 renders its dropdown detached from the field; JS also sets dir for each instance. */
html[lang="en"] .select2-container .select2-selection--single .select2-selection__rendered
{direction:ltr;float:none;text-align:left;padding-left:8px;padding-right:20px;}
html[lang="en"] .select2-container--default .select2-selection--single .select2-selection__arrow
{left:auto;right:1px;}
/* Preserve the original Slick CSS float/direction rules.
   Slider direction is set using its JS rtl option, never forced on track/list. */
/* Header and contact popup overlays */
html[lang="en"] .yf-lang-switch,html[lang="en"] .yf-auth-locales,html[lang="en"] .yf-mobile-lang {direction:ltr;}
.yf-lang-switch a[aria-current="page"],.yf-auth-locales a[aria-current="page"] {font-weight:700;text-decoration:underline;}
html[lang="en"] #site-logo {margin-left:0!important;margin-right:1rem!important;}
html[lang="en"] .contact-map-popup {direction:ltr;text-align:left;}
html[lang="en"] #search {left:auto!important;right:15px!important;}
/* Avoid flipping arbitrary visual icons; only navigation chevrons may need mirroring. */
html[lang="en"] .mobile-has-submenu .fa-chevron-left {transform:rotate(180deg);}
@media(max-width:1024px){
 html[lang="en"] #open-filters {left:auto!important;right:2rem!important;}
 html[lang="en"] #close-filters {left:auto!important;right:1rem!important;}
 html[lang="en"] .category-page aside {left:0;right:auto;}
 html[lang="en"] .mobile-page-inner {text-align:left;}
}

/* HOME CATEGORY CARD SIZING – isolated from Bootstrap and Slick */
.yf-home-main .products-section .yf-static-products {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible;
}
.yf-home-main .products-section .yf-static-products > .product-outer {
    box-sizing: border-box;
    flex: 0 0 250px;
    width: 250px;
    max-width: 100%;
    padding: 15px 0;
}
/* Keep normal Slick-calculated widths; do not set widths on .slick-slide. */
.yf-home-main .yf-static-section { min-height: 0; }
.yf-home-main .yf-static-products .product { width: 90%; margin: 0 auto; }
/* Headings are server-rendered: never hide them behind entrance animations. */
.yf-home-main .card-header .title-dot { opacity: 1 !important; visibility: visible !important; }
html[lang="en"] .yf-home-main .card-header .title-dot { text-align: left; direction: ltr; }
html[lang="en"] .yf-home-main .card-header .title-dot::before { left: 0; right: auto; }
@media (max-width: 600px) {
    .yf-home-main .products-section .yf-static-products { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; }
    .yf-home-main .products-section .yf-static-products > .product-outer { flex: 0 0 250px; }
}
