/**
 * WooCommerce Taxonomy Banners - Frontend styles.
 *
 * The default template outputs the active theme's own "klbth-banner"
 * markup, so layout/visual styling comes from the theme's CSS. This file
 * only adds small safety-net rules the theme is not expected to provide:
 * an image fade-in once loaded, and visible keyboard focus states.
 */

.wctb-banner.wctb-banner--loaded .wctb-banner__image {
	animation: wctb-fade-in 0.4s ease;
}

@keyframes wctb-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.wctb-banner .btn.link:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.wctb-banner.wctb-banner--loaded .wctb-banner__image {
		animation: none;
	}
}

/**
 * Bottom-of-page Content Section - image on one side, heading + rich-text
 * description on the other. No theme component to piggyback on for this
 * one (unlike the banner, which reuses "klbth-banner"), so it gets its own
 * layout rules here.
 */

.wctb-content-section {
	display: flex;
	align-items: center;
	gap: 48px;
	padding: 48px 0;
}

.wctb-content-section__media,
.wctb-content-section__body {
	flex: 1 1 50%;
	min-width: 0;
}

.wctb-content-section__media img {
	width: 100%;
	height: 100%;
	max-height: 460px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

.wctb-content-section__heading {
	margin: 0 0 16px;
	font-size: 1.75rem;
	line-height: 1.3;
}

.wctb-content-section__description {
	font-size: 1rem;
	line-height: 1.7;
}

.wctb-content-section__description > *:last-child {
	margin-bottom: 0;
}

@media (max-width: 1024px) {
	.wctb-content-section {
		flex-direction: column;
		gap: 24px;
		padding: 32px 0;
	}

	.wctb-content-section__media img {
		max-height: 280px;
	}
}

/**
 * Two-card Promo Section - sits between the bottom banner and the content
 * section. Each card is its own background-image block with a badge,
 * heading, and button. Own layout rules, same reasoning as the content
 * section above (no existing theme component to piggyback on).
 */

.wctb-promo-section {
	display: flex;
	gap: 24px;
	padding: 24px 0;
}

.wctb-promo-section__card {
	flex: 1 1 50%;
	min-width: 0;
	min-height: 280px;
	padding: 32px;
	border-radius: 8px;
	background-color: #1a1a1a;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	gap: 12px;
	color: #fff;
	position: relative;
}

.wctb-promo-section__card::before {
    background: #00000040;
    border-radius: 8px;
    content: '';
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 999;
}

.wctb-promo-section__badge {
	display: inline-block;
	padding: 4px 12px;
	font-size: 0.8rem;
	font-weight: 600;
	background: #EF233C;
	border-radius: 999px;
}

.wctb-promo-section__heading {
	margin: 0;
	font-size: 1.5rem;
	line-height: 1.3;
	color: inherit;
}

.wctb-promo-section__button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

@media (max-width: 1024px) {
	.wctb-promo-section {
		flex-direction: column;
		gap: 16px;
		padding: 16px 0;
	}

	.wctb-promo-section__card {
		min-height: 220px;
	}
}
