/* Basic RTL overrides loaded only when $lang == 'ar' */
html.rtl, html.rtl body { direction: rtl; unicode-bidi: embed; }
html.rtl body { text-align: right; }

/* Flip common floats if utility classes exist */
html.rtl .fl { float: right !important; }
html.rtl .fr { float: left !important; }
html.rtl .text-left { text-align: right !important; }
html.rtl .text-right { text-align: left !important; }

/* Navigation lists */
html.rtl ul, html.rtl ol { padding-right: 20px; padding-left: 0; }

/* Input groups alignment */
/* Search/input group: move button到左，仅限搜索与购买数量，不全局影响 */
html.rtl .search-ipt .input-group,
html.rtl #searchIndex .input-group,
html.rtl form.seller_header_search .input-group { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-direction: row-reverse; flex-direction: row-reverse; }
html.rtl .search-ipt .input-group .input-group-btn,
html.rtl #searchIndex .input-group .input-group-btn,
html.rtl form.seller_header_search .input-group .input-group-btn { -ms-flex-order: 2; order: 2; }
html.rtl .search-ipt .input-group .form-control,
html.rtl #searchIndex .input-group .form-control,
html.rtl form.seller_header_search .input-group .form-control { -ms-flex-order: 1; order: 1; }
html.rtl .search-ipt .input-group .btn-u { margin-right: 10px; margin-left: 0; }

/* 数量选择器仅反转按钮顺序 */
html.rtl .buynum_select { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-direction: row-reverse; flex-direction: row-reverse; }
html.rtl .buynum_select .input-group-btn:first-child { -ms-flex-order: 2; order: 2; }
html.rtl .buynum_select .form-control { -ms-flex-order: 1; order: 1; text-align: center; }

/* Arrow icons if used */
html.rtl .ico-arrow { transform: scaleX(-1); display: inline-block; }

/* Bootstrap helpers (if present) */
html.rtl .pull-left { float: right !important; }
html.rtl .pull-right { float: left !important; }

/* VC/VCBlue index steps timeline dots line layout fix */
html.rtl .search-container .search-desc .line div { float: right !important; margin-right: 38px; margin-left: 0; }
html.rtl .search-container .search-desc .line div:last-child { float: left !important; margin-left: 38px; margin-right: 0; }
html.rtl .search-container .search-desc .item-desc { text-align: right; }
html.rtl .search-container .search-desc { direction: rtl; }
html.rtl .search-container .search-desc .round { left: auto; right: 104px; }
html.rtl .search-container .search-desc .line { left: auto; right: 130px; }

/* Product detail layout: move gallery to right, info to left */
html.rtl .product_Box .image_area { left: auto !important; right: 0 !important; }
html.rtl .product_Box .item-info { margin-right: 420px !important; margin-left: 0 !important; position: relative; z-index: 2; }
html.rtl .product_Box .image_area { z-index: 1; }
html.rtl .item-price .block-btn-s { float: left !important; }

/* Price line direction and popover in RTL */
html.rtl .item-pri .item-price { direction: rtl; display: -webkit-box !important; display: -ms-flexbox !important; display: flex !important; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -ms-flex-direction: row-reverse !important; flex-direction: row-reverse !important; }
html.rtl .item-pri .item-price .SelectImg { margin-left: 16px; margin-right: 0; }
html.rtl .item-pri .item-price .item-price-pop { left: auto; right: 0; text-align: right; }
html.rtl .item-pri .item-price .item-price-pop .popover-content { text-align: right; }
html.rtl .item-pri .item-price > div { margin-right: 10px; }

/* Item info block general alignment */
html.rtl .item-info { text-align: right; }
html.rtl .item-info .seller-info { text-align: right; }

/* SKU 图片与文字间距、已选值间距 */
html.rtl .sku-thumb-div .sku-img { margin-right: 0 !important; margin-left: 10px !important; }
html.rtl .item-info .goods_label_selected { margin-right: 10px; margin-left: 0; }
html.rtl .item-info .goods_label { text-align: right; }
html.rtl .item-info .goods_option { direction: rtl; }

/* 规格标题与值方向（dl 列表） */
html.rtl .item-info dl { direction: rtl; }
html.rtl .item-info dl dd, html.rtl .item-info dl dt { text-align: right; }

/* 购买按钮排布（RTL 下主按钮在左侧） */
html.rtl .buy_line dd { text-align: left; }

