﻿/* =========================
   Advertisement Gallery
   ========================= */

.advertisement-gallery {
    width: 100%;
}

/* تصویر اصلی */

.gallery-main-image {
    width: 100%;
    height: 500px;
    background: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .gallery-main-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        cursor: zoom-in;
        transition: opacity 0.2s ease;
    }


/* تصاویر کوچک */

.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.gallery-thumbnail {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

    .gallery-thumbnail img {
        width: 100%;
        height: 110px;
        object-fit: cover;
        display: block;
    }

    .gallery-thumbnail:hover {
        border-color: #007bff;
    }

    .gallery-thumbnail.active {
        border-color: #007bff;
    }

.gallery-thumbnail {
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
    padding: 5px;
}

    .gallery-thumbnail.active {
        border-color: #0d6efd;
        box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.3);
    }

    .gallery-thumbnail:hover {
        transform: scale(1.05);
    }
/* گالری اصلی */
.gallery-main-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #f8f9fa;
}

.gallery-main-image img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.3s ease;
    display: block;
}

    /* وقتی زوم شده */
    .gallery-main-image img.zoomed {
        cursor: zoom-out;
        transform: scale(1.6);
        transform-origin: center center;
    }

/* دکمه‌های قبلی و بعدی */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.55);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.25s ease;
    cursor: pointer;
}

    .gallery-nav:hover {
        background: rgba(0, 0, 0, 0.8);
        transform: translateY(-50%) scale(1.1);
    }

    .gallery-nav.prev {
        right: 15px;
    }

    .gallery-nav.next {
        left: 15px;
    }

/* تصاویر کوچک */
.gallery-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 520px;
    overflow-y: auto;
    padding-left: 5px;
}

.gallery-thumbnail {
    border: 3px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s ease;
    opacity: 0.75;
}

    .gallery-thumbnail:hover {
        opacity: 1;
        transform: scale(1.03);
    }

    .gallery-thumbnail.active {
        border-color: #0d6efd;
        opacity: 1;
        box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
    }

    .gallery-thumbnail img {
        width: 100%;
        height: 80px;
        object-fit: cover;
        display: block;
    }

/* موبایل */

@media (max-width: 768px) {

    .gallery-main-image {
        height: 350px;
    }

    .gallery-thumbnail {
        width: 75px;
        height: 65px;
    }
    .gallery-single-image {
        width: 100%;
        height: 450px;
        border-radius: 10px;
        overflow: hidden;
        background: #f5f5f5;
    }

        .gallery-single-image img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            display: block;
        }
}
