/**
 * RHT Brand Catalogue - frontend button.
 */

/* Lay out the brand banner and the catalogue button on the same row. */
.woocommerce-products-header:has( > .rht-brand-catalogue-wrap ) {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

/* Let the banner sit on the left and shrink naturally. */
.woocommerce-products-header > .pwb-brand-banner.pwb-before-loop {
	margin: 0;
	flex: 0 1 auto;
}

.rht-brand-catalogue-wrap {
	margin: 0;
	flex: 0 0 auto;
	text-align: right;
}

/* Mobile: stack neatly. */
@media ( max-width: 600px ) {
	.woocommerce-products-header:has( > .rht-brand-catalogue-wrap ) {
		justify-content: flex-start;
	}
	.rht-brand-catalogue-wrap {
		flex: 1 1 100%;
		text-align: left;
	}
}

.rht-brand-catalogue-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.55rem 1rem;
	background-color: #b81b22; /* RHT red */
	color: #fff !important;
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.2;
	text-decoration: none !important;
	border-radius: 4px;
	border: 2px solid transparent;
	transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
	box-shadow: 0 2px 6px rgba( 0, 0, 0, 0.08 );
}

.rht-brand-catalogue-btn:hover,
.rht-brand-catalogue-btn:focus {
	background-color: #8f1319;
	transform: translateY( -1px );
	box-shadow: 0 4px 10px rgba( 0, 0, 0, 0.15 );
	color: #fff !important;
	text-decoration: none !important;
	outline: none;
}

.rht-brand-catalogue-btn:focus-visible {
	border-color: #fff;
	box-shadow: 0 0 0 3px #b81b22;
}

.rht-brand-catalogue-btn .rht-bc-icon {
	flex-shrink: 0;
	display: inline-block;
}

.rht-brand-catalogue-btn .rht-bc-label small {
	display: inline-block;
	margin-left: 0.35rem;
	font-weight: 400;
	opacity: 0.9;
	font-size: 0.85em;
}

@media ( max-width: 480px ) {
	.rht-brand-catalogue-btn {
		width: 100%;
		justify-content: center;
	}
}
