/**
 * RTL (Right-to-Left) styles for frontend
 * Applied when body has dir="rtl" (e.g. Arabic, Kurdish)
 */

/* ==========================================================================
   GLOBAL – All elements and pseudo-elements text-align right
   ========================================================================== */
body[dir="rtl"],
body[dir="rtl"] *::before,
body[dir="rtl"] *::after {
    text-align: right;
}

/* Keep center for buttons and explicitly centered content */
body[dir="rtl"] .button,
body[dir="rtl"] .btn,
body[dir="rtl"] button,
body[dir="rtl"] input[type="submit"],
body[dir="rtl"] input[type="button"],
body[dir="rtl"] .text-center,
body[dir="rtl"] .modal-footer.justify-content-center,
body[dir="rtl"] .modal-content.text-center,
body[dir="rtl"] .btn-search,
body[dir="rtl"] .mydash-stat-box,
body[dir="rtl"] .achievement-card {
    text-align: center;
}

/* ==========================================================================
   BASE
   ========================================================================== */
body[dir="rtl"] {
    direction: rtl;
}

body[dir="rtl"] ul,
body[dir="rtl"] ol {
    padding-left: 0;
    padding-right: 17px;
}

body[dir="rtl"] ul ul,
body[dir="rtl"] ul ol,
body[dir="rtl"] ol ol,
body[dir="rtl"] ol ul {
    padding-left: 0;
    padding-right: 17px;
}

body[dir="rtl"] blockquote,
body[dir="rtl"] q {
    border-left: none;
    border-right: none;
    border-bottom: 1px solid #f2f2f2;
    border-top: 1px solid #f2f2f2;
}

body[dir="rtl"] blockquote::before {
    display: block;
    text-align: right;
}

/* ==========================================================================
   PSEUDO-ELEMENTS ::before / ::after – RTL positioning for all CSS objects
   ========================================================================== */

/* Dropdown / menu arrows – margin flip */
body[dir="rtl"] .vereesa-language .language-toggle::after,
body[dir="rtl"] .vereesa-dropdown .language-toggle:after,
body[dir="rtl"] .block-minicart .shopcart-icon::after,
body[dir="rtl"] .main-menu > li.menu-item-has-children > a::after,
body[dir="rtl"] .main-menu > li.menu-item-has-children > a:after,
body[dir="rtl"] .vereesa-nav-vertical .menu-item-has-children > a .toggle-submenu::before {
    margin-right: 0.5em;
    margin-left: 0;
}

body[dir="rtl"] .block-minicart .shopcart-icon::after {
    right: auto;
    left: 30px;
}

/* Submenu item arrow */
body[dir="rtl"] .main-menu .submenu > li.menu-item-has-children > a:after {
    float: left;
}

/* Form checkbox */
body[dir="rtl"] .form-checkbox span::before {
    left: auto;
    right: 0;
}

body[dir="rtl"] .form-checkbox input[type="checkbox"]:checked + span::after,
body[dir="rtl"] .form-checkbox:hover span::after {
    left: auto;
    right: 6px;
}

/* Widget / mega-menu title underline */
body[dir="rtl"] .mega-menu .vereesa-custommenu .widgettitle::before,
body[dir="rtl"] .widget .widgettitle::before {
    left: auto;
    right: 0;
}

/* Blog content sidebar line */
body[dir="rtl"] .main-content-blog.right-sidebar .content-blog::after {
    right: auto;
    left: -15px;
}

body[dir="rtl"] .main-content-blog.left-sidebar .content-blog::after {
    left: auto;
    right: -15px;
}

/* Chosen select arrow – keep on start side in RTL */
body[dir="rtl"] .chosen-container-single .chosen-single div b::after {
    left: auto;
    right: 10px;
}

/* Sidebar checkbox label */
body[dir="rtl"] .sidebar input[type="checkbox"] + label::after,
body[dir="rtl"] .customer_login input[type="checkbox"] + label::after {
    left: auto;
    right: 0;
}

body[dir="rtl"] .sidebar input[type="checkbox"]:checked + label::before,
body[dir="rtl"] .customer_login input[type="checkbox"]:checked + label::before {
    left: auto;
    right: 0;
}

