.listing-gallery {
    margin: 1rem 0 1.5rem;
}

.gallery-main {
    display: block;
    width: 100%;
    max-width: 720px;
    padding: 0;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    cursor: zoom-in;
    position: relative;
    background: #e5e7eb;
}

.gallery-main img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    display: block;
}

.gallery-count {
    position: absolute;
    right: .75rem;
    bottom: .75rem;
    background: rgba(17, 24, 39, .75);
    color: #fff;
    padding: .35rem .65rem;
    border-radius: 6px;
    font-size: .85rem;
}

.gallery-thumbs {
    display: flex;
    gap: .5rem;
    margin-top: .65rem;
    flex-wrap: wrap;
    max-width: 720px;
}

.gallery-thumb {
    padding: 0;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    width: 72px;
    height: 54px;
    background: #e5e7eb;
}

.gallery-thumb.is-active {
    border-color: var(--color-primary);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.gallery-main img {
    pointer-events: none;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, .92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.lightbox[hidden] {
    display: none !important;
}

.lightbox:not([hidden]) {
    display: flex !important;
}

body.lightbox-open {
    overflow: hidden;
}

.lightbox-figure {
    margin: 0;
    max-width: min(96vw, 1100px);
    max-height: 90vh;
    text-align: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: calc(90vh - 3rem);
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-caption {
    color: #e5e7eb;
    margin-top: .75rem;
    font-size: .95rem;
}

.lightbox-counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: #d1d5db;
    margin: 0;
    font-size: .9rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, .12);
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
    padding: .25rem .55rem;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, .25);
}

.lightbox-close {
    top: 1rem;
    right: 1rem;
}

.lightbox-prev {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev:disabled,
.lightbox-next:disabled {
    opacity: .35;
    cursor: default;
}

@media (max-width: 600px) {
    .lightbox-prev { left: .25rem; }
    .lightbox-next { right: .25rem; }
    .lightbox-close { top: .5rem; right: .5rem; }
}
