/* Brand logos — one muted light-grey look, brand gold on hover.
   Matches every uploaded brand logo (files are named brand-*.webp): the
   homepage "Shop by brand" marquee and the Daily Deals brand tiles. The logos
   arrive in mixed colours (some white, so invisible on white), and need
   transparent backgrounds for this to read as a logo rather than a box.

   Rest: white at 75% — muted against the dark green "Shop by brand" section.
   (On a white section this would vanish; switch to invert(70%) = #b3b3b3.)
   Hover: black → #c3a25d (--bs-accent). Filters can't take a CSS variable, so
   the gold chain is pre-solved for that hex. Re-solve it if the accent changes. */

img[src*="/uploads/brand-"] {
	filter: brightness(0) invert(1);
	opacity: .75;
	transition: filter .25s ease, opacity .25s ease, transform .25s ease;
}

img[src*="/uploads/brand-"]:hover,
.image-slide:hover > img[src*="/uploads/brand-"],
a:hover img[src*="/uploads/brand-"],
a:focus-visible img[src*="/uploads/brand-"] {
	filter: brightness(0) saturate(100%) invert(63%) sepia(50%) saturate(359%) hue-rotate(4deg) brightness(93%) contrast(93%);
	opacity: 1;
	transform: scale(1.04);
}

/* Logos on white tiles (Daily Deals brand tiles): light grey, or white would vanish */
.bg-white img[src*="/uploads/brand-"]:not(:hover) {
	filter: brightness(0) invert(70%);
	opacity: 1;
}

.bg-white:hover img[src*="/uploads/brand-"] {
	filter: brightness(0) saturate(100%) invert(63%) sepia(50%) saturate(359%) hue-rotate(4deg) brightness(93%) contrast(93%);
}

/* Everyday deal card logos: near-black on white cards, white on the green
   featured card. Only the brand-*.webp set (transparent backgrounds) — a logo
   with a solid fill (e.g. a coupon's own Logo Override) keeps its colours,
   because recolouring it to one colour turns it into a silhouette. */
.gm-logo-on-light img[src*="/uploads/brand-"]:not(:hover) {
	filter: brightness(0);
	opacity: .85;
}

.gm-logo-on-dark img[src*="/uploads/brand-"]:not(:hover) {
	filter: brightness(0) invert(1);
	opacity: .9;
}

/* Everyday deal colour blocks: every logo solid white, any filename (also
   logos with a solid fill, which become a white mark). */
.gm-logo-white img,
.gm-logo-white img:hover {
	filter: brightness(0) invert(1);
	opacity: .95;
	transform: none;
}

/* Logos already black-and-white (white mark, black outline) keep their own
   colours: the white filter would flatten the outline into a silhouette.
   Matched by alt (the brand name) too, so swapping the file keeps working. */
.gm-logo-white img[alt="Hotbox" i],
.gm-logo-white img[alt="Hotbox" i]:hover,
.gm-logo-white img[src*="/uploads/hotbox"],
.gm-logo-white img[src*="/uploads/hotbox"]:hover,
.gm-logo-white img[src*="/uploads/hb."],
.gm-logo-white img[src*="/uploads/hb."]:hover {
	filter: none;
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	img[src*="/uploads/brand-"] {
		transition: none;
	}

	img[src*="/uploads/brand-"]:hover,
	.image-slide:hover > img[src*="/uploads/brand-"],
	a:hover img[src*="/uploads/brand-"] {
		transform: none;
	}
}
