/* dm-gold-sp-lightbox.css — ظاهرِ لایت‌باکسِ گالریِ تک‌محصول (JS: dm-gold-sp-lightbox.js). */

body.dm-lb-open { overflow: hidden; }

.dm-lb {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    background: rgba(10, 10, 14, .94);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    direction: rtl;
    animation: dm-lb-in .18s ease-out;
}

@keyframes dm-lb-in { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
    .dm-lb { animation: none; }
    .dm-lb__img { transition: none !important; }
}

.dm-lb__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    flex: 0 0 auto;
}

.dm-lb__count {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .3px;
    color: rgba(255, 255, 255, .8);
}

.dm-lb__close,
.dm-lb__nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    /* ⚠ پس‌زمینهٔ تیرهٔ تقریباً مات + حلقهٔ روشن + سایه: تصاویر ما معمولاً زمینهٔ سفید دارند و دکمهٔ شیشه‌ایِ
       سفید رویشان گم می‌شد. این‌طوری روی هر تصویری (سفید یا تیره) خوانا می‌ماند. */
    background: rgba(20, 20, 28, .78);
    border: 1.5px solid rgba(255, 255, 255, .55);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
    color: #fff;
    cursor: pointer;
    transition: background .18s, transform .18s;
}

.dm-lb__close:hover,
.dm-lb__nav:hover { background: rgba(20, 20, 28, .95); }

.dm-lb__close:focus-visible,
.dm-lb__nav:focus-visible,
.dm-lb__thumb:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.dm-lb__stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
}

.dm-lb__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    user-select: none;
    -webkit-user-drag: none;
    opacity: 0;
    transition: opacity .2s ease;
}

.dm-lb__img.is-ready { opacity: 1; }

.dm-lb__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 44px;
    height: 44px;
}

.dm-lb__nav:active { transform: translateY(-50%) scale(.94); }

/* RTL: «قبلی» سمتِ راست، «بعدی» سمتِ چپ (جهتِ فیزیکی) */
.dm-lb__nav--prev { right: 14px; }
.dm-lb__nav--next { left: 14px; }

.dm-lb.is-single .dm-lb__nav,
.dm-lb.is-single .dm-lb__thumbs { display: none; }

.dm-lb__thumbs {
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 12px 14px 16px;
    overflow-x: auto;
    scrollbar-width: none;
}

.dm-lb__thumbs::-webkit-scrollbar { display: none; }

.dm-lb__thumb {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    padding: 2px;
    border: 2px solid transparent;
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    opacity: .6;
    cursor: pointer;
    overflow: hidden;
    transition: opacity .18s, border-color .18s;
}

.dm-lb__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 7px;
}

.dm-lb__thumb:hover { opacity: .9; }

.dm-lb__thumb.is-active {
    opacity: 1;
    border-color: #fff;
}

@media (max-width: 768px) {
    .dm-lb__nav { width: 36px; height: 36px; }
    .dm-lb__nav--prev { right: 8px; }
    .dm-lb__nav--next { left: 8px; }
    .dm-lb__thumb { width: 48px; height: 48px; }
}
