/*
 * Full-bleed section background, same viewport-width trick as
 * .trade-hub-hero (inc/single-trade-hub/assets/css/single-trade-hub.css) —
 * breaks out of whatever WPBakery row/column width this shortcode is
 * dropped into. Scoped to .trade-hub-box-grid (not the shared
 * .trade-hub-grid class, which the archive/taxonomy templates also use and
 * load this same stylesheet for) so only this shortcode's own section gets
 * the gradient.
 */
.trade-hub-box-grid {
	position: relative;
	left: 50%;
	right: 50%;
	width: 100vw;
	margin-left: -50vw;
	margin-right: -50vw;
	padding: 64px 0 0;
	background: linear-gradient(180deg, var(--color-grey-97, #F6F7FA) 0%, var(--bg-quaternary-2, #FFF) 100%);
}

.trade-hub-box-grid__inner.container {
	position: relative;
}

.trade-hub-box-grid__header {
	margin: 0 0 40px;
	text-align: center;
}

.trade-hub-box-grid__title {
	margin: 0;
	font-size: 32px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -.64px;
	color: #0f1f30;
}

.trade-hub-box-grid__subtitle {
	margin: 12px 0 0;
	font-size: 16px;
	line-height: 1.5;
	color: rgba(0, 0, 0, .6);
}

@media (max-width: 640px) {
	.trade-hub-box-grid__title {
		font-size: 24px;
	}
}

.trade-hub-grid__items {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

@media (max-width: 1024px) {
	.trade-hub-grid__items {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.trade-hub-grid__items {
		grid-template-columns: 1fr;
	}

	.trade-hub-grid__items > .trade-hub-card:nth-child(n+4) {
		display: none;
	}

	.trade-hub-grid__items.is-expanded > .trade-hub-card:nth-child(n+4) {
		display: block;
	}
}

.trade-hub-grid__toggle-wrap {
	display: none;
}

/*
 * Woodmart's own base.min.css has a generic
 * `:is(.btn, .button, button, [type=submit], [type=button]):hover` rule
 * that recolors every <button> on the site on hover. It ties this rule's
 * specificity exactly, and its stylesheet happens to win the source-order
 * tiebreak — !important is the only reliable way to keep our own colors.
 */
.trade-hub-grid__toggle,
.trade-hub-grid__toggle:hover {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #F5F5F5 !important;
	border: none !important;
	padding: 12px 24px;
	border-radius: 999px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	text-transform: none;
	color: #1A484E !important;
	box-shadow: none !important;
	cursor: pointer;
}

.trade-hub-grid__toggle svg {
	transition: transform .2s ease;
}

.trade-hub-grid__toggle[aria-expanded="true"] svg {
	transform: rotate(-90deg);
}

.trade-hub-grid__toggle-text-hide {
	display: none;
}

.trade-hub-grid__toggle[aria-expanded="true"] .trade-hub-grid__toggle-text-show {
	display: none;
}

.trade-hub-grid__toggle[aria-expanded="true"] .trade-hub-grid__toggle-text-hide {
	display: inline;
}

@media (max-width: 640px) {
	.trade-hub-grid__toggle-wrap {
		display: flex;
		justify-content: center;
		margin-top: 24px;
	}
}

.trade-hub-grid__footer {
	display: flex;
	justify-content: center;
	margin-top: 32px;
}

.trade-hub-grid__load-more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 28px;
	border: 1px solid rgba(0, 0, 0, .15);
	border-radius: 999px;
	text-decoration: none;
	color: inherit;
	font-weight: 600;
	transition: opacity .2s ease;
}

.trade-hub-grid__load-more.loading {
	opacity: .5;
	pointer-events: none;
}

/* Plain link under the grid, desktop only. */
.trade-hub-box-grid__view-all {
	display: flex;
	width: fit-content;
	align-items: center;
	gap: 8px;
	margin: 64px auto 0;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	color: #1A484E;
	white-space: nowrap;
}

@media (max-width: 1024px) {
	.trade-hub-box-grid__view-all {
		display: none;
	}
}
