/* RTL Fixer patch v3 for oct_remarket-like themes */

html[dir="rtl"] body.rtl,
body.rtl {
    direction: rtl;
    text-align: right;
}

/* Header / catalog button */
body.rtl #menu_toggle_button,
body.rtl .rm-btn,
body.rtl .btn,
body.rtl a.btn {
    align-items: center;
}

body.rtl #menu_toggle_button {
    display: inline-flex !important;
    justify-content: center;
    gap: 8px;
}

body.rtl #menu_toggle_button .rm-btn-text {
    order: 1;
}

body.rtl #menu_toggle_button .rm-btn-icon,
body.rtl #menu_toggle_button .catalog-icon,
body.rtl #menu_toggle_button .close-icon {
    order: 2;
    margin: 0 !important;
}

body.rtl .btn i,
body.rtl .btn svg,
body.rtl .btn img,
body.rtl a.btn i,
body.rtl a.btn svg,
body.rtl a.btn img,
body.rtl button i,
body.rtl button svg,
body.rtl button img,
body.rtl .rm-btn i,
body.rtl .rm-btn svg,
body.rtl .rm-btn img,
body.rtl .button-group button i,
body.rtl .button-group button svg,
body.rtl .button-group button img {
    margin-right: 0 !important;
    margin-left: 0 !important;
}

body.rtl .btn,
body.rtl a.btn,
body.rtl button,
body.rtl .rm-btn,
body.rtl .button-group button,
body.rtl .product-thumb .button-group button {
    gap: 8px;
}

/* Breadcrumb */
body.rtl .breadcrumb,
body.rtl .rm-breadcrumb {
    direction: rtl;
    text-align: right;
}

body.rtl .rm-breadcrumb a,
body.rtl .breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

body.rtl .rm-breadcrumb .fa-home:after {
    position: relative;
    left: -8px;
}

/* Mega menu: keep it under the catalog button, not from page left */
body.rtl .rm-header-categories,
body.rtl .oct-header-categories,
body.rtl .header-categories,
body.rtl .rm-categories,
body.rtl .rm-header-search,
body.rtl .header-search {
    position: relative;
}

body.rtl .rm-header-categories .dropdown-menu,
body.rtl .oct-header-categories .dropdown-menu,
body.rtl .header-categories .dropdown-menu,
body.rtl .rm-categories .dropdown-menu,
body.rtl .rm-header-categories .rm-menu,
body.rtl .rm-header-categories .rm-menu-list,
body.rtl .oct-header-categories .rm-menu,
body.rtl .oct-header-categories .rm-menu-list,
body.rtl #oct-menu-box,
body.rtl .oct-menu-box,
body.rtl .rm-mega-menu,
body.rtl .rm-menu-dropdown,
body.rtl .menu-dropdown,
body.rtl .menu-dropdown-inner {
    left: auto !important;
    right: 0 !important;
    transform: none !important;
    text-align: right;
    direction: rtl;
}

body.rtl .rm-header-categories .dropdown-menu .row,
body.rtl .oct-header-categories .dropdown-menu .row,
body.rtl #oct-menu-box .row,
body.rtl .oct-menu-box .row,
body.rtl .rm-mega-menu .row {
    direction: rtl;
}

body.rtl .rm-header-categories .dropdown-menu a,
body.rtl .oct-header-categories .dropdown-menu a,
body.rtl #oct-menu-box a,
body.rtl .oct-menu-box a,
body.rtl .rm-mega-menu a {
    text-align: right;
}

/* Product page / buy block */
body.rtl #product,
body.rtl .product-info,
body.rtl .product-right,
body.rtl .product-right-block,
body.rtl .product-block,
body.rtl .product-thumb,
body.rtl .product-thumb .caption,
body.rtl .product-layout {
    text-align: right;
}

body.rtl #product .input-group,
body.rtl .product-right .input-group,
body.rtl .product-info .input-group,
body.rtl .product-quantity,
body.rtl .qty-block,
body.rtl .quantity-control {
    direction: ltr;
}

body.rtl #product .input-group .form-control,
body.rtl .product-right .input-group .form-control,
body.rtl .product-info .input-group .form-control,
body.rtl .product-quantity input,
body.rtl .qty-block input,
body.rtl .quantity-control input {
    text-align: center !important;
    direction: ltr !important;
}

