.custom-lightbox {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__image > a > img {
    border-radius: 24px !important;
    display: block;
}
/* ===== LIGHTBOX ICON FIX ===== */

.custom-lightbox .lightbox-close,
.custom-lightbox .lightbox-nav {
    width: 80px !important;
    height: 80px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* SVG suurus */
.custom-lightbox .lightbox-close svg,
.custom-lightbox .lightbox-nav svg {
    width: 50px !important;
    height: 50px !important;
    stroke-width: 2.2;
}

/* Värv mustaks */
.custom-lightbox .lightbox-close,
.custom-lightbox .lightbox-nav {
    color: #111 !important;
}

/* Hover */
.custom-lightbox .lightbox-close:hover,
.custom-lightbox .lightbox-nav:hover {
    opacity: 0.7;
}
.lightbox-open {
    overflow: hidden;
}

.lightbox-inner {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1400px;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image-wrap {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 80px 20px;
}

.lightbox-image-wrap img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
	border-radius:20px;
}

.lightbox-close,
.lightbox-nav {
    border: none;
    background: transparent;
    color: #111;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 3;
    width: 44px;
    height: 44px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 48px;
    height: 48px;
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

.lightbox-close svg,
.lightbox-nav svg {
    display: block;
}

.lightbox-thumbs {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 20px 24px 28px;
    overflow-x: auto;
}

.lightbox-thumbs button {
    width: 72px;
    height: 72px;
    border: 1px solid #ddd;
    background: #fff;
    padding: 4px;
    border-radius: 10px;
    cursor: pointer;
    flex: 0 0 auto;
}

.lightbox-thumbs button.is-active {
    border-color: #111;
}

.lightbox-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}
.custom-lightbox .lightbox-close,
.custom-lightbox .lightbox-nav {
    color: #111 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

.custom-lightbox .lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 20;
    width: 56px;
    height: 56px;
}

.custom-lightbox .lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 56px;
    height: 56px;
}

.custom-lightbox .lightbox-prev {
    left: 24px;
}

.custom-lightbox .lightbox-next {
    right: 24px;
}

.custom-lightbox .lightbox-close svg,
.custom-lightbox .lightbox-nav svg {
    display: block;
    width: 60px;
    height: 60px;
    stroke: currentColor;
}

.custom-lightbox .lightbox-close:hover,
.custom-lightbox .lightbox-nav:hover {
    color: #000 !important;
    opacity: 0.7 !important;
}


/* =========================================================
   WooCommerce Product Gallery - custom no-flexslider version
   ========================================================= */

/* Product page layout */
.single-product div.product {
    display: grid;
    grid-template-columns: minmax(0, 60%) minmax(320px, 1fr);
    gap: 48px;
    align-items: start;
}

.single-product div.product .images,
.single-product div.product .woocommerce-product-gallery {
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    float: none !important;
    margin: 0;
}

.single-product div.product .summary {
    width: 100% !important;
    min-width: 0;
    float: none !important;
    clear: none !important;
    margin: 0;
}

/* Internal gallery layout */
.single-product div.product .woocommerce-product-gallery {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    position: relative;
}

/* Sale badge */
.single-product div.product span.onsale {
    z-index: 2;
}

/* Main viewport created by JS */
.single-product div.product .woocommerce-product-gallery .custom-gallery-viewport {
    grid-column: 2;
    grid-row: 1 / span 2;
    background: #fafafa;
    border-radius: 28px;
    overflow: hidden;
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

/* Hide original wrapper from layout role, but keep it in DOM */
.single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
    display: contents;
}

/* Slides */
.single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__image {
    display: none;
    width: 100%;
    height: 100%;
    margin: 0 !important;
    float: none !important;
    position: relative;
    overflow: hidden;
    text-align: center;
	border-radius:20px;
}

.single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__image.is-active {
    display: flex;
    align-items: center;
    justify-content: center;
	border-radius:20px;
	overflow:hidden;
}

/* Slide link */
.single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__image > a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
	border-radius:20px;
}

/* Sale badge inside viewport */
.single-product div.product .custom-gallery-viewport .onsale {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}

/* Main image */
.single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__image > a > img {
    display: block;
    width: 100%;
    max-width: 90%;
    max-height: 520px;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
    transform: none !important;
    transition: none !important;
    box-shadow: none !important;
    filter: brightness(0.98);
	border-radius:20px;
}

/* Hide possible zoom image */
.single-product div.product .woocommerce-product-gallery .zoomImg {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    max-width: none !important;
}

