.wb-ig-widget {
    --wb-ig-cols: 4;
    --wb-ig-col-gap: 12px;
    --wb-ig-row-gap: 12px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.wb-ig-empty {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 15px;
    background: #f9f9fb;
    border-radius: 12px;
    border: 2px dashed #ddd;
}

.wb-ig-no-result {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
    margin: 0;
}

.wb-ig-widget .wb-ig-item[hidden] {
    display: none !important;
}

.wb-ig-autoload-sentinel {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #6b6b76;
    font-size: 13px;
    opacity: 0;
    transition: opacity .2s ease;
}

.wb-ig-autoload-sentinel.is-loading {
    opacity: 1;
}

.wb-ig-autoload-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(92, 10, 42, .18);
    border-top-color: #5c0a2a;
    border-radius: 50%;
    animation: wbIgAutoLoadSpin .7s linear infinite;
}

@keyframes wbIgAutoLoadSpin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .wb-ig-autoload-spinner {
        animation: none;
    }
}

.wb-ig-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.wb-ig-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wb-ig-widget .wb-ig-filter-btn {
    font-size: 13px;
    font-family: inherit;
    font-weight: 600;
    line-height: 1.4;
    color: #5C0A2A;
    background-color: #fff;
    border: 1px solid #e0dce8;
    border-radius: 999px;
    padding: 7px 16px;
    cursor: pointer;
    text-shadow: none;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

.wb-ig-widget .wb-ig-filter-btn:hover {
    background-color: #f5f2f8;
}

.wb-ig-widget .wb-ig-filter-btn.is-active {
    color: #fff;
    background-color: #5C0A2A;
    border-color: #5C0A2A;
}

.wb-ig-widget .wb-ig-filter-btn:focus-visible {
    outline: 3px solid rgba(92, 10, 42, .35);
    outline-offset: 2px;
}

.wb-ig-sort {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6b6b76;
}

.wb-ig-widget .wb-ig-sort-select {
    font-family: inherit;
    font-size: 13px;
    color: #2d2d38;
    padding: 6px 10px;
    border: 1px solid #e0dce8;
    border-radius: 8px;
    background-color: #fff;
    cursor: pointer;
}

.wb-ig-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #e9e9ef;
    animation: wbIgFadeIn .5s ease both;
    animation-delay: var(--anim-delay, 0ms);
    transition: transform .35s cubic-bezier(.25, .8, .25, 1), box-shadow .35s ease, border-color .25s ease;
}

.wb-ig-item .wb-ig-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s cubic-bezier(.25, .8, .25, 1), filter .35s ease;
}

.wb-ig-clickable {
    cursor: pointer;
}

.wb-ig-clickable:focus-visible {
    outline: 3px solid rgba(92, 10, 42, .55);
    outline-offset: 3px;
}

.wb-ig-hover-zoom .wb-ig-item:hover .wb-ig-img {
    transform: scale(1.06);
}

.wb-ig-hover-zoomout .wb-ig-item .wb-ig-img {
    transform: scale(1.08);
}

.wb-ig-hover-zoomout .wb-ig-item:hover .wb-ig-img {
    transform: scale(1);
}

.wb-ig-hover-brightness .wb-ig-item:hover .wb-ig-img {
    filter: brightness(1.15);
}

.wb-ig-hover-grayscale .wb-ig-item .wb-ig-img {
    filter: grayscale(1);
}

.wb-ig-hover-grayscale .wb-ig-item:hover .wb-ig-img {
    filter: grayscale(0);
}

.wb-ig-hover-lift .wb-ig-item:hover {
    transform: translateY(-6px);
}

.wb-ig-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 14px 14px 14px;
    background: linear-gradient(0deg, rgba(0, 0, 0, .55) 0%, transparent 100%);
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: flex-start;
    color: #fff;
    pointer-events: none;
    transition: opacity .35s ease, transform .35s ease;
}

.wb-ig-ovl-fade .wb-ig-overlay {
    opacity: 0;
}

.wb-ig-ovl-fade .wb-ig-item:hover .wb-ig-overlay {
    opacity: 1;
}

.wb-ig-ovl-slide .wb-ig-overlay {
    opacity: 0;
    transform: translateY(16px);
}

.wb-ig-ovl-slide .wb-ig-item:hover .wb-ig-overlay {
    opacity: 1;
    transform: translateY(0);
}

