.sgc-carousel {
    --sgc-columns: 4;
    --sgc-image-height: 200px;
    --sgc-gap: 8px;
    --sgc-radius: 4px;
    --sgc-hover-opacity: 0.8;
    --sgc-arrow-color: #fff;
    --sgc-arrow-bg: rgba(0, 0, 0, 0.5);
    --sgc-arrow-size: 36px;
    --sgc-arrow-offset: 12px;
    --sgc-dot-color: rgba(17, 17, 17, 0.28);
    --sgc-dot-active-color: #111;
    position: relative;
    width: 100%;
    outline: none;
}

.sgc-carousel *,
.sgc-lightbox * {
    box-sizing: border-box;
}

.sgc-carousel button,
.sgc-lightbox button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
    min-width: 0;
    min-height: 0;
    border: 0 !important;
    background: none;
    box-shadow: none !important;
    text-shadow: none;
    text-transform: none;
    font: inherit;
    color: inherit;
    line-height: 1;
}

.sgc-carousel .sgc-item,
.sgc-carousel .sgc-arrow,
.sgc-carousel .sgc-dot,
.sgc-lightbox .sgc-lightbox-close,
.sgc-lightbox .sgc-lightbox-nav {
    all: unset;
    box-sizing: border-box;
}

.sgc-carousel button::before,
.sgc-carousel button::after,
.sgc-lightbox button::before,
.sgc-lightbox button::after {
    content: none !important;
    display: none !important;
}

.sgc-carousel .sgc-item,
.sgc-carousel .sgc-arrow,
.sgc-carousel .sgc-dot,
.sgc-lightbox .sgc-lightbox-close,
.sgc-lightbox .sgc-lightbox-nav {
    padding: 0 !important;
    margin: 0 !important;
    border-style: none !important;
    border-width: 0 !important;
    background-image: none !important;
    text-decoration: none !important;
}

.sgc-carousel img,
.sgc-lightbox img {
    border: 0;
    box-shadow: none;
}

.sgc-carousel:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.75);
    outline-offset: 2px;
    border-radius: 6px;
}

.sgc-viewport {
    overflow: hidden;
    width: 100%;
}

.sgc-track {
    display: flex;
    transition-property: transform;
    transition-duration: 400ms;
    transition-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
    touch-action: pan-y;
}

.sgc-page {
    min-width: 100%;
    display: grid;
    grid-template-columns: repeat(var(--sgc-columns), minmax(0, 1fr));
    gap: var(--sgc-gap);
}

.sgc-item {
    position: relative;
    display: block;
    width: 100%;
    height: var(--sgc-image-height);
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: hidden;
    border-radius: var(--sgc-radius);
    background: transparent;
    cursor: pointer;
    isolation: isolate;
}

.sgc-lightbox-disabled .sgc-item {
    cursor: default;
}

.sgc-item-static {
    cursor: default;
}

.sgc-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    opacity: 0;
    transform: scale3d(0.94, 0.94, 1);
    transition: transform 0.42s ease, opacity 0.42s ease;
    will-change: transform, opacity;
}

.sgc-item img.sgc-image-loaded {
    opacity: 1;
    transform: scale3d(1, 1, 1);
}

.sgc-item:hover img.sgc-image-loaded,
.sgc-item:focus-visible img.sgc-image-loaded {
    transform: scale3d(1.05, 1.05, 1);
    opacity: var(--sgc-hover-opacity);
}

.sgc-item:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85);
}

.sgc-arrow {
    position: absolute !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    width: var(--sgc-arrow-size) !important;
    height: var(--sgc-arrow-size) !important;
    min-width: var(--sgc-arrow-size) !important;
    min-height: var(--sgc-arrow-size) !important;
    border: 0 !important;
    border-radius: 999px;
    color: var(--sgc-arrow-color);
    background: var(--sgc-arrow-bg, rgba(10, 12, 20, 0.66)) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    z-index: 20;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
    text-decoration: none !important;
    opacity: 1;
    transition: opacity 0.22s ease, background-color 0.22s ease;
    pointer-events: auto;
}

.sgc-arrow:hover {
    background: rgba(10, 12, 20, 0.84);
}

.sgc-arrow:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.sgc-arrow[disabled] {
    opacity: 0.28 !important;
    cursor: not-allowed;
}

.sgc-arrow-prev {
    left: var(--sgc-arrow-offset) !important;
    right: auto !important;
}

.sgc-arrow-next {
    right: var(--sgc-arrow-offset) !important;
    left: auto !important;
}

.sgc-arrow span {
    font-size: calc(var(--sgc-arrow-size) * 0.56) !important;
    line-height: 1;
    pointer-events: none;
}

.sgc-dots {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    margin-top: 14px;
    position: relative;
    z-index: 15;
    pointer-events: auto;
}

