/*
 * Hub Bridge Homepage — Shop archive (WooCommerce) editorial styling.
 * Adds a page title + a results / filters / sort bar above the product grid.
 * The Hub theme product cards (.ld-sp) are intentionally left untouched.
 */

.hbp-shop-head {
	width: 100vw;
	max-width: 100vw;
	box-sizing: border-box;
	margin-block: 0 1.75rem;
	margin-inline: calc(50% - 50vw);
	padding-inline: clamp(1rem, 4vw, 3rem);
	color: #2f3a8e;
}

.hbp-shop-title {
	margin: 2.5rem 0;
	font-size: clamp(2.5rem, 6vw, 4.5rem);
	font-weight: 700;
	line-height: 1;
	letter-spacing: 5px;
	color: #f06479;
	text-align: center;
}

.hbp-shop-bar {
	display: flex;
	align-items: stretch;
	gap: 0;
	min-height: 2.75rem;
	padding: 0.35rem 0;
	border-top: 1px solid rgba(240, 100, 121, 0.55);
	border-bottom: 1px solid rgba(240, 100, 121, 0.55);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: #2f3a8e;
}

/* Only our three sections are columns; hide the theme's captured toolbar/notices. */
.hbp-shop-bar > .woocommerce-notices-wrapper,
.hbp-shop-bar > .ld-shop-topbar {
	display: none !important;
}

.hbp-shop-bar__count,
.hbp-shop-bar .hbp-shop-filters,
.hbp-shop-bar__sort {
	flex: 1 1 0;
	min-width: 0;
	margin: 0;
	display: flex;
	align-items: center;
	padding-inline: 1.5rem;
}

.hbp-shop-bar__count {
	justify-content: flex-start;
	padding-inline-start: 0;
}

.hbp-shop-bar .hbp-shop-filters {
	justify-content: center;
	border-inline-start: 1px solid rgba(47, 58, 142, 0.28);
}

.hbp-shop-bar__sort {
	justify-content: flex-end;
	padding-inline-end: 0;
	border-inline-start: 1px solid rgba(47, 58, 142, 0.28);
}

.woocommerce .woocommerce-result-count,
.hbp-shop-bar__count .woocommerce-result-count {
	margin: 0 !important;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	color: inherit;
}

.hbp-shop-bar .woocommerce-ordering {
	margin: 0;
	text-align: right;
}

/* Match the result-count text exactly — including the theme's jQuery-UI selectmenu. */
.hbp-shop-bar__sort .woocommerce-ordering,
.hbp-shop-bar__sort .woocommerce-ordering select,
.hbp-shop-bar__sort .ui-selectmenu-button,
.hbp-shop-bar__sort .ui-selectmenu-text,
.hbp-shop-bar__sort .lqd-select-dropdown {
	font-family: inherit !important;
	font-size: 0.72rem !important;
	font-weight: 600 !important;
	letter-spacing: 0.09em !important;
	text-transform: uppercase !important;
	line-height: 1 !important;
	color: #2f3a8e !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	min-height: 0 !important;
	height: auto !important;
	padding: 0 !important;
	margin: 0 !important;
	cursor: pointer;
}

/* ── Filters dropdown ───────────────────────────────────────────────────── */
.hbp-shop-filters {
	position: relative;
	text-align: center;
}

.hbp-shop-filters__toggle {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	list-style: none;
	cursor: pointer;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	color: #2f3a8e;
}

.hbp-shop-filters__toggle::-webkit-details-marker {
	display: none;
}

.hbp-shop-filters__toggle::after {
	content: "\25BE";
	font-size: 0.9em;
	line-height: 1;
}

.hbp-shop-filters[open] .hbp-shop-filters__toggle::after {
	content: "\25B4";
}

.hbp-shop-filters__menu {
	position: absolute;
	top: calc(100% + 12px);
	left: 50%;
	transform: translateX(-50%);
	z-index: 30;
	display: flex;
	flex-direction: column;
	min-width: 13rem;
	padding: 8px;
	background: #faf6ec;
	border: 1px solid #2f3a8e;
	box-shadow: 0.3rem 0.3rem 0 rgba(47, 58, 142, 0.2);
}

.hbp-shop-filters__link {
	padding: 9px 12px;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-align: left;
	color: #2f3a8e !important;
	text-decoration: none !important;
	border-radius: 5px;
	transition: background 160ms ease;
}

.hbp-shop-filters__link:hover,
.hbp-shop-filters__link.is-active {
	background: #f06479;
	color: #2f3a8e !important;
}

/* ── Balance the Hub theme product cards ────────────────────────────────── */
/* Reserve two lines for every product name so prices/buttons line up across a row. */
.woocommerce ul.products li.product .ld-sp-info h3 {
	min-height: 40px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	margin-bottom: 0;
}

/* Breathing room between rows. */
.woocommerce ul.products {
	row-gap: 2.5rem;
}

@media (max-width: 600px) {
	.hbp-shop-bar {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		min-height: 0;
		padding: 0;
		font-size: 0.68rem;
	}

	.hbp-shop-bar__count,
	.hbp-shop-bar .hbp-shop-filters,
	.hbp-shop-bar__sort {
		flex: 1 1 auto;
		justify-content: center;
		padding: 0.7rem 0;
		border-inline-start: 0;
		border-block-start: 1px solid rgba(47, 58, 142, 0.14);
	}

	.hbp-shop-bar__count {
		border-block-start: 0;
	}

	.hbp-shop-bar__sort {
		justify-content: center;
	}
}
