/*!
 * GBZ420 - QA media layer: the non-Prime catalogue photos whose subject or baked artwork falls
 * outside the maquette-05 cover window.
 * Written 2026-09-23 by the prime-qa-css task. Local copy only (gbz420.test -> C:\Codex\GBZ420\site).
 * Extended 2026-09-24 by the product-gap/media-769 task: image 769 (product 235, "THCX Cartouche
 * Vape Mango Kush") added to both blocks - the cartridge is cut top and bottom by cover +
 * scale(1.26). Measurement of the 960x960 derivative: content box 46,120-878,891 (832 x 771 px,
 * 86.7 % x 80.3 % of the square) against the 79.4 % x 54.6 % cover window, i.e. ~32 % of the
 * subject height lost. Under `contain` the subject renders 297 x 276 px, i.e. 59.6 % of the
 * 499 px frame width, inside the 51.5-66.4 % band the seven 2026-09-23 images already sit in.
 *
 * Audit : docs/sitewide-maquettes-20260921/qa-prime-finish-20260923/media-crop-audit.md
 *         (window under cover + scale(1.26) on a square gbz_pdp derivative = rows 218-742 and
 *          columns 99-861 of 960, i.e. 79.4 % x 54.6 % of the source, centred)
 * Rules : themes/warehouse/assets/css/gbz-shell-v1.css (line numbers re-checked 2026-09-24 after
 *         another task edited that file: :388-393 the 499/343 frame with overflow hidden,
 *         :402-411 the gallery cover + 1.26, :429-435 the thumbnails, :565-577 the mobile
 *         cover + 1.1, :596-604 the Prime exception (already `contain`, untouched here)).
 * Tokens: this sheet is served by Apache without cache-control or etag, so the `?v=` token in
 *         templates/_partials/head.tpl is the only invalidation: it was bumped from
 *         `20260923-media1` to `20260924-media2` with the 769 addition.
 *
 * Rules for this file:
 *  1. Presentation only. No price, label, product data, cart behaviour, review block or markup is
 *     selected anywhere below: two declarations per rule, both about image fitting.
 *  2. The scope is the MEDIA, not the product page: each rule is keyed on the image's own `src`,
 *     so a page that carries one of these seven photos keeps the maquette framing for every other
 *     image it shows. Nothing is keyed on `body#product` classes, so a healthy PDP is untouched.
 *     Ids covered here: 1, 5, 32, 435, 437 (baked crown / MADE IN USA overlay), 772 (pack
 *     subject) and 838 (printed pack text) from the 2026-09-23 audit, plus 769 from the
 *     2026-09-24 measurement above. Nothing else was added.
 *  3. The reference PDP of maquette 05 - product 150, image 524 - keeps the global
 *     `cover` + `scale(1.26)`, and the Prime family keeps its existing `contain`: neither id and
 *     no Prime image appears in any selector below.
 *  4. Mobile inherits this file: the <=767.98px block of the shell only re-declares `cover` and
 *     `scale(1.1)` on the same selectors these rules already outrank by specificity, so the
 *     seven photos are whole at both widths without a second media query.
 *  5. No !important; the attribute selector carries the extra specificity instead. The 499/343
 *     frame, the hairlines, the thumbnail geometry and every other page keep their current rules.
 */

/* ----------------------------------------------------------------------------------------------
 * 1. Gallery - `gbz_pdp` (960x960) of the audited images.
 *    `contain` shows the whole derivative inside the unchanged frame; on these files the
 *    subject lands between 51.5 % and 66.4 % of the frame width (769 included, at 59.6 %;
 *    measured, see the report)
 *    against the 68.5 % of the maquette calibration, and the baked overlay or printed artwork -
 *    which `cover` cut by 122 to 218 source pixels - stays entirely visible.
 * ------------------------------------------------------------------------------------------- */

body#product .gbz-product-page .product-cover .product-images-large img[src*="/1-gbz_pdp/"],
body#product .gbz-product-page .product-cover .product-images-large img[src*="/5-gbz_pdp/"],
body#product .gbz-product-page .product-cover .product-images-large img[src*="/32-gbz_pdp/"],
body#product .gbz-product-page .product-cover .product-images-large img[src*="/435-gbz_pdp/"],
body#product .gbz-product-page .product-cover .product-images-large img[src*="/437-gbz_pdp/"],
body#product .gbz-product-page .product-cover .product-images-large img[src*="/769-gbz_pdp/"],
body#product .gbz-product-page .product-cover .product-images-large img[src*="/772-gbz_pdp/"],
body#product .gbz-product-page .product-cover .product-images-large img[src*="/838-gbz_pdp/"] {
    object-fit: contain;
    transform: none;
}

