/* =========================================================
   Shop toolbar: custom breadcrumb + result count + sort
   ========================================================= */

:root {
	--rr-toolbar-bg: #f3f4f6;
	--rr-toolbar-text: #4b5563;
	--rr-toolbar-muted: #6b7280;
	--rr-toolbar-strong: #1f2937;
	--rr-toolbar-border: #e5e7eb;
	--rr-accent: #8b1a24;
}

/* Hide Basel secondary category nav + back button in shop title */
body.post-type-archive-product .page-title.title-shop .basel-product-categories,
body.tax-product_cat .page-title.title-shop .basel-product-categories,
body.tax-product_tag .page-title.title-shop .basel-product-categories,
body.post-type-archive-product .page-title.title-shop .basel-show-categories,
body.tax-product_cat .page-title.title-shop .basel-show-categories,
body.tax-product_tag .page-title.title-shop .basel-show-categories,
body.post-type-archive-product .page-title.title-shop .basel-back-btn,
body.tax-product_cat .page-title.title-shop .basel-back-btn,
body.tax-product_tag .page-title.title-shop .basel-back-btn {
	display: none !important;
}

/* Toolbar bar */
.rr-shop-toolbar.shop-loop-head,
.shop-loop-head.rr-shop-toolbar {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 16px 24px;
	flex-wrap: wrap;
	width: 100% !important;
	float: none !important;
	margin: 0 0 28px !important;
	padding: 14px 0 !important;
	background: transparent !important;
	border: 0 !important;
	border-bottom: 1px solid var(--rr-toolbar-border) !important;
	min-height: 0 !important;
}

.rr-shop-breadcrumb {
	display: flex;
	align-items: center;
	min-width: 0;
	flex: 1 1 auto;
	max-width: 100%;
}

.rr-breadcrumb {
	display: inline-flex !important;
	align-items: center;
	flex-wrap: nowrap;
	gap: 8px;
	min-width: 0;
	max-width: 100%;
	margin: 0 !important;
	padding: 0 !important;
	font-size: 13px !important;
	line-height: 1.35 !important;
	color: var(--rr-toolbar-muted) !important;
	background: none !important;
	border: 0 !important;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.rr-breadcrumb a,
.rr-breadcrumb .rr-bc-link {
	color: var(--rr-toolbar-text) !important;
	text-decoration: none !important;
	font-weight: 500 !important;
}

.rr-breadcrumb a:hover,
.rr-breadcrumb .rr-bc-link:hover {
	color: var(--rr-toolbar-strong) !important;
	text-decoration: underline !important;
}

.rr-breadcrumb .rr-bc-current {
	color: var(--rr-toolbar-strong) !important;
	font-weight: 700 !important;
}

/* Kill Basel default "/" separators on any leftover WC crumbs */
.rr-shop-breadcrumb .woocommerce-breadcrumb a::before,
.rr-shop-breadcrumb .woocommerce-breadcrumb a::after,
.rr-shop-breadcrumb .woocommerce-breadcrumb span::before,
.rr-shop-breadcrumb .woocommerce-breadcrumb span::after,
.rr-breadcrumb a::before,
.rr-breadcrumb a::after,
.rr-breadcrumb span::before,
.rr-breadcrumb span::after {
	content: none !important;
	display: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.rr-bc-home {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: var(--rr-toolbar-muted);
	line-height: 0;
}

.rr-bc-home svg {
	display: block;
}

.rr-bc-sep {
	display: inline-block !important;
	flex-shrink: 0;
	color: #9ca3af !important;
	font-size: 14px !important;
	line-height: 1 !important;
	padding: 0 2px !important;
	font-weight: 400 !important;
}

.rr-shop-tools {
	display: flex !important;
	align-items: center;
	justify-content: flex-end;
	gap: 14px 18px;
	flex: 0 1 auto;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
	width: auto !important;
}

.rr-shop-tools .woocommerce-result-count {
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
	display: block !important;
	font-size: 13px !important;
	line-height: 1.35 !important;
	color: var(--rr-toolbar-muted) !important;
	white-space: nowrap;
}

.rr-shop-tools .woocommerce-ordering {
	margin: 0 !important;
	float: none !important;
	display: block !important;
}

.rr-shop-tools .woocommerce-ordering select {
	min-width: 160px;
	max-width: 100%;
	height: 36px;
	padding: 0 32px 0 12px !important;
	border: 1px solid var(--rr-toolbar-border) !important;
	border-radius: 8px !important;
	background-color: #fff !important;
	color: var(--rr-toolbar-strong) !important;
	font-size: 13px !important;
	line-height: 36px !important;
	box-shadow: none !important;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1.4 1.2L6 5.8l4.6-4.6L12 2.6 6 8.6 0 2.6z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 10px;
	cursor: pointer;
}

/* Hide Basel extras that used to sit in shop-loop-head */
.rr-shop-toolbar .basel-products-shop-view,
.rr-shop-toolbar .basel-show-sidebar-btn,
.rr-shop-toolbar .basel-filter-buttons,
.rr-shop-toolbar .shop-view,
.rr-shop-toolbar .basel-ajax-loader {
	display: none !important;
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
	.rr-shop-toolbar.shop-loop-head,
	.shop-loop-head.rr-shop-toolbar {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
		padding: 12px 0 !important;
		margin-bottom: 20px !important;
	}

	.rr-shop-breadcrumb,
	.rr-breadcrumb {
		width: 100%;
	}

	.rr-shop-tools {
		width: 100% !important;
		justify-content: space-between;
		flex-wrap: wrap;
		gap: 10px;
	}

	.rr-shop-tools .woocommerce-result-count {
		white-space: normal;
		flex: 1 1 auto;
	}

	.rr-shop-tools .woocommerce-ordering {
		flex: 0 0 auto;
		margin-left: auto !important;
	}

	.rr-shop-tools .woocommerce-ordering select {
		min-width: 140px;
		width: auto;
	}
}

@media (max-width: 480px) {
	.rr-shop-tools {
		flex-direction: column;
		align-items: stretch;
	}

	.rr-shop-tools .woocommerce-ordering,
	.rr-shop-tools .woocommerce-ordering select {
		width: 100% !important;
		margin-left: 0 !important;
	}
}
