/* SINGLE PRODUCT PAGE ONLY */
body.single-product {
    --liora-img-gold: #cfa05a;
    --liora-img-brown: #2a160f;
    --liora-img-border: rgba(77, 46, 29, .18);
    --liora-img-border-hover: rgba(207, 160, 90, .50);
    --liora-img-shadow: 0 8px 24px rgba(45, 28, 18, .10), 0 2px 6px rgba(45, 28, 18, .06);
    --liora-img-shadow-hover: 0 16px 34px rgba(45, 28, 18, .16), 0 4px 12px rgba(45, 28, 18, .08);
}

/* Main WooCommerce gallery image */
body.single-product .liora-single-image-link {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    isolation: isolate;
    transform: translateZ(0);
    border: 1px solid var(--liora-img-border) !important;
    box-shadow: var(--liora-img-shadow) !important;
    transition: transform .32s ease, box-shadow .32s ease, border-color .32s ease !important;
    background: #fff;
    cursor: zoom-in;
}
body.single-product .liora-single-image-link:hover {
    transform: translateY(-3px);
    border-color: var(--liora-img-border-hover) !important;
    box-shadow: var(--liora-img-shadow-hover) !important;
}
body.single-product .liora-single-image-link::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.16), transparent 38%, rgba(40,20,12,.10));
    transition: opacity .30s ease;
}
body.single-product .liora-single-image-link::after {
    content: "FULL SCREEN  →";
    position: absolute;
    z-index: 3;
    left: 18px;
    right: 18px;
    bottom: 16px;
    padding: 10px 14px;
    text-align: center;
    border: 1px solid rgba(255,255,255,.55);
    background: rgba(35,18,12,.68);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    opacity: 0;
    transform: translateY(8px);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    transition: opacity .30s ease, transform .30s ease;
    pointer-events: none;
}
body.single-product .liora-single-image-link img {
    display: block;
    width: 100%;
    transition: transform .42s cubic-bezier(.2,.7,.2,1), filter .42s ease !important;
    will-change: transform;
}
body.single-product .liora-single-image-link:hover::before,
body.single-product .liora-single-image-link:hover::after { opacity: 1; }
body.single-product .liora-single-image-link:hover::after { transform: translateY(0); }
body.single-product .liora-single-image-link:hover img {
    transform: scale(1.035);
    filter: contrast(1.025) saturate(1.025);
}

/* Thumbnails: same refined border + shadow */
body.single-product .woocommerce-product-gallery .flex-control-thumbs li,
body.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image:not(:first-child) {
    border-radius: 7px;
}
body.single-product .woocommerce-product-gallery .flex-control-thumbs img,
body.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image:not(:first-child) img {
    border: 1px solid rgba(77, 46, 29, .16) !important;
    border-radius: 7px !important;
    box-shadow: 0 4px 12px rgba(45, 28, 18, .08) !important;
    transition: border-color .24s ease, box-shadow .24s ease, transform .24s ease, opacity .24s ease !important;
    background: #fff;
}
body.single-product .woocommerce-product-gallery .flex-control-thumbs img:hover,
body.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image:not(:first-child) img:hover {
    border-color: rgba(207, 160, 90, .55) !important;
    box-shadow: 0 8px 18px rgba(45, 28, 18, .12) !important;
    transform: translateY(-1px);
}
body.single-product .woocommerce-product-gallery .flex-control-thumbs .flex-active,
body.single-product .woocommerce-product-gallery .flex-control-thumbs li img.flex-active {
    border-color: rgba(207, 160, 90, .68) !important;
    box-shadow: 0 10px 20px rgba(45, 28, 18, .14) !important;
    opacity: 1 !important;
}

