/* ============================================================
   VIPLINER 文章页通用增强样式（jbus-enhance）
   风格与现有文章页一致：白底卡片、圆角 12px、主色 #1A4FA0
   所有选择器以 jbus- 前缀隔离，不影响页面原有规则与 loading="lazy"
   ============================================================ */

/* ---------- 1. 图片 hover / 可点击反馈（仅指针设备生效，不影响懒加载） ---------- */
img.jbus-gallery-item {
  cursor: zoom-in;
  -webkit-tap-highlight-color: rgba(26, 79, 160, .12);
  transition: opacity .2s ease;
}
@media (hover: hover) {
  .photos figure:hover img.jbus-gallery-item { opacity: .88; }
  .photos figure:hover { border-color: #B9CDEE; }
}
.photos figure { transition: border-color .2s ease; }

/* ---------- 2. HERO 下方"查看车内实拍"快速跳转按钮 ---------- */
.jbus-jump {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  max-width: 640px;
  width: calc(100% - 32px);
  margin: 12px auto 2px;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1A4FA0, #3B82F6);
  color: #fff !important;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: .5px;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(26, 79, 160, .35);
  animation: jbusJumpPulse 2.8s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}
.jbus-jump:active { opacity: .85; transform: scale(.985); }
.jbus-jump .jbus-arr { font-weight: 400; }
@keyframes jbusJumpPulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(26, 79, 160, .35); }
  50% { box-shadow: 0 6px 22px rgba(59, 130, 246, .55); transform: translateY(-1px); }
}

/* ---------- 3. 右下角浮动导航（FAB） ---------- */
.jbus-fab-wrap {
  position: fixed;
  right: 14px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  /* 页面底部有"返回"粘性条时抬高，避免遮挡 */
}
.jbus-fab-wrap.jbus-raised { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }

.jbus-fab {
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #1A4FA0, #3B82F6);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(26, 79, 160, .4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.jbus-fab:active { transform: scale(.94); }
.jbus-fab svg { display: block; width: 21px; height: 21px; }
.jbus-fab .jbus-fab-icon-close { display: none; }
.jbus-fab-wrap.jbus-open .jbus-fab-icon-menu { display: none; }
.jbus-fab-wrap.jbus-open .jbus-fab-icon-close { display: block; }

.jbus-fab-menu {
  background: #FFFFFF;
  border: 1px solid #E2E8F4;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(16, 38, 80, .18);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: 52vh;
  max-width: 74vw;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(.97);
  transform-origin: bottom right;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.jbus-fab-wrap.jbus-open .jbus-fab-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.jbus-fab-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #1F2937;
  text-decoration: none !important;
  white-space: nowrap;
  border-left: 3px solid transparent;
  -webkit-tap-highlight-color: transparent;
}
.jbus-fab-menu a:active { background: #EEF3FC; }
.jbus-fab-menu a.jbus-active {
  color: #1A4FA0;
  font-weight: 600;
  background: #EEF3FC;
  border-left-color: #1A4FA0;
}

/* ---------- 4. Lightbox 大图预览 ---------- */
.jbus-lb {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(13, 23, 43, .93);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s;
}
.jbus-lb.jbus-open { opacity: 1; visibility: visible; }

.jbus-lb-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px;
}
.jbus-lb-count {
  flex: none;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .85);
  background: rgba(255, 255, 255, .14);
  border-radius: 999px;
  padding: 3px 10px;
  font-variant-numeric: tabular-nums;
}
.jbus-lb-alt {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jbus-lb-btn {
  flex: none;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.jbus-lb-btn:active { background: rgba(255, 255, 255, .28); }

.jbus-lb-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 52px 8px calc(20px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}
/* 缩放（原尺寸）模式：容器原生滚动查看大图 */
.jbus-lb-stage.jbus-zoomed {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  display: block;
  touch-action: pan-x pan-y;
}
.jbus-lb-stage.jbus-zoomed .jbus-lb-img {
  max-width: none;
  max-height: none;
  margin: 0 auto;
}
.jbus-lb-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, .45);
  transform: scale(.97);
  transition: transform .2s ease;
  touch-action: manipulation;
}
.jbus-lb.jbus-open .jbus-lb-img { transform: scale(1); }
.jbus-lb-img.jbus-loading { opacity: .35; }

.jbus-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.jbus-lb-nav:active { background: rgba(255, 255, 255, .3); }
.jbus-lb-nav.jbus-prev { left: 8px; }
.jbus-lb-nav.jbus-next { right: 8px; }
.jbus-lb-nav[hidden] { display: none; }

/* Lightbox 打开时锁定页面滚动（html 上加类，避免动 body 样式） */
html.jbus-lb-open, html.jbus-lb-open body { overflow: hidden !important; }

/* ---------- 5. 动效偏好与兼容 ---------- */
@media (prefers-reduced-motion: reduce) {
  .jbus-jump { animation: none; }
  .jbus-lb, .jbus-lb-img, .jbus-fab-menu { transition: none; }
}
