/* Header: orange logo block, top bar, main nav, tools, mobile drawer. */

.bb-header {
	position: sticky;
	top: 0;
	z-index: 100;
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-rows: auto auto;
	background: var(--bb-dark);
	color: #fff;
}

.bb-header {
	isolation: isolate;
}

.admin-bar .bb-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .bb-header {
		top: 46px;
	}
}

.bb-header__logo {
	grid-row: 1 / span 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 96px;
	background: var(--bb-orange);
}

.bb-header__logo img {
	width: auto;
	max-height: 48px;
}

.bb-logo-text {
	font-family: var(--bb-font-head);
	font-size: 20px;
	font-weight: 800;
	line-height: 1;
	text-transform: uppercase;
	text-align: center;
}

.bb-header__top {
	display: none;
}

.bb-header__main {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-height: var(--bb-header-h);
	padding-inline: 8px 12px;
	background: #232325;
}

.bb-iconbtn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: none;
	color: #fff;
	cursor: pointer;
}

.bb-iconbtn:hover {
	color: var(--bb-orange);
}

.bb-header__tools {
	display: flex;
	align-items: center;
	margin-left: auto;
}

.bb-cart-count {
	position: absolute;
	top: 2px;
	right: 0;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 9px;
	background: var(--bb-orange);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}

.bb-cart-count[data-count="0"] {
	display: none;
}

/* Search panel */
.bb-search {
	grid-column: 1 / -1;
	padding: 12px var(--bb-gutter);
	background: #2d2d30;
}

.bb-search[hidden] {
	display: none;
}

.bb-search form {
	display: flex;
	max-width: 720px;
	margin-inline: auto;
}

.bb-search input[type="search"] {
	flex: 1;
	min-width: 0;
	padding: 10px 14px;
	border: 0;
	font: inherit;
}

.bb-search button[type="submit"] {
	padding: 0 20px;
	border: 0;
	background: var(--bb-orange);
	color: #fff;
	font-family: var(--bb-font-head);
	text-transform: uppercase;
	cursor: pointer;
}

/* Navigation: mobile drawer by default */
.bb-nav {
	position: fixed;
	inset: 0 auto 0 0;
	z-index: 110;
	width: min(86vw, 360px);
	padding: 16px 0 32px;
	overflow-y: auto;
	background: var(--bb-dark);
	transform: translateX(-100%);
	visibility: hidden;
	transition: transform 0.25s, visibility 0.25s;
}

.bb-nav.is-open {
	transform: none;
	visibility: visible;
}

.bb-nav .menu > li {
	position: relative;
	border-bottom: 1px solid #333;
}

.bb-nav a {
	display: block;
	padding: 14px 20px;
	font-family: var(--bb-font-head);
	font-size: 18px;
	font-weight: 700;
	text-transform: uppercase;
}

.bb-nav a:hover,
.bb-nav .current-menu-item > a {
	color: var(--bb-orange);
}

.bb-nav .sub-menu {
	display: none;
	background: #151516;
}

.bb-nav .is-open > .sub-menu {
	display: block;
}

.bb-nav .sub-menu a {
	padding: 10px 20px 10px 36px;
	font-size: 16px;
	font-weight: 500;
}

.bb-nav .sub-menu .sub-menu a {
	padding-left: 52px;
}