/* Related products images: same Shop hover treatment, without touching text/buttons/layout */
body.single-product .related.products .liora-related-image-link,
body.single-product .upsells.products .liora-related-image-link {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    isolation: isolate;
    transform: translateZ(0);
    border: 1px solid var(--liora-img-border) !important;
    box-shadow: var(--liora-img-shadow) !important;
    transition: transform .32s ease, box-shadow .32s ease, border-color .32s ease !important;
    background: #fff;
}
body.single-product .related.products .liora-related-image-link:hover,
body.single-product .upsells.products .liora-related-image-link:hover {
    transform: translateY(-3px);
    border-color: var(--liora-img-border-hover) !important;
    box-shadow: var(--liora-img-shadow-hover) !important;
}
body.single-product .related.products .liora-related-image-link::before,
body.single-product .upsells.products .liora-related-image-link::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.16), transparent 38%, rgba(40,20,12,.10));
    transition: opacity .30s ease;
}
body.single-product .related.products .liora-related-image-link::after,
body.single-product .upsells.products .liora-related-image-link::after {
    content: "VIEW PRODUCT  →";
    position: absolute;
    z-index: 3;
    left: 18px;
    right: 18px;
    bottom: 16px;
    padding: 10px 14px;
    text-align: center;
    border: 1px solid rgba(255,255,255,.55);
    background: rgba(35,18,12,.68);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    opacity: 0;
    transform: translateY(8px);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    transition: opacity .30s ease, transform .30s ease;
    pointer-events: none;
}
body.single-product .related.products .liora-related-image-link img,
body.single-product .upsells.products .liora-related-image-link img {
    display: block;
    width: 100%;
    transition: transform .42s cubic-bezier(.2,.7,.2,1), filter .42s ease !important;
    will-change: transform;
}
body.single-product .related.products .liora-related-image-link:hover::before,
body.single-product .related.products .liora-related-image-link:hover::after,
body.single-product .upsells.products .liora-related-image-link:hover::before,
body.single-product .upsells.products .liora-related-image-link:hover::after { opacity: 1; }
body.single-product .related.products .liora-related-image-link:hover::after,
body.single-product .upsells.products .liora-related-image-link:hover::after { transform: translateY(0); }
body.single-product .related.products .liora-related-image-link:hover img,
body.single-product .upsells.products .liora-related-image-link:hover img {
    transform: scale(1.035);
    filter: contrast(1.025) saturate(1.025);
}

/* Fullscreen lightbox */
body.single-product .liora-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, visibility .25s ease;
}
body.single-product .liora-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
body.single-product .liora-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(14, 8, 6, .88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
body.single-product .liora-lightbox__dialog {
    position: relative;
    z-index: 2;
    width: min(92vw, 1380px);
    height: min(90vh, 940px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 72px;
}
body.single-product .liora-lightbox__image-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
body.single-product .liora-lightbox__img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.20);
    box-shadow: 0 24px 70px rgba(0,0,0,.34);
    background: #fff;
}
body.single-product .liora-lightbox__btn {
    position: absolute;
    z-index: 3;
    border: 0;
    background: rgba(255,255,255,.92);
    color: #23120c;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, opacity .2s ease;
}
body.single-product .liora-lightbox__btn:hover {
    transform: translateY(-2px);
    background: #fff;
}
body.single-product .liora-lightbox__btn:focus { outline: 2px solid var(--liora-img-gold); outline-offset: 2px; }
body.single-product .liora-lightbox__btn--close {
    top: 14px;
    right: 14px;
    width: 48px;
    height: 48px;
    font-size: 20px;
    line-height: 1;
}
body.single-product .liora-lightbox__btn--prev,
body.single-product .liora-lightbox__btn--next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
}
body.single-product .liora-lightbox__btn--prev { left: 14px; }
body.single-product .liora-lightbox__btn--next { right: 14px; }
body.single-product .liora-lightbox__counter {
    position: absolute;
    left: 24px;
    top: 18px;
    z-index: 3;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}
body.single-product.liora-lightbox-open {
    overflow: hidden;
}

@media (max-width: 767px) {
    body.single-product .liora-single-image-link::after,
    body.single-product .related.products .liora-related-image-link::after {
        left: 12px;
        right: 12px;
        bottom: 12px;
        padding: 9px 10px;
    }
    body.single-product .liora-lightbox__dialog {
        width: 100vw;
        height: 100vh;
        padding: 62px 18px 24px;
    }
    body.single-product .liora-lightbox__btn--prev { left: 10px; }
    body.single-product .liora-lightbox__btn--next { right: 10px; }
    body.single-product .liora-lightbox__btn--prev,
    body.single-product .liora-lightbox__btn--next,
    body.single-product .liora-lightbox__btn--close {
        width: 46px;
        height: 46px;
    }
    body.single-product .liora-lightbox__counter {
        top: 14px;
        left: 14px;
        font-size: 11px;
    }
}

@media (hover: none), (prefers-reduced-motion: reduce) {
    body.single-product .liora-single-image-link::before,
    body.single-product .liora-single-image-link::after,
    body.single-product .related.products .liora-related-image-link::before,
    body.single-product .related.products .liora-related-image-link::after,
    body.single-product .upsells.products .liora-related-image-link::before,
    body.single-product .upsells.products .liora-related-image-link::after { display: none; }

    body.single-product .liora-single-image-link img,
    body.single-product .related.products .liora-related-image-link img,
    body.single-product .upsells.products .liora-related-image-link img {
        transform: none !important;
        transition: none !important;
    }
}