.wb-ig-ovl-zoom .wb-ig-overlay {
    opacity: 0;
    transform: scale(.94);
    transform-origin: bottom center;
}

.wb-ig-ovl-zoom .wb-ig-item:hover .wb-ig-overlay {
    opacity: 1;
    transform: scale(1);
}

.wb-ig-ovl-trigger-always .wb-ig-overlay {
    opacity: 1;
    transform: none;
}

.wb-ig-meta-line {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}

.wb-ig-meta-icon {
    font-size: 11px;
    flex-shrink: 0;
}

.wb-ig-color-swatch {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, .7);
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}

.wb-ig-grid {
    display: grid;
    grid-template-columns: repeat(var(--wb-ig-cols), minmax(0, 1fr));
    column-gap: var(--wb-ig-col-gap);
    row-gap: var(--wb-ig-row-gap);
}

.wb-ig-grid .wb-ig-item {
    aspect-ratio: var(--wb-ig-ar, auto);
}

.wb-ig-ar-original .wb-ig-grid .wb-ig-item {
    aspect-ratio: auto;
    height: auto;
}

.wb-ig-ar-original .wb-ig-grid .wb-ig-img {
    height: auto;
    object-fit: contain;
}

/* Keep a genuine masonry-like layout even when the Masonry library is delayed
   or blocked. CSS columns do not let a tall image push the entire next row down,
   unlike the previous flex-wrap fallback. */
.wb-ig-masonry {
    position: relative;
    display: block;
    column-count: var(--wb-ig-cols);
    column-gap: var(--wb-ig-col-gap);
}

.wb-ig-masonry .wb-ig-sizer,
.wb-ig-masonry .wb-ig-gutter-sizer {
    display: none;
}

.wb-ig-masonry .wb-ig-item {
    display: inline-block;
    width: 100%;
    margin: 0 0 var(--wb-ig-row-gap);
    vertical-align: top;
    break-inside: avoid;
    page-break-inside: avoid;
}

/* JavaScript measures a real CSS Grid track and assigns a pixel width before
   Masonry starts. This avoids unsupported CSS calc() multiplication/division. */
.wb-ig-masonry.is-masonry {
    display: block;
    column-count: initial;
    column-gap: 0;
}

.wb-ig-masonry.is-masonry::after {
    content: '';
    display: block;
    clear: both;
}

.wb-ig-masonry.is-masonry .wb-ig-item {
    margin-bottom: var(--wb-ig-row-gap);
    display: block;
    float: left;
}

.wb-ig-masonry-measure {
    position: absolute;
    inset: 0 0 auto 0;
    z-index: -1;
    width: 100%;
    height: 0;
    overflow: hidden;
    visibility: hidden;
    pointer-events: none;
    display: grid;
    grid-template-columns: repeat(var(--wb-ig-cols), minmax(0, 1fr));
    column-gap: var(--wb-ig-col-gap);
}

.wb-ig-masonry-measure-column {
    min-width: 0;
    height: 0;
}

.wb-ig-masonry .wb-ig-img {
    height: auto;
}

.wb-ig-carousel-wrap {
    position: relative;
}

.wb-ig-carousel {
    overflow: hidden;
    border-radius: 12px;
}

/* Minimal Swiper layout, scoped to this widget, so the carousel still works if
   Elementor's lazy-loaded swiper stylesheet never lands on the page. These
   duplicate Swiper's own rules, so loading both is harmless. */
.wb-ig-carousel .swiper-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    box-sizing: content-box;
    transition-property: transform;
}

.wb-ig-carousel .swiper-slide {
    position: relative;
    flex-shrink: 0;
    width: 100%;
    height: auto;
    transition-property: transform;
}

.wb-ig-carousel .wb-ig-item {
    height: 280px;
}

.wb-ig-carousel--fallback .swiper-wrapper {
    display: flex;
    gap: var(--wb-ig-col-gap);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

.wb-ig-carousel--fallback .swiper-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
}

.wb-ig-widget .wb-ig-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    border: 0 solid transparent;
    background-color: rgba(0, 0, 0, .4);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-shadow: none;
    transition: background-color .25s ease, color .25s ease, border-color .25s ease, opacity .2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.wb-ig-widget .wb-ig-carousel-arrow:hover {
    background-color: rgba(0, 0, 0, .7);
}

