/* Owner LIVE MASTER FIX: passive, centered original product photographs. */
.px-gallery-stage { display:grid;place-items:center;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);touch-action:pan-y pinch-zoom }
.px-gallery-stage > .px-gallery-image { place-self:center;object-fit:contain;object-position:50% 50%;margin:0;cursor:default }
.px-gallery-thumb { display:grid;place-items:center;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) }
#pxProductPage .px-gallery-thumb > img { display:block;width:100%;height:100%;min-width:0;min-height:0;max-width:100%;max-height:100%;object-fit:contain;object-position:50% 50%;margin:0 }
/* Give the inner grid a definite rectangle without changing the accepted 4:3 card. */
.px-catalog-media > .px-catalog-art.is-live-media { position:absolute;inset:0;width:100%;height:100%;aspect-ratio:auto;display:grid;place-items:center;transform:none }
.px-catalog-art.is-live-media > .px-catalog-product-image,
.px-catalog-product-image.px-sozo-original-preview,
#pxRecommendations .px-setup-image,
#pxRecommendations .px-setup-image.px-sozo-original-preview,
.px-category-art > .px-category-image { object-fit:contain!important;object-position:50% 50%!important;transform:none;margin:0 }
.px-catalog-card:hover .px-catalog-art,
#pxRecommendations .px-setup-card:hover .px-setup-image { transform:none }
.px-category-art { display:grid;place-items:center }
.px-feature-art { min-width:0;display:grid;place-items:center }
.px-feature-photo { display:block;width:100%;height:100%;max-height:210px;object-fit:contain;object-position:50% 50%;margin:0 }
/* Symmetric text space; the arrow occupies a reserved, separate end zone. */
select[name="sort"] { appearance:none;-webkit-appearance:none;box-sizing:border-box;min-width:184px;max-width:100%;height:45px;padding:0 34px;text-align:center;text-align-last:center;line-height:normal;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%2317191b' stroke-width='1.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 15px center;background-size:10px 6px }
@media(max-width:520px) { select[name="sort"] { min-width:0;width:100% } }

/* A definite grid track also contains legacy 100%-sized square originals without overflow/cropping. */
#pxProductPage.px-pdp .px-gallery-stage #pxGalleryImage.px-gallery-image { min-width:0;min-height:0;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:50% 50%!important }

/* Prevent intrinsic square-image min-content tracks from growing beyond a 4:3 listing frame. */
.px-catalog-media > .px-catalog-art.is-live-media,.px-category-art { grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) }
.px-catalog-art.is-live-media > .px-catalog-product-image { min-width:0;min-height:0;max-width:100%;max-height:100% }

/* Preserve the full source in every thumbnail, overriding legacy product-inline cover rules. */
#pxProductPage.px-pdp .px-gallery-thumb > img { object-fit:contain!important;object-position:50% 50%!important }

/* OWNER LOCK 19.11.2026: SOZO previews and approved A75 third photos have NO inset mat.
   Preserve the current frame geometry, original image files, gallery order and passive main photo. */
.px-catalog-art.is-live-media > .px-catalog-product-image.px-sozo-original-preview {
 width:100%!important;height:100%!important;object-fit:cover!important;object-position:50% 50%!important;margin:0!important;
}
#pxRecommendations .px-setup-card[data-category="mousepads"] .px-setup-image {
 inset:0!important;width:100%!important;height:100%!important;object-fit:cover!important;object-position:50% 50%!important;
}
.px-category-tile[data-category="mousepads"] .px-category-art { padding:0!important }
.px-category-tile[data-category="mousepads"] .px-category-image {
 width:100%!important;height:100%!important;object-fit:cover!important;object-position:50% 50%!important;border-radius:0;
}
.px-catalog-media > .px-catalog-art.is-live-media,
#pxRecommendations .px-setup-card[data-category="mousepads"] .px-setup-image { transform:none!important }
#pxProductPage.px-pdp .px-gallery-stage.is-fullbleed #pxGalleryImage.px-gallery-image {
 width:100%!important;height:100%!important;object-fit:cover!important;object-position:50% 50%!important;margin:0!important;
}
#pxProductPage.px-pdp .px-gallery-thumb.is-fullbleed { padding:0 }
#pxProductPage.px-pdp .px-gallery-thumb.is-fullbleed > img { object-fit:cover!important;object-position:50% 50%!important }

/* SOZO quality restoration: accepted upper source crop, no mat, no stretching. */
.px-catalog-art.is-live-media > .px-catalog-product-image.px-sozo-original-preview { object-position:50% 0%!important; }
#pxRecommendations .px-setup-card[data-category="mousepads"] .px-setup-image { object-position:50% 0%!important; }
.px-category-tile[data-category="mousepads"] .px-category-image { object-position:50% 0%!important; }

/* Closeout: text only. Bottom whitespace derives from top padding + brand row + gap.
   Border compensation measures the outer card boundary; names grow by actual lines. */
.px-catalog-card:has(>.px-catalog-card-inner>.px-catalog-copy>.px-catalog-model:last-child){align-self:start}
.px-catalog-card-inner:has(>.px-catalog-copy>.px-catalog-model:last-child){height:auto}
.px-catalog-copy:has(>.px-catalog-model:last-child){--px-copy-top:18px;--px-brand-line:11px;--px-brand-gap:8px;min-height:0;height:auto;padding-top:var(--px-copy-top);padding-bottom:calc(var(--px-copy-top) + var(--px-brand-line) + var(--px-brand-gap) - 1px)}
.px-catalog-model{min-height:0}
#pxRecommendations .px-setup-copy{min-height:0;height:auto}
@media(max-width:900px){.px-catalog-copy:has(>.px-catalog-model:last-child){--px-copy-top:13px;--px-brand-line:9.9px;--px-brand-gap:6px}}

/* Text only: same acceptance anchors as the catalogue, including the existing variant row. */
#pxRecommendations .px-setup-copy{--px-rec-top:18px;--px-rec-brand:11px;--px-rec-brand-gap:8px;--px-rec-variant:16.25px;padding-bottom:calc(var(--px-rec-top) + var(--px-rec-brand) + var(--px-rec-brand-gap) - 1px)}
#pxRecommendations .px-setup-copy:has(>.px-setup-variant){padding-bottom:calc(var(--px-rec-top) + var(--px-rec-brand) + var(--px-rec-brand-gap) - var(--px-rec-variant) - 7px - 1px)}
@media(max-width:900px){#pxRecommendations .px-setup-copy{--px-rec-top:14px;--px-rec-variant:15px}}
