.lsg-gallery {
    --lsg-gap: 18px;
    --lsg-radius: 28px;
    --lsg-slides: 3;
    position: relative;
    width: 100%;
    display: grid;
    gap: 18px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.lsg-gallery *,
.lsg-lightbox * {
    box-sizing: border-box;
}

.lsg-gallery__viewport {
    position: relative;
    overflow: hidden;
    border-radius: var(--lsg-radius);
    background: linear-gradient(180deg, #ffffff 0%, #f7f8fb 100%);
    border: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: 0 18px 45px rgba(17, 24, 39, 0.08);
    padding: 18px;
}

.lsg-gallery__track {
    display: flex;
    gap: var(--lsg-gap);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.lsg-gallery__slide {
    flex: 0 0 calc((100% - (var(--lsg-gap) * (var(--lsg-slides) - 1))) / var(--lsg-slides));
    min-width: 0;
}

.lsg-gallery__image,
.lsg-gallery__lightbox-trigger {
    display: block;
    width: 100%;
}

.lsg-gallery__lightbox-trigger {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.lsg-gallery__image {
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 22px;
    box-shadow: 0 16px 32px rgba(17, 24, 39, 0.1);
}

.lsg-gallery__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.78);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 32px rgba(17, 24, 39, 0.2);
    cursor: pointer;
    z-index: 2;
    transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.lsg-gallery__arrow:hover {
    background: rgba(17, 24, 39, 0.95);
}

.lsg-gallery__arrow span {
    font-size: 32px;
    line-height: 1;
}

.lsg-gallery__arrow--prev { left: 20px; }
.lsg-gallery__arrow--next { right: 20px; }

.lsg-gallery__dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.lsg-gallery__dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.18);
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.lsg-gallery__dot.is-active {
    background: #111827;
    transform: scale(1.2);
}

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

.lsg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
}

.lsg-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 10, 15, 0.82);
    backdrop-filter: blur(12px);
}

.lsg-lightbox__inner {
    position: absolute;
    inset: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lsg-lightbox__image {
    max-width: min(92vw, 1200px);
    max-height: 86vh;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.lsg-lightbox__close,
.lsg-lightbox__nav {
    position: absolute;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.lsg-lightbox__close {
    top: 0;
    right: 0;
    width: 54px;
    height: 54px;
    font-size: 34px;
}

.lsg-lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    font-size: 34px;
}

.lsg-lightbox__nav--prev { left: 16px; }
.lsg-lightbox__nav--next { right: 16px; }

@media (max-width: 767px) {
    .lsg-gallery {
        --lsg-gap: 12px;
        --lsg-radius: 22px;
        --lsg-slides: 1;
    }

    .lsg-gallery__viewport {
        padding: 12px;
    }

    .lsg-gallery__image {
        border-radius: 18px;
    }

    .lsg-gallery__arrow {
        width: 42px;
        height: 42px;
    }

    .lsg-gallery__arrow span {
        font-size: 26px;
    }

    .lsg-gallery__arrow--prev { left: 12px; }
    .lsg-gallery__arrow--next { right: 12px; }

    .lsg-lightbox__inner {
        inset: 18px;
    }

    .lsg-lightbox__nav {
        width: 46px;
        height: 46px;
    }
}
