/* Xemry native EN/AR header dropdown — v3.9.9. Scoped to the header only. */
body.xm-refined .xm-language-cart-group {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 5px;
  direction: ltr; /* language icon stays physically LEFT of cart in both page directions */
  min-width: 0;
}
body.xm-refined .xm-header-lang {
  position: relative;
  z-index: 300;
  flex: 0 0 auto;
  font-family: var(--xm-sans, Manrope, sans-serif);
  direction: ltr;
  text-align: left;
  color: #133f32;
}
body.xm-refined .xm-header-lang-trigger {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  min-width: 72px;
  height: 38px;
  padding: 5px 7px;
  margin: 0;
  background: transparent;
  color: #133f32;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font: 750 11px/1 var(--xm-sans, Manrope, sans-serif);
  white-space: nowrap;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}
body.xm-refined .xm-header-lang-trigger::-webkit-details-marker {display: none;}
body.xm-refined .xm-header-lang-trigger::marker {content: '';}
body.xm-refined .xm-header-lang-trigger:hover,
body.xm-refined .xm-header-lang[open] .xm-header-lang-trigger { background: #edf4ed; border-color: #dce9df; }
body.xm-refined .xm-header-lang-trigger:focus-visible { outline: 2px solid #276847; outline-offset: 2px; }
body.xm-refined .xm-header-lang .xm-lang-flag {
  width: 23px !important;
  min-width: 23px;
  height: 16px !important;
  object-fit: cover;
  display: block;
  flex: 0 0 auto;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(15,50,37,.12);
}
body.xm-refined .xm-header-lang-trigger .xm-lang-chevron {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  transition: transform .16s ease;
  flex: 0 0 auto;
}
body.xm-refined .xm-header-lang[open] .xm-lang-chevron { transform: rotate(180deg); }
body.xm-refined .xm-header-lang-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 162px;
  width: max-content;
  max-width: min(210px, calc(100vw - 20px));
  padding: 5px;
  background: #fff;
  border: 1px solid #dce7dd;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(10,44,31,.16);
  z-index: 999;
  text-align: left;
  direction: ltr;
}
body.xm-refined .xm-header-lang:not([open]) .xm-header-lang-panel { display: none; }
body.xm-refined .xm-header-lang-option {
  display: flex;
  gap: 10px;
  align-items: center;
  text-decoration: none !important;
  width: 100%;
  min-height: 39px;
  padding: 8px 9px;
  color: #183d31 !important;
  border-radius: 6px;
  font: 650 12px/1.3 var(--xm-sans, Manrope, sans-serif);
}
body.xm-refined .xm-header-lang-option:hover,
body.xm-refined .xm-header-lang-option:focus-visible { background: #eef5ef; outline: none; }
body.xm-refined .xm-header-lang-option.is-selected { background: #f2f7f3; }
body.xm-refined .xm-header-lang-option .xm-lang-check {
  margin-left: auto;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: #23744a;
  stroke-width: 2.2;
}
@media (max-width: 1180px) {
  body.xm-refined .xm-header-lang-trigger { min-width: 42px; padding-inline: 5px; gap: 3px; }
  body.xm-refined .xm-header-lang-trigger .xm-lang-code { display: none; }
  body.xm-refined .xm-header-lang-trigger .xm-lang-chevron {width: 10px;}
}
@media (max-width: 720px) {
  body.xm-refined .xm-language-cart-group { gap: 2px; }
  body.xm-refined .xm-header-lang-trigger { min-width: 37px; width: 37px; height: 36px; padding: 4px 3px; gap: 2px; }
  body.xm-refined .xm-header-lang .xm-lang-flag { width: 21px !important; min-width: 21px; height: 15px !important; }
  body.xm-refined .xm-header-lang-trigger .xm-lang-chevron { width: 8px; }
}
@media (max-width: 350px) {
  body.xm-refined .xm-header-lang-trigger { min-width: 33px; width: 33px; }
  body.xm-refined .xm-header-lang .xm-lang-flag { width: 19px !important; min-width: 19px; height: 14px !important; }
}
/* Keep option links on-screen if the header is anchored on the left in Arabic. */
html[dir="rtl"] body.xm-refined .xm-header-lang-panel { right: auto; left: 0; }
@media (prefers-reduced-motion: reduce) {
  body.xm-refined .xm-header-lang-trigger .xm-lang-chevron { transition: none; }
}
