.process-card,
.equipment-item,
.product-card {
  cursor: zoom-in;
}

.process-card:focus-visible,
.equipment-item:focus-visible,
.product-card:focus-visible {
  outline: 3px solid rgba(20, 115, 230, .35);
  outline-offset: 4px;
}

/* 防止外部全局 div 样式（如 meta.css 的 div{width:100%;height:100%;display:flex;}）破坏弹窗 flex 布局 */
.detail-gallery,
.detail-gallery__backdrop,
.detail-gallery__dialog,
.detail-gallery__media,
.detail-gallery__content,
.detail-gallery__footer,
.detail-gallery__controls {
  width: auto;
  height: auto;
}

.detail-gallery__backdrop {
  display: block;
}

body.has-detail-gallery {
  overflow: hidden;
}

.detail-gallery {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 32px;
  visibility: hidden;
  opacity: 0;
  transition: opacity .22s ease, visibility .22s ease;
}

.detail-gallery.is-open {
  visibility: visible;
  opacity: 1;
}

.detail-gallery__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 21, 28, .62);
  -webkit-backdrop-filter: blur(18px) saturate(.85);
  backdrop-filter: blur(18px) saturate(.85);
  cursor: default;
}

.detail-gallery__dialog {
  position: relative;
  width: min(1120px, calc(100vw - 64px));
  max-height: min(760px, calc(100vh - 64px));
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 6px;
  background: rgba(250, 251, 252, .94);
  box-shadow: 0 30px 80px rgba(3, 9, 16, .28);
  transform: translateY(10px) scale(.985);
  transition: transform .24s ease;
}

.detail-gallery.is-open .detail-gallery__dialog {
  transform: none;
}

.detail-gallery__media {
  min-height: 560px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #edf0f2;
  border-right: 1px solid #d9dee3;
}

.detail-gallery__image {
  width: 100%;
  height: 100%;
  max-height: min(760px, calc(100vh - 64px));
  object-fit: contain;
  padding: 26px;
}

.detail-gallery__content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 58px 54px 42px;
}

.detail-gallery__eyebrow {
  margin: 0 0 14px;
  color: #1473e6;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
}

.detail-gallery__title {
  margin: 0;
  color: #15181d;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.2;
  letter-spacing: -.03em;
}

.detail-gallery__title::after {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  margin-top: 22px;
  background: #1473e6;
}

.detail-gallery__description {
  max-height: 300px;
  margin: 26px 0 0;
  overflow-y: auto;
  color: #626971;
  font-size: 16px;
  line-height: 1.9;
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  -webkit-box-orient: unset;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  flex-shrink: 0;
}

.detail-gallery__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid #dfe3e8;
}

.detail-gallery__count {
  color: #7a828a;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.detail-gallery__controls {
  display: flex;
  gap: 8px;
}

.detail-gallery__nav,
.detail-gallery__close {
  display: grid;
  place-items: center;
  border: 1px solid #cfd5db;
  background: rgba(255, 255, 255, .82);
  color: #252a30;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}

.detail-gallery__nav {
  width: 44px;
  height: 44px;
}

.detail-gallery__close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 42px;
  height: 42px;
}

.detail-gallery__nav:hover,
.detail-gallery__close:hover {
  border-color: #1473e6;
  background: #fff;
  color: #1473e6;
}

.detail-gallery__nav:focus-visible,
.detail-gallery__close:focus-visible {
  outline: 3px solid rgba(20, 115, 230, .3);
  outline-offset: 2px;
}

.detail-gallery__nav svg,
.detail-gallery__close svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 820px) {
  .detail-gallery { padding: 20px; }
  .detail-gallery__dialog {
    width: min(620px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  .detail-gallery__media {
    min-height: 0;
    height: min(42vh, 360px);
    border-right: 0;
    border-bottom: 1px solid #d9dee3;
  }
  .detail-gallery__image { max-height: none; padding: 18px; }
  .detail-gallery__content { padding: 34px 30px 28px; }
  .detail-gallery__description { max-height: none; font-size: 15px; }
  .detail-gallery__footer { margin-top: 26px; }
}

@media (max-width: 520px) {
  .detail-gallery { padding: 10px; }
  .detail-gallery__dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }
  .detail-gallery__media { height: min(36vh, 290px); }
  .detail-gallery__image { padding: 12px; }
  .detail-gallery__content { padding: 28px 22px 22px; }
  .detail-gallery__title { padding-right: 28px; font-size: 26px; }
  .detail-gallery__close { top: 12px; right: 12px; width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .detail-gallery,
  .detail-gallery__dialog { transition: none; }
}
