.cgs-wrapper {
  width: 100%;
  height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
  background: transparent;
}

.cgs-track {
  display: flex;
  align-items: center;
  gap: 20px;
  position: absolute;
  left: 0;
  transition: left 0.8s ease-in-out;
}

.cgs-frame {
  flex-shrink: 0;
  width: 400px;
  height: 560px;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0.5;
  transition: opacity 0.8s ease-in-out;
}

.cgs-frame.is-active {
  opacity: 1;
}

.cgs-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
  cursor: pointer;
  transform: scale(0.7);
  transition: transform 0.8s ease-in-out;
}

.cgs-frame.is-active img {
  transform: scale(1.1);
}

.cgs-thumbnail-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  padding: 10px;
}

.cgs-thumbnail {
  flex: 0 0 80px;
  height: 80px;
  cursor: pointer;
  border: 3px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}

.cgs-thumbnail:hover {
  transform: scale(1.05);
}

.cgs-thumbnail.is-active {
  border-color: #007bff;
}

.cgs-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 600px) {
  .cgs-wrapper {
    height: 400px;
  }
  .cgs-frame {
    width: 240px;
    height: 340px;
  }
  .cgs-frame img {
    transform: scale(0.65);
  }
  .cgs-frame.is-active img {
    transform: scale(1.0);
  }
  .cgs-thumbnail {
    flex-basis: 60px;
    height: 60px;
  }
}

.cgs-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.92);
}

.cgs-modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90vh;
}

.cgs-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
}

.cgs-close:hover {
  color: #bbb;
}
