/* =========================================================
   ZIZIGOLO PRODUCT GALLERY
========================================================= */

.zzg-product-gallery {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;

    position: relative;

    box-sizing: border-box;
    direction: rtl;
}

.zzg-product-gallery *,
.zzg-product-gallery *::before,
.zzg-product-gallery *::after {
    box-sizing: border-box;
}


/* =========================================================
   DESKTOP GALLERY
========================================================= */

.zzg-desktop-gallery {
    display: block;

    width: 100%;
    max-width: 100%;
}

.zzg-desktop-main {
    position: relative;

    width: 100%;
    height: 420px;

    margin: 0;
    padding: 0;

    overflow: hidden;

    background: #fff;

    border-radius: 14px;
}

.zzg-desktop-main > img {
    display: block;

    width: 100%;
    height: 100%;
    max-width: 100%;

    margin: 0;
    padding: 0;

    object-fit: contain;

    cursor: zoom-in;

    user-select: none;
    -webkit-user-drag: none;
}


/* =========================================================
   DESKTOP ARROWS
========================================================= */

.zzg-d-arrow {
    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    width: 38px;
    height: 38px;

    min-width: 38px;
    min-height: 38px;

    margin: 0;
    padding: 0;

    border: 1px solid #ddd;
    border-radius: 50%;

    background: rgba(255,255,255,.96);

    color: #222;

    font-family: Arial, sans-serif;
    font-size: 27px;
    line-height: 1;

    display: flex;

    align-items: center;
    justify-content: center;

    cursor: pointer;

    z-index: 10;

    appearance: none;
    -webkit-appearance: none;
}

.zzg-d-prev {
    right: 12px;
}

.zzg-d-next {
    left: 12px;
}


/* =========================================================
   DESKTOP COUNTER
========================================================= */

.zzg-d-count {
    position: absolute;

    left: 50%;
    bottom: 12px;

    transform: translateX(-50%);

    width: 48px;
    min-width: 48px;

    height: 30px;
    min-height: 30px;

    margin: 0;
    padding: 5px 7px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 3px;

    border-radius: 16px;

    background: linear-gradient(
        135deg,
        #0d6efd,
        #e31b23
    );

    color: #fff;

    font-size: 12px;
    font-weight: 600;

    line-height: 1;

    text-align: center;

    white-space: nowrap;

    z-index: 20;

    box-shadow: 0 4px 12px rgba(0,0,0,.12);
}


/* =========================================================
   DESKTOP GALLERY ACTIONS
========================================================= */

.zzg-d-tools {
    position: absolute;

    left: 12px;
    bottom: 12px;

    width: auto;
    height: 34px;

    margin: 0;
    padding: 0;

    display: flex;

    flex-direction: row;
    flex-wrap: nowrap;

    align-items: center;
    justify-content: flex-start;

    gap: 7px;

    direction: ltr;

    z-index: 30;
}


/* =========================================================
   FAVORITE + COMPARE BUTTONS
========================================================= */

.zzg-d-action {
    position: relative;

    flex: 0 0 34px;

    width: 34px;
    height: 34px;

    min-width: 34px;
    max-width: 34px;

    min-height: 34px;
    max-height: 34px;

    margin: 0;
    padding: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 50%;

    background: rgba(255,255,255,.96);

    color: #0d6efd;

    font-family: inherit;
    font-size: 20px;
    line-height: 1;

    cursor: pointer;

    box-shadow: 0 3px 10px rgba(0,0,0,.10);

    transition: .2s ease;

    appearance: none;
    -webkit-appearance: none;
}

.zzg-d-action:hover {
    transform: translateY(-1px);
}

.zzg-d-action > span {
    display: block;

    width: auto;
    height: auto;

    margin: 0;
    padding: 0;

    line-height: 1;
}


/* =========================================================
   FAVORITE ACTIVE
========================================================= */

.zzg-d-action.zzg-favorite.is-active {
    background: #e31b23;

    color: #fff;
}


/* =========================================================
   COMPARE ACTIVE
========================================================= */

.zzg-d-action.zzg-compare.is-active {
    background: #0d6efd;

    color: #fff;
}


/* =========================================================
   DESKTOP ALL IMAGES
========================================================= */

