/* Arbuda product cards — white branded placeholder while images load */
.aiz-card-box .image-hover-effect,
.aiz-card-box .position-relative.img-fit,
.aiz-card-box .arbuda-card-image-frame {
    background-color: #ffffff !important;
    background-image: url('../img/arbuda-product-placeholder.webp') !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: 52% !important;
}

/* Fixed card image frame — prevents blank / jumping sizes */
.aiz-card-box .arbuda-card-image-frame,
.aiz-card-box .position-relative.img-fit {
    position: relative;
    overflow: hidden;
}

.aiz-card-box .arbuda-product-img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    background-color: transparent !important;
}

/* Placeholder state: show logo (img src or CSS bg), never blank */
.aiz-card-box .arbuda-product-img.lazyload,
.aiz-card-box .arbuda-product-img.lazyloading,
.aiz-card-box .arbuda-product-img.arbuda-img-loading,
.aiz-card-box .arbuda-product-img[data-src],
.aiz-card-box .product-main-image.arbuda-product-img:not(.arbuda-img-loaded):not(.lazyloaded) {
    object-fit: contain !important;
    object-position: center center !important;
    background-color: #ffffff !important;
    padding: 10% !important;
    opacity: 1 !important;
    filter: none !important;
}

.aiz-card-box .arbuda-product-img.lazyloaded,
.aiz-card-box .arbuda-product-img.arbuda-img-loaded {
    object-fit: contain !important;
    object-position: center center !important;
    background-color: transparent !important;
    padding: 0 !important;
    opacity: 1 !important;
    transition: opacity 0.2s ease;
}

.aiz-card-box .product-hover-image.arbuda-product-img.lazyload,
.aiz-card-box .product-hover-image.arbuda-product-img.lazyloading,
.aiz-card-box .product-hover-image.arbuda-product-img.arbuda-img-loading,
.aiz-card-box .product-hover-image.arbuda-product-img[data-src] {
    opacity: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    pointer-events: none;
}

.aiz-card-box .product-hover-image.arbuda-product-img.lazyloaded,
.aiz-card-box .product-hover-image.arbuda-product-img.arbuda-img-loaded {
    opacity: 0;
    background: transparent !important;
}

.aiz-card-box .image-hover-effect:hover .product-hover-image.arbuda-product-img.lazyloaded,
.aiz-card-box .image-hover-effect:hover .product-hover-image.arbuda-product-img.arbuda-img-loaded {
    opacity: 1;
}

/* Broken / missing product photo — stay on white logo card */
.aiz-card-box .arbuda-product-img.arbuda-img-broken {
    object-fit: contain !important;
    background-color: #ffffff !important;
    background-image: url('../img/arbuda-product-placeholder.webp') !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: 52% !important;
    padding: 10% !important;
}

/* PDP gallery — branded white logo behind every slide (never grey broken icon) */
.arbuda-gallery-frame,
.product-gallery .swiper-slide.arbuda-gallery-frame,
.thumb-slider .swiper-slide.arbuda-gallery-frame,
.main-slider .swiper-slide.arbuda-gallery-frame {
    background-color: #ffffff !important;
    background-image: url('../img/arbuda-product-placeholder.webp') !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: 42% !important;
}

.arbuda-gallery-frame img.arbuda-img-broken,
.product-gallery img.arbuda-img-broken,
.thumb-slider img.arbuda-img-broken,
.main-slider img.arbuda-img-broken {
    opacity: 0 !important;
    visibility: hidden !important;
}

.arbuda-gallery-frame img,
.product-gallery .lightbox-source,
.thumb-slider img {
    object-fit: contain !important;
    object-position: center center !important;
    background: transparent !important;
}

/* Always-visible bottom-right watermark */
.aiz-card-box .image-hover-effect,
.product-gallery .swiper-slide,
.woodmart-show-product-gallery,
.lightbox-item,
[data-arbuda-protect-wrap="1"] {
    position: relative;
}

.aiz-card-box .image-hover-effect::after,
.product-gallery .swiper-slide::after,
.woodmart-show-product-gallery::after,
.lightbox-item::after,
[data-arbuda-protect-wrap="1"]::after {
    content: '';
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: clamp(26px, 11%, 44px);
    height: clamp(26px, 11%, 44px);
    background: url('../img/arbuda-watermark.png') no-repeat center / contain;
    opacity: 0.95;
    pointer-events: none;
    z-index: 5;
    filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.35));
}

.aiz-card-box img[data-arbuda-protect="1"],
.product-gallery img[data-arbuda-protect="1"],
.thumb-slider img[data-arbuda-protect="1"],
.woodmart-show-product-gallery img[data-arbuda-protect="1"] {
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}

@media (max-width: 575px) {
    .aiz-card-box .image-hover-effect::after,
    .product-gallery .swiper-slide::after,
    .woodmart-show-product-gallery::after,
    .lightbox-item::after {
        width: 28px;
        height: 28px;
        right: 4px;
        bottom: 4px;
        opacity: 0.96;
    }

    .aiz-card-box .image-hover-effect,
    .aiz-card-box .position-relative.img-fit,
    .aiz-card-box .arbuda-card-image-frame {
        background-size: 55% !important;
    }

    .aiz-card-box.h-150px,
    .aiz-card-box .h-150px,
    .aiz-card-box .arbuda-card-image-frame.h-150px {
        height: 150px !important;
    }
}
