.product-image-widget {
    display: flex;
    flex-direction: row-reverse;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.main-image {
   
    flex: 1;
    position: relative;
}

.woocommerce-page .main-image img {
    width: 100%;
    height: auto;
    display: block;
    height: 500px;
    width: 500px;
    object-fit: contain;
}

.navigation {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    opacity: 0;
    transition: opacity 0.3s;
}

.main-image:hover .navigation {
    opacity: 1;
}

.navigation span {
    background: rgba(255, 255, 255, 0.7);
    color: #333;
    padding: 10px;
    cursor: pointer;
}

.magnify {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.7);
    color: #333;
    padding: 10px;
    cursor: pointer;
}

.gallery-images {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 80px;
}

.gallery-image {
    width: 100%;
    height: auto;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.gallery-image.active {
    border-color: #333;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    .product-image-widget {
        flex-direction: column;
    }

    .gallery-images {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
    }

    .gallery-image {
        width: 60px;
        flex-shrink: 0;
    }
}