/* أساسيات مشتركة لكل متاجر المعرض (ميكانيكا فقط — الشكل في ملف كل عالم) */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scrollbar-gutter:stable;overflow-x:clip}
body{margin:0;overflow-x:clip;min-height:100vh;-webkit-tap-highlight-color:transparent;overscroll-behavior-x:none}
img{display:block;max-width:100%}
button{font:inherit;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
a{color:inherit}
input,select,textarea{font:inherit}
[hidden]{display:none!important}
html.ov-lock{overflow:hidden}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
:focus-visible{outline:2px solid currentColor;outline-offset:2px}

/* الشريط الثابت */
.stack{position:sticky;top:0;z-index:50}

/* النوافذ */
.ov{position:fixed;left:0;right:0;bottom:0;top:var(--stack-h,120px);z-index:40;visibility:hidden;pointer-events:none}
.ov.open{visibility:visible;pointer-events:auto}
.ov-scroll{height:100%;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.ov-modal{top:0;z-index:60;display:grid;place-items:center;padding:16px}
.ov-modal .ov-panel{max-height:calc(100% - 8px);width:min(460px,100%);display:flex;flex-direction:column}
.ov-modal .ov-scroll{height:auto;max-height:100%}

/* نتائج البحث */
#search-results{position:absolute;left:0;right:0;top:100%;margin:0 auto;max-width:560px;display:none;max-height:min(60vh,420px);overflow-y:auto}
#search-results.open{display:block}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}
}
#products{scroll-margin-top:calc(var(--stack-h,120px) + 10px)}
