﻿/* =========================================================
   NILEN – RTL OVERRIDES (FINAL FIX)
   This file ONLY fixes direction issues.
   Must be loaded LAST.
   ========================================================= */

html[dir="rtl"], body {
    direction: rtl;
}

/* ---------- Global text ---------- */
body {
    text-align: right;
}

/* =========================================================
   DESKTOP HEADER RTL
   ========================================================= */

/* Top header row order */
@media (min-width: 768px) {

    .sury-top-row {
        flex-direction: row-reverse;
    }

    .sury-left {
        justify-content: flex-start;
        text-align: right;
    }

    .sury-right {
        justify-content: flex-end;
        text-align: right;
    }

    .sury-search {
        direction: rtl;
    }

    .sury-search-form input {
        text-align: right;
    }

    .sury-search-form button {
        order: -1; /* icon goes to right */
    }
}

/* =========================================================
   DESKTOP MENU & DROPDOWN RTL
   ========================================================= */

.sury-menu {
    direction: rtl;
}

    .sury-menu > li {
        text-align: right;
    }

    /* dropdown positioning */
    .sury-menu .dropdown {
        right: 0;
        left: auto;
        text-align: right;
    }

/* =========================================================
   MOBILE HEADER RTL
   ========================================================= */

@media (max-width: 767.98px) {

    .mobile-header {
        flex-direction: row-reverse;
    }

        .mobile-header .mh-logo {
            justify-content: center;
        }

    .mobile-search-wrap {
        direction: rtl;
    }

        .mobile-search-wrap input {
            text-align: right;
        }

    /* cart badge position */
    .mobile-header .mh-cart-count {
        right: auto;
        left: 6px;
    }
}

/* =========================================================
   MOBILE DRAWER RTL (VERY IMPORTANT)
   ========================================================= */

.mm-drawer {
    direction: rtl;
}

/* drawer slides from RIGHT */
.mm-drawer {
    right: 0;
    left: auto;
    transform: translateX(105%);
}

    .mm-drawer.open {
        transform: translateX(0);
    }

/* overlay click area ok */

/* drawer header */
.mm-head {
    flex-direction: row-reverse;
}

/* close button */
.mm-close {
    margin-left: 0;
    margin-right: auto;
}

/* drawer nav */
.mm-nav {
    text-align: right;
}

    .mm-nav summary {
        text-align: right;
    }

.mm-sub a {
    text-align: right;
}

/* =========================================================
   BOTTOM MOBILE NAV RTL
   ========================================================= */

.mobile-bottom-nav {
    direction: rtl;
}

    .mobile-bottom-nav .mbn-badge {
        left: auto;
        right: 50%;
        transform: translateX(-14px);
    }

/* =========================================================
   FORMS / INPUTS / GENERIC RTL FIX
   ========================================================= */

input,
textarea {
    direction: rtl;
    text-align: right;
}

    /* fix icons inside inputs */
    input::placeholder {
        text-align: right;
    }