/* Star rating – float flip */
body[dir="rtl"] .star-rating:before,
body[dir="rtl"] .star-rating > span:before {
    float: right;
}

/* Product list attributes separator */
body[dir="rtl"] .product-item.style-list .product-info-left .attributes-display li a:after {
    margin-right: 4px;
    margin-left: 0;
}

/* Product list message line */
body[dir="rtl"] .product-item.style-list .product-list-message::after {
    left: auto;
    right: 0;
}

/* Product grid title underline (centered – flip for RTL) */
body[dir="rtl"] .product-grid-title::before {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

/* Tabs underline */
body[dir="rtl"] .vereesa-tabs .tab-link li a::before {
    left: auto;
    right: 0;
}

body[dir="rtl"] .tab-details-product .tab-link li.active a::after {
    left: auto;
    right: 0;
}


/* Title form underline */
body[dir="rtl"] .title-form::before {
    left: auto;
    right: 0;
}

/* Contact info / details-infor icons */
body[dir="rtl"] .details-infor .group-button .yith-wcwl-add-to-wishlist div a::before,
body[dir="rtl"] .details-infor .group-button .size-chart-wrapp .btn-size-chart a::before {
    margin-right: 0;
    margin-left: 7px;
}

/* Breadcrumb (Bootstrap-style) */
body[dir="rtl"] .breadcrumb > li + li:before {
    padding: 0 8px;
    margin-right: 0;
    margin-left: 4px;
}

/* Footer demos link arrow */
body[dir="rtl"] .footer-end .demos a::after {
    margin-right: 5px;
    margin-left: 0;
}

/* Cart / checkout buttons and arrows */
body[dir="rtl"] .shop_table .actions .coupon .button::after,
body[dir="rtl"] .checkout-wrapp .button-payment::after {
    margin-right: 5px;
    margin-left: 0;
}

body[dir="rtl"] .button-control .btn-back-to-shipping::before {
    margin-right: 5px;
    margin-left: 0;
}

/* Newsletter popup / disable checkbox */
body[dir="rtl"] .vereesa-disablepopupnewsletter span::before {
    left: auto;
    right: 0;
}

body[dir="rtl"] .vereesa-disablepopupnewsletter input[type="checkbox"]:checked + span::after {
    left: auto;
    right: 1px;
}

/* List color / attribute color check icon */
body[dir="rtl"] .list-color a.active::before,
body[dir="rtl"] .list-color a:hover::before,
body[dir="rtl"] .attribute_color .list-color a:hover::before,
body[dir="rtl"] .attribute_color .list-color a.active::before {
    left: auto;
    right: 50%;
    margin-right: -0.5em;
    margin-left: 0;
}

/* Vereesa blog item overlay */
body[dir="rtl"] .vereesa-blog-item .post-thumb > a::after,
body[dir="rtl"] .vereesa-blog-item .post-thumb .video-vereesa-blog figure::after {
    left: 0;
    right: 0;
}

/* Top bar language separator */
body[dir="rtl"] .top-bar .header-language .vereesa-language::after {
    margin-right: 0.25em;
    margin-left: 0.25em;
}

/* Slick carousel arrows (sliders with dir="ltr" keep LTR; others inherit) */
body[dir="rtl"] .slick-slider.nav-center > .slick-arrow:first-child {
    left: auto;
    right: 0;
}

body[dir="rtl"] .slick-slider.nav-center > .slick-arrow:first-child + .slick-arrow {
    right: auto;
    left: 0;
}

/* Responsive: dropdown toggler arrow */
body[dir="rtl"] .dropdown-menu .dropdown-toggler::after {
    right: auto;
    left: 0;
}

body[dir="rtl"] .dropdown-toggle::after {
    float: left;
}

/* Responsive: shop cart / wishlist table cell labels (data-title) */
body[dir="rtl"] .shop_cart_table td::before,
body[dir="rtl"] .wishlist_table td::before {
    float: right;
    margin-right: 0;
    margin-left: 15px;
    text-align: right;
}

body[dir="rtl"] table tr th:last-child,
body[dir="rtl"] table tr td:last-child {
    border-right: 1px solid #f3f3f3;
    border-left: 0;
}

body[dir="rtl"] table tr th:first-child,
body[dir="rtl"] table tr td:first-child {
    text-align: center !important;
    border-left: 0;
}

/* Form controls – ensure text aligns right (some ignore inheritance) */
body[dir="rtl"] input:not([type="submit"]):not([type="button"]):not([type="reset"]),
body[dir="rtl"] select,
body[dir="rtl"] textarea {
    text-align: right;
}

/* ==========================================================================
   HEADER – Top bar
   ========================================================================== */
body[dir="rtl"] .top-bar-left .header-message,
body[dir="rtl"] .top-bar-left .header-message p {
    text-align: left !important;
}
body[dir="rtl"] .vereesa-language .vereesa-submenu {
    left: auto;
    right: 0;
    text-align: right;
}

/* ==========================================================================
   HEADER – Main header (logo, search, minicart, account)
   ========================================================================== */
body[dir="rtl"] .main-header .logo {
    text-align: right;
}

body[dir="rtl"] .block-search-block .form-content .inner {
    direction: rtl;
}

body[dir="rtl"] .block-search-block .btn-search {
    left: auto;
    right: 0;
}

body[dir="rtl"] .block-search-block .input {
    padding-left: 50px;
    padding-right: 20px;
    text-align: right;
}

body[dir="rtl"] .header-control {
    direction: rtl;
}

body[dir="rtl"] .block-minicart .shopcart-icon,
body[dir="rtl"] .block-account > a {
    margin-left: 15px;
    margin-right: 0;
}

body[dir="rtl"] .vereesa-mini-cart .shopcart-description.vereesa-submenu,
body[dir="rtl"] .block-account .header-account.vereesa-submenu {
    left: auto;
    right: 0;
    text-align: right;
}

/* ==========================================================================
   SIDE CART (MINICART) – RTL redesign
   ========================================================================== */
body[dir="rtl"] .block-minicart .shopcart-description {
    left: 0;
    right: auto;
    direction: rtl;
}

body[dir="rtl"] .shopcart-description .content-wrap {
    direction: rtl;
    text-align: right;
}

body[dir="rtl"] .shopcart-description .content-wrap .title {
    text-align: right;
    padding: 15px 20px;
    border-bottom: 1px solid #f1f1f1;
}

body[dir="rtl"] .shopcart-description .content-wrap ul {
    padding: 0 20px;
    direction: rtl;
}

body[dir="rtl"] .shopcart-description .content-wrap ul li {
    direction: rtl;
    text-align: right;
}

/* Cart item: image on right, details on left in RTL */
body[dir="rtl"] .minicart-items .product-cart.mini_cart_item .product-media,
body[dir="rtl"] .minicart-items .mini_cart_item .product-media {
    float: right;
    width: 80px;
    margin-left: 10px;
    margin-right: 0;
}

body[dir="rtl"] .minicart-items .product-cart .product-details,
body[dir="rtl"] .minicart-items .mini_cart_item .product-details {
    overflow: hidden;
    text-align: right;
    padding-left: 0;
    padding-right: 10px;
}

body[dir="rtl"] .minicart-items .product-cart .product-name,
body[dir="rtl"] .minicart-items .mini_cart_item .product-name {
    text-align: right;
}

body[dir="rtl"] .minicart-items .product-cart .product-remove,
body[dir="rtl"] .minicart-items .mini_cart_item .product-remove {
    float: left;
    left: auto;
    right: auto;
}

body[dir="rtl"] .minicart-items .product-cart .product-media {
    margin-left: 0;
    margin-right: 0;
}

/* Subtotal row RTL */
body[dir="rtl"] .shopcart-description .subtotal {
    text-align: right;
    padding: 15px 20px;
}

body[dir="rtl"] .shopcart-description .subtotal .total-title,
body[dir="rtl"] .shopcart-description .subtotal .total-price {
    text-align: right;
}

/* Actions: View cart + Checkout – row reversed for RTL */
body[dir="rtl"] .shopcart-description .actions {
    padding: 0 20px 30px;
    text-align: left;
    direction: rtl;
}

body[dir="rtl"] .shopcart-description .actions .button-viewcart {
    float: right;
    margin-left: 8px;
    margin-right: 0;
}

body[dir="rtl"] .shopcart-description .actions .button-checkout {
    float: left;
    margin-left: 0;
    margin-right: 0;
}

/* Scrollbar on left side in RTL */
body[dir="rtl"] .minicart-items .mCSB_scrollTools {
    right: auto;
    left: -5px;
}

body[dir="rtl"] .minicart-items .mCSB_inside > .mCSB_container {
    margin-right: 0;
    margin-left: 20px;
}

body[dir="rtl"] .minicart-items .mCSB_container,
body[dir="rtl"] #mCSB_1_container {
    direction: rtl;
    text-align: right;
}

