.halor-gallery {
    display: grid;
    gap: 12px;
}

.halor-gallery.columns-1 { grid-template-columns: repeat(1, 1fr); }
.halor-gallery.columns-2 { grid-template-columns: repeat(2, 1fr); }
.halor-gallery.columns-3 { grid-template-columns: repeat(3, 1fr); }
.halor-gallery.columns-4 { grid-template-columns: repeat(4, 1fr); }
.halor-gallery.columns-5 { grid-template-columns: repeat(5, 1fr); }
.halor-gallery.columns-6 { grid-template-columns: repeat(6, 1fr); }

.halor-item {
    display: block;
    overflow: hidden;
	position: relative;
    text-decoration: none;
}

.halor-item img {
    display: block;
    width: 100%;
    height: var(--halor-image-height-desktop, 260px);
    object-fit: cover;
    transition: transform 0.28s ease;
}

.halor-item:hover img {
    transform: scale(1.05);
}

/* Tablet */
@media (max-width: 1024px) {
    .halor-gallery.columns-4,
    .halor-gallery.columns-5,
    .halor-gallery.columns-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile Grid */
@media (max-width: 767px) {
    .halor-gallery.mobile-grid {
        grid-template-columns: 1fr;
    }

    .halor-gallery.mobile-grid .halor-item img {
        height: var(--halor-image-height-mobile, 220px);
    }
}

/* Mobile Carousel */
@media (max-width: 767px) {
    .halor-gallery.mobile-carousel {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
    }

    .halor-gallery.mobile-carousel::-webkit-scrollbar {
        height: 6px;
    }

    .halor-gallery.mobile-carousel::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.25);
        border-radius: 999px;
    }

    .halor-gallery.mobile-carousel .halor-item {
        flex: 0 0 82%;
        scroll-snap-align: center;
    }

    .halor-gallery.mobile-carousel .halor-item img {
        height: var(--halor-image-height-mobile, 220px);
    }

    .halor-item:hover img {
        transform: none;
    }
}

/* Lightbox */
#halor-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.94);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 60px 70px;
    box-sizing: border-box;
}

#halor-lightbox.halor-open {
    display: flex;
}

#halor-lightbox * {
    box-sizing: border-box;
}

#halor-lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

#halor-lightbox-figure {
    margin: 0;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
	height: stretch;
}

#halor-lightbox-caption {
    color: #fff;
    text-align: center;
    margin-top: 14px;
    max-width: 900px;
    font-size: 14px;
    line-height: 1.45;
}

.halor-lightbox-btn {
    position: absolute;
    z-index: 2;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    border-radius: 999px;
    width: 48px;
    height: 48px;
    font-size: 28px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.halor-lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.05);
}

#halor-lightbox-close {
    top: 18px;
    right: 18px;
}

#halor-lightbox-prev {
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
}

#halor-lightbox-next {
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
}

#halor-lightbox-prev:hover,
#halor-lightbox-next:hover {
    transform: translateY(-50%) scale(1.05);
}

@media (max-width: 767px) {
    #halor-lightbox {
        padding: 50px 16px 30px;
    }

    .halor-lightbox-btn {
        width: 42px;
        height: 42px;
        font-size: 24px;
    }

    #halor-lightbox-prev {
        left: 10px;
    }

    #halor-lightbox-next {
        right: 10px;
    }

    #halor-lightbox-caption {
        font-size: 13px;
        margin-top: 10px;
    }
}