.zzg-d-all {
    position: relative;

    flex: 0 0 auto;

    width: 94px;
    min-width: 94px;
    max-width: 94px;

    height: 34px;
    min-height: 34px;
    max-height: 34px;

    margin: 0;
    padding: 0 10px;

    display: flex;

    flex-direction: row;
    flex-wrap: nowrap;

    align-items: center;
    justify-content: center;

    gap: 5px;

    border: 0;
    border-radius: 18px;

    background: linear-gradient(
        135deg,
        #b6cae7,
        #e31b23
    );

    color: #fff;

    font-family: inherit;
    font-size: 12px;
    font-weight: 600;

    line-height: 1;

    white-space: nowrap;

    cursor: pointer;

    box-shadow: 0 4px 12px rgba(0,0,0,.12);

    transition: .2s ease;

    appearance: none;
    -webkit-appearance: none;
}

.zzg-d-all:hover {
    transform: translateY(-1px);
}

.zzg-d-all .zzg-icon-grid {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: auto;
    height: auto;

    margin: 0;
    padding: 0;

    font-size: 15px;
    line-height: 1;
}

.zzg-d-all > span:not(.zzg-icon-grid) {
    display: inline-block;

    width: auto;
    height: auto;

    margin: 0;
    padding: 0;

    white-space: nowrap;
}


/* =========================================================
   DESKTOP THUMBNAILS
========================================================= */

.zzg-desktop-thumbs {
    width: 100%;

    margin: 8px 0 0;
    padding: 2px 0;

    display: flex;

    align-items: center;

    gap: 7px;

    overflow-x: auto;
    overflow-y: hidden;

    scrollbar-width: none;
}

.zzg-desktop-thumbs::-webkit-scrollbar {
    display: none;
}

.zzg-d-thumb {
    flex: 0 0 62px;

    width: 62px;
    height: 62px;

    min-width: 62px;
    min-height: 62px;

    margin: 0;
    padding: 0;

    border: 1px solid #ddd;
    border-radius: 8px;

    background: #fff;

    overflow: hidden;

    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;
}

.zzg-d-thumb img {
    display: block;

    width: 100%;
    height: 100%;

    margin: 0;
    padding: 0;

    object-fit: contain;

    user-select: none;
    -webkit-user-drag: none;
}

.zzg-d-thumb.is-active {
    border: 2px solid #0d6efd;
}


/* =========================================================
   MOBILE PRODUCT GALLERY
========================================================= */

.zzg-mobile-gallery {
    display: none;
}