.wb-ig-widget .wb-ig-carousel-arrow:focus-visible {
    outline: 3px solid rgba(255, 255, 255, .6);
    outline-offset: 2px;
}

.wb-ig-widget .wb-ig-carousel-arrow svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
}

.wb-ig-widget .wb-ig-carousel-arrow.swiper-button-disabled {
    opacity: .35;
    cursor: default;
}

.wb-ig-arrows-inside .wb-ig-arrow-prev {
    left: 12px;
}

.wb-ig-arrows-inside .wb-ig-arrow-next {
    right: 12px;
}

.wb-ig-arrows-outside .wb-ig-carousel-wrap {
    padding: 0 56px;
}

.wb-ig-arrows-outside .wb-ig-arrow-prev {
    left: 0;
}

.wb-ig-arrows-outside .wb-ig-arrow-next {
    right: 0;
}

.wb-ig-arrows-top-right .wb-ig-carousel-wrap {
    padding-top: 56px;
}

.wb-ig-arrows-top-right .wb-ig-carousel-arrow {
    top: 0;
    transform: none;
}

.wb-ig-arrows-top-right .wb-ig-arrow-prev {
    right: 52px;
    left: auto;
}

.wb-ig-arrows-top-right .wb-ig-arrow-next {
    right: 0;
}

.wb-ig-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.wb-ig-widget .wb-ig-dots .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    margin: 0;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, .25);
    border: none;
    opacity: 1;
    cursor: pointer;
    transition: background-color .25s ease, transform .2s ease;
}

.wb-ig-widget .wb-ig-dots .swiper-pagination-bullet-active {
    background-color: #5C0A2A;
    transform: scale(1.3);
}

/* The `hidden` attribute only carries display:none from the UA stylesheet, which
   any author rule outranks -- so gate every display we set on :not([hidden]) and
   keep the guard below as a backstop. */
.wb-ig-widget [hidden] {
    display: none !important;
}

.wb-ig-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background-color: rgba(0, 0, 0, .92);
    align-items: center;
    justify-content: center;
    animation: wbIgLbIn .3s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.wb-ig-lightbox:not([hidden]) {
    display: flex;
}

.wb-ig-widget .wb-ig-lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;
    font-size: 36px;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    padding: 0;
    text-shadow: none;
    opacity: .8;
    transition: opacity .2s ease, transform .2s ease;
}

.wb-ig-widget .wb-ig-lightbox-close:hover {
    opacity: 1;
    transform: scale(1.15);
}

.wb-ig-widget .wb-ig-lightbox-prev,
.wb-ig-widget .wb-ig-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    border: none;
    background-color: rgba(255, 255, 255, .12);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-shadow: none;
    transition: background-color .25s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.wb-ig-widget .wb-ig-lightbox-prev:hover,
.wb-ig-widget .wb-ig-lightbox-next:hover {
    background-color: rgba(255, 255, 255, .25);
}

.wb-ig-widget .wb-ig-lightbox-prev {
    left: 20px;
}

.wb-ig-widget .wb-ig-lightbox-next {
    right: 20px;
}

.wb-ig-lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
    max-height: 90vh;
}

.wb-ig-lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 12px 50px rgba(0, 0, 0, .5);
}

.wb-ig-lightbox-meta {
    display: flex;
    gap: 20px;
    padding: 16px 0 0;
    color: rgba(255, 255, 255, .85);
    font-size: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

.wb-ig-lightbox-meta .wb-ig-meta-line {
    font-size: 14px;
}

@keyframes wbIgFadeIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wbIgLbIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 767px) {
    .wb-ig-ovl-fade .wb-ig-overlay,
    .wb-ig-ovl-slide .wb-ig-overlay,
    .wb-ig-ovl-zoom .wb-ig-overlay {
        opacity: 1;
        transform: none;
    }

    .wb-ig-arrows-outside .wb-ig-carousel-wrap {
        padding: 0 40px;
    }

    .wb-ig-widget .wb-ig-lightbox-prev,
    .wb-ig-widget .wb-ig-lightbox-next {
        width: 36px;
        height: 36px;
    }

    .wb-ig-widget .wb-ig-lightbox-prev {
        left: 8px;
    }

    .wb-ig-widget .wb-ig-lightbox-next {
        right: 8px;
    }
}
