/* Amer gallery — shared structure for every design (only design 1 ships at
 * launch). Every measured size, colour and breakpoint lives in the design's
 * own -1.css (design variants convention, conventions.md); this file only
 * holds what any future gallery design's grid would share: the item's shell,
 * the hover-reveal icon link and the tooltip's structural pieces (position,
 * pointer-events), never their numbers.
 */
.amer-gallery__item { position: relative; display: flex; overflow: hidden; }
.amer-gallery__media { position: relative; display: block; overflow: hidden; inline-size: 100%; }
.amer-gallery__media img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
/* Centred with a physical left:50%, on purpose (conventions.md: values built
   on 50% are centring, not a side). Written as inset-inline-start it became
   right:50% in Arabic while translate(-50%) still pulled left: measured, the
   button sat 40px left of its tile's centre and the tooltip 89px left of the
   button, clipped by the tile. */
.amer-gallery__view {
  position: absolute;
  inset-block-start: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.amer-gallery__tooltip {
  position: absolute;
  inset-block-end: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  white-space: nowrap;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  /* The template's .hover-tooltip .tooltip transition: visibility is not in
     it, so the tip fades in after .1s but vanishes at once on leaving. */
  transition: transform .3s ease .1s, opacity .3s ease .1s;
}
.amer-gallery__view:hover .amer-gallery__tooltip { opacity: 1; visibility: visible; }
.amer-gallery__action { display: flex; justify-content: center; }

/* ---- «لون الكلام» (text_color, 2026-10-13, round 2) -------------------------
   The section writes the merchant's colour over the theme's text colours
   (gallery.jinja), so the heading, the line under it, the link at the end
   and the dots take it. The white view button over a photo, the dark
   tooltip and the slider arrows (white squares, the heading colour under
   the mouse; 1.04:1 both ways with a light colour before, review of round
   2) keep the theme's: their fill is their own. */
.amer-gallery.amer-section--ink :is(.amer-gallery__view, .amer-gallery__tooltip, .amer-sw-nav) {
  --amer-heading: var(--amer-theme-heading);
  --amer-text: var(--amer-theme-text);
  --amer-muted: var(--amer-theme-muted);
  --amer-price-old: var(--amer-theme-price-old);
  --amer-card-price: initial;
}
