/* NEXUS v788 — product page layout (Digikala-style): ONE clean layer, loaded last.
   Desktop: 3 columns (gallery | info | sticky buy box). Mobile: single column, fixed bottom buy bar. */
html:root:root:root:root:root:root:root:root body.nxd-page main.nxd,
html:root:root:root:root:root:root:root:root body.nxd-page .nxd-wrap,
html:root:root:root:root:root:root:root:root body.nxd-page .nxd-grid{overflow:visible!important}
html:root:root:root:root:root:root:root:root body.nxd-page .nxd-wrap{max-width:1280px;margin-inline:auto;padding-inline:16px}

/* cards */
html:root:root:root:root:root:root:root:root body.nxd-page .nxd-gallery,
html:root:root:root:root:root:root:root:root body.nxd-page .nxd-buy{background:var(--nxd-card,#fff)!important;border:1px solid rgba(148,163,184,.28)!important;border-radius:16px!important;box-shadow:0 10px 28px -20px rgba(15,23,42,.35)!important;box-sizing:border-box}
html:root:root:root:root:root:root:root:root body.nxd-page .nxd-gallery{padding:12px!important}
html:root:root:root:root:root:root:root:root body.nxd-page .nxd-buy{padding:16px!important;display:flex!important;flex-direction:column!important;gap:12px!important}
html:root:root:root:root:root:root:root:root body.nxd-page .nxd-buy .nxd-cta{width:100%;min-height:48px;border-radius:12px!important;font-weight:800}
html:root:root:root:root:root:root:root:root body.nxd-page .nxd-buy .nxd-buyrow{display:flex;gap:10px;align-items:stretch}
html:root:root:root:root:root:root:root:root body.nxd-page .nxd-buy .nxd-buyrow .nxd-cta{flex:1}
html:root:root:root:root:root:root:root:root body.nxd-page .nxd-thumbs{display:flex!important;gap:8px;overflow-x:auto;margin-top:10px;scrollbar-width:none}
html:root:root:root:root:root:root:root:root body.nxd-page .nxd-thumbs::-webkit-scrollbar{display:none}
html:root:root:root:root:root:root:root:root body.nxd-page .nxd-thumbs .nx-thumb{flex:0 0 62px;width:62px;height:62px;padding:3px;border-radius:12px;border:2px solid transparent;background:#fff;overflow:hidden}
html:root:root:root:root:root:root:root:root body.nxd-page .nxd-thumbs .nx-thumb img{width:100%;height:100%;object-fit:contain;border-radius:8px}
html:root:root:root:root:root:root:root:root body.nxd-page .nxd-thumbs .nx-thumb.is-active{border-color:#2563eb}
html:root:root:root:root:root:root:root:root body.nxd-page .nxd-feats{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
html:root:root:root:root:root:root:root:root body.nxd-page .nxd-feat{border-radius:12px;padding:10px 12px;background:rgba(148,163,184,.12)}

/* tabs + sections as cards */
html:root:root:root:root:root:root:root:root body.nxd-page .nxd-tabs{margin:16px 0 !important;padding:5px!important;gap:4px!important;border:1px solid rgba(148,163,184,.28)!important;border-radius:14px!important;background:var(--nxd-card,#fff)!important}
html:root:root:root:root:root:root:root:root body.nxd-page .nxd-tabs a{padding:10px 16px!important;border-radius:10px!important;font-weight:700;white-space:nowrap;border:0!important}
html:root:root:root:root:root:root:root:root body.nxd-page .nxd-tabs a.is-active{background:#2563eb!important;color:#fff!important}
html:root:root:root:root:root:root:root:root body.nxd-page .nxd-secs{display:flex!important;flex-direction:column;gap:14px}
html:root:root:root:root:root:root:root:root body.nxd-page .nxd-sec{margin:0!important;padding:18px 20px!important;background:var(--nxd-card,#fff)!important;border:1px solid rgba(148,163,184,.28)!important;border-radius:16px!important;scroll-margin-top:calc(var(--nx671-hh,64px) + 70px)}

/* trust: one compact row; drop the duplicate bottom block */
html:root:root:root:root:root:root:root:root body.nxd-page .nx765-proof-rail{margin:16px 0!important}
html:root:root:root:root:root:root:root:root body.nxd-page .nx765-proof-head{display:none!important}
html:root:root:root:root:root:root:root:root body.nxd-page .nx-why-nexus{display:none!important}

/* DESKTOP */
@media (min-width:992px){
  html:root:root:root:root:root:root:root:root body.nxd-page .nxd-wrap .nxd-grid{display:grid!important;grid-template-columns:minmax(0,420px) minmax(0,1fr) 330px!important;column-gap:28px!important;row-gap:0!important;align-items:start!important}
  html:root:root:root:root:root:root:root:root body.nxd-page .nxd-grid>.nxd-gallery{grid-column:1;grid-row:1;position:sticky!important;top:calc(var(--nx671-hh,64px) + 16px)!important;align-self:start}
  html:root:root:root:root:root:root:root:root body.nxd-page .nxd-grid>.nxd-info{grid-column:2;grid-row:1;min-width:0}
  html:root:root:root:root:root:root:root:root body.nxd-page .nxd-grid>.nxd-buy{grid-column:3;grid-row:1;position:sticky!important;top:calc(var(--nx671-hh,64px) + 16px)!important;align-self:start}
  html:root:root:root:root:root:root:root:root body.nxd-page .nxd-buy .nxp-sb,
  html:root:root:root:root:root:root:root:root body.nxd-page .nxp-sb{display:none!important}
  html:root:root:root:root:root:root:root:root body.nxd-page .nx765-proof-track{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;overflow:visible!important}
  html:root:root:root:root:root:root:root:root body.nxd-page .nx765-proof-card{width:auto!important;min-width:0;border-radius:14px;overflow:hidden}
}
/* MOBILE / TABLET */
@media (max-width:991px){
  html:root:root:root:root:root:root:root:root body.nxd-page .nxd-wrap{padding-inline:10px}
  html:root:root:root:root:root:root:root:root body.nxd-page .nxd-wrap .nxd-grid{display:flex!important;flex-direction:column!important;gap:0!important}
  /* v791: no sticky gallery on mobile (smooth scroll); info sheet overlaps the gallery edge */
  html:root:root:root:root:root:root:root:root body.nxd-page .nxd-grid>.nxd-gallery{order:1;position:relative!important;top:auto!important;z-index:1;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:#fff!important}
  html:root:root:root:root:root:root:root:root body.nxd-page .nxd-grid>.nxd-info{order:2;position:relative;z-index:3;margin-top:-18px;padding:18px 14px 8px;background:var(--nxd-card,#fff)!important;border-radius:22px 22px 0 0;box-shadow:0 -4px 12px -6px rgba(15,23,42,.18)}
  html:root:root:root:root:root:root:root:root body.nxd-page .nxd-grid>.nxd-buy{order:3;position:relative!important;z-index:3;border:0!important;border-radius:0 0 16px 16px!important;box-shadow:none!important;border-top:1px solid rgba(148,163,184,.25)!important}
  html:root:root:root:root:root:root:root:root body.nxd-page .nxd-sec{padding:14px!important}
}

/* v792: seller box (flat, inside buy card) */
html:root:root:root:root:root:root:root:root body.nxd-page .nxd-buy .nx665-sl{border:0!important;background:transparent!important;box-shadow:none!important;padding:0!important;margin:0!important}
html:root:root:root:root:root:root:root:root body.nxd-page .nx665-sl-h{flex-wrap:nowrap!important;gap:10px!important;padding-bottom:10px!important;border-bottom:1px solid rgba(148,163,184,.25)!important}
html:root:root:root:root:root:root:root:root body.nxd-page .nx665-sl-ic{width:42px;height:42px;border-radius:50%;background:rgba(37,99,235,.10)}
html:root:root:root:root:root:root:root:root body.nxd-page .nx665-sl-ic svg{width:22px;height:22px}
html:root:root:root:root:root:root:root:root body.nxd-page .nx665-sl-h b{font-size:15px!important}
html:root:root:root:root:root:root:root:root body.nxd-page .nx665-sl-h em{background:transparent!important;color:#64748b!important;padding:0!important;font-weight:700!important;font-size:12px!important;white-space:nowrap}
html:root:root:root:root:root:root:root:root body.nxd-page .nx665-sl-ul li{border-bottom:0!important;padding:8px 0!important;font-size:13px!important}
/* v792: special-sale strip (no timer) */
.nx792-sale{display:flex;align-items:center;gap:8px;margin:0 0 12px;padding:9px 12px;border-radius:12px;background:#fff1f2;color:#be123c;font-size:13.5px;font-weight:800}
.nx792-sale span{margin-inline-start:auto;font-weight:900}
@media (max-width:991px){
  .nx792-sale{margin:-18px -14px 12px;border-radius:22px 22px 0 0;border-top:3px solid #f43f5e;padding:12px 16px}
}
html[data-theme="dark"] .nx792-sale{background:rgba(244,63,94,.14);color:#fda4af}
