.image-gallery, #review_image_preview {
    margin: 20px 0;
}

.gallery-button, .custom-file-button {
    padding: 10px 20px;
    margin: 5px;
    border: none;
    cursor: pointer;
}

.gallery-button:disabled, .custom-file-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.gallery-upload {
    margin: 10px 0;
}

.gallery-container, #review_image_preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Four images per row */
    gap: 10px;
    justify-items: center;
}

.gallery-item {
    padding: 2px;
    text-align: center;
}

.gallery-item img {
    max-width: 100px;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    width: 100%; /* Ensure images fill their grid cell */
    object-fit: cover;
}

.delete-image {
    margin-top: 5px;
    background: #d63638;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
}

.error, .success {
    padding: 10px;
    margin: 5px 0;
    position: relative;
}

.error {
    background: #ffe6e6;
    color: #d63638;
}

.success {
    background: #e6ffe6;
    color: #2e7d32;
}

.error-close {
    position: absolute;
    right: 10px;
    cursor: pointer;
}

/* Popup Styles */
#image-slideshow-popup {
    /* display: none !important; */ /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex; /* Use flex for centering */
    align-items: center;
    justify-content: center;
}

.slideshow-container {
    position: relative;
    max-width: 65%;
    height: calc(100% - 50px);
    text-align: center;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    margin: 0 auto;
    gap: 20px;
    align-items: flex-start;
	margin-top: 32px;
}

#slideshow-image {
    max-width: 100%;
    object-fit: contain;
    border-radius: 4px;
    min-width: 50%;
    object-fit: contain;
    border-radius: 4px;
    max-height: calc(100vh - 100px);
}

.slideshow-close {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #333;
    font-size: 24px;
    cursor: pointer;
    font-weight: bold;
}

.slideshow-prev,
.slideshow-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 18px;
    border-radius: 4px;
}

.slideshow-prev:disabled,
.slideshow-next:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.slideshow-prev {
    left: -40px; /* Outside the container for better spacing */
}

.slideshow-next {
    right: -40px;
}

#slideshow-counter {
    margin-top: 10px;
    font-size: 16px;
}
#slideshow-counter {
    background: #000;
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    color: #fff;
}
#slideshow-comment {
    color: #333;
    margin: 10px 20px 10px 0px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    border-radius: 4px;
    color: #000 !important;
	text-align:left;
}


.slideshow-container-wrap-comment {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    align-items: flex-start;
    min-width: 50%;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery-container, #review_image_preview {
        grid-template-columns: repeat(2, 1fr); /* Two images per row on mobile */
    }

    .slideshow-container {
        max-width: 90%;
        padding: 10px;
    }

    .slideshow-prev {
        left: 10px;
    }

    .slideshow-next {
        right: 10px;
    }

    #slideshow-image {
        max-height: 40vh;
    }
}

div#image-slideshow-popup {
    display: block;
}












.gallery-container {
    max-height: 140px;
    overflow: hidden;
    border-left:solid 1px #8080804f;
    padding-left:20px;
}
.gallery-item {
    height: 70px;
    width: auto;
    display: block;
    overflow: hidden;
}

.gallery-item img {
    height: 155px;
    width: auto;
    display: block;
    position:relative;
    margin-top:-50px;
}






/* style for pop up */

#slideshow-verified {
    color: #fff;
    background: #1bc288;
    font-style: normal;
    padding: 0px 2px;
    font-size: 12px;
    font-family: 'Poppins';
	height:20px;
}

div#slideshow-rating {
    color: #f1e4de;
	font-size: 1.78em;
}

.slideshow-container-wrap-name {
    display: flex;
    gap: 10px;
}


#slideshow-review-date-wraper {
	display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
}

#slideshow-comment-date {
    font-size: 12px;
    color: #00000099;
	margin-right: 20px;
}

a#slideshow-product-link {
    display: flex;
    flex-direction: column;
    color:#000;
    font-weight: 500;
    font-size: 14px;
    font-family: 'Poppins';
    position: relative;
}


#slideshow-verified:after {
    content: "";
    display: inline-block;
    width: 25px;
    height: 25px;
    background-image: url(/wp-content/themes/botiga-1749475845-via-wpturbo/woocommerce/single-product/verified.svg);
    background-size: contain;
    background-repeat: no-repeat;
    margin-left: 5px;
    vertical-align: middle;
    position: absolute;
	margin-top:-2px;
}



.gallery-container p.success{
    display:none;
}


img#slideshow-product-image {
    max-width: 150px;
}

span.slideshow-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

span.slideshow-close {
    border-radius: 6px;
    width: 50px;
    font-size: 40px;
    font-family: 'star';
    height: 50px;
    line-height: 40px;
    display: block;
    transition: 0.3s ease;
}

span.review-slideshow-close {
    border-radius: 6px;
    width: 50px;
    font-size: 40px;
    font-family: 'star';
    height: 50px;
    line-height: 40px;
    display: block;
    transition: 0.3s ease;
}

span.review-slideshow-close:hover {
    background: rgba(0, 0, 0, 0.1);
}