.rra-vg-container {
    --gold: #C89B3C;
    --transition-curve: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: #fff;
    padding: 10px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.rra-vg-main-wrapper {
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
}

.rra-vg-main {
    width: 100%;
    height: 500px;
}

/* Fail-safe visible fallbacks if Swiper is not initialized yet */
.rra-vg-main:not(.swiper-initialized) .swiper-wrapper {
    display: block !important;
}
.rra-vg-main:not(.swiper-initialized) .swiper-slide {
    display: none !important;
}
.rra-vg-main:not(.swiper-initialized) .swiper-slide:first-child {
    display: block !important;
    width: 100%;
    height: 100%;
}

.rra-vg-main .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: #000;
}

.rra-vg-main .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--transition-curve);
    cursor: pointer;
}

.rra-vg-main .swiper-slide:hover img {
    transform: scale(1.05);
}

/* Nav Buttons Styling */
.rra-vg-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.rra-vg-nav-btn:hover {
    background: var(--gold);
}

.rra-vg-nav-btn svg {
    width: 24px;
    height: 24px;
    fill: #111;
    transition: fill 0.3s ease;
}

.rra-vg-nav-btn:hover svg {
    fill: #fff;
}

.rra-vg-nav-prev {
    left: 20px;
}

.rra-vg-nav-next {
    right: 20px;
}

/* Thumbnails Strip robust styling */
.rra-vg-thumbs-container {
    position: relative;
    width: 100%;
}

.rra-vg-thumbs {
    width: 100%;
}

.rra-vg-thumbs:not(.swiper-initialized) .swiper-wrapper {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 12px !important;
}

.rra-vg-thumbs:not(.swiper-initialized) .swiper-slide {
    flex: 0 0 120px !important;
    width: 120px !important;
    height: 90px !important;
}

.rra-vg-thumbs .swiper-slide {
    height: 90px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.rra-vg-thumbs .swiper-slide-thumb-active {
    opacity: 1;
}

.rra-vg-thumbs .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.rra-vg-thumbs .swiper-slide-thumb-active img {
    border-color: var(--gold);
}

/* Lightbox styles */
.rra-vg-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.admin-bar .rra-vg-lightbox {
    top: var(--wp-admin--admin-bar--height, 32px);
}
@media screen and (max-width: 782px) {
    body.admin-bar .rra-vg-lightbox {
        top: 46px;
    }
}

.rra-vg-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.rra-vg-lightbox-content {
    max-width: 90%;
    max-height: 85%;
    position: relative;
}

.rra-vg-lightbox-img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    object-fit: contain;
}

.rra-vg-lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: #fff;
    font-size: 24px;
    transition: background 0.3s ease;
}

.rra-vg-lightbox-close:hover {
    background: var(--gold);
}
