/* PartBench display lock + project gallery */
html.pb-interaction-locked,
html.pb-interaction-locked body,
html.pb-interaction-locked main {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

html.pb-interaction-locked input,
html.pb-interaction-locked textarea,
html.pb-interaction-locked select,
html.pb-interaction-locked option {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

html.pb-interaction-locked img {
  -webkit-user-drag: none;
  user-drag: none;
}

.pb-gallery-shell {
  margin-top: 28px;
}

.pb-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.pb-gallery-card {
  position: relative;
  display: block;
  min-height: 270px;
  padding: 0;
  overflow: hidden;
  color: #f7f8f4;
  text-align: left;
  cursor: zoom-in;
  background: #101411;
  border: 0;
}

.pb-gallery-card:focus-visible {
  outline: 3px solid #d6ff47;
  outline-offset: 4px;
}

.pb-gallery-card::after {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 1;
  padding: 7px 9px;
  color: #101411;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  content: "VIEW + ZOOM";
  background: #d6ff47;
}

.pb-gallery-card img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 270px;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform .28s ease, filter .28s ease;
}

.pb-gallery-card:hover img {
  filter: brightness(.78);
  transform: scale(1.05);
}

.pb-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(3, 5, 3, .94);
}

.pb-lightbox__dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(100%, 1240px);
  height: min(100%, 880px);
  overflow: hidden;
  background: #0e120f;
  box-shadow: 0 18px 70px rgba(0, 0, 0, .58);
}

.pb-lightbox__tools {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  color: #f7f8f4;
  border-bottom: 1px solid rgba(247, 248, 244, .16);
}

.pb-lightbox__caption {
  margin-right: auto;
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pb-lightbox__toolgroup {
  display: flex;
  align-items: center;
  gap: 7px;
}

.pb-lightbox button {
  min-width: 36px;
  min-height: 34px;
  padding: 6px 9px;
  color: #f7f8f4;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  background: transparent;
  border: 1px solid rgba(247, 248, 244, .35);
}

.pb-lightbox button:hover,
.pb-lightbox button:focus-visible {
  color: #101411;
  background: #d6ff47;
  border-color: #d6ff47;
  outline: none;
}

.pb-lightbox__stage {
  position: relative;
  display: grid;
  min-height: 0;
  place-items: center;
  overflow: auto;
  cursor: zoom-in;
}

.pb-lightbox__stage.is-zoomed {
  cursor: zoom-out;
}

.pb-lightbox__image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
  transition: transform .18s ease;
}

.pb-lightbox__hint {
  position: absolute;
  bottom: 15px;
  left: 50%;
  padding: 7px 10px;
  color: #f7f8f4;
  font-size: 11px;
  font-weight: 700;
  background: rgba(0, 0, 0, .55);
  border: 1px solid rgba(247, 248, 244, .22);
  transform: translateX(-50%);
  pointer-events: none;
}

@media (max-width: 760px) {
  .pb-gallery-grid { grid-template-columns: 1fr; }
  .pb-gallery-card,
  .pb-gallery-card img { min-height: 245px; }
  .pb-lightbox { padding: 10px; }
  .pb-lightbox__dialog { height: min(100%, 720px); }
  .pb-lightbox__caption { display: none; }
  .pb-lightbox__hint { font-size: 10px; }
}