/* 放大层：全屏白底。左上返回、右上选灯单；中间内容一屏放得下就不滚，
   放不下才在中间上下滑；底部三个按钮固定。 */

.zm{position:fixed;inset:0;z-index:50;display:flex;flex-direction:column;
  background:var(--card);overflow:hidden}
.zm[hidden]{display:none}
/* 放大层开着时锁住底下的主页，别让手指把它带着滚 */
html.zm-open,html.zm-open body{overflow:hidden}

/* 顶栏：苹果那种"‹"＋选灯单图标（带红点） */
.zm-top{flex:none;display:flex;align-items:center;justify-content:space-between;
  height:48px;padding:env(safe-area-inset-top) 8px 0}
.zm-bk{width:40px;height:44px;display:flex;align-items:center;justify-content:center;
  font-size:30px;line-height:1;color:var(--ink);padding:0 0 5px}
.zm-ct{position:relative;width:40px;height:44px;display:flex;align-items:center;justify-content:center}
.zm-ct svg{width:23px;height:23px;fill:none;stroke:var(--ink);stroke-width:1.7;
  stroke-linecap:round;stroke-linejoin:round}
.zm-ct .dot{position:absolute;top:4px;right:0;min-width:16px;height:16px;border-radius:8px;
  background:var(--red);color:#fff;font-size:10px;line-height:16px;text-align:center;
  font-weight:600;padding:0 4px}
.zm-ct .dot[hidden]{display:none}

/* 中间：图＋货号规格＋价格。flex+min-height:0，内容矮就不滚，高了才滚 */
.zm-body{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;scrollbar-width:none}
.zm-body::-webkit-scrollbar{display:none}
.zm-page{will-change:transform}
.zm-img{background:#f2f2f5;cursor:pointer}
.zm-img img{display:block;width:100%;aspect-ratio:1;object-fit:cover;pointer-events:none}
.zm-info{padding:12px 16px 0}
.zm-id{font-size:19px;line-height:26px;font-weight:700;color:var(--ink);word-break:break-all}
.zm-spec{margin-top:4px;font-size:12px;line-height:19px;color:var(--sub)}
.zm-spec i{font-style:normal;color:var(--muted);margin-right:6px}

/* 价格框：单选。多价的灯没选就点"加入"时整排闪一下 */
.zm-prices{display:flex;flex-wrap:wrap;gap:8px;padding:12px 16px 16px}
.pz{flex:1 1 44%;min-width:0;min-height:42px;padding:6px 8px;
  display:flex;align-items:center;justify-content:center;gap:5px;
  border:1.5px solid var(--line);border-radius:8px;background:var(--card);
  font-size:13px;line-height:17px;color:var(--ink);white-space:nowrap}
.pz .ck{font-style:normal;color:var(--brand-ink);font-weight:700}
.pz .in{font-style:normal;font-size:10px;line-height:14px;padding:0 3px;border-radius:3px;
  background:var(--red-soft);color:var(--red);font-weight:400}
.pz.on{border-color:var(--brand);background:var(--brand-soft);color:var(--brand-ink);font-weight:600}
@keyframes zflash{50%{border-color:var(--red);background:var(--red-soft)}}
.zm-prices.flash .pz{animation:zflash .45s ease-in-out 2}

/* 底部：转发、图册原页、加入选灯单（主按钮），永远在底部 */
.zm-foot{flex:none;display:flex;gap:8px;padding:8px 12px;
  padding-bottom:calc(8px + env(safe-area-inset-bottom));
  border-top:1px solid var(--line);background:var(--card)}
.zm-foot button{height:44px;border-radius:10px;display:flex;align-items:center;justify-content:center;
  font-size:14px}
.zm-foot .sub{width:56px;border:1.5px solid var(--line);color:var(--ink);font-size:12px;flex:none}
.zm-foot .wide{width:78px}
.zm-foot .primary{flex:1;min-width:0;background:var(--brand);color:#fff;font-weight:600;letter-spacing:1px}

/* 加入时飞向选灯单图标的那张小图 */
.zm-fly{position:fixed;z-index:60;border-radius:8px;object-fit:cover;pointer-events:none;will-change:transform}
@keyframes dotBump{40%{transform:scale(1.35)}}
.zm-ct .dot.bump{animation:dotBump .3s ease-out}

/* 左右滑换盏：下一盏从右边进来，上一盏从左边进来 */
@keyframes zinNext{from{opacity:.25;transform:translateX(30%)}to{opacity:1;transform:none}}
@keyframes zinPrev{from{opacity:.25;transform:translateX(-30%)}to{opacity:1;transform:none}}
.zm-page.in-next{animation:zinNext .24s cubic-bezier(.22,.61,.36,1)}
.zm-page.in-prev{animation:zinPrev .24s cubic-bezier(.22,.61,.36,1)}

/* 复制链接等小提示 */
.zm-toast{position:fixed;left:50%;bottom:calc(88px + env(safe-area-inset-bottom));
  transform:translateX(-50%);z-index:70;pointer-events:none;
  background:rgba(27,27,34,.88);color:#fff;font-size:13px;line-height:18px;
  padding:8px 14px;border-radius:18px;opacity:0;transition:opacity .2s;
  max-width:80vw;white-space:nowrap}
.zm-toast.show{opacity:1}

/* 放大层里的完整标题：表里的标题原样显示，能换行，不截断 */
.zm-title{margin-top:6px;font-size:12.5px;line-height:19px;color:var(--sub);word-break:break-all}

/* 转发图：整页变暗，图浮上来，长按保存 */
.sc{position:fixed;inset:0;z-index:60;background:rgba(0,0,0,.78);display:flex;flex-direction:column;
  align-items:center;justify-content:flex-start;padding:calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
  backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);overflow-y:auto;-webkit-overflow-scrolling:touch}
.sc[hidden]{display:none}
.sc-tog{flex:none;display:flex;gap:4px;padding:3px;border-radius:999px;background:rgba(255,255,255,.16);margin:16px 0 12px}
.sc-tog button{font-size:13px;line-height:26px;padding:0 16px;border-radius:999px;color:#fff;opacity:.75}
.sc-tog button.on{background:#fff;color:var(--ink);font-weight:600;opacity:1}
/* 卡片按图的比例自己定大小；高度给上面"带价格/不带价格"、
   下面"长按图片"和"关闭"让出位置，一屏里全都露得出来 */
.sc-card{flex:none;border-radius:14px;background:#fff;overflow:hidden;
  max-width:calc(100vw - 32px);
  max-height:calc(100vh - 190px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  max-height:calc(100dvh - 190px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  display:flex;align-items:center;justify-content:center}
.sc-card img{display:block;width:auto;height:auto;object-fit:contain;
  max-width:calc(100vw - 32px);
  max-height:calc(100vh - 190px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  max-height:calc(100dvh - 190px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
.sc-hint{flex:none;margin-top:12px;font-size:12.5px;color:#fff;opacity:.85}
.sc-foot{flex:none;margin-top:14px;display:flex;gap:10px}
.sc-foot button{height:40px;padding:0 22px;border-radius:10px;background:rgba(255,255,255,.16);
  color:#fff;font-size:14px}

/* 全屏图片查看：黑背景，图片可缩放拖动 */
.img-viewer{position:fixed;inset:0;z-index:400;background:#000;display:flex;align-items:center;
  justify-content:center;touch-action:none}
.img-viewer[hidden]{display:none}
.img-viewer img{display:block;max-width:100%;max-height:100%;object-fit:contain;
  touch-action:manipulation;user-select:none;-webkit-user-select:none}

