/* The single focus policy for Asfar. Legacy product-layout CSS excludes these
   treatments on this theme; keyboard focus remains visible without pointer halos. */
body:is(.wp-child-theme-asfar,.asfar-theme-catalogue) :is(a[href],button,summary,[role=button],[tabindex],input[type=checkbox],input[type=radio]):not(:disabled):focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}
body:is(.wp-child-theme-asfar,.asfar-theme-catalogue) :is(a[href],button,summary,[role=button],[tabindex],input[type=checkbox],input[type=radio]):not(:disabled):focus:focus-visible {
  outline: 2px solid #777d6f;
  outline-offset: 2px;
  box-shadow: none;
}
body:is(.wp-child-theme-asfar,.asfar-theme-catalogue) :is(input[type=search],input[type=text],input[type=email],input[type=tel],input[type=password],input[type=number],textarea,select):not(:disabled):not([type=hidden]):focus {
  outline: none;
  box-shadow: none;
  border-color: #777d6f;
}
body:is(.wp-child-theme-asfar,.asfar-theme-catalogue) .quantity:focus-within { box-shadow: none; border-color: #777d6f; }
/* Honor pointer intent even when a native modal programmatically moves focus. */
html[data-asfar-input=pointer] body:is(.wp-child-theme-asfar,.asfar-theme-catalogue) :is(a[href],button,summary,[role=button],[tabindex],input[type=checkbox],input[type=radio]):not(:disabled):focus {
  outline: none;
  box-shadow: none;
}
/* The page and its overlays use the same quiet native scrollbar. */
html:has(> body:is(.wp-child-theme-asfar,.asfar-theme-catalogue)) { scrollbar-width: thin; scrollbar-gutter: stable; scrollbar-color: #c3c7bc transparent; }
html:has(> body:is(.wp-child-theme-asfar,.asfar-theme-catalogue))::-webkit-scrollbar { width: 6px; }
html:has(> body:is(.wp-child-theme-asfar,.asfar-theme-catalogue))::-webkit-scrollbar-track { background: transparent; }
html:has(> body:is(.wp-child-theme-asfar,.asfar-theme-catalogue))::-webkit-scrollbar-thumb { background: #c3c7bc; border-radius: 6px; }

/* Put the viewport scrollbar on the right without changing Arabic content or
   the document's semantic dir=rtl. Only scrolling surfaces use LTR geometry. */
html:has(> body:is(.wp-child-theme-asfar,.asfar-theme-catalogue)) { direction: ltr; }
body:is(.wp-child-theme-asfar,.asfar-theme-catalogue) { direction: rtl; overflow-x: clip; overflow-y: visible; }

/* One lock for the menu and instant search. Keep the page still with no gutter
   between the sheet and viewport edge; do not alter the page's scroll position. */
html.asfar-overlay-open:has(> body:is(.wp-child-theme-asfar,.asfar-theme-catalogue)) { overflow: hidden; scrollbar-gutter: auto; }
html.asfar-overlay-open body { overflow: clip; width: calc(100% - var(--asfar-scrollbar-gap, 0px)); margin-left: 0; margin-right: auto; }
:is(.asfar-menu-scroll,.asfar-instant-search) { scrollbar-width: thin; scrollbar-color: #c3c7bc transparent; }
:is(.asfar-menu-scroll,.asfar-instant-search)::-webkit-scrollbar { width: 6px; }
:is(.asfar-menu-scroll,.asfar-instant-search)::-webkit-scrollbar-thumb { background: #c3c7bc; border-radius: 6px; }
