/**
 * Coinsat RTL fixes for Kumo storefront theme.
 * Loaded only when site language direction is rtl.
 * Keeps button sizes; fixes header, grid, nav, cart panel.
 */

html[dir="rtl"],
html[dir="rtl"] body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

html[dir="rtl"] #main-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

html[dir="rtl"] .container,
html[dir="rtl"] .container-fluid {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Bootstrap grid — prevent left gutter gap */
html[dir="rtl"] .row {
    margin-right: -12px;
    margin-left: -12px;
}

html[dir="rtl"] .row > * {
    padding-right: 12px;
    padding-left: 12px;
}

/* Header top bar */
html[dir="rtl"] .float-right {
    float: left !important;
}

html[dir="rtl"] .float-left {
    float: right !important;
}

html[dir="rtl"] .text-left {
    text-align: right !important;
}

html[dir="rtl"] .text-right {
    text-align: left !important;
}

/* Main header block — desktop only; mobile uses .coinsat-mobile-header */
@media (min-width: 992px) {
    html[dir="rtl"] .headd-sty-wrap {
        flex-direction: row-reverse;
    }

    html[dir="rtl"] .headd-sty-left {
        flex-direction: row-reverse;
    }
}

html[dir="rtl"] .coinsat-mobile-header {
    flex-direction: row !important;
    direction: rtl;
}

html[dir="rtl"] .coinsat-mobile-center {
    flex-direction: row !important;
}

html[dir="rtl"] .coinsat-mobile-icons {
    flex-direction: row !important;
}

html[dir="rtl"] .headd-sty-02 {
    margin-left: 0 !important;
    margin-right: 1rem !important;
}

html[dir="rtl"] .headd-sty-last .nav-menu {
    flex-direction: row-reverse;
}

/* Hamburger / nav toggle — move to right in RTL */
html[dir="rtl"] .nav-toggle {
    left: auto !important;
    right: 0 !important;
}

html[dir="rtl"] .nav-toggle-mobile {
    left: auto !important;
    right: 10px !important;
}

/* LTR cart panel default handled by .coinsat-side-panel in coinsat-fixes.css */

/* Mobile slide menu from right */
html[dir="rtl"] .navigation-portrait .nav-menus-wrapper {
    left: auto !important;
    right: -400px !important;
}

html[dir="rtl"] .navigation-portrait .nav-menus-wrapper.nav-menus-wrapper-open,
html[dir="rtl"] .nav-menus-wrapper.nav-menus-wrapper-open {
    left: auto !important;
    right: 0 !important;
}

html[dir="rtl"] .nav-menus-wrapper-close-button {
    float: left;
}

html[dir="rtl"] .navigation-portrait .nav-menu > li > a {
    text-align: right;
}

html[dir="rtl"] .nav-dropdown {
    text-align: right;
}

/* Feature boxes (Free Shipping etc.) */
html[dir="rtl"] .coinsat-features-row .d-flex.justify-content-start,
html[dir="rtl"] .coinsat-feature-box {
    flex-direction: row-reverse;
    text-align: right;
}

html[dir="rtl"] .coinsat-feature-box .d_capt {
    text-align: right;
}

html[dir="rtl"] .coinsat-feature-box .d_ico {
    margin-left: 8px;
    margin-right: 0;
}

/* Product cards */
html[dir="rtl"] .product_grid .text-left,
html[dir="rtl"] .card-footer .text-left {
    text-align: right !important;
}

html[dir="rtl"] .elso_titl,
html[dir="rtl"] .elis_rty,
html[dir="rtl"] .prt_02,
html[dir="rtl"] .prt_03,
html[dir="rtl"] .prt_04 {
    text-align: right;
}

/* Cart / wishlist side panel — slide from left in RTL */
html[dir="rtl"] .w3-ch-sideBar.coinsat-side-panel {
    right: auto !important;
    left: 0 !important;
    animation-name: coinsatSlideLeft !important;
}

@keyframes coinsatSlideLeft {
    from { left: -300px; opacity: 0; }
    to   { left: 0; opacity: 1; }
}

/* Dropdown menus */
html[dir="rtl"] .dropdown-menu {
    text-align: right;
    right: 0;
    left: auto;
}

html[dir="rtl"] .input-group-prepend {
    border-right: 0 !important;
    border-left: 1px solid #dee2e6 !important;
}

html[dir="rtl"] .border-end {
    border-right: 0 !important;
    border-left: 1px solid #dee2e6 !important;
}

/* Footer */
html[dir="rtl"] .footer_widget,
html[dir="rtl"] .footer-menu {
    text-align: right;
}

/* Breadcrumb */
html[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
    float: right;
    padding-left: 0.5rem;
    padding-right: 0;
}

/* Counter badges on icons */
html[dir="rtl"] .dn-counter {
    right: auto;
    left: -8px;
}

/* Slider / hero */
html[dir="rtl"] .home-slider .item {
    text-align: right;
}

html[dir="rtl"] .sec_title {
    text-align: center;
}

/* Forms on product page */
html[dir="rtl"] .form-row label,
html[dir="rtl"] .form-check-label {
    text-align: right;
}

html[dir="rtl"] .star-rating {
    flex-direction: row-reverse;
    justify-content: flex-end !important;
}

/* Product action buttons — keep aligned in RTL */
html[dir="rtl"] .product_grid .card-footer .d-flex,
html[dir="rtl"] .product_grid .card-footers .d-flex,
html[dir="rtl"] .ftr-content .d-flex {
    flex-direction: row;
    justify-content: stretch;
}

html[dir="rtl"] .product_grid .card-footer .text-left,
html[dir="rtl"] .product_grid .card-footers .text-left,
html[dir="rtl"] .ftr-content .text-left {
    text-align: right !important;
}

html[dir="rtl"] .mfliud {
    padding-right: 0 !important;
    padding-left: 0 !important;
}

/* Prevent horizontal scroll from fixed nav */
html[dir="rtl"] .navigation {
    width: 100%;
    max-width: 100%;
}

html[dir="rtl"] .header,
html[dir="rtl"] .header-dark {
    width: 100%;
    max-width: 100%;
    left: 0;
    right: 0;
}
