/* Image lightbox — shared fullscreen viewer */
.image-lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.image-lightbox-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.image-lightbox-overlay.is-fullscreen .image-lightbox-stage {
    border-radius: 0;
}

.image-lightbox-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #f8fafc;
    flex-shrink: 0;
}

.image-lightbox-title {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.9;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 50vw;
}

.image-lightbox-counter {
    font-size: 0.8rem;
    opacity: 0.75;
    margin-inline-start: 0.5rem;
}

.image-lightbox-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.image-lightbox-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.image-lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

.image-lightbox-btn:active {
    transform: scale(0.96);
}

.image-lightbox-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 0;
    padding: 0 3.5rem 1.5rem;
}

.image-lightbox-img-wrap {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: imageLightboxIn 0.28s ease;
}

@keyframes imageLightboxIn {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.image-lightbox-img {
    max-width: min(96vw, 1400px);
    max-height: calc(100vh - 7rem);
    object-fit: contain;
    border-radius: 0.35rem;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
    user-select: none;
    -webkit-user-drag: none;
}

.image-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.75rem;
    height: 2.75rem;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 1.35rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
    z-index: 2;
}

.image-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.28);
}

.image-lightbox-nav:disabled {
    opacity: 0.25;
    cursor: default;
}

.image-lightbox-nav--prev { inset-inline-start: 0.75rem; }
.image-lightbox-nav--next { inset-inline-end: 0.75rem; }

img.js-image-lightbox,
[data-image-lightbox] {
    cursor: zoom-in;
}

.sm-photos-grid img.js-image-lightbox,
.cm-photos-grid img.js-image-lightbox,
.store-lightbox-img {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sm-photos-grid img.js-image-lightbox:hover,
.cm-photos-grid img.js-image-lightbox:hover,
.store-lightbox-img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

@media (max-width: 575.98px) {
    .image-lightbox-stage { padding: 0 0.5rem 1rem; }
    .image-lightbox-nav { width: 2.25rem; height: 2.25rem; font-size: 1.1rem; }
    .image-lightbox-nav--prev { inset-inline-start: 0.25rem; }
    .image-lightbox-nav--next { inset-inline-end: 0.25rem; }
}
