/* v831 — صفحه محصول موبایل مثل دیجی‌کالا: گالری چسبان، شیت روی گالری، نوار فروش ویژه، عنوان جمع‌شونده، پیل پیشرفت
   فقط موبایل/تبلت؛ موزاییک/ریل عکس‌ها دست نخورده. */
@media (max-width:991px){
  /* ۱) گرید حذف می‌شود تا گالری در کل طول .nx-theater چسبان بماند (قبلاً فقط تا آخر .nxd-grid) */
  html:root:root:root:root:root:root:root:root:root:root body.nxd-page .nx-theater{display:block!important;position:relative!important;overflow:visible!important}
  html:root:root:root:root:root:root:root:root:root:root body.nxd-page .nx-theater>.nxd-grid{display:contents!important}

  html:root:root:root:root:root:root:root:root:root:root body.nxd-page .nx-theater .nxd-gallery{
    position:sticky!important;top:var(--nx671-hh,56px)!important;z-index:1!important;
    margin:0!important;transform:none!important;background:#fff!important;
  }
  html[data-theme="dark"]:root:root:root:root:root:root:root:root:root:root body.nxd-page .nx-theater .nxd-gallery{background:var(--nxd-card,#0f1a2c)!important}

  /* ۲) همهٔ بخش‌های بعد از گالری، مات و بالاتر از آن؛ هنگام اسکرول روی گالری می‌لغزند */
  html:root:root:root:root:root:root:root:root:root:root body.nxd-page .nx-theater>:not(.nxd-grid):not(.nxd-gallery):not(.nx765-mobile-product):not(.nxd-tabs):not(script):not(style),
  html:root:root:root:root:root:root:root:root:root:root body.nxd-page .nx-theater .nxd-grid>.nxd-buy{
    position:relative!important;z-index:3!important;background:var(--nxd-card,#fff)!important;
  }
  html:root:root:root:root:root:root:root:root:root:root body.nxd-page .nx-theater .nxd-tabs{
    position:sticky!important;top:var(--nx671-hh,56px)!important;z-index:5!important;background:var(--nxd-card,#fff)!important;
  }

  /* ۳) شیت اطلاعات با لبهٔ گرد روی گالری */
  html:root:root:root:root:root:root:root:root:root:root body.nxd-page .nx-theater .nxd-grid>.nxd-info{
    position:relative!important;z-index:3!important;margin-top:-24px!important;
    padding:16px 14px 10px!important;border-radius:22px 22px 0 0!important;
    background:var(--nxd-card,#fff)!important;box-shadow:0 -6px 18px -12px rgba(15,23,42,.35)!important;
  }
  html:root:root:root:root:root:root:root:root:root:root body.nxd-page .nx-theater .nxd-grid>.nxd-info:has(>.nx792-sale:first-child){padding-top:0!important}

  /* ۴) نوار «فروش ویژه» دیجی‌کالایی: خط قرمز بالا، صورتی، تمام‌عرض، بالای شیت */
  html:root:root:root:root:root:root:root:root:root:root body.nxd-page .nxd-info>.nx792-sale{
    display:flex!important;align-items:center!important;gap:8px!important;
    margin:0 -14px 14px!important;padding:12px 16px!important;
    border:0!important;border-top:3px solid #ef4056!important;border-radius:22px 22px 0 0!important;
    background:#fdecee!important;color:#ef4056!important;font-size:14px!important;
  }
  html body.nxd-page .nxd-info>.nx792-sale b{font-weight:900!important;font-size:15px!important}
  html body.nxd-page .nxd-info>.nx792-sale span{margin-inline-start:auto!important;font-weight:900!important;font-size:14px!important}
  html body.nxd-page .nxd-info>.nx792-sale svg{width:18px!important;height:18px!important;flex:none}
  html[data-theme="dark"] body.nxd-page .nxd-info>.nx792-sale{background:rgba(239,64,86,.14)!important;color:#ff8a9a!important}

  /* ۵) عنوان: دو خط + فلش باز/بسته شدن */
  html body.nxd-page .nxd-info .nxd-cat{font-size:13px!important;font-weight:700!important;color:#0ea5e9!important;margin-bottom:6px!important;display:inline-block}
  html body.nxd-page .nxd-info h1.nxd-title{
    position:relative!important;font-size:15.5px!important;font-weight:800!important;line-height:2.1!important;
    margin:2px 0 10px!important;padding-inline-start:30px!important;color:#0f172a!important;
  }
  html[data-theme="dark"] body.nxd-page .nxd-info h1.nxd-title{color:#fff!important}
  html body.nxd-page .nxd-info h1.nxd-title.nx831-clamp{display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;line-clamp:2!important;overflow:hidden!important}
  html body.nxd-page .nxd-info h1.nxd-title .nx831-more{
    position:absolute;left:0;bottom:2px;width:28px;height:28px;padding:0;border:0;background:transparent;color:#6b7280;
    display:grid;place-items:center;cursor:pointer;
  }
  html body.nxd-page .nxd-info h1.nxd-title .nx831-more svg{width:18px;height:18px;transition:transform .2s}
  html body.nxd-page .nxd-info h1.nxd-title:not(.nx831-clamp) .nx831-more svg{transform:rotate(180deg)}

  /* ۶) نوار پیشرفت: پیل دیجی‌کالایی پایین‌چپ گالری؛ خط نازک قدیمی مخفی */
  html body .nxd-stage.nx817-rail-on .nx787-prog{display:none!important}
  html body .nxd-stage .nx831-pill{
    position:absolute;left:14px;bottom:38px;z-index:6;display:flex;align-items:center;gap:8px;
    padding:6px 12px;border-radius:999px;background:rgba(70,70,75,.82);color:#fff;
    font-size:13px;font-weight:800;direction:ltr;pointer-events:none;line-height:1;
  }
  html body .nxd-stage .nx831-pill i{display:block;width:52px;height:4px;border-radius:4px;background:rgba(255,255,255,.35);overflow:hidden}
  html body .nxd-stage .nx831-pill b{display:block;height:100%;width:22%;border-radius:4px;background:#fff}
  html body .nxd-stage .nx831-pill s{width:1px;height:14px;background:rgba(255,255,255,.5)}
  html body .nxd-stage .nx831-pill svg{width:16px;height:16px}
}
