.fwgc-r2-gallery-wrap {
    margin: 1.5rem 0;
}

.fwgc-r2-gallery-title {
    margin-bottom: 1rem;
}

.fwgc-r2-gallery-grid {
    column-count: var(--fwgc-r2-columns-desktop, 4);
    column-gap: 14px;
}

.fwgc-r2-gallery-item {
    display: none;
    width: 100%;
    margin: 0 0 14px;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    overflow: hidden;
    border-radius: 6px;
    background: #f3f3f3;
    cursor: pointer;
}

.fwgc-r2-gallery-item.is-visible {
    display: block;
}

.fwgc-r2-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

.fwgc-r2-gallery-message {
    padding: 1rem;
    border: 1px solid #ddd;
    background: #fafafa;
}

.fwgc-r2-load-more-wrap {
    text-align: center;
    margin-top: 24px;
}

.fwgc-r2-load-more {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #222222 !important;
    background: #222222 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    cursor: pointer !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    padding: 12px 22px !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    text-decoration: none !important;
    appearance: none !important;
}

.fwgc-r2-load-more:hover,
.fwgc-r2-load-more:focus {
    background: #000000 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: #000000 !important;
    outline: 2px solid #000000 !important;
    outline-offset: 2px !important;
}

.fwgc-r2-load-more.is-hidden {
    display: none !important;
}

.fwgc-r2-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.88);
    padding: 30px;
}

.fwgc-r2-lightbox.is-open {
    display: flex;
}

.fwgc-r2-lightbox-inner {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fwgc-r2-lightbox-image {
    max-width: 95vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: block;
    background: #fff;
}

.fwgc-r2-lightbox-button {
    position: absolute !important;
    z-index: 2 !important;
    border: 1px solid #111 !important;
    background: #ffffff !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    cursor: pointer !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 30px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 999px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    box-shadow: none !important;
    text-decoration: none !important;
    appearance: none !important;
}

.fwgc-r2-lightbox-button:hover,
.fwgc-r2-lightbox-button:focus {
    background: #ffffff !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    outline: 2px solid #ffffff !important;
    outline-offset: 2px !important;
}

.fwgc-r2-lightbox-close {
    top: -22px !important;
    right: -22px !important;
}

.fwgc-r2-lightbox-prev {
    left: -60px !important;
}

.fwgc-r2-lightbox-next {
    right: -60px !important;
}

.fwgc-r2-lightbox-caption {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 18px;
    text-align: center;
    color: #fff;
    font-size: 15px;
    padding: 0 20px;
}

.fwgc-r2-gallery-index-wrap {
    margin: 1.5rem 0;
}

.fwgc-r2-gallery-index-title {
    margin-bottom: 1rem;
}

.fwgc-r2-gallery-index-grid {
    display: grid;
    grid-template-columns: repeat(var(--fwgc-r2-index-columns-desktop, 3), minmax(0, 1fr));
    gap: 16px;
}

.fwgc-r2-gallery-index-card {
    display: block;
    padding: 18px;
    border: 1px solid #dddddd;
    border-radius: 8px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
}

.fwgc-r2-gallery-index-card:hover,
.fwgc-r2-gallery-index-card:focus {
    border-color: #222222;
    text-decoration: none;
}

.fwgc-r2-gallery-index-card-title {
    display: block;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 6px;
}

.fwgc-r2-gallery-index-card-count {
    display: block;
    font-size: 14px;
    color: #555555;
}

@media (max-width: 1100px) {
    .fwgc-r2-gallery-grid {
        column-count: var(--fwgc-r2-columns-tablet, 3);
    }

    .fwgc-r2-gallery-index-grid {
        grid-template-columns: repeat(var(--fwgc-r2-index-columns-tablet, 2), minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .fwgc-r2-gallery-grid {
        column-count: var(--fwgc-r2-columns-mobile, 2);
    }

    .fwgc-r2-gallery-index-grid {
        grid-template-columns: repeat(var(--fwgc-r2-index-columns-mobile, 1), minmax(0, 1fr));
    }

    .fwgc-r2-lightbox {
        padding: 18px;
    }

    .fwgc-r2-lightbox-prev {
        left: 10px !important;
    }

    .fwgc-r2-lightbox-next {
        right: 10px !important;
    }

    .fwgc-r2-lightbox-close {
        top: 10px !important;
        right: 10px !important;
    }

    .fwgc-r2-lightbox-button {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        min-height: 42px !important;
        font-size: 26px !important;
    }
}

@media (max-width: 430px) {
    .fwgc-r2-gallery-grid {
        column-count: 1;
    }

    .fwgc-r2-gallery-index-grid {
        grid-template-columns: 1fr;
    }
}