.cg-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 20px auto;
  max-width: 1000px;
}

.cg-gallery .cg-thumb {
  flex: 0 0 calc(25% - 8px);
  max-height: 90px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  max-width: 150px;
}

.cg-gallery .cg-thumb img {
  height: 100px;
  object-fit: cover;
  width: auto;
  transition: transform 0.3s ease;
}

.cg-gallery .cg-thumb:hover img {
  transform: scale(1.05);
}

@media screen and (max-width: 768px) {
  .cg-gallery .cg-thumb {
    flex: 0 0 calc(50% - 8px);
  }
}
/** LightBox CSS **/
.cg-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.cg-lightbox-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90%;
  max-height: 90%;
}

.cg-lightbox-inner img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 4px;
  z-index: 1;
}

.cg-lightbox-controls {
  position: fixed;
  top: 30px;
  right: 30px;
  z-index: 2;
}

.cg-lightbox-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  line-height: 1;
}

.cg-lightbox-nav {
  position: fixed;
  top: 50%;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  padding: 0 40px;
  z-index: 2;
  box-sizing: border-box;
}

.cg-lightbox-nav button {
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: white;
  font-size: 48px;
  cursor: pointer;
  padding: 10px 20px;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.cg-lightbox-nav button:hover {
  background: rgba(255, 255, 255, 0.2);
}
@media (max-width: 600px) {
  .cg-lightbox-nav button {
    font-size: 15px;
    padding: 6px 12px;
  }
}
