/* --- Base Styles --- */
.golden-gallery-container {
    width: 100%;
    margin: 0 auto;
    padding: 10px;
    background-color: transparent; /* پس‌زمینه شفاف */
}

.golden-gallery-wrapper {
    display: flex;
    gap: 15px;
}

.golden-gallery-main-image {
    border: 1px solid #D4AF37;
    padding: 5px;
    background-color: #000;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
    border-radius: 5px;
}

.golden-gallery-main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* تصویر را به طور کامل نمایش می‌دهد */
    display: block;
    border-radius: 3px;
}

/* تغییر ۱: افزودن نشانگر کلیک به تصویر اصلی */
.main-golden-image {
    cursor: pointer;
}

.thumbnail-item {
    cursor: pointer;
    border: 1px solid #555;
    padding: 3px;
    border-radius: 4px;
    transition: all 0.3s ease;
    background-color: #000;
}

.thumbnail-item img {
    display: block;
    border-radius: 2px;
}

.thumbnail-item.active {
    border-color: #D4AF37;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.7);
}

/* --- Layout: Horizontal (Default) --- */
.golden-gallery-layout-horizontal .golden-gallery-wrapper {
    flex-direction: column; /* آیتم‌ها زیر هم قرار می‌گیرند */
}

.golden-gallery-layout-horizontal .golden-gallery-thumbnails {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.golden-gallery-layout-horizontal .thumbnail-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.golden-gallery-layout-horizontal .thumbnail-item:hover {
    transform: scale(1.05);
}


/* --- Layout: Vertical (Inspired by your screenshot) --- */
.golden-gallery-layout-vertical .golden-gallery-wrapper {
    flex-direction: row-reverse; /* تصاویر کوچک در سمت راست */
}

.golden-gallery-layout-vertical .golden-gallery-main-image {
    flex-grow: 1; /* فضای باقی‌مانده را پر می‌کند */
}

.golden-gallery-layout-vertical .golden-gallery-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
    width: 120px; /* عرض ستون تصاویر کوچک */
    overflow-y: auto; /* اسکرول در صورت زیاد بودن تصاویر */
    padding: 10px 5px;
    background-color: rgba(10, 10, 10, 0.5); /* پس‌زمینه نیمه‌شفاف */
    border-radius: 8px;
}

/* استایل اسکرول‌بار برای حالت عمودی */
.golden-gallery-layout-vertical .golden-gallery-thumbnails::-webkit-scrollbar {
    width: 5px;
}
.golden-gallery-layout-vertical .golden-gallery-thumbnails::-webkit-scrollbar-track {
    background: #222;
}
.golden-gallery-layout-vertical .golden-gallery-thumbnails::-webkit-scrollbar-thumb {
    background: #D4AF37;
    border-radius: 5px;
}

.golden-gallery-layout-vertical .thumbnail-item {
    width: 100%;
}

.golden-gallery-layout-vertical .thumbnail-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1; /* تصاویر را مربع نگه می‌دارد */
    object-fit: cover;
}


/* --- Responsive for Mobile --- */
@media (max-width: 767px) {
    /* در موبایل، همیشه حالت عمودی را به حالت افقی ترجیح می‌دهیم */
    .golden-gallery-layout-horizontal .golden-gallery-wrapper {
        flex-direction: column; /* همان حالت افقی باقی می‌ماند */
    }

    /* حالت عمودی را برای موبایل بهینه می‌کنیم */
    .golden-gallery-layout-vertical .golden-gallery-wrapper {
        flex-direction: column; /* در موبایل، تصاویر کوچک زیر تصویر اصلی بروند */
    }

    .golden-gallery-layout-vertical .golden-gallery-thumbnails {
        flex-direction: row; /* تصاویر کوچک افقی شوند */
        overflow-y: hidden;
        overflow-x: auto; /* اسکرول افقی */
        width: 100%;
        padding-bottom: 10px;
    }

    .golden-gallery-layout-vertical .thumbnail-item {
        width: 70px; /* اندازه کوچک‌تر برای موبایل */
        flex-shrink: 0;
    }

    .golden-gallery-layout-vertical .thumbnail-item img {
         width: 70px;
         height: 70px;
    }
}

/* --- Lightbox Styles (بخش جدید) --- */
.golden-gallery-lightbox-overlay {
    display: none; /* در ابتدا مخفی باشد */
    position: fixed; /* روی تمام محتوا قرار بگیرد */
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* پس‌زمینه تیره و نیمه‌شفاف */
    cursor: pointer;
    -webkit-backdrop-filter: blur(5px); /* افکت بلور برای مرورگرهای کرومیوم */
    backdrop-filter: blur(5px);
}

.golden-gallery-lightbox-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    border-radius: 5px;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.5);
}

.golden-gallery-lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 45px;
    font-weight: bold;
    transition: 0.3s ease;
    cursor: pointer;
    text-shadow: 0 0 5px #000;
}

.golden-gallery-lightbox-close:hover,
.golden-gallery-lightbox-close:focus {
    color: #D4AF37; /* رنگ طلایی هنگام هاور */
    text-decoration: none;
}

/* --- اصلاح جایگاه دکمه بستن برای موبایل --- */
@media (max-width: 767px) {
    .golden-gallery-lightbox-close {
        /* 
         * فاصله دکمه از بالا و راست را برای صفحات کوچک کمتر می‌کنیم
         * تا به گوشه نزدیک‌تر شود.
        */
        top: 10px;
        right: 10px;

        /* (اختیاری) می‌توانید اندازه فونت را هم کمی کوچکتر کنید */
        font-size: 35px;
    }
}