@media (max-width: 767px) {

    /* =====================================================
       DESKTOP HIDE
    ===================================================== */

    .zzg-desktop-gallery {
        display: none;
    }

    /* =====================================================
       MOBILE SHOW
    ===================================================== */

    .zzg-mobile-gallery {
        display: block;

        width: 100%;
        max-width: 100%;

        margin: 0;
        padding: 0;

        background: #fff;

        overflow: hidden;
    }


    /* =====================================================
       MOBILE TRACK
    ===================================================== */

    .zzg-mobile-track {
        width: 100%;
        max-width: 100%;

        margin: 0;
        padding: 0 8px;

        display: flex;

        flex-wrap: nowrap;

        gap: 8px;

        overflow-x: auto;
        overflow-y: hidden;

        scrollbar-width: none;

        -webkit-overflow-scrolling: touch;

        scroll-snap-type: x mandatory;

        direction: rtl;

        overscroll-behavior-x: contain;
    }

    .zzg-mobile-track::-webkit-scrollbar {
        display: none;
    }


    /* =====================================================
       MOBILE PAGE
    ===================================================== */

    .zzg-mobile-page {
        flex: 0 0 calc(100vw - 16px);

        width: calc(100vw - 16px);
        min-width: calc(100vw - 16px);

        height: 315px;

        margin: 0;
        padding: 0;

        display: flex;

        flex-direction: row;

        gap: 7px;

        overflow: hidden;

        background: #fff;

        scroll-snap-align: start;
        scroll-snap-stop: always;
    }


    /* =====================================================
       MOBILE MAIN IMAGE
    ===================================================== */

    .zzg-mobile-main {
        flex: 0 0 65%;

        width: 65%;
        height: 100%;

        min-width: 0;

        margin: 0;
        padding: 0;

        border: 1px solid #eee;
        border-radius: 10px;

        background: #fff;

        overflow: hidden;

        cursor: zoom-in;

        appearance: none;
        -webkit-appearance: none;
    }

    .zzg-mobile-main img {
        display: block;

        width: 100%;
        height: 100%;
        max-width: 100%;

        margin: 0;
        padding: 0;

        object-fit: contain;

        user-select: none;
        -webkit-user-drag: none;
    }


    /* =====================================================
       MOBILE SIDE IMAGES
    ===================================================== */

    .zzg-mobile-side {
        flex: 1 1 auto;

        width: 35%;
        min-width: 0;

        height: 100%;

        margin: 0;
        padding: 0;

        display: flex;

        flex-direction: column;

        gap: 7px;

        overflow: hidden;
    }

    .zzg-mobile-small {
        flex: 1 1 0;

        width: 100%;
        min-width: 0;
        min-height: 0;

        margin: 0;
        padding: 0;

        border: 1px solid #eee;
        border-radius: 10px;

        background: #fff;

        overflow: hidden;

        cursor: zoom-in;

        appearance: none;
        -webkit-appearance: none;
    }

    .zzg-mobile-small img {
        display: block;

        width: 100%;
        height: 100%;
        max-width: 100%;

        margin: 0;
        padding: 0;

        object-fit: contain;

        user-select: none;
        -webkit-user-drag: none;
    }


    /* =====================================================
       MOBILE BOTTOM
    ===================================================== */

    .zzg-mobile-bottom {
        width: 100%;

        margin: 0;
        padding: 8px 10px 0;

        display: flex;

        align-items: center;
        justify-content: space-between;

        gap: 10px;

        background: #fff;
    }

    .zzg-mobile-count {
        display: inline-flex;

        align-items: center;
        justify-content: center;

        margin: 0;
        padding: 5px 10px;

        min-height: 27px;

        border-radius: 15px;

        background: linear-gradient(135deg, #0d6efd, #0dcaf0);

        color: #fff;

        font-size: 11px;
        font-weight: 600;

        line-height: 1;

        white-space: nowrap;

        box-shadow: 0 3px 10px rgba(0,0,0,.12);
    }

    .zzg-mobile-all {
        display: inline-flex;

        align-items: center;
        justify-content: center;

        gap: 5px;

        margin: 0;
        padding: 7px 12px;

        min-height: 33px;

        border: 0;
        border-radius: 18px;

        background:linear-gradient(135deg, #0d6efd, #0dcaf0);

        color: #fff;

        font-family: inherit;

        font-size: 12px;
        font-weight: 600;

        cursor: pointer;

        box-shadow: 0 3px 10px rgba(0,0,0,.12);

        appearance: none;
        -webkit-appearance: none;
    }
}


/* =========================================================
   MOBILE ACTIONS
========================================================= */

.zzg-mobile-actions {
    display: flex;

    align-items: center;

    gap: 6px;

    flex-shrink: 0;
}

.zzg-mobile-action {
    width: 32px;
    height: 32px;

    min-width: 32px;
    min-height: 32px;

    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 50%;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #f5f7fa;

    color: #0d6efd;

    font-size: 19px;
    line-height: 1;

    cursor: pointer;

    box-shadow: 0 2px 7px rgba(0,0,0,.08);

    appearance: none;
    -webkit-appearance: none;
}

.zzg-mobile-action.zzg-favorite.is-active {
    background: #e31b23;
    color: #fff;
}

.zzg-mobile-action.zzg-compare.is-active {
    background: #0d6efd;
    color: #fff;
}

.zzg-mobile-action > span {
    display: block;

    margin: 0;
    padding: 0;

    line-height: 1;
}


/* =========================================================
   MOBILE COUNT / ALL
========================================================= */

@media (max-width: 767px) {

    .zzg-mobile-actions {
        flex-shrink: 0;
    }

    .zzg-mobile-count {
        margin-right: auto;
        margin-left: auto;
    }

    .zzg-mobile-all {
        flex-shrink: 0;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .zzg-mobile-page {
        height: 285px;

        flex-basis: calc(100vw - 14px);

        width: calc(100vw - 14px);
        min-width: calc(100vw - 14px);
    }

    .zzg-mobile-track {
        padding-left: 7px;
        padding-right: 7px;

        gap: 7px;
    }

    .zzg-mobile-main {
        flex-basis: 64%;
    }

    .zzg-mobile-side {
        gap: 7px;
    }

}


/* =========================================================
   LIGHTBOX
========================================================= */

.zzg-lightbox {
    position: fixed !important;

    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;

    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;

    margin: 0 !important;
    padding: 0 !important;

    display: none;

    background: #000 !important;

    overflow: hidden !important;

    z-index: 2147483647 !important;

    direction: rtl;
}

.zzg-lightbox.is-open {
    display: block !important;
}

.zzg-lightbox-bg {
    position: absolute !important;

    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;

    width: 100% !important;
    height: 100% !important;

    background: #000 !important;

    z-index: 1 !important;
}


/* =========================================================
   LIGHTBOX MAIN IMAGE
========================================================= */

.zzg-lb-image-wrap {
    position: absolute !important;

    top: 52px !important;
    right: 58px !important;
    bottom: 118px !important;
    left: 58px !important;

    margin: 0 !important;
    padding: 8px !important;

    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    z-index: 5 !important;
}

.zzg-lb-image-wrap img {
    display: block !important;

    width: auto !important;
    height: auto !important;

    max-width: 100% !important;
    max-height: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    object-fit: contain !important;

    user-select: none;
    -webkit-user-drag: none;
}


/* =========================================================
   LIGHTBOX CLOSE
========================================================= */

.zzg-lb-close {
    position: absolute !important;

    top: 14px !important;
    right: 14px !important;

    width: 42px !important;
    height: 42px !important;

    min-width: 42px !important;
    min-height: 42px !important;

    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    border: 0 !important;
    border-radius: 50% !important;

    background:linear-gradient(135deg, #0d6efd, #0dcaf0) !important;

    color: #fff !important;

    font-family: Arial, sans-serif !important;
    font-size: 29px !important;
    line-height: 1 !important;

    cursor: pointer;

    z-index: 100 !important;

    box-shadow: 0 4px 14px rgba(0,0,0,.25);

    appearance: none !important;
    -webkit-appearance: none !important;
}


/* =========================================================
   LIGHTBOX COUNTER
========================================================= */

.zzg-lb-count {
    position: absolute !important;

    top: 19px !important;
    left: 18px !important;

    margin: 0 !important;
    padding: 6px 11px !important;

    min-width: 50px;

    display: inline-flex !important;

    align-items: center !important;
    justify-content: center !important;

    gap: 4px !important;

    border-radius: 16px !important;

    background: linear-gradient(135deg, #0d6efd, #0dcaf0) !important;

    color: #fff !important;

    font-size: 12px !important;
    font-weight: 600 !important;

    line-height: 1.1 !important;

    z-index: 100 !important;

    box-shadow: 0 4px 14px rgba(0,0,0,.25);
}


/* =========================================================
   LIGHTBOX ARROWS
========================================================= */

.zzg-lb-arrow {
    position: absolute !important;

    top: 50% !important;

    transform: translateY(-50%) !important;

    width: 44px !important;
    height: 44px !important;

    min-width: 44px !important;
    min-height: 44px !important;

    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    border: 1px solid rgba(255,255,255,.18) !important;
    border-radius: 50% !important;

    background: rgba(255,255,255,.10) !important;

    color: #fff !important;

    font-family: Arial, sans-serif !important;
    font-size: 32px !important;

    cursor: pointer;

    z-index: 100 !important;

    backdrop-filter: blur(5px);

    appearance: none !important;
    -webkit-appearance: none !important;
}

.zzg-lb-prev {
    right: 12px !important;
}

.zzg-lb-next {
    left: 12px !important;
}


/* =========================================================
   LIGHTBOX THUMBNAILS
========================================================= */

.zzg-lb-thumbs {
    position: absolute !important;

    right: 12px !important;
    left: 12px !important;

    bottom: calc(
        18px + env(safe-area-inset-bottom, 0px)
    ) !important;

    width: auto !important;

    height: 64px !important;

    margin: 0 !important;
    padding: 4px 8px !important;

    display: flex !important;

    flex-direction: row !important;
    flex-wrap: nowrap !important;

    align-items: center !important;
    justify-content: center !important;

    gap: 8px !important;

    overflow-x: auto !important;
    overflow-y: hidden !important;

    scrollbar-width: none !important;

    z-index: 200 !important;

    pointer-events: auto !important;

    white-space: nowrap !important;
}

.zzg-lb-thumbs::-webkit-scrollbar {
    display: none !important;
}


/* =========================================================
   LIGHTBOX THUMB
========================================================= */

.zzg-lb-thumb {
    position: relative !important;

    flex: 0 0 64px !important;

    width: 64px !important;
    height: 52px !important;

    min-width: 64px !important;
    max-width: 64px !important;

    min-height: 52px !important;
    max-height: 52px !important;

    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    border: 1px solid #555 !important;
    border-radius: 7px !important;

    background: #111 !important;

    overflow: hidden !important;

    cursor: pointer !important;

    pointer-events: auto !important;

    z-index: 201 !important;

    touch-action: manipulation !important;

    appearance: none !important;
    -webkit-appearance: none !important;
}

.zzg-lb-thumb img {
    display: block !important;

    width: 100% !important;
    height: 100% !important;

    min-width: 0 !important;
    min-height: 0 !important;

    max-width: 100% !important;
    max-height: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    object-fit: contain !important;

    pointer-events: none !important;

    user-select: none !important;
    -webkit-user-drag: none !important;
}

.zzg-lb-thumb.is-active {
    border: 2px solid #0d6efd !important;

    box-shadow:
        0 0 0 1px #e31b23,
        0 0 10px rgba(13,110,253,.35);
}


/* =========================================================
   MOBILE LIGHTBOX
========================================================= */

@media (max-width: 767px) {

    .zzg-lightbox {
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 100dvh !important;
    }

    .zzg-lb-image-wrap {

        top: 46px !important;

        right: 10px !important;
        left: 10px !important;

        bottom: 104px !important;

        padding: 2px !important;
    }

    .zzg-lb-close {

        top: 10px !important;
        right: 10px !important;

        width: 40px !important;
        height: 40px !important;

        min-width: 40px !important;
        min-height: 40px !important;

        font-size: 27px !important;
    }

    .zzg-lb-count {

        top: 16px !important;
        left: 12px !important;

        padding: 6px 10px !important;

        min-width: 48px !important;
    }

    .zzg-lb-arrow {

        width: 39px !important;
        height: 39px !important;

        min-width: 39px !important;
        min-height: 39px !important;

        font-size: 28px !important;
    }

    .zzg-lb-prev {
        right: 6px !important;
    }

    .zzg-lb-next {
        left: 6px !important;
    }

    .zzg-lb-thumbs {

        right: 6px !important;
        left: 6px !important;

        bottom: calc(
            8px + env(safe-area-inset-bottom, 0px)
        ) !important;

        height: 60px !important;

        padding: 3px 4px !important;

        gap: 6px !important;

        justify-content: flex-start !important;

        align-items: center !important;

        flex-wrap: nowrap !important;

        overflow-x: auto !important;
        overflow-y: hidden !important;
    }

    .zzg-lb-thumb {

        flex: 0 0 58px !important;

        width: 58px !important;
        height: 48px !important;

        min-width: 58px !important;
        max-width: 58px !important;

        min-height: 48px !important;
        max-height: 48px !important;
    }
}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .zzg-lb-image-wrap {

        top: 44px !important;

        right: 6px !important;
        left: 6px !important;

        bottom: 98px !important;
    }

    .zzg-lb-thumbs {

        right: 4px !important;
        left: 4px !important;

        bottom: calc(
            6px + env(safe-area-inset-bottom, 0px)
        ) !important;

        height: 58px !important;

        gap: 5px !important;
    }

    .zzg-lb-thumb {

        flex-basis: 54px !important;

        width: 54px !important;
        height: 45px !important;

        min-width: 54px !important;
        max-width: 54px !important;

        min-height: 45px !important;
        max-height: 45px !important;
    }
}
/* =========================================================
   GALLERY BUTTONS - VISIBILITY
========================================================= */

/* علاقه‌مندی و مقایسه */
.zzg-d-action {
    border: 1px solid rgba(13, 110, 253, .25) !important;

    box-shadow:
        0 3px 10px rgba(0, 0, 0, .14),
        0 0 0 1px rgba(255, 255, 255, .8) inset !important;

    background: #fff !important;
}


/* حالت فعال علاقه‌مندی */
.zzg-d-action.zzg-favorite.is-active {
    border-color: #e31b23 !important;

    box-shadow:
        0 3px 10px rgba(227, 27, 35, .25),
        0 0 0 1px rgba(255, 255, 255, .25) inset !important;
}


/* حالت فعال مقایسه */
.zzg-d-action.zzg-compare.is-active {
    border-color: #0d6efd !important;

    box-shadow:
        0 3px 10px rgba(13, 110, 253, .30),
        0 0 0 1px rgba(255, 255, 255, .25) inset !important;
}


/* =========================================================
   ALL IMAGES - SIMPLE LIGHT BLUE
========================================================= */

.zzg-d-all {
    background: #dbeafe !important;

    color: #0d6efd !important;

    border: 1px solid rgba(13, 110, 253, .18) !important;

    box-shadow:
        0 3px 10px rgba(0, 0, 0, .12) !important;
}


/* =========================================================
   DESKTOP COUNTER 1 / 6 - SIMPLE LIGHT BLUE
========================================================= */

.zzg-d-count {
    background: #dbeafe !important;

    color: #0d6efd !important;

    border: 1px solid rgba(13, 110, 253, .18) !important;

    box-shadow:
        0 3px 10px rgba(0, 0, 0, .12) !important;
}