/* Centre the printed sheet at a consistent height while preserving hand scale. */
:is([data-flyer-gallery="a7"], .flc-cards a[href="/products/flyers-leaflets/a7"] > .b2-card-image) {
    overflow: hidden;
}

:is(
    [data-flyer-gallery="a7"],
    [data-flyer-gallery="a7"] .np-flyer-gallery-preview,
    .flc-cards a[href="/products/flyers-leaflets/a7"] > .b2-card-image
) > img {
    transform: translateY(var(--flyer-photo-offset, 0px)) scale(var(--flyer-photo-zoom, 1));
    transform-origin: var(--flyer-photo-origin, center);
}

/* Lift the sheet only when the shaded controls would cover its lower edge. */
[data-flyer-gallery="a7"] > [data-gallery-image] {
    --flyer-gallery-bar-height: 72px;
    --flyer-photo-offset: min(0px, calc(17% - var(--flyer-gallery-bar-height) - 4px));
}

@media (max-width: 600px) {
    [data-flyer-gallery="a7"] > [data-gallery-image] {
        --flyer-gallery-bar-height: 54px;
    }
}

/* Keep the download label on two lines alongside the previews on narrow phones. */
@media (max-width: 370px) {
    #product-content [data-flyer-gallery="a7"] .np-flyer-gallery-bar {
        gap: 4px;
        padding-inline: 6px;
    }

    #product-content [data-flyer-gallery="a7"] .np-flyer-gallery-previews {
        gap: 4px;
    }

    #product-content [data-flyer-gallery="a7"] .np-flyer-gallery-preview {
        width: 30px;
        height: 30px;
    }

    #product-content [data-flyer-gallery="a7"] .np-flyer-gallery-bar > a.cpo-template-download {
        gap: 4px;
        padding-inline: 4px;
    }

    #product-content [data-flyer-gallery="a7"] a.cpo-template-download > img {
        width: 16px !important;
    }
}

img[src*="/a7-gentlemans-cut-held-"] {
    --flyer-photo-zoom: 1.63;
    --flyer-photo-origin: 38% 42%;
}

img[src*="/a7-bloom-stem-held-"] {
    --flyer-photo-zoom: 1.53;
    --flyer-photo-origin: 57% 36%;
}

img[src*="/a7-golden-crust-held-"] {
    --flyer-photo-zoom: 1.59;
    --flyer-photo-origin: 39% 35%;
}

img[src*="/a7-nail-studio-held-"] {
    --flyer-photo-zoom: 1.45;
    --flyer-photo-origin: 54% 37%;
}