/* ==========================================================================
   HEADER – Nav (categories, main menu)
   ========================================================================== */
body[dir="rtl"] .header-nav-container {
    text-align: right;
}

body[dir="rtl"] .vertical-wapper .block-title {
    text-align: right;
}

body[dir="rtl"] .vertical-wapper .block-title .icon-bar {
    margin-left: 10px;
    margin-right: 0;
}

body[dir="rtl"] .vereesa-nav-vertical .menu-item a,
body[dir="rtl"] .vereesa-nav-vertical .submenu .menu-item a {
    text-align: right;
}

body[dir="rtl"] .vereesa-nav-vertical .toggle-submenu {
    left: 0;
    right: auto;
}

body[dir="rtl"] .verticalmenu-content .submenu {
    left: auto;
    right: 100%;
}

body[dir="rtl"] .header-nav .vereesa-nav.main-menu {
    text-align: right;
}

body[dir="rtl"] .header-nav .vereesa-nav.main-menu .menu-item {
    float: right;
}

/* ==========================================================================
   BREADCRUMB
   ========================================================================== */
body[dir="rtl"] .breadcrumb-trail .trail-items {
    padding-left: 0;
    padding-right: 0;
    text-align: right;
}

body[dir="rtl"] .breadcrumb-trail .trail-items li::after {
    margin-left: 0;
    margin-right: 8px;
}

