/* JIACHAO MACHINERY — local photo lightbox. No external fonts or CDN. */
img[src*="assets/img/photos/"] {
  cursor: zoom-in;
}

.jc-lightbox {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: none;
  flex-direction: column;
  background: rgba(15, 26, 34, 0.92);
  color: #dfe7ec;
}
.jc-lightbox.is-open { display: flex; }
.jc-lightbox[hidden] { display: none !important; }

.jc-lightbox-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 8px 12px;
  background: #15232e;
  border-bottom: 3px solid #d9922e;
}
.jc-lightbox-title {
  flex: 1 1 auto;
  margin: 0;
  min-width: 0;
  font: 600 0.95rem/1.3 "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jc-lightbox-count {
  flex: 0 0 auto;
  font-size: 0.8125rem;
  color: #9fb6c6;
  letter-spacing: 0.04em;
}

.jc-lb-btn {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font: 700 1.25rem/1 "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  cursor: pointer;
}
.jc-lb-btn:hover,
.jc-lb-btn:focus-visible {
  border-color: #fff;
  outline: 2px solid #d9922e;
  outline-offset: 2px;
}
.jc-lb-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.jc-lb-close { font-size: 1.5rem; }

.jc-lightbox-stage {
  flex: 1 1 auto;
  position: relative;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.jc-lightbox-stage.is-dragging { cursor: grabbing; }

.jc-lightbox-stage img {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: calc(100% - 32px);
  max-height: calc(100% - 32px);
  width: auto;
  height: auto;
  cursor: zoom-in;
  transform-origin: center center;
  pointer-events: none;
  display: block;
  background: transparent;
}

.jc-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 64px;
  background: rgba(21, 35, 46, 0.72);
}
.jc-lb-prev { left: 8px; }
.jc-lb-next { right: 8px; }
.jc-lb-nav[hidden] { display: none !important; }

body.jc-lightbox-open { overflow: hidden; }

@media (max-width: 640px) {
  .jc-lightbox-toolbar { gap: 6px; padding: 6px 8px; }
  .jc-lightbox-title { font-size: 0.8125rem; }
  .jc-lb-btn { width: 36px; height: 36px; }
  .jc-lb-nav { width: 36px; height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .jc-lightbox-stage img { transition: none !important; }
}
