.ccg-gallery {
  --ccg-text: #f1f1f1;
  --ccg-muted: #d6d9de;
  --ccg-accent: #c9a36a;

  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
}

.ccg-gallery .ccg-gallery-item {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(201, 163, 106, 0.3) !important;
  background: #171a20;
  border-radius: 10px;
  cursor: zoom-in;
  transform: translateY(0);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  grid-column: span 3;
  aspect-ratio: 4 / 3;
}

.ccg-gallery .ccg-gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.26);
}

.ccg-gallery .ccg-gallery-item img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
}

.ccg-gallery .ccg-gallery-item figcaption {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 6px 8px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  align-items: center !important;
  background: linear-gradient(180deg, rgba(8, 9, 12, 0) 0%, rgba(8, 9, 12, 0.88) 100%) !important;
  pointer-events: none;
  z-index: 2;
}

.ccg-gallery .ccg-tag {
  font-size: 11px;
  line-height: 1.2;
  color: var(--ccg-muted);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  white-space: nowrap;
}

.ccg-gallery .ccg-tag-location {
  color: var(--ccg-text);
}

.ccg-gallery .ccg-tag-subject {
  color: var(--ccg-accent);
}

.ccg-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 14, 0.88);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ccg-lightbox.is-open {
  display: flex;
}

.ccg-lightbox img {
  max-width: min(1200px, 96vw);
  max-height: 88vh;
  border-radius: 12px;
}

.ccg-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 0;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  background: #fff;
  color: #13151a;
}

.ccg-fav-slider {
  --ccg-slider-width: 980px;
  --ccg-slider-height: 200px;
  position: relative;
  width: min(100%, var(--ccg-slider-width));
  margin: 0 auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0 38px;
}

.ccg-fav-viewport {
  overflow: hidden;
  border-radius: 0;
}

.ccg-fav-track {
  display: flex;
  width: 100%;
  transition: transform 0.45s ease;
}

.ccg-fav-slide {
  min-width: calc(100% / 3);
  position: relative;
  padding: 0 10px;
  height: var(--ccg-slider-height);
}

.ccg-fav-slide img {
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  object-position: center center;
  display: block;
  max-height: none !important;
  aspect-ratio: auto !important;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ccg-fav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #1b1f26;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.ccg-fav-prev {
  left: 6px;
}

.ccg-fav-next {
  right: 6px;
}

@media (max-width: 900px) {
  .ccg-gallery {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .ccg-gallery .ccg-gallery-item {
    grid-column: span 3;
    aspect-ratio: 4 / 3;
  }

  .ccg-gallery .ccg-tag {
    font-size: 10px;
  }

  .ccg-fav-slider {
    --ccg-slider-width: 760px;
    --ccg-slider-height: 190px;
    padding: 0 34px;
  }

  .ccg-fav-slide {
    min-width: calc(100% / 2);
    padding: 0 8px;
  }
}

@media (max-width: 620px) {
  .ccg-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .ccg-gallery .ccg-gallery-item {
    grid-column: span 1;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
  }

  .ccg-gallery .ccg-gallery-item figcaption {
    padding: 5px 6px !important;
  }

  .ccg-gallery .ccg-tag {
    font-size: 9px;
    line-height: 1.2;
    white-space: normal;
  }

  .ccg-fav-slider {
    --ccg-slider-width: 360px;
    --ccg-slider-height: 180px;
    padding: 0 30px;
  }

  .ccg-fav-slide {
    min-width: 100%;
    padding: 0 6px;
  }
}
