/* SSS 1.3.0 — Catalog photos: no crops, no white-on-white, no giant blank slots.
   Scope only known SuperStampaSprint card types; never affect logo, homepage hero or print files. */
:root { --sss-vf-surface: #f1f4f9; --sss-vf-stroke: #e3eaf3; }

/* Macro-categories and their illustrated groups. */
#sss-vc-content .sss-vc-image,
.sss-vc-main .sss-vc-image,
#contenuto-catalogo .ssscp-img,
.ssscp-shell .ssscp-img {
    box-sizing: border-box !important;
    width: 100% !important;
    height: 190px !important;
    min-height: 0 !important;
    padding: 8px !important;
    border-radius: 13px !important;
    border: 1px solid var(--sss-vf-stroke) !important;
    background: var(--sss-vf-surface) !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
}
#sss-vc-content .sss-vc-image img,
.sss-vc-main .sss-vc-image img,
#contenuto-catalogo .ssscp-img img,
.ssscp-shell .ssscp-img img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
    background: transparent !important;
    transform: none !important;
}
/* Keep the individual cards consistent without changing columns or order. */
.sss-vc-main .sss-vc-tile, .ssscp-shell .ssscp-category {
    box-sizing: border-box;
    align-self: stretch;
    min-width: 0;
}
.sss-vc-main .sss-vc-tile-content,
.ssscp-shell .ssscp-category strong,
.ssscp-shell .ssscp-category small { max-width: 100%; }

/* WooCommerce product thumbnails: preserve full item for Payper, Promit and printed products. */
.woocommerce ul.products li.product a img,
.sss-home-catalog .woocommerce ul.products li.product a img {
    object-fit: contain !important;
    object-position: center center !important;
    background: var(--sss-vf-surface) !important;
    border-radius: 12px !important;
    transform: none !important;
}
/* The empty WooCommerce placeholder is not a genuine product photo. */
.sss-vf-image-missing { position: relative !important; }
.sss-vf-image-missing > img.sss-vf-unavailable,
.sss-vf-image-missing img.sss-vf-unavailable {
    opacity: 0 !important;
}
.sss-vf-image-missing .sss-vf-missing-label {
    box-sizing: border-box;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: linear-gradient(140deg, #f3f6fb, #eaf0f9);
    border: 1px solid var(--sss-vf-stroke);
    border-radius: 12px;
    text-align: center;
    color: #536784;
    font: 600 12px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    pointer-events: none;
}

/* WooCommerce thumbnails often sit inside an anchor that also contains the name.
   Constrain the missing-image message to image height, never cover labels/prices. */
.woocommerce ul.products li.product a.sss-vf-image-missing > .sss-vf-missing-label {
    inset: 0 0 auto 0;
    height: 220px;
}

/* No huge empty WooCommerce notices area once the success alert is moved to top. */
.single-product .woocommerce-notices-wrapper:empty,
.woocommerce-notices-wrapper:empty { display: none !important; margin: 0 !important; padding: 0 !important; min-height: 0 !important; }
.single-product main.sss-main { min-height: 0 !important; }

/* A product with no photo genuinely available: compact and truthful status. */
.sss-sm-slider-wrap:has(.sss-sm-gallery-empty),
.sss-sm-slider:has(.sss-sm-gallery-empty) {
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: auto !important;
}
.sss-sm-gallery-empty {
    min-height: 92px !important;
    padding: 19px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #5d6b81 !important;
    background: var(--sss-vf-surface) !important;
    border: 1px dashed #cbd7e7 !important;
    border-radius: 12px !important;
    font-size: 13px;
    text-align: center;
}
.sss-sm-slider-wrap:has(.sss-sm-gallery-empty) .sss-sm-nav:disabled,
.sss-sm-slider-wrap:has(.sss-sm-gallery-empty) .sss-sm-dots:empty {
    display: none !important;
}

/* Avoid large empty section padding when no content is rendered. */
.sss-vc-main .sss-vc-tiles:empty,
.ssscp-shell .ssscp-grid:empty { display: none !important; min-height: 0 !important; }

@media (max-width: 640px) {
    #sss-vc-content .sss-vc-image,
    .sss-vc-main .sss-vc-image,
    #contenuto-catalogo .ssscp-img,
    .ssscp-shell .ssscp-img { height: 155px !important; padding: 6px !important; }
    .sss-vf-image-missing .sss-vf-missing-label { font-size: 11px; }
    .woocommerce ul.products li.product a.sss-vf-image-missing > .sss-vf-missing-label { height: 170px; }
}
