.sigma-gallery-container {
    max-width: 100%;
    margin: 0 auto 30px;
}

.sigma-gallery-title {
    margin-bottom: 20px;
    color: #ff5501;
}

.sigma-gallery-main-container {
    position: relative;
    margin-bottom: 15px;
}

.sigma-gallery-main-image {
    text-align: center;
    position: relative;
    cursor: pointer;
    height: 400px;
}

.sigma-gallery-main-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    transition: opacity 0.3s ease;
}

.sigma-gallery-main-image img:hover {
    opacity: 0.9;
}

.sigma-gallery-navigation {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
}

.sigma-gallery-prev,
.sigma-gallery-next {
    background-color: rgba(0,0,0,0.5);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 24px;
    transition: background-color 0.3s ease;
}

.sigma-gallery-prev:hover,
.sigma-gallery-next:hover {
    background-color: rgba(0,0,0,0.7);
}

.sigma-gallery-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.sigma-gallery-thumbnail {
    cursor: pointer;
    width: calc(20% - 10px);
    width: 80px;
    height: 80px;
    position: relative;
    border: 2px solid transparent;
    transition: all 0.3s;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.sigma-gallery-thumbnail.active {
    border-color: #ff5501;
}

.sigma-gallery-thumbnail img {
    width: auto;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
    max-width: 100%;
    max-height: 100%;
}

.sigma-gallery-thumbnail:hover img {
    transform: scale(1.05);
}

.thumbnail-title {
    display: none;
    font-size: 12px;
    text-align: center;
    padding: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background-color: rgba(255,255,255,0.8);
}

.sigma-gallery-caption {
    display:none;
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f8f8;
    border-radius: 4px;
}

.sigma-gallery-caption h3 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 18px;
    color: #333;
}

.sigma-gallery-description {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f8f8;
    border-radius: 4px;
    color: #333;
    line-height: 1.5;
}

/* Caption paragraph styling */
.sigma-gallery-caption p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: #666;
}

/* Responsive adjustments */
@media only screen and (max-width: 767px) {
    .sigma-gallery-thumbnail {
        width: calc(33.33% - 10px);
    }
    
    .sigma-gallery-prev,
    .sigma-gallery-next {
        width: 30px;
        height: 30px;
        font-size: 20px;
    }
    .sigma-gallery-main-image{
        height: 300px;
    }
}

@media only screen and (max-width: 480px) {
    .sigma-gallery-thumbnail {
        width: calc(50% - 10px);
    }
    
    .sigma-gallery-caption h3 {
        font-size: 16px;
    }
    
    .sigma-gallery-caption p {
        font-size: 13px;
    }
}

/* Lightbox overlay customization */
.mfp-bg {
    opacity: 0.9;
}

.mfp-figure:after {
    box-shadow: none;
    background: transparent;
}

.mfp-title {
    font-size: 14px;
    line-height: 1.4;
    padding-right: 30px;
}

/* Loading state */
.sigma-gallery-loading {
    position: relative;
    min-height: 200px;
}

.sigma-gallery-loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    margin-left: -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff5501;
    border-radius: 50%;
    animation: sigma-gallery-spin 1s linear infinite;
}

@keyframes sigma-gallery-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fullscreen mode */
.sigma-gallery-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sigma-gallery-fullscreen img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* Fade animations */
.sigma-gallery-fade {
    animation: sigma-gallery-fade 0.3s ease-in-out;
}

@keyframes sigma-gallery-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}