/* Express arrows and dotted separator */
html.rtl .item-info .express .arrow-right { border-left: 0; border-right: 6px solid #999; margin-left: 2px; margin-right: 0; }
html.rtl .item-info .dotted-line { border-left: 1px dotted #3f72ff; border-right: 0; margin-left: 0; margin-right: 20px; }

/* Buttons spacing in item header */
html.rtl .block-btn-imgs-foot a { margin-right: 0; margin-left: 30px; }

/* Home STEP1/2/3 - keep left to right order for steps */
html.rtl .lc_step { text-align: right; }
html.rtl .lc_list, html.rtl .lc_box, html.rtl .lc_wrap { direction: rtl; }
html.rtl .lc_box { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; }
html.rtl .lc_box { -webkit-box-orient: horizontal; -webkit-box-direction: reverse; -ms-flex-direction: row-reverse; flex-direction: row-reverse; }
/* Keep lc_imgs in normal left-to-right order (STEP 1 -> 2 -> 3) */
html.rtl .index_share_intro_lc .lc_imgs { direction: ltr !important; text-align: right; display: flex !important; flex-direction: row !important; }
html.rtl .index_share_intro_lc .lc_spit .lc-right { transform: scaleX(-1); display: inline-block; }
/* Button arrow point left in RTL */
html.rtl .index-block-btn .icon-sharebtn-right { transform: scaleX(-1); display: inline-block; }

/* Footer icons container - reverse order in RTL */
html.rtl .icons-container .content { display: -webkit-box !important; display: -ms-flexbox !important; display: flex !important; -ms-flex-direction: row-reverse !important; flex-direction: row-reverse !important; }

/* Footer menu layout - reverse order in RTL */
html.rtl .footer .bottom-menu { direction: rtl; text-align: right; display: -webkit-box !important; display: -ms-flexbox !important; display: flex !important; -ms-flex-direction: row-reverse !important; flex-direction: row-reverse !important; }
html.rtl .footer .bt-menu-logo.left { float: none !important; -ms-flex-order: 6 !important; order: 6 !important; }
html.rtl .footer .bt-menu.right { text-align: right; float: none !important; }
html.rtl .footer .bottom-box .row { direction: rtl; }
html.rtl .footer .bottom-txt-left { text-align: right !important; }
html.rtl .footer .bottom-txt-right { text-align: left !important; }
html.rtl .footer .bottom-box .icons { background-position: center left !important; }

/* Quick toolbar (floating icons on right) - move to left in RTL */
html.rtl .quick-toolbar,
html.rtl [class*="quick-toolbar"],
html.rtl [class*="toolbar"] {
    right: auto !important;
    left: 15px !important;
}
html.rtl .quick-toolbar .discord,
html.rtl .discord {
    right: auto !important;
    left: 20px !important;
}
html.rtl .quick-toolbar .whatsapp,
html.rtl .whatsapp {
    right: auto !important;
    left: 20px !important;
}
html.rtl .Cl-shopping-cart-popover,
html.rtl [class*="shopping-cart-popover"],
html.rtl [class*="cart-popover"] {
    right: auto !important;
    left: 72px !important;
}
html.rtl .quick-toolbar .menu a .a-tips,
html.rtl .a-tips {
    right: auto !important;
    left: calc(100% + 5px) !important;
}
html.rtl .quick-toolbar .menu a .a-tips::after,
html.rtl .a-tips::after {
    right: auto !important;
    left: 0 !important;
    margin-left: -5px !important;
    margin-right: 0 !important;
    border-left: 0 !important;
    border-right: 5px solid rgba(0,0,0,0.7) !important;
}
/* Basic RTL support overrides */
html.rtl, html[dir="rtl"] {
  direction: rtl;
}
html.rtl body, html[dir="rtl"] body {
  text-align: right;
}
/* Swap common float helpers if present */
html.rtl .fl { float: right !important; }
html.rtl .fr { float: left !important; }
/* Navigation and lists */
html.rtl ul, html.rtl ol { padding-right: 0; padding-left: initial; }
/* Input groups in RTL */
html.rtl .input-group .input-group-btn { float: left; }
html.rtl .input-group .form-control { text-align: right; }
/* Align icons/arrows if used */
html.rtl .ico-arrow { transform: scaleX(-1); }

