/* v787 product gallery slider */
html body .nxd-stage.nx787-on .nx-lq{display:none!important}
/* v801: عکس اصلی حذف نمی‌شود (ارتفاع قاب را نگه می‌دارد)، فقط نامرئی می‌شود؛ در حالت موزاییک موبایل v795 آن را display:none می‌کند */
html body .nxd-stage.nx787-on:not(.nx790-on)>#mainImg{visibility:hidden!important;opacity:0!important;pointer-events:none!important}
/* v801: اطمینان از ارتفاع قاب و دیده‌شدن ریل اسلایدر */
html body .nxd-stage.nx787-on:not(.nx790-on){min-height:260px}
html body .nx787-rail{position:absolute;inset:0;z-index:1;display:flex;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;scrollbar-width:none;direction:ltr;cursor:grab}
html body .nx787-rail::-webkit-scrollbar{display:none}
html body .nx787-rail.is-drag{cursor:grabbing}
html body .nx787-slide{flex:0 0 100%;width:100%;height:100%;scroll-snap-align:center;scroll-snap-stop:always;display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:16px}
html body .nx787-slide img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;mix-blend-mode:normal;user-select:none;-webkit-user-drag:none}
html[data-theme="dark"] body .nx787-slide img{mix-blend-mode:normal}
html body .nx787-prog{position:absolute;left:14px;right:14px;bottom:12px;height:4px;border-radius:999px;background:rgba(15,23,42,.12);z-index:3;overflow:hidden;pointer-events:none;direction:ltr}
html[data-theme="dark"] body .nx787-prog{background:rgba(255,255,255,.18)}
html body .nx787-prog span{display:block;height:100%;width:0;border-radius:999px;background:#2563eb;transition:width .25s ease}
html body .nx787-cnt{position:absolute;left:12px;bottom:22px;z-index:3;padding:2px 9px;border-radius:999px;background:rgba(0,0,0,.55);color:#fff;font-size:12px;font-weight:700;direction:ltr;pointer-events:none}
html body .nxd-stage .nx787-arr{position:absolute;top:50%;transform:translateY(-50%);z-index:4;width:38px;height:38px;padding:0;border:0;border-radius:50%;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.9);color:#0f172a;box-shadow:0 6px 16px -6px rgba(15,23,42,.45);cursor:pointer;opacity:0;transition:opacity .18s}
html body .nxd-stage .nx787-arr svg{width:20px;height:20px}
html body .nxd-stage .nx787-prev{left:10px;right:auto}
html body .nxd-stage .nx787-next{right:10px;left:auto}
html body .nxd-stage:hover .nx787-arr{opacity:1}
html[data-theme="dark"] body .nxd-stage .nx787-arr{background:rgba(15,26,44,.85);color:#fff}
@media (hover:none){html body .nxd-stage .nx787-arr{display:none}}

/* v790 mosaic rail (mobile) */
html:root:root:root:root:root:root:root:root body.nxd-page .nxd-gallery.nx790-m .nxd-thumbs{display:none!important}
html:root:root:root:root:root:root:root:root body.nxd-page .nxd-stage.nx790-on{aspect-ratio:auto!important;height:min(72vw,40vh)!important;max-height:none!important;background:#fff!important;border-radius:0!important;overflow:hidden}
.nx790-rail{position:absolute;inset:0;display:flex;gap:8px;padding:0 10px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity;direction:rtl;overscroll-behavior-x:contain}
.nx790-rail::-webkit-scrollbar{display:none}
.nx790-big{flex:0 0 66%;height:100%;scroll-snap-align:start}
.nx790-col{flex:0 0 36%;height:100%;display:grid;grid-template-rows:1fr 1fr;gap:8px;scroll-snap-align:start}
.nx790-col.is-one{grid-template-rows:1fr}
.nx790-tile{height:100%;min-height:0;border-radius:16px;background:#fff;border:1px solid rgba(148,163,184,.30);box-sizing:border-box;display:flex;align-items:center;justify-content:center;overflow:hidden;cursor:pointer}
.nx790-tile img{width:100%;height:100%;object-fit:contain;border-radius:16px;mix-blend-mode:normal;user-select:none;-webkit-user-drag:none;pointer-events:none}
html[data-theme="dark"] .nx790-tile img{mix-blend-mode:normal}
.nx790-pill{position:absolute;left:14px;bottom:34px;z-index:3;display:flex;align-items:center;gap:8px;padding:7px 12px;border-radius:999px;background:rgba(70,70,75,.82);color:#fff;font-size:13px;font-weight:800;direction:ltr;pointer-events:none}
.nx790-pill i{display:block;width:52px;height:4px;border-radius:4px;background:rgba(255,255,255,.35);overflow:hidden;direction:rtl}
.nx790-pill b{display:block;height:100%;width:22%;border-radius:4px;background:#fff}
.nx790-pill s{width:1px;height:14px;background:rgba(255,255,255,.5)}
.nx790-pill svg{width:16px;height:16px}

html[data-theme="dark"] .nx790-tile,html[data-theme="dark"] body.nxd-page .nxd-stage.nx790-on{background:var(--nxd-card,#0f1a2c)!important}

/* v793: باکس هر عکس به اندازهٔ نسبت خودش؛ گوشهٔ باکس گرد، گوشهٔ عکس تیز */
.nx790-big,.nx790-col{flex:0 0 auto!important;width:auto}
.nx790-tile{padding:6px;background:#f3f4f6;border:0;border-radius:14px;box-sizing:border-box}
.nx790-tile img{width:100%;height:100%;object-fit:contain;border-radius:0!important}
html[data-theme="dark"] .nx790-tile{background:var(--nxd-card,#0f1a2c)}

/* v794: گوشهٔ عکس هم گرد، پس‌زمینهٔ باکس سفید */
.nx790-tile{background:#fff!important;border:1px solid rgba(148,163,184,.28)}
.nx790-tile img{border-radius:10px!important}
html[data-theme="dark"] .nx790-tile{background:var(--nxd-card,#0f1a2c)!important}
/* v794: عنوان چسبان هنگام اسکرول */
.nx794-bar{position:fixed;left:0;right:0;top:var(--nx671-hh,64px);z-index:60;background:#fff;border-bottom:1px solid rgba(148,163,184,.3);padding:10px 14px;font-size:14px;font-weight:800;line-height:1.5;color:#0f172a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;direction:rtl;transform:translateY(-130%);opacity:0;pointer-events:none;transition:transform .2s ease,opacity .2s ease}
.nx794-bar.is-on{transform:none;opacity:1}
html[data-theme="dark"] .nx794-bar{background:var(--nxd-card,#0f1a2c);color:#fff}