/* ==========================================================================
   MAIN CONTENT – Slider, banner, product sections
   ========================================================================== */
body[dir="rtl"] .banner-content,
body[dir="rtl"] .banner-wrapp .title {
    text-align: center;
}

body[dir="rtl"] .custommenu-title-blog,
body[dir="rtl"] .custom_blog_title,
body[dir="rtl"] .widgettitle {
    text-align: right;
}

body[dir="rtl"] .product-item .product-top .flash {
    left: auto;
    right: 15px;
}

body[dir="rtl"] .product-item .quick-wiew-button {
    text-align: center;
}

body[dir="rtl"] .list-products {
    direction: rtl;
}

body[dir="rtl"] .list-products .product-item {
    text-align: right;
}

/* Auto-clear: use clear right in RTL */
body[dir="rtl"] .auto-clear .col-bg-1:nth-child(12n+1),
body[dir="rtl"] .auto-clear .col-bg-2:nth-child(6n+1),
body[dir="rtl"] .auto-clear .col-bg-15:nth-child(5n+1),
body[dir="rtl"] .auto-clear .col-bg-3:nth-child(4n+1),
body[dir="rtl"] .auto-clear .col-bg-4:nth-child(3n+1),
body[dir="rtl"] .auto-clear .col-bg-6:nth-child(odd),
body[dir="rtl"] .auto-clear .col-lg-1:nth-child(12n+1),
body[dir="rtl"] .auto-clear .col-lg-2:nth-child(6n+1),
body[dir="rtl"] .auto-clear .col-lg-15:nth-child(5n+1),
body[dir="rtl"] .auto-clear .col-lg-3:nth-child(4n+1),
body[dir="rtl"] .auto-clear .col-lg-4:nth-child(3n+1),
body[dir="rtl"] .auto-clear .col-lg-6:nth-child(odd),
body[dir="rtl"] .auto-clear .col-md-1:nth-child(12n+1),
body[dir="rtl"] .auto-clear .col-md-2:nth-child(6n+1),
body[dir="rtl"] .auto-clear .col-md-15:nth-child(5n+1),
body[dir="rtl"] .auto-clear .col-md-3:nth-child(4n+1),
body[dir="rtl"] .auto-clear .col-md-4:nth-child(3n+1),
body[dir="rtl"] .auto-clear .col-md-6:nth-child(odd),
body[dir="rtl"] .auto-clear .col-sm-1:nth-child(12n+1),
body[dir="rtl"] .auto-clear .col-sm-2:nth-child(6n+1),
body[dir="rtl"] .auto-clear .col-sm-15:nth-child(5n+1),
body[dir="rtl"] .auto-clear .col-sm-3:nth-child(4n+1),
body[dir="rtl"] .auto-clear .col-sm-4:nth-child(3n+1),
body[dir="rtl"] .auto-clear .col-sm-6:nth-child(odd),
body[dir="rtl"] .auto-clear .col-xs-1:nth-child(12n+1),
body[dir="rtl"] .auto-clear .col-xs-2:nth-child(6n+1),
body[dir="rtl"] .auto-clear .col-xs-15:nth-child(5n+1),
body[dir="rtl"] .auto-clear .col-xs-3:nth-child(4n+1),
body[dir="rtl"] .auto-clear .col-xs-4:nth-child(3n+1),
body[dir="rtl"] .auto-clear .col-xs-6:nth-child(odd) {
    clear: right;
}

