.cgc-carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-bottom: 35px;
}

.cgc-carousel-container .swiper-wrapper {
    display: flex !important;
}

.cgc-slide {
    height: auto !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.cgc-gallery-item {
    position: relative !important;
    width: 100% !important;
    aspect-ratio: var(--thumb-aspect-ratio, 1/1) !important;
    overflow: hidden !important;
    cursor: pointer;
    background-color: #f2f2f2;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cgc-gallery-item img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: var(--thumb-object-fit, cover) !important;
    object-position: var(--thumb-object-position, center center) !important;
    transition: transform 0.3s ease;
}

.cgc-gallery-item:hover img {
    transform: scale(1.04);
}

.cgc-carousel-container .swiper-button-prev,
.cgc-carousel-container .swiper-button-next {
    color: #ffffff;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background 0.3s ease, transform 0.2s ease;
    z-index: 10;
}

.cgc-carousel-container .swiper-button-prev:after,
.cgc-carousel-container .swiper-button-next:after {
    font-size: 16px !important;
    font-weight: bold;
}

.cgc-carousel-container .swiper-button-prev:hover,
.cgc-carousel-container .swiper-button-next:hover {
    background: rgba(0, 0, 0, 0.85);
    transform: scale(1.1);
}

.cgc-carousel-container .cgc-pagination {
    bottom: 5px !important;
}

.cgc-carousel-container .swiper-pagination-bullet {
    background: #888888;
    opacity: 0.6;
}

.cgc-carousel-container .swiper-pagination-bullet-active {
    background: #000000;
    opacity: 1;
}

.cgc-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

body.admin-bar .cgc-lightbox {
    top: var(--wp-admin--admin-bar--height, 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .cgc-lightbox {
        top: 46px;
    }
}

.cgc-lb-img {
    max-width: 90vw !important;
    max-height: 90vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
    user-select: none;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.cgc-lb-close,
.cgc-lb-prev,
.cgc-lb-next {
    position: absolute;
    color: #ffffff;
    font-size: 36px;
    cursor: pointer;
    user-select: none;
    z-index: 1000000;
    padding: 10px;
    transition: opacity 0.2s ease;
}

.cgc-lb-close:hover,
.cgc-lb-prev:hover,
.cgc-lb-next:hover {
    opacity: 0.7;
}

.cgc-lb-close {
    top: 20px;
    right: 30px;
    font-size: 45px;
}

.cgc-lb-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.cgc-lb-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}