/* ----------------------------------------------------------------------------------------------
 * 2. Thumbnails - `medium_default` of the same images.
 *    The tile is 149/118 and the derivative is portrait (452x584), so `cover` + `scale(1.15)`
 *    cropped the overlay away a second time. `contain` keeps the whole photo, which is what a
 *    thumbnail is for; the tile geometry, the selected state and the swiper behaviour are not
 *    touched.
 * ------------------------------------------------------------------------------------------- */

body#product .gbz-product-page #product-images-thumbs img[src*="/1-medium_default/"],
body#product .gbz-product-page #product-images-thumbs img[src*="/5-medium_default/"],
body#product .gbz-product-page #product-images-thumbs img[src*="/32-medium_default/"],
body#product .gbz-product-page #product-images-thumbs img[src*="/435-medium_default/"],
body#product .gbz-product-page #product-images-thumbs img[src*="/437-medium_default/"],
body#product .gbz-product-page #product-images-thumbs img[src*="/769-medium_default/"],
body#product .gbz-product-page #product-images-thumbs img[src*="/772-medium_default/"],
body#product .gbz-product-page #product-images-thumbs img[src*="/838-medium_default/"] {
    object-fit: contain;
    transform: none;
}

/* ----------------------------------------------------------------------------------------------
 * 3. Gallery + thumbnails - VIP product 261, "Gummies THC 100x40mg - 4000 mg Pack" (2026-09-27).
 *    Category 47 is restricted to groups 3-4, so this page was outside the 2026-09-23/24 sweeps
 *    and image 833 never reached the list in the header above (which stays as written on purpose -
 *    this patch is append-only). Measured on the live 960x960 derivative: the artwork paints
 *    columns 0-959 and rows 56-905, so the shared frame cuts 20.6 % of the subject width and
 *    38.4 % of its height on desktop (cover + 1.26) and 9.2 % x 29.4 % on mobile (cover + 1.1).
 *    The selectors mirror section 1/2 - one image id, keyed on the image's own src - so only
 *    image 833 and its thumbnail leave the shared framing; every other PDP, listing card and
 *    thumbnail keeps gbz-shell-v1.css 4b/4c unchanged.
 *    Evidence: tools/vip-gallery-crop-20260927/REPORT.md
 * ------------------------------------------------------------------------------------------- */

body#product .gbz-product-page .product-cover .product-images-large img[src*="/833-gbz_pdp/"],
body#product .gbz-product-page #product-images-thumbs img[src*="/833-medium_default/"] {
    object-fit: contain;
    transform: none;
}

/* ----------------------------------------------------------------------------------------------
 * 4. OPTIONAL - slides 2-5 of the same product (images 835 / 836 / 837).
 *    Same measurement pass: the artwork is clipped by 10.3 % (835), 45.4 % (836) and 45.4 %
 *    (837) of its height on desktop, 1.0 % / 37.5 % / 37.5 % on mobile, and the matching
 *    thumbnails lose up to 31.2 % of the subject height. Image 834 is deliberately absent: it is
 *    centred (rows 292-731 of 960) and loses 0.2 %, so it keeps the shared framing.
 *    Delete this block if the change must stay limited to the reported image 833.
 * ------------------------------------------------------------------------------------------- */

body#product .gbz-product-page .product-cover .product-images-large img[src*="/835-gbz_pdp/"],
body#product .gbz-product-page .product-cover .product-images-large img[src*="/836-gbz_pdp/"],
body#product .gbz-product-page .product-cover .product-images-large img[src*="/837-gbz_pdp/"],
body#product .gbz-product-page #product-images-thumbs img[src*="/835-medium_default/"],
body#product .gbz-product-page #product-images-thumbs img[src*="/836-medium_default/"],
body#product .gbz-product-page #product-images-thumbs img[src*="/837-medium_default/"] {
    object-fit: contain;
    transform: none;
}
