/**
 * Listing banner, above product search results and optionally category
 * listings. Markup: includes/listing-banner.php.
 *
 * Colors come from the theme's tokens with the brand values as fallbacks, so
 * the band follows a token change and still renders without the theme. White
 * on brand red is 5.6:1.
 */

.gc-listing-banner {
	--gc-banner-bg: var(--color-brand-primary, #be3437);
	--gc-banner-fg: #fff;
	position: relative;
	display: flex;
	align-items: stretch;
	margin-top: 28px;
	min-height: 184px;
	overflow: hidden;
	background: var(--gc-banner-bg);
	color: var(--gc-banner-fg);
}

.gc-listing-banner__body {
	position: relative;
	z-index: 1;
	flex: 1 1 auto;
	max-width: 70%;
	padding: 30px 36px 22px;
}

.gc-listing-banner__title {
	margin: 0 0 14px;
	color: var(--gc-banner-fg);
	font-family: var(--font-heading, "Inter", system-ui, sans-serif);
	font-size: clamp(26px, 3.4vw, 44px);
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -0.01em;
}

.gc-listing-banner__text {
	max-width: 660px;
	margin: 0 0 6px;
	color: var(--gc-banner-fg);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.45;
}

/* A text link in the mockup, but a full 44px tall so it is a comfortable tap
   target; the negative margin keeps the extra height from pushing the band
   taller than the design. */
.gc-listing-banner__button {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	margin-bottom: -6px;
	color: var(--gc-banner-fg);
	font-size: 16px;
	font-weight: 800;
	text-decoration: none;
}
.gc-listing-banner__button:hover,
.gc-listing-banner__button:focus-visible {
	color: var(--gc-banner-fg);
	text-decoration: underline;
	text-underline-offset: 4px;
}
.gc-listing-banner__button:focus-visible {
	outline: 3px solid var(--gc-banner-fg);
	outline-offset: 2px;
}
.gc-listing-banner__chevron {
	flex: none;
	transition: transform .15s ease;
}
.gc-listing-banner__button:hover .gc-listing-banner__chevron {
	transform: translateX(3px);
}

/* The right of the band: the white notch, or an image when one is set. */
.gc-listing-banner__art {
	position: absolute;
	inset: 0 0 0 auto;
	width: 38%;
	color: var(--gc-banner-fg);
	pointer-events: none;
}

/* Height-led, so the circle stays round however tall the text makes the
   band. The cut sits about four fifths of the way across, as in the mockup. */
.gc-listing-banner__notch {
	position: absolute;
	top: 0;
	left: 44%;
	width: auto;
	height: 100%;
	overflow: visible;
}

.gc-listing-banner--image .gc-listing-banner__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
	.gc-listing-banner__chevron { transition: none; }
}

@media (max-width: 999px) {
	.gc-listing-banner__body { max-width: 72%; padding: 24px 24px 18px; }
	.gc-listing-banner__art { width: 30%; }
	.gc-listing-banner__notch { left: 30%; }
}

/* A phone has no room beside the text, so the band is the text alone. */
@media (max-width: 639px) {
	.gc-listing-banner { min-height: 0; margin-top: 20px; }
	.gc-listing-banner__body { max-width: none; padding: 20px 20px 14px; }
	.gc-listing-banner__title { margin-bottom: 10px; }
	.gc-listing-banner__text { font-size: 14px; }
	.gc-listing-banner__art { display: none; }
}