/* ==========================================================================
   PRODUCTS PAGE – Sidebar, filters
   ========================================================================== */
body[dir="rtl"] .main-content-product.left-sidebar .row {
    direction: rtl;
}

body[dir="rtl"] .main-content-product .sidebar {
    padding-left: 15px;
    padding-right: 0;
}

body[dir="rtl"] .shop-sidebar .widget,
body[dir="rtl"] .price-title,
body[dir="rtl"] .woof_Widget label {
    text-align: right;
}

body[dir="rtl"] .price-container {
    margin-left: 0;
    margin-right: 0;
}

body[dir="rtl"] .price-field {
    padding-left: 0;
    padding-right: 0;
}

body[dir="rtl"] .wrapper-sidebar {
    text-align: right;
}

body[dir="rtl"] .shop-content {
    padding-right: 15px;
    padding-left: 0;
}

body[dir="rtl"] .select2-container {
    text-align: right;
}

body[dir="rtl"] .select2-selection__rendered {
    padding-right: 8px;
    padding-left: 0;
}

body[dir="rtl"] .select2-selection__arrow {
    left: 7px;
    right: auto;
}

/* ==========================================================================
   PRODUCT DETAIL (productmore)
   ========================================================================== */
body[dir="rtl"] .product-detail .details-info,
body[dir="rtl"] .product-detail .product-name,
body[dir="rtl"] .product-detail .product-price-block,
body[dir="rtl"] .product-detail .quantity-add-to-cart {
    text-align: right;
}

body[dir="rtl"] .quick-view-modal .modal-close-btn {
    right: auto;
    left: 12px;
}

body[dir="rtl"] .details-thumd .thumbnails_carousel {
    direction: rtl;
}

/* ==========================================================================
   CONTACT / ABOUT / FORMS
   ========================================================================== */
body[dir="rtl"] .form-contact .form-label,
body[dir="rtl"] .form-message .form-label,
body[dir="rtl"] .vereesa-contact-fom .form-label {
    text-align: right;
}

body[dir="rtl"] .form-contact input,
body[dir="rtl"] .form-contact textarea,
body[dir="rtl"] .form-message input,
body[dir="rtl"] .form-message textarea,
body[dir="rtl"] .vereesa-contact-fom input,
body[dir="rtl"] .vereesa-contact-fom textarea {
    text-align: right;
}

body[dir="rtl"] .form-contact .form-message,
body[dir="rtl"] .page-main-content .content-inner {
    text-align: right;
}

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