.sgc-dot {
    width: 10px !important;
    height: 10px !important;
    min-width: 10px !important;
    min-height: 10px !important;
    border-radius: 50%;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    background: var(--sgc-dot-color) !important;
    transition: transform 0.22s ease, background-color 0.22s ease;
}

.sgc-dot.is-active {
    background: var(--sgc-dot-active-color) !important;
    transform: scale(1.22);
}

.sgc-dot:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.sgc-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 99999;
}

.sgc-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.sgc-lightbox-stage {
    width: min(86vw, 1200px);
    height: min(82vh, 860px);
    max-width: 86vw;
    max-height: 82vh;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.sgc-lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    opacity: 0;
    transform: scale(0.985);
    transition: opacity 0.2s ease, transform 0.25s ease;
}

.sgc-lightbox-image.sgc-image-loaded {
    opacity: 1;
    transform: scale(1);
}

.sgc-lightbox-close,
.sgc-lightbox-nav {
    border: 0 !important;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.sgc-lightbox-close:hover,
.sgc-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sgc-lightbox-close:focus-visible,
.sgc-lightbox-nav:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.sgc-lightbox-close {
    position: fixed;
    top: max(8px, env(safe-area-inset-top));
    right: max(8px, env(safe-area-inset-right));
    left: auto !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    font-size: 28px !important;
    line-height: 44px !important;
    font-family: Arial, sans-serif !important;
    font-weight: 400 !important;
    text-align: center !important;
    z-index: 100002;
    pointer-events: auto;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    float: none !important;
    background: rgba(0, 0, 0, 0.35) !important;
    border-radius: 999px !important;
    user-select: none;
}

.sgc-lightbox-controls {
    position: fixed;
    left: 50%;
    bottom: max(18px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    display: flex !important;
    align-items: center !important;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    z-index: 100001;
    pointer-events: auto;
    float: none !important;
}

.sgc-lightbox-nav {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    min-height: 52px !important;
    font-size: 28px !important;
    line-height: 1;
    pointer-events: auto;
    text-align: center;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    float: none !important;
}

.sgc-lightbox.sgc-nav-bottom .sgc-lightbox-nav {
    position: static;
}

.sgc-lightbox.sgc-nav-sides .sgc-lightbox-controls {
    position: fixed;
    inset: 0;
    transform: none;
    padding: 0;
    background: transparent;
    pointer-events: none;
    display: block !important;
}

.sgc-lightbox-counter {
    min-width: 84px;
    color: #fff;
    font-size: 14px;
    line-height: 1;
    letter-spacing: 0.02em;
    text-align: center;
}

.sgc-lightbox.sgc-nav-sides .sgc-lightbox-counter {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: auto;
}

.sgc-lightbox.sgc-nav-sides .sgc-lightbox-prev {
    position: fixed;
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
    pointer-events: auto;
}

.sgc-lightbox.sgc-nav-sides .sgc-lightbox-next {
    position: fixed;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    pointer-events: auto;
}

.sgc-lightbox.sgc-hide-counter .sgc-lightbox-counter {
    display: none !important;
}

.sgc-lightbox.sgc-single-image .sgc-lightbox-controls {
    display: none !important;
}

body.sgc-lightbox-open {
    overflow: hidden;
}

.sgc-empty {
    border: 1px dashed #c9ced6;
    border-radius: 6px;
    color: #4b5563;
    font-size: 14px;
    padding: 12px 14px;
}

@media (max-width: 767px) {
    .sgc-page {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sgc-item {
        height: calc(var(--sgc-image-height) * 0.75);
    }

    .sgc-arrow-prev {
        left: 8px !important;
    }

    .sgc-arrow-next {
        right: 8px !important;
    }

    .sgc-arrow {
        opacity: 1;
    }

    .sgc-lightbox-stage {
        width: 94vw;
        height: 72vh;
        max-width: 94vw;
        max-height: 72vh;
    }

    .sgc-lightbox-nav {
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
        min-height: 46px !important;
        font-size: 24px !important;
    }

    .sgc-lightbox-close {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        font-size: 24px !important;
        line-height: 40px !important;
        top: max(8px, env(safe-area-inset-top));
        right: max(8px, env(safe-area-inset-right));
    }

    .sgc-lightbox-controls {
        bottom: max(12px, env(safe-area-inset-bottom));
        width: auto;
        max-width: calc(100% - 24px);
        justify-content: center;
    }

    .sgc-lightbox.sgc-nav-sides .sgc-lightbox-prev {
        left: 10px;
    }

    .sgc-lightbox.sgc-nav-sides .sgc-lightbox-next {
        right: 10px;
    }

    .sgc-lightbox.sgc-nav-sides .sgc-lightbox-controls {
        width: auto;
        bottom: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sgc-track,
    .sgc-item img,
    .sgc-arrow,
    .sgc-dot,
    .sgc-lightbox,
    .sgc-lightbox-image,
    .sgc-lightbox-close,
    .sgc-lightbox-nav {
        transition: none !important;
        animation: none !important;
    }
}
