/*
 * VINICIRO — normalizzazione visuale immagini prodotto
 * Uniforma automaticamente immagini con trasparenze o ampi margini bianchi
 * senza modificare i file sorgente.
 */

.iuz-wine-bottle,
.vci-product-image,
.fsf-cat-image > a,
.card-product .product-img,
.card-product .img-product,
.iuz-live-search-image,
.iuz-gallery-main,
.iuz-gallery-thumb,
.iuz-model-button-image,
.iuz-model-carousel-media,
.iuz-selected-format-media,
.iuz-related-image {
    position: relative;
    overflow: hidden;
}

.iuz-wine-bottle img.vci-product-image-normalized,
.vci-product-image img.vci-product-image-normalized,
.fsf-cat-image img.vci-product-image-normalized,
.card-product .product-img img.vci-product-image-normalized,
.card-product img.img-product.vci-product-image-normalized,
.iuz-live-search-image img.vci-product-image-normalized,
.iuz-gallery-main img.vci-product-image-normalized,
.iuz-gallery-thumb img.vci-product-image-normalized,
.iuz-model-button-image img.vci-product-image-normalized,
.iuz-model-carousel-media img.vci-product-image-normalized,
.iuz-selected-format-media img.vci-product-image-normalized,
.iuz-related-image img.vci-product-image-normalized {
    position: absolute !important;
    display: block !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: fill !important;
    object-position: initial !important;
    transform: none !important;
    transform-origin: center center !important;
    background: transparent !important;
    transition: opacity .18s ease, filter .28s ease !important;
    will-change: width, height, left, top;
}

/* Le immagini JPG/PNG con fondo bianco vengono fuse sul fondo bianco della card:
   niente "quadrato" visibile e nessuna ombra rettangolare. */
.iuz-wine-bottle img.vci-product-image-normalized.vci-product-image-white-bg,
.vci-product-image img.vci-product-image-normalized.vci-product-image-white-bg,
.fsf-cat-image img.vci-product-image-normalized.vci-product-image-white-bg,
.card-product img.vci-product-image-normalized.vci-product-image-white-bg,
.iuz-gallery-main img.vci-product-image-normalized.vci-product-image-white-bg,
.iuz-gallery-thumb img.vci-product-image-normalized.vci-product-image-white-bg,
.iuz-model-button-image img.vci-product-image-normalized.vci-product-image-white-bg,
.iuz-model-carousel-media img.vci-product-image-normalized.vci-product-image-white-bg,
.iuz-selected-format-media img.vci-product-image-normalized.vci-product-image-white-bg,
.iuz-related-image img.vci-product-image-normalized.vci-product-image-white-bg {
    mix-blend-mode: multiply !important;
    filter: none !important;
}

/* Le immagini già scontornate mantengono una leggera profondità. */
.iuz-wine-bottle img.vci-product-image-normalized.vci-product-image-transparent,
.vci-product-image img.vci-product-image-normalized.vci-product-image-transparent,
.fsf-cat-image img.vci-product-image-normalized.vci-product-image-transparent,
.iuz-gallery-main img.vci-product-image-normalized.vci-product-image-transparent,
.iuz-gallery-thumb img.vci-product-image-normalized.vci-product-image-transparent,
.iuz-model-button-image img.vci-product-image-normalized.vci-product-image-transparent,
.iuz-model-carousel-media img.vci-product-image-normalized.vci-product-image-transparent,
.iuz-selected-format-media img.vci-product-image-normalized.vci-product-image-transparent,
.iuz-related-image img.vci-product-image-normalized.vci-product-image-transparent {
    mix-blend-mode: normal !important;
    filter: drop-shadow(0 16px 17px rgba(26, 18, 20, .12)) !important;
}

/* La card si muove, non la bottiglia: evita zoom/crop diversi tra prodotti. */
.iuz-wine-item:hover .iuz-wine-bottle img.vci-product-image-normalized,
.vci-home .iuz-wine-item:hover .iuz-wine-bottle img.vci-product-image-normalized,
.fsf-cat-card:hover .fsf-cat-image img.vci-product-image-normalized {
    transform: none !important;
}

/* Mentre il browser analizza il file l'immagine resta comunque fruibile. */
.vci-product-image-normalizing {
    opacity: .985;
}

@media (max-width: 700px) {
    .iuz-wine-bottle img.vci-product-image-normalized.vci-product-image-transparent,
    .vci-product-image img.vci-product-image-normalized.vci-product-image-transparent,
    .fsf-cat-image img.vci-product-image-normalized.vci-product-image-transparent,
    .iuz-gallery-main img.vci-product-image-normalized.vci-product-image-transparent,
    .iuz-gallery-thumb img.vci-product-image-normalized.vci-product-image-transparent,
    .iuz-model-button-image img.vci-product-image-normalized.vci-product-image-transparent,
    .iuz-model-carousel-media img.vci-product-image-normalized.vci-product-image-transparent,
    .iuz-selected-format-media img.vci-product-image-normalized.vci-product-image-transparent,
    .iuz-related-image img.vci-product-image-normalized.vci-product-image-transparent {
        filter: drop-shadow(0 11px 12px rgba(26, 18, 20, .10)) !important;
    }
}
