/* SASA Packaging - pictures keep their OWN shape. Behaviour: public/assets/main/js/sasa-media-fit.js
   The script gives every visitor card its picture's ratio (--ar) and every grid tile the right height, so nothing is cropped.
   Placeholder colours / gradients are not touched here: they still show when a picture is missing or still loading. */

/* ---- visitors reel: the card is exactly as wide:tall as its picture (4:5 only until the picture is known / when there is none) ---- */
.gv-card { aspect-ratio: var(--ar, 4 / 5); }

/* phones + tablets (the reel runs sideways): same height for all cards, the width follows the picture */
@media (max-width: 1099px) {
	.gv-card { width: auto; height: clamp(210px, 54vw, 300px); }
}

/* ---- product page big picture: stays square; a very different shape is shown whole inside it ---- */
.sxi-main.is-contain img { object-fit: contain; }
.sxi-main.is-contain:hover img { transform: scale(1.35); }
@media (hover: none) { .sxi-main.is-contain:hover img { transform: none; } }

/* ---- NO DOME: every top picture is a rounded rectangle (vertical stays vertical, horizontal stays horizontal) ----
   Applies to the product page, the category page and the 3 cards at the top of the Products page. */
.sxi-arch, .sxi-arch--1, .sxi-arch--2, .sxi-arch--3,
.sxi-arch--fit, .sxi-arch--fit.is-land { border-radius: 28px; }
.sxi-arch { border-width: 5px; }
.sxi-arch::after { /* fine inner ring: gives the frame a premium "framed photo" edge */
	content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none;
	box-shadow: inset 0 0 0 1px rgba(31, 45, 34, 0.08), inset 0 -60px 80px -60px rgba(20, 30, 22, 0.25);
}
.sxi-arch img { transition: transform 1.4s var(--ease, cubic-bezier(.22,.8,.2,1)); }
.sxi-arch:hover img { transform: scale(1.05); }
@media (hover: none) { .sxi-arch:hover img { transform: none; } }

/* ---- the frame WRAPS the picture: it is exactly as wide / tall as the picture itself (pure CSS, no JavaScript needed) ----
   Horizontal picture = wide frame, vertical picture = tall frame, square = square. Nothing is cropped. */
.sxi-collage--fit { --fit-h: clamp(340px, 44vw, 540px); height: auto; min-height: var(--fit-h); display: flex; align-items: center; justify-content: center; }
.sxi-collage--fit .sxi-arch--fit {
	position: relative; inset: auto; left: auto; right: auto; top: auto; bottom: auto; margin: 0; translate: none;
	width: auto; height: auto; max-width: 100%; display: block; line-height: 0;
}
.sxi-collage--fit .sxi-arch--fit img {
	position: static; inset: auto; display: block; width: auto; height: auto;
	max-width: 100%; max-height: var(--fit-h); object-fit: contain;
}
.sxi-collage--fit .sxi-arch--fit.is-empty { width: min(100%, 380px); height: var(--fit-h); }   /* no picture yet: soft placeholder tile */
.sxi-collage--fit .sxi-arch--fit .sxi-ph { z-index: 1; }

/* ---- About Us inner pages, 2-3 hero pictures: every card takes the SHAPE of its own picture (JS sets --r = width / height) ----
   Each card is as wide as its slot allows, but never taller than its slot: horizontal picture = wide card, vertical = tall card. Nothing is cropped. */
.sxi-collage--shape { --fit-h: clamp(340px, 44vw, 540px); height: var(--fit-h); }
.sxi-collage--shape .sxi-arch { --r: 0.8; height: auto; aspect-ratio: var(--r); }
.sxi-collage--shape .sxi-arch--1 { --mh: calc(var(--fit-h) * 0.78); width: min(46%, calc(var(--mh) * var(--r))); }
.sxi-collage--shape .sxi-arch--2 { --mh: calc(var(--fit-h) * 0.64); width: min(42%, calc(var(--mh) * var(--r))); }
.sxi-collage--shape .sxi-arch--3 { --mh: calc(var(--fit-h) * 0.42); width: min(34%, calc(var(--mh) * var(--r))); }