body.rtl #button-cart,
body.rtl .btn-cart,
body.rtl .oct-button,
body.rtl .buy-one-click,
body.rtl .rm-product-btn,
body.rtl .quickbuy,
body.rtl .one-click-buy,
body.rtl .btn-quick-order {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

body.rtl #button-cart i,
body.rtl .btn-cart i,
body.rtl .oct-button i,
body.rtl .buy-one-click i,
body.rtl .rm-product-btn i,
body.rtl .quickbuy i,
body.rtl .one-click-buy i,
body.rtl .btn-quick-order i {
    margin: 0 !important;
}

body.rtl .product-thumb .button-group,
body.rtl .product-layout .button-group {
    direction: rtl;
}

/* Sidebar / filters / icons */
body.rtl .list-group,
body.rtl .list-group-item,
body.rtl .filter,
body.rtl .filter-item,
body.rtl .ocfilter,
body.rtl .ocfilter-option,
body.rtl .form-check,
body.rtl .custom-control {
    text-align: right;
}

body.rtl .form-check-input,
body.rtl .custom-control-input {
    margin-left: 0;
}

/* Footer */
body.rtl footer,
body.rtl #footer,
body.rtl .footer,
body.rtl .rm-footer,
body.rtl .footer-top,
body.rtl .footer-middle,
body.rtl .footer-bottom {
    direction: rtl;
    text-align: right;
}

body.rtl footer .row,
body.rtl #footer .row,
body.rtl .footer .row,
body.rtl .rm-footer .row,
body.rtl .footer-top .row,
body.rtl .footer-middle .row,
body.rtl .footer-bottom .row {
    direction: rtl;
}

body.rtl footer [class*="col-"],
body.rtl #footer [class*="col-"],
body.rtl .footer [class*="col-"],
body.rtl .rm-footer [class*="col-"],
body.rtl .footer-top [class*="col-"],
body.rtl .footer-middle [class*="col-"],
body.rtl .footer-bottom [class*="col-"] {
    text-align: right;
    float: right;
}

body.rtl footer ul,
body.rtl #footer ul,
body.rtl .footer ul,
body.rtl .rm-footer ul {
    padding-right: 0;
    list-style-position: inside;
}

body.rtl footer input,
body.rtl #footer input,
body.rtl .footer input,
body.rtl .rm-footer input {
    direction: rtl;
    text-align: right;
}

body.rtl footer .btn,
body.rtl #footer .btn,
body.rtl .footer .btn,
body.rtl .rm-footer .btn {
    justify-content: center;
}

body.rtl footer .payment,
body.rtl footer .payments,
body.rtl footer .payment-icons,
body.rtl #footer .payment,
body.rtl #footer .payments,
body.rtl #footer .payment-icons,
body.rtl .footer .payment,
body.rtl .footer .payments,
body.rtl .footer .payment-icons,
body.rtl .rm-footer .payment,
body.rtl .rm-footer .payments,
body.rtl .rm-footer .payment-icons,
body.rtl .footer img,
body.rtl #footer img {
    max-width: 100%;
    height: auto;
}

body.rtl footer .payment,
body.rtl footer .payments,
body.rtl footer .payment-icons,
body.rtl #footer .payment,
body.rtl #footer .payments,
body.rtl #footer .payment-icons,
body.rtl .footer .payment,
body.rtl .footer .payments,
body.rtl .footer .payment-icons,
body.rtl .rm-footer .payment,
body.rtl .rm-footer .payments,
body.rtl .rm-footer .payment-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    align-items: center;
}

body.rtl footer .socials,
body.rtl #footer .socials,
body.rtl .footer .socials,
body.rtl .rm-footer .socials {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
}

/* Keep latin emails / URLs readable */
body.rtl a[href^="mailto:"],
body.rtl a[href^="http"],
body.rtl .ltr,
body.rtl code,
body.rtl pre {
    direction: ltr;
    unicode-bidi: embed;
}
body.rtl {
    direction: rtl;
    text-align: right;
}

/* header */
body.rtl header,
body.rtl .top-nav,
body.rtl .rm-header-address,
body.rtl .rm-header-phones,
body.rtl .top-nav-info-list,
body.rtl .top-nav-account-links {
    direction: rtl;
    text-align: right;
}

body.rtl #logo {
    justify-content: flex-start;
}

body.rtl #menu_toggle_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-direction: row-reverse;
}

body.rtl #menu_toggle_button .rm-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

body.rtl #menu_toggle_button .rm-btn-text {
    line-height: 1.2;
    text-align: center;
}

/* universal gap for buttons with icons */
body.rtl .rm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.rtl .rm-btn .rm-btn-icon {
    margin-left: 8px;
    margin-right: 0;
}

body.rtl .rm-btn .rm-btn-text {
    order: 1;
}

body.rtl .rm-btn .rm-btn-icon {
    order: 2;
}

/* breadcrumb */
body.rtl .rm-breadcrumb,
body.rtl .breadcrumb,
body.rtl .rm-breadcrumb-item,
body.rtl .breadcrumb-item {
    direction: rtl;
    text-align: right;
}

body.rtl .rm-breadcrumb .fa-home:after {
    position: relative;
    left: -8px;
}


/* RTL: real catalog menu for oct_remarket */
body.rtl #rm-menu {
    position: absolute !important;
    top: auto !important;
    left: auto;
    right: auto;
    z-index: 9999 !important;
    margin: 0 !important;
    min-width: 380px;
}

body.rtl #rm-menu .rm-menu-list,
body.rtl #rm-menu .rm-menu-list a,
body.rtl #rm-menu .rm-menu-list-item,
body.rtl #rm-menu .rm-menu-list-item > div,
body.rtl #rm-menu .rm-menu-list-item > a {
    direction: rtl;
    text-align: right;
}