.single-product div.product .woocommerce-product-gallery .custom-gallery-trigger {
    position: absolute;
    padding: 3px;
    top: 18px;
    right: 18px;
    z-index: 2;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #ffffff00;
    /* box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08); */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Thumbnail column */
.single-product .custom-gallery-thumbs-wrap {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-height: 420px;
}

/* Thumbs list */
.single-product .custom-gallery-thumbs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.single-product .custom-gallery-thumbs::-webkit-scrollbar {
    display: none;
}

.single-product .custom-gallery-thumbs li {
    width: 120px;
    margin: 3px;
    flex: 0 0 auto;
}

.single-product .custom-gallery-thumbs button {
    display: block;
    width: 120px;
    height: 120px;
    padding: 4px;
    border-radius: 14px;
    border: 1px solid #e6e6e6;
    background: #fff;
    cursor: pointer;
}

.single-product .custom-gallery-thumbs button:hover {
    -webkit-transform: translateX(0);
    transform: translateX(0);
}

.single-product .custom-gallery-thumbs button.is-active {
    border-color: #e6e6e6;
    border: solid 2px #bcbcbc;
    box-shadow: 0px 0px 2px #00000000;
}

.single-product .custom-gallery-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
    opacity: 0.55;
    transition: opacity 0.25s ease;
}

.single-product .custom-gallery-thumbs button:hover img,
.single-product .custom-gallery-thumbs button.is-active img {
    opacity: 1;
}

/* Thumb arrows */
.single-product .gallery-thumb-arrow {
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #111;
    font-size: 22px !important;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;

}
.single-product .gallery-thumb-arrow--up {
    transform: rotate(90deg);
}

.single-product .gallery-thumb-arrow--down {
    transform: rotate(-90deg);
}

.single-product .gallery-thumb-arrow svg {
    display: block;
}
.single-product .gallery-thumb-arrow:hover {
    opacity: 0.7;
	 
}

.single-product .gallery-thumb-arrow:disabled {
    opacity: 0.25;
    cursor: default;
	 font-size: 22px;
}
.custom-gallery-trigger {
    position: absolute;
    top: 16px;
    right: 16px;

    width: 36px;
    height: 36px;

    border: none;
    border-radius: 50%;

    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(6px);

    display: flex;
    align-items: center;
    justify-content: center;

    color: #111; /* 👈 ikooni värv */
    cursor: pointer;

    transition: all 0.2s ease;
}

/* hover effect */
.custom-gallery-trigger:hover {
    background: #111;
    color: #fff;
	  -webkit-transform: translateX(0);
    transform: translateX(0);
}

/* SVG */
.custom-gallery-trigger svg {
    display: block;
}
/* Tablet */
@media (max-width: 1000px) {
	.single-product .custom-gallery-thumbs {
  
    max-width: 400px;
 
}
    .single-product .custom-gallery-thumbs {
        display: flex;
        flex-direction: row;
    }

    .single-product div.product .woocommerce-product-gallery {
        display: flex;
        flex-direction: column-reverse;
    }

    .single-product .custom-gallery-thumbs-wrap {
        min-height: auto;
        margin-top: 0;
    }
}
@media (max-width: 844px) {
	.single-product .custom-gallery-thumbs {
  
    max-width: 263px;
     }
}

/* Mobile */
@media (max-width: 768px) {
.lightbox-image-wrap {
   
    padding: 20px 20px 10px;
}
	.custom-lightbox .lightbox-next {
    right: 10px;
}
	.custom-lightbox .lightbox-prev {
    left: 10px;
}
	.custom-lightbox .lightbox-close, .custom-lightbox .lightbox-nav {
    width: 60px !important;
    height: 60px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}
	.single-product .site-main-inside{
    padding: 10px 0% 0px;
}
    .single-product div.product {
        display: block;
    }
	.single-product .custom-gallery-thumbs {
  
    max-width: 340px;
     }

    .single-product div.product .summary {
        margin-top: 24px;
    }

    .single-product div.product .woocommerce-product-gallery {
        display: flex;
        flex-direction: column-reverse;
    }

    .single-product div.product .woocommerce-product-gallery .custom-gallery-viewport {
        min-height: 380px;
        margin-bottom: 0px;
        border-radius: 20px;
        width: 100%;
        padding: 24px;
    }

    .single-product .custom-gallery-thumbs-wrap {
        min-height: auto;
        margin-top: 0;
    }

    .single-product .gallery-thumb-arrow {
        display: none;
    }

    .single-product .custom-gallery-thumbs {
        flex-direction: row;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 6px;
    }

    .single-product .custom-gallery-thumbs li,
    .single-product .custom-gallery-thumbs button {
        width: 103px;
        height: 103px;
    }

    .single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__image > a > img {
        max-height: 380px;
    }
}