.owl-item img {
    border-radius: 5px !important;
}
.main-carousel {
	margin-bottom: 10px;
}
.owl-carousel .owl-nav .owl-next, .owl-carousel .owl-nav .owl-prev {
    background: #ffffff !important;
    width: 24px;
    height: 24px;
    border-radius: 50% !important;
    position: absolute;
    top: 43%;
}
.owl-carousel .owl-nav .owl-next {
	right: 20px;
}
.owl-carousel .owl-nav .owl-prev {
	left: 20px;
}
.owl-carousel .owl-nav button.owl-next span, .owl-carousel .owl-nav button.owl-prev span {
    color: #000000 !important;
    font-size: 0px;
    padding: 0px !important;
    line-height: normal !important;
}
.owl-carousel .owl-nav button span {
	font-size: 0px;
}
.owl-carousel .owl-nav button.owl-next,
.owl-carousel .owl-nav button.owl-prev {
	font-family: "Font Awesome 6 Free" !important;
    line-height: 24px !important; 	
}
.owl-carousel .owl-nav button.owl-next:before {
    content: "\f054";
	font-size: 16px;
	color: #000000;
}
.owl-carousel .owl-nav button.owl-prev:before {
	content: "\f053";
	font-size: 16px;
	color: #000000;
}

/* CSS for Thumbnail Carousel */
.owl-carousel.thumbnail-carousel .thumb-item {
    width: auto;
    overflow: hidden;
}
.owl-carousel.thumbnail-carousel .thumb-item img {
    width: 100%;
    height: auto;
    object-fit: contain; /* Changed from cover to contain for uncropped thumbnails */
    border-radius: 10px !important;
    border: solid 1px #000000;
    background-color: #f5f5f5; /* Add background for images that don't fill the space */
}
/* Basic Pagination Styling */
.owl-carousel button.owl-dot {
    width: 12px;
    height: 12px;
    background-color: #000000;
    border-radius: 50%;
    margin: 2px;
}
.owl-carousel .owl-dots {
	text-align: center;
}

/* Gallery Wrapper Styles */
.cgc-gallery-wrapper {
    width: 100%;
    clear: both;
}

/* Left Thumbnail Style */
.cgc-gallery-wrapper.thumbnail-style-left {
    display: flex;
    /* gap is now set dynamically via inline styles */
    align-items: flex-start;
}

.cgc-gallery-wrapper.thumbnail-style-left .cgc-thumbnails-container {
    flex: 0 0 78px;
    max-width: 78px;
}

.cgc-gallery-wrapper.thumbnail-style-left .cgc-main-container {
    flex: 1;
    min-width: 0;
}

.cgc-gallery-wrapper.thumbnail-style-left .thumbnail-list {
    display: flex;
    flex-direction: column;
    /* gap is now set dynamically via inline styles */
    overflow: hidden;
}

.cgc-gallery-wrapper.thumbnail-style-left .thumb-item {
    flex-shrink: 0;
}

.cgc-gallery-wrapper.thumbnail-style-left .thumb-item img {
    width: 78px;
    height: 78px;
    object-fit: contain; /* Changed from cover to contain for uncropped thumbnails */
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.2s ease;
    display: block;
    border-radius: 8px;
    background-color: #f5f5f5; /* Add background for images that don't fill the space */
}

.cgc-gallery-wrapper.thumbnail-style-left .thumb-item:hover img {
    opacity: 0.8;
    transform: scale(1.05);
}

.cgc-gallery-wrapper.thumbnail-style-left .thumb-item.active img {
    border: 1px solid #000;
    opacity: 1;
}

/* Bottom Thumbnail Style (Default) */
.cgc-gallery-wrapper.thumbnail-style-bottom .main-carousel {
    margin-bottom: 10px;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .cgc-gallery-wrapper.thumbnail-style-left {
        flex-direction: column;
    }
    
    .cgc-gallery-wrapper.thumbnail-style-left .cgc-thumbnails-container {
        flex: 1 1 auto;
        max-width: 100%;
        margin-bottom: 10px;
        order: 2; /* Show thumbnails below on mobile */
    }
    
    .cgc-gallery-wrapper.thumbnail-style-left .cgc-main-container {
        order: 1; /* Show main image first on mobile */
    }
    
    .cgc-gallery-wrapper.thumbnail-style-left .thumbnail-list {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 5px;
        /* gap is now set dynamically via inline styles */
    }
    
    .cgc-gallery-wrapper.thumbnail-style-left .thumb-item img {
        width: 60px;
        height: 60px;
    }
}

/* Image Title Styles */
.cgc-image-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.owl-carousel .item {
    position: relative;
}

.cgc-image-title:hover {
    opacity: 0.9;
}

@media (max-width: 767px) {
    .cgc-image-title {
        font-size: 12px;
        padding: 8px 10px;
    }
}