/* ============================================================
   九叶官网 · 图片灯箱样式（公共，配合 js/lightbox.js）
   前台（首页/产品中心/人才招聘/包材参考）与后台（admin）共用。
   ⚠️ 独立成文件的原因：后台只加载 admin.css，若样式留在 style.css 里，
      后台的灯箱会完全没有样式。
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 5000;               /* 高于前台所有浮层(≤400)与后台弹窗(≤1300)，低于后台提示条(9999) */
  background: rgba(5, 61, 28, .88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.lightbox.open { display: flex; }
.lightbox figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.lightbox img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
  background: #000;
}
.lightbox figcaption {
  color: rgba(255, 255, 255, .92);
  font-size: 14px;
  font-weight: 500;
}
.lightbox-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(0, 0, 0, .4);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(0, 0, 0, .7); }

/* 缩放：滚轮 / ＋− / 双击 / 拖动平移 / 触摸捏合；工具条底部居中 */
.lightbox figure img {
  transition: transform .12s ease;
  transform-origin: 50% 50%;
  will-change: transform;
  touch-action: none;          /* 自己处理拖动与捏合，避免浏览器抢手势 */
}
.lightbox.zoomed figure img { transition: none; cursor: grab; }
.lightbox.zoomed figure img:active { cursor: grabbing; }
.lb-tools {
  position: absolute;
  left: 50%; bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 22px;
  background: rgba(0, 0, 0, .55);
  border: 1px solid rgba(255, 255, 255, .18);
}
.lb-tools button {
  width: 34px; height: 30px;
  border: 0; border-radius: 8px;
  background: transparent;
  color: #fff;
  font-size: 16px; line-height: 1;
  cursor: pointer;
}
.lb-tools button:hover { background: rgba(255, 255, 255, .16); }
.lb-tools .lb-level {
  min-width: 46px;
  text-align: center;
  color: rgba(255, 255, 255, .86);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
