.cgs-gallery {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 10px 0;
  scrollbar-width: none;
}

.cgs-gallery::-webkit-scrollbar {
  display: none;
}

.cgs-gallery a {
  flex-shrink: 0;
  display: flex;            /* 变成 flex 布局，让 img 居中 */
  justify-content: center;  /* 水平居中 */
  align-items: center;      /* 垂直居中 */

  /* 容器固定大小 */
  width: 200px;             /* 统一宽度，防止竖图太窄 */
  height: 220px;            /* 统一高度 */

  background: #f9f9f9;
  border-radius: 6px;
  overflow: hidden;
  box-sizing: border-box;
}

/* 图片自适应容器，保持比例 */
.cgs-gallery a img {
  max-width: 100%;
  max-height: 100%;
  height: auto;
  width: auto;
  display: block;
  object-fit: contain;
}

/* 鼠标悬停图片略微放大 */
.cgs-gallery img:hover {
  transform: scale(1.02);
}

/* 移动端尺寸调整 */
@media (max-width: 768px) {
  .cgs-gallery a {
    width: 140px;
    height: 150px;
  }
}
/* 去掉焦点虚框 */
.cgs-gallery a:focus {
  outline: none;  /* 去掉焦点虚框 */
}