.bb-subtoggle {
	position: absolute;
	top: 0;
	right: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.bb-subtoggle .bb-icon {
	width: 16px;
	height: 16px;
	transition: transform 0.15s;
}

.is-open > .bb-subtoggle .bb-icon {
	transform: rotate(180deg);
}

.bb-scrim {
	position: fixed;
	inset: 0;
	/* Must stay BELOW the header (z-index 100): the mobile menu drawer lives inside the header, so a higher
	   value would cover the drawer and swallow taps on its links. */
	z-index: 99;
	background: rgba(0, 0, 0, 0.6);
}

.bb-scrim[hidden] {
	display: none;
}

body.bb-nav-open {
	overflow: hidden;
}

/* Language switcher */
.bb-lang {
	position: relative;
	font-size: 16px;
}

.bb-lang summary {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	cursor: pointer;
	list-style: none;
	transition: color 0.15s;
}

.bb-lang summary:hover,
.bb-lang[open] summary {
	color: var(--bb-orange);
}

.bb-lang summary::-webkit-details-marker {
	display: none;
}

.bb-lang .bb-icon {
	width: 12px;
	height: 12px;
	transition: transform 0.15s;
}

.bb-lang[open] .bb-icon {
	transform: rotate(180deg);
}

.bb-lang img {
	width: 22px;
	height: auto;
	border-radius: 2px;
}

/* Dropdown: roomy, with the same orange top edge as the other panels */
.bb-lang__list {
	position: absolute;
	top: calc(100% + 4px);
	right: 0;
	z-index: 10;
	min-width: 190px;
	padding: 6px 0;
	background: var(--bb-dark);
	border-top: 3px solid var(--bb-orange);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.bb-lang__list a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 18px;
	font-family: var(--bb-font-head);
	font-size: 18px;
	white-space: nowrap;
	transition: background-color 0.15s, color 0.15s;
}

.bb-lang__list a:hover,
.bb-lang__list a:focus-visible {
	background: #232325;
	color: var(--bb-orange);
}

/* Desktop */
@media (min-width: 1100px) {
	.bb-header__logo {
		width: 290px;
	}

	.bb-header__logo img {
		max-height: 110px;
	}

	.bb-logo-text {
		font-size: 34px;
	}

	.bb-header__top {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 clamp(16px, 4vw, 64px) 0 clamp(16px, 2vw, 32px);
		min-height: 52px;
		background: #121213;
	}

	.bb-header__welcome {
		font-family: var(--bb-font-head);
		font-size: 14px;
		font-weight: 600;
	}

	.bb-header__main {
		min-height: 106px;
		padding-inline: clamp(16px, 2vw, 32px) clamp(16px, 4vw, 64px);
		background: rgba(35, 35, 37, 0.96);
	}
	.bb-header__toggle {
		display: none;
	}

	.bb-nav {
		position: static;
		width: auto;
		padding: 0;
		overflow: visible;
		background: none;
		transform: none;
		visibility: visible;
	}

	.bb-nav .menu {
		display: flex;
		flex-wrap: wrap;
		gap: 0 4px;
	}

	.bb-nav .menu > li {
		border: 0;
	}

	.bb-nav .menu > li > a {
		display: flex;
		align-items: center;
		gap: 8px;
		padding: 12px clamp(8px, 1vw, 16px);
		font-size: clamp(18px, 1.5vw, 24px);
	}

	.bb-nav .menu > .menu-item-has-children > a::after {
		content: "";
		border: 5px solid transparent;
		border-top-color: currentcolor;
		border-bottom: 0;
	}

	.bb-subtoggle {
		display: none;
	}

	.bb-nav .sub-menu {
		position: absolute;
		top: 100%;
		left: 0;
		z-index: 20;
		display: block;
		min-width: 240px;
		padding: 8px 0;
		background: var(--bb-dark);
		border-top: 3px solid var(--bb-orange);
		box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
		opacity: 0;
		visibility: hidden;
		transform: translateY(6px);
		transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
	}

	.bb-nav .menu > li:hover > .sub-menu,
	.bb-nav .menu > li:focus-within > .sub-menu {
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.bb-nav .sub-menu a,
	.bb-nav .sub-menu .sub-menu a {
		padding: 9px 20px;
		font-size: 16px;
	}

	.bb-nav .sub-menu li {
		position: relative;
	}

	.bb-nav .sub-menu .sub-menu {
		top: -11px;
		left: 100%;
	}

	.bb-nav .sub-menu li:hover > .sub-menu,
	.bb-nav .sub-menu li:focus-within > .sub-menu {
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.bb-scrim {
		display: none;
	}
}

/* ---------- Mini cart dropdown (desktop hover) ---------- */
.bb-minicart {
	display: none;
}

@media (hover: hover) and (min-width: 1100px) {
	.bb-header__tools {
		align-self: stretch;
	}

	/* The hover area runs down to the header edge so the pointer never leaves it on the way to the panel. */
	.bb-cartbox {
		position: relative;
		display: flex;
		align-items: center;
		height: 100%;
	}

	.bb-minicart {
		position: absolute;
		top: 100%;
		right: -12px;
		z-index: 40;
		display: block;
		width: 380px;
		max-height: calc(100vh - 220px);
		padding: 20px 22px 22px;
		overflow-y: auto;
		background: #fff;
		color: var(--bb-text);
		border-top: 3px solid var(--bb-orange);
		box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
		opacity: 0;
		visibility: hidden;
		transform: translateY(6px);
		transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
	}

	.bb-cartbox:hover .bb-minicart,
	.bb-cartbox:focus-within .bb-minicart {
		opacity: 1;
		visibility: visible;
		transform: none;
	}
}

.bb-minicart__title {
	margin: 0 0 14px;
	padding-bottom: 12px;
	border-bottom: 1px solid #e4e4e4;
	color: #777;
	font-family: var(--bb-font-head);
	font-size: 17px;
}

.bb-minicart__title span {
	color: var(--bb-orange);
}

.woocommerce-mini-cart {
	display: grid;
	gap: 0;
}

.woocommerce-mini-cart-item {
	display: grid;
	grid-template-columns: 76px minmax(0, 1fr) auto;
	gap: 14px;
	align-items: start;
	padding-block: 14px;
	border-bottom: 1px solid #eee;
}

.bb-minicart__img img {
	display: block;
	width: 76px;
	height: 76px;
	object-fit: contain;
}

.bb-minicart__info {
	display: grid;
	gap: 4px;
	min-width: 0;
}

.bb-minicart__name {
	font-family: var(--bb-font-head);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.2;
}

a.bb-minicart__name:hover {
	color: var(--bb-orange);
}

.woocommerce-mini-cart-item .quantity {
	color: #666;
	font-family: var(--bb-font-head);
	font-size: 16px;
}

.woocommerce-mini-cart-item dl.variation {
	margin: 0;
	font-size: 13px;
	color: #777;
}

.woocommerce-mini-cart-item dl.variation dt,
.woocommerce-mini-cart-item dl.variation dd {
	display: inline;
	margin: 0;
}

.bb-minicart__actions {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.bb-minicart__actions a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	color: #444;
}

.bb-minicart__actions a:hover {
	color: var(--bb-orange);
}

.bb-minicart__actions .bb-icon {
	width: 18px;
	height: 18px;
}

.woocommerce-mini-cart__total {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 14px 0;
	font-family: var(--bb-font-head);
	font-size: 19px;
	text-transform: uppercase;
}

.woocommerce-mini-cart__total .amount {
	font-size: 24px;
	font-weight: 700;
}

.woocommerce-mini-cart__buttons {
	display: grid;
	gap: 10px;
	margin: 0;
}

.woocommerce-mini-cart__buttons .button {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	background: #333;
	color: #fff;
	font-family: var(--bb-font-head);
	font-size: 19px;
	font-weight: 700;
	text-transform: uppercase;
	transition: background-color 0.15s;
}

.woocommerce-mini-cart__buttons .button:hover {
	background: var(--bb-orange);
}

.woocommerce-mini-cart__buttons .checkout {
	background: var(--bb-orange);
}

.woocommerce-mini-cart__buttons .checkout:hover {
	background: var(--bb-orange-dark);
}

.woocommerce-mini-cart__empty-message {
	margin: 0;
	padding: 8px 0;
	color: #666;
	text-align: center;
}

/* ---------- Mini cart: specificity guard ----------
   WooCommerce's legacy stylesheet (still loaded on a few pages such as my account) styles cart lists and
   buttons with rules like ".woocommerce ul.cart_list li img". These scoped rules make the panel look the
   same on every page. */
.bb-minicart .woocommerce-mini-cart-item {
	padding-left: 0;
}

.bb-minicart .bb-minicart__img img {
	float: none;
	display: block;
	width: 76px;
	height: 76px;
	margin: 0;
	box-shadow: none;
	object-fit: contain;
}

.bb-minicart a.remove {
	position: static;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 0;
	background: none;
	color: #444 !important;
	font-size: 0;
	line-height: 1;
}

.bb-minicart a.remove:hover {
	background: none;
	color: var(--bb-orange) !important;
}

.bb-minicart .woocommerce-mini-cart__buttons a.button {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	padding: 0 20px;
	border-radius: 0;
	background: #333;
	color: #fff;
	font-family: var(--bb-font-head);
	font-size: 19px;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
}

.bb-minicart .woocommerce-mini-cart__buttons a.button:hover {
	background: var(--bb-orange);
	color: #fff;
}

.bb-minicart .woocommerce-mini-cart__buttons a.button.checkout {
	background: var(--bb-orange);
}

.bb-minicart .woocommerce-mini-cart__buttons a.button.checkout:hover {
	background: var(--bb-orange-dark);
}

.bb-minicart .woocommerce-mini-cart__total {
	border: 0;
	padding: 0;
}

.bb-minicart .woocommerce-mini-cart__total strong {
	font-weight: 400;
}
