/* MySave Image Zoom Slider — Elementor widget */

.ypiz-wrap {
    --ypiz-active-scale: 1;
    --ypiz-side-scale: 0.72;
    --ypiz-side-opacity: 1;
    width: 100%;
    margin: 0 auto;
    overflow: visible !important;
}

.ypiz-viewport {
    position: relative;
    width: 100%;
    padding: 20px 64px 28px;
    overflow: visible !important;
}

.ypiz-swiper {
    width: 100%;
    overflow: hidden !important;
}

.ypiz-swiper .swiper-wrapper {
    align-items: center;
}

.ypiz-swiper .swiper-slide {
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.ypiz-card {
    width: 100%;
    transform: scale(var(--ypiz-side-scale));
    opacity: 1;
    transition: transform 0.4s ease, opacity 0.4s ease;
    will-change: transform, opacity;
    transform-origin: center center;
}

.ypiz-swiper .swiper-slide-active .ypiz-card,
.ypiz-swiper .swiper-slide-duplicate-active .ypiz-card {
    transform: scale(var(--ypiz-active-scale));
    opacity: 1;
    z-index: 3;
    position: relative;
}

@media (min-width: 768px) {
    .ypiz-swiper .swiper-slide-prev .ypiz-card,
    .ypiz-swiper .swiper-slide-duplicate-prev .ypiz-card {
        transform: translateX(6%) scale(var(--ypiz-side-scale));
    }

    .ypiz-swiper .swiper-slide-next .ypiz-card,
    .ypiz-swiper .swiper-slide-duplicate-next .ypiz-card {
        transform: translateX(-6%) scale(var(--ypiz-side-scale));
    }
}

.ypiz-media {
    display: block;
    width: 100%;
    overflow: hidden;
    border-radius: 18px;
    line-height: 0;
    text-decoration: none;
    background: #e5e7eb;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
    transition: box-shadow 0.4s ease;
}

button.ypiz-media {
    padding: 0;
    border: 0;
    font: inherit;
    color: inherit;
    cursor: zoom-in;
    appearance: none;
    -webkit-appearance: none;
}

.ypiz-swiper .swiper-slide-active .ypiz-media,
.ypiz-swiper .swiper-slide-duplicate-active .ypiz-media {
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
}

.ypiz-media img {
    width: 100%;
    height: auto;
    display: block;
}

.ypiz-nav {
    position: absolute;
    top: 50%;
    z-index: 8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 9999px;
    background-color: #20A748;
    color: #ffffff;
    cursor: pointer;
    transform: translateY(-50%);
    box-shadow: 0 8px 20px rgba(32, 167, 72, 0.3);
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.ypiz-nav svg {
    width: 22px;
    height: 22px;
    display: block;
}

/* Arrows sit over the left and right side slides. */
.ypiz-prev {
    left: 8px;
}

.ypiz-next {
    right: 8px;
}

.ypiz-nav:hover {
    transform: translateY(-50%) scale(1.06);
    box-shadow: 0 10px 24px rgba(32, 167, 72, 0.36);
}

.ypiz-nav:focus-visible {
    outline: 2px solid #178a3a;
    outline-offset: 3px;
}

.ypiz-pagination {
    display: none;
}

.ypiz-empty {
    padding: 24px;
    border-radius: 16px;
    background: #f3f4f6;
    color: #6b7280;
    text-align: center;
}

/* Prevent Elementor wrappers from clipping the side slides */
.elementor-widget-mysave-image-zoom-slider,
.elementor-widget-mysave-image-zoom-slider > .elementor-widget-container,
.elementor-element:has(.ypiz-wrap) {
    overflow: visible !important;
}

@media (max-width: 1023px) {
    .ypiz-viewport {
        padding-right: 52px;
        padding-left: 52px;
    }

    .ypiz-prev {
        left: 4px;
    }

    .ypiz-next {
        right: 4px;
    }
}

@media (max-width: 767px) {
    .ypiz-viewport {
        padding: 12px 0 20px;
    }

    .ypiz-nav {
        display: none;
    }

    .ypiz-pagination {
        display: flex;
        position: static !important;
        width: auto !important;
        justify-content: center;
        align-items: center;
        gap: 8px;
        margin-top: 16px;
    }

    .ypiz-pagination .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
        margin: 0 !important;
        background: #20A748;
        opacity: 0.3;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .ypiz-pagination .swiper-pagination-bullet-active {
        opacity: 1;
        transform: scale(1.25);
    }
}

.ypiz-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.78);
}

.ypiz-lightbox.is-open {
    display: flex;
}

.ypiz-lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 9999px;
    background: #ffffff;
    color: #111827;
    cursor: pointer;
}

.ypiz-lightbox-close svg {
    width: 22px;
    height: 22px;
    display: block;
}

.ypiz-lightbox-image {
    max-width: min(96vw, 1100px);
    max-height: 88vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

body.ypiz-lightbox-open {
    overflow: hidden;
}
