/*
 * ONECAT PREMIUM RTL V1
 *
 * Applied only while document dir="rtl".
 * The English / LTR design is untouched.
 */


/* =========================================================
   GLOBAL RTL CONTAINMENT
   Prevent horizontal overflow seen in current Arabic page.
   ========================================================= */

html[dir="rtl"],
html[dir="rtl"] body{
    max-width:100%;
    overflow-x:hidden;
}

html[dir="rtl"] body{
    direction:rtl;
}


/* =========================================================
   ARABIC TYPOGRAPHY
   ========================================================= */

html[dir="rtl"] body{
    font-family:
        "Segoe UI",
        Tahoma,
        Arial,
        sans-serif;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4{
    letter-spacing:0 !important;
    line-height:1.3;
}


/* =========================================================
   HEADER
   ========================================================= */

@media (min-width:981px){

    html[dir="rtl"] .oc-header .section-wrap,
    html[dir="rtl"] .oc-header .header-inner{
        direction:rtl;
    }

    html[dir="rtl"] .oc-header .oc-nav{
        direction:rtl;
    }

    html[dir="rtl"] .oc-header .oc-menu{
        direction:rtl;
    }

    html[dir="rtl"] .oc-header .oc-menu > a{
        letter-spacing:0;
        white-space:nowrap;
    }

}


/* =========================================================
   NAVIGATION CHEVRONS
   Down-chevron itself should rotate only when opened.
   Do not mirror it horizontally.
   ========================================================= */

html[dir="rtl"] .oc-nav-chevron{
    transform:none;
}

html[dir="rtl"]
.oc-menu > a.is-active
.oc-nav-chevron{
    transform:rotate(180deg);
}


/* =========================================================
   MEGA MENU
   ========================================================= */

html[dir="rtl"] .oc-mega-layer{
    direction:rtl;
}

html[dir="rtl"] .oc-mega-panel{
    direction:rtl;
    text-align:right;
}

html[dir="rtl"] .oc-mega-intro{
    align-items:flex-start;
    text-align:right;
}

html[dir="rtl"] .oc-mega-heading{
    direction:rtl;
}

html[dir="rtl"] .oc-mega-card,
html[dir="rtl"] .oc-mega-info-card,
html[dir="rtl"] .oc-mega-link{
    text-align:right;
}

html[dir="rtl"] .oc-mega-product-logo{
    margin-left:auto;
    margin-right:0;
}


/* =========================================================
   DIRECTIONAL ARROWS
   ========================================================= */

html[dir="rtl"] .oc-mega-arrow{
    transform:scaleX(-1);
}

html[dir="rtl"]
.oc-mega-card:hover
.oc-mega-arrow{
    transform:
        scaleX(-1)
        translateX(2px);
}


/* Common literal arrow characters/buttons */

html[dir="rtl"] a,
html[dir="rtl"] button{
    unicode-bidi:plaintext;
}


/* =========================================================
   HERO
   ========================================================= */

html[dir="rtl"] .hero-copy,
html[dir="rtl"] .hero-content,
html[dir="rtl"] .hero-text{
    text-align:right;
}

html[dir="rtl"] .hero h1{
    letter-spacing:0 !important;
    line-height:1.15;
}

html[dir="rtl"] .hero p{
    line-height:1.75;
}


/* Keep embedded English abbreviations visually stable */

html[dir="rtl"] .hero h1 strong,
html[dir="rtl"] .hero h1 b{
    unicode-bidi:isolate;
}


/* =========================================================
   BUTTON GROUPS
   ========================================================= */

html[dir="rtl"] .hero-actions,
html[dir="rtl"] .cta-actions{
    direction:rtl;
}

html[dir="rtl"] .hero-actions a,
html[dir="rtl"] .hero-actions button,
html[dir="rtl"] .cta-actions a,
html[dir="rtl"] .cta-actions button{
    letter-spacing:0;
}


/* =========================================================
   PRODUCT GRID
   ========================================================= */

html[dir="rtl"] .product-grid,
html[dir="rtl"] .products-grid,
html[dir="rtl"] .product-card{
    direction:rtl;
}

html[dir="rtl"] .product-card{
    text-align:right;
}

html[dir="rtl"] .product-card h3,
html[dir="rtl"] .product-card p{
    text-align:right;
}

html[dir="rtl"] .product-card img{
    direction:ltr;
}


/* Keep English product names natural */

html[dir="rtl"] .product-card h3{
    unicode-bidi:plaintext;
}


/* =========================================================
   FEATURE / ICON ROWS
   ========================================================= */

html[dir="rtl"] .features,
html[dir="rtl"] .feature-row,
html[dir="rtl"] .trust-row{
    direction:rtl;
}


/* =========================================================
   LANGUAGE PICKER
   ========================================================= */

html[dir="rtl"] .oc-premium-lang{
    direction:rtl;
}

html[dir="rtl"] .oc-i18n-panel{
    direction:rtl;
    text-align:right;
}

html[dir="rtl"] .oc-i18n-head{
    direction:rtl;
}

html[dir="rtl"] .oc-i18n-search{
    direction:rtl;
    text-align:right;
}

html[dir="rtl"] .oc-i18n-option{
    direction:rtl;
    text-align:right;
}


/* =========================================================
   FOOTER
   ========================================================= */

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

html[dir="rtl"] .oc-footer .footer-bottom{
    direction:rtl;
}


/* =========================================================
   CHAT BUTTON
   The floating mascot must not create page overflow.
   ========================================================= */

html[dir="rtl"] .oc-chat-widget,
html[dir="rtl"] [id*="chatWidget"]{
    max-width:calc(100vw - 20px);
}


/* =========================================================
   GENERIC SAFETY
   ========================================================= */

html[dir="rtl"] img,
html[dir="rtl"] video,
html[dir="rtl"] iframe{
    max-width:100%;
}


/* =========================================================
   MOBILE RTL
   ========================================================= */

@media(max-width:980px){

    html[dir="rtl"] .oc-header,
    html[dir="rtl"] .oc-menu{
        direction:rtl;
    }

    html[dir="rtl"] .hero-actions{
        align-items:stretch;
    }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media(prefers-reduced-motion:reduce){

    html[dir="rtl"] *{
        scroll-behavior:auto !important;
    }

}


/* ONECAT_RTL_OVERFLOW_FIX_V2 */

html[dir="rtl"]{
    overflow-x:clip !important;
}

html[dir="rtl"] body{
    overflow-x:clip !important;
    width:100%;
}

html[dir="rtl"] .page,
html[dir="rtl"] main,
html[dir="rtl"] section{
    max-width:100%;
}