body[dir="rtl"] .header-banner .banner-header .content-inner {
    text-align: right;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
body[dir="rtl"] .footer .box-footer {
    text-align: right;
}

body[dir="rtl"] .footer .single-img p,
body[dir="rtl"] .footer .vereesa-custommenu .menu {
    text-align: right;
}

body[dir="rtl"] .footer .vereesa-custommenu .menu .menu-item a {
    text-align: right;
}

body[dir="rtl"] .footer .vereesa-socials .socials {
    text-align: right;
}

body[dir="rtl"] .footer .vereesa-socials .socials li {
    margin-left: 10px;
    margin-right: 0;
}

body[dir="rtl"] .footer-end .coppyright {
    text-align: center;
}

/* ==========================================================================
   MOBILE HEADER
   ========================================================================== */
body[dir="rtl"] .header-device-mobile .wapper {
    direction: rtl;
}

body[dir="rtl"] .header-device-mobile .mobile-logo {
    text-align: right;
}

body[dir="rtl"] .header-device-mobile .mobile-settings-box .block-sub-item,
body[dir="rtl"] .header-device-mobile .vereesa-language-wrap {
    text-align: right;
}

body[dir="rtl"] .mobile-settings-box .block-sub-item .vereesa-language-wrap {
    padding-left: 0;
    padding-right: 0;
}

body[dir="rtl"] .header-device-mobile .block-sub .close {
    left: auto;
    right: 15px;
}

body[dir="rtl"] .header-searchform-box .searchform-wrap input {
    text-align: right;
}

/* ==========================================================================
   MOBILE FOOTER BAR
   ========================================================================== */
body[dir="rtl"] .footer-device-mobile .wapper {
    direction: rtl;
}

/* ==========================================================================
   MODALS & BUTTONS
   ========================================================================== */

body[dir="rtl"] .modal-header .close {
    margin-left: 0;
    margin-right: auto;
}

body[dir="rtl"] .modal-footer:not(.justify-content-center) {
    text-align: left;
}

/* ==========================================================================
   FLASH / ALERTS
   ========================================================================== */
body[dir="rtl"] .alert {
    text-align: right;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
body[dir="rtl"] .pagination {
    direction: rtl;
}

body[dir="rtl"] .pagination .page-item {
    margin-left: 5px;
    margin-right: 0;
}

/* RTL: swap prev/next arrows so "previous" points right (›) and "next" points left (‹) */
body[dir="rtl"] .pagination .page-link[rel="prev"],
body[dir="rtl"] .pagination .page-item:first-child .page-link {
    font-size: 0;
}
body[dir="rtl"] .pagination .page-link[rel="prev"]::after,
body[dir="rtl"] .pagination .page-item:first-child .page-link::after {
    content: '\203A';
    font-size: 1rem;
}
body[dir="rtl"] .pagination .page-link[rel="next"],
body[dir="rtl"] .pagination .page-item:last-child .page-link {
    font-size: 0;
}
body[dir="rtl"] .pagination .page-link[rel="next"]::after,
body[dir="rtl"] .pagination .page-item:last-child .page-link::after {
    content: '\2039';
    font-size: 1rem;
}

/* ==========================================================================
   MYDASHBOARD (extends app layout – extra RTL for shared layout)
   ========================================================================== */
body[dir="rtl"] .mydash-page .mydash-sidebar {
    text-align: right;
}

body[dir="rtl"] .mydash-page .mydash-nav-item {
    justify-content: flex-start;
}

body[dir="rtl"] .mydash-form-group {
    text-align: right;
}

body[dir="rtl"] .mydash-form-group .position-relative .toggle-password-input {
    padding-right: 1rem;
    padding-left: 2.5rem;
}

body[dir="rtl"] .mydash-form-group .position-relative .toggle-password {
    left: auto;
    right: 0.75rem;
}

/* ==========================================================================
   AUTH PAGES (login/register)
   ========================================================================== */
body[dir="rtl"] .reg-login-forms,
body[dir="rtl"] .reg-input-group label {
    text-align: right;
}

body[dir="rtl"] .reg-input-group input {
    text-align: right;
}

body[dir="rtl"] .dropdown-menu {
    left: auto;
    right: 0;
    text-align: right;
}
