/* Storefront languages: switcher, Arabic typography and RTL details.
   Layout mirroring itself comes from the generated *.rtl.css files (npm run build:rtl). */

/* Language switcher in the black top bar */
.langSwitch { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; opacity: .85; transition: opacity .2s; }
.langSwitch:hover, .langSwitch:focus-visible { opacity: 1; }
.langSwitch img { width: 14px; height: auto; }
.langSwitch span { line-height: 1; }

/* Typography is shared with administrator sign-in via fonts.css. */
html[lang="ar"] body { line-height: 1.7; }

/* Directional icons point the other way in RTL */
html[dir="rtl"] .fa-chevron-right,
html[dir="rtl"] .fa-chevron-left,
html[dir="rtl"] .fa-arrow-right,
html[dir="rtl"] .fa-arrow-left,
html[dir="rtl"] .fa-arrow-right-long,
html[dir="rtl"] .fa-arrow-left-long,
html[dir="rtl"] .fa-angle-right,
html[dir="rtl"] .fa-angle-left,
html[dir="rtl"] .fa-caret-right,
html[dir="rtl"] .fa-caret-left,
html[dir="rtl"] .fa-right-from-bracket,
html[dir="rtl"] .fa-arrow-right-from-bracket { transform: scaleX(-1); }

/* Numbers, phone numbers, prices and codes keep their natural order inside Arabic text */
html[dir="rtl"] .productPrice,
html[dir="rtl"] .productOldPrice,
html[dir="rtl"] [dir="ltr"] { unicode-bidi: isolate; }
/* Phone numbers whose markup is shared with the English page */
html[dir="rtl"] .topBarItem span { direction: ltr; unicode-bidi: isolate; }

/* Keep Arabic contact layouts RTL; isolate only the number itself. */
html[dir="rtl"] a[href^="tel:"]:not([dir="ltr"]){direction:rtl}
html[dir="rtl"] a[href^="tel:"] [dir="ltr"],html[dir="rtl"] .contactCardItem > span[dir="ltr"]{direction:ltr;unicode-bidi:isolate;text-align:right}
html[dir="rtl"] .contactCardItem{text-align:right}

/* Equal client tiles and logo canvases, including linked logos. */
.companyClients{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:stretch}
.companyClients li{width:100%;min-width:0;height:128px;aspect-ratio:auto;padding:20px;overflow:hidden}
.companyClients li>a{display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-width:0}
.companyClients img{display:block;width:100%;height:80px;max-width:160px;max-height:100%;object-fit:contain;object-position:center}
@media(min-width:640px){.companyClients{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(min-width:1024px){.companyClients{grid-template-columns:repeat(6,minmax(0,1fr))}}

/* A group containing one main category can use the full menu width. */
.megaGroups.megaGroups--single{columns:auto;width:100%}
.megaGroups--single .megaGroup ul{display:grid;grid-auto-flow:column;grid-template-columns:repeat(var(--subcategory-columns,1),minmax(0,1fr));grid-template-rows:repeat(var(--subcategory-rows,5),auto);gap:4px 24px;align-items:start}
.megaGroups--single .megaGroup li{min-width:0}
.accInvoiceAction{display:flex;margin:0}.accInvoiceAction .accBtn{width:100%}
@media(max-width:479px){.accOrderActions .accInvoiceAction{flex:1 1 auto}}
.megaGroups--single .megaGroup li a{white-space:normal;overflow-wrap:anywhere}
