/*
 * Wholesale refinement layer.
 * Loaded after Astra and the legacy alignment stylesheet.
 */

:root {
	--bbsw-orange: #ff5a1f;
	--bbsw-orange-dark: #d9470f;
	--bbsw-orange-soft: #fff3ed;
}

/* Calls to action */
.bbsw-home-actions .button,
.bbsw-buy-now,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .single_add_to_cart_button {
	border-color: var(--bbsw-orange) !important;
	background: var(--bbsw-orange) !important;
	color: #fff !important;
	box-shadow: none !important;
}

.bbsw-home-actions .button:hover,
.bbsw-buy-now:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce .single_add_to_cart_button:hover {
	border-color: var(--bbsw-orange-dark) !important;
	background: var(--bbsw-orange-dark) !important;
	color: #fff !important;
}

.bbsw-home-actions .button-outline {
	border-color: var(--bbsw-orange) !important;
	background: #fff !important;
	color: var(--bbsw-orange) !important;
}

.bbsw-home-actions .button-outline:hover {
	background: var(--bbsw-orange-soft) !important;
	color: var(--bbsw-orange-dark) !important;
}

.woocommerce nav.woocommerce-pagination ul li span.current {
	border-color: var(--bbsw-orange);
	background: var(--bbsw-orange);
	color: #fff;
}

/* Product archives */
.tax-product_cat #primary,
.woocommerce-shop #primary {
	padding-top: 28px;
	padding-bottom: 55px;
}

.woocommerce-products-header__title.page-title,
.woocommerce h1.page-title {
	margin: 0 0 30px;
	font-size: clamp(28px, 3vw, 38px);
	line-height: 1.2;
}

.bbsw-shop-layout {
	display: grid;
	grid-template-columns: 238px minmax(0, 1fr);
	clear: both;
	gap: 34px;
	align-items: start;
}

.bbsw-shop-filters {
	position: sticky;
	top: 20px;
	min-width: 0;
	border-top: 3px solid var(--bbsw-orange);
	background: #fff;
}

.bbsw-shop-filters__heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 0 13px;
	border-bottom: 1px solid var(--bbsw-line);
}

.bbsw-shop-filters__heading h2 {
	margin: 0;
	font-size: 18px;
	line-height: 1.2;
}

.bbsw-shop-filters__heading a {
	color: var(--bbsw-orange);
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
	text-transform: uppercase;
}

.bbsw-filter-group {
	margin: 0;
	border-bottom: 1px solid var(--bbsw-line);
}

.bbsw-filter-title {
	position: relative;
	padding: 14px 25px 14px 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	cursor: pointer;
	list-style: none;
}

.bbsw-filter-title::-webkit-details-marker {
	display: none;
}

.bbsw-filter-title::after {
	position: absolute;
	top: 50%;
	right: 3px;
	width: 8px;
	height: 8px;
	border-right: 2px solid #666;
	border-bottom: 2px solid #666;
	transform: translateY(-70%) rotate(45deg);
	transition: transform .2s ease;
	content: "";
}

.bbsw-filter-group[open] .bbsw-filter-title::after {
	transform: translateY(-25%) rotate(225deg);
}

.bbsw-filter-options {
	max-height: 290px;
	padding: 0 0 13px;
	overflow: auto;
	scrollbar-width: thin;
}

.bbsw-filter-options ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.bbsw-filter-options li {
	display: flex;
	align-items: center;
	margin: 0 0 7px;
	color: #555;
	font-size: 13px;
	line-height: 1.3;
}

.bbsw-filter-options li a {
	position: relative;
	flex: 1;
	padding-left: 25px;
	color: inherit;
	text-decoration: none;
}

.bbsw-filter-options li a::before {
	position: absolute;
	top: 50%;
	left: 0;
	width: 16px;
	height: 16px;
	border: 1px solid #aaa;
	border-radius: 2px;
	background: #fff;
	transform: translateY(-50%);
	content: "";
}

.bbsw-filter-options li.chosen a::before,
.bbsw-filter-options li.woocommerce-widget-layered-nav-list__item--chosen a::before {
	border-color: var(--bbsw-orange);
	background: var(--bbsw-orange);
	box-shadow: inset 0 0 0 3px #fff;
}

.bbsw-filter-options .count {
	margin-left: 5px;
	color: #999;
	font-size: 12px;
}

.bbsw-shop-main {
	min-width: 0;
}

.bbsw-shop-main .woocommerce-result-count,
.bbsw-shop-main .woocommerce-ordering {
	margin-bottom: 25px;
}

.woocommerce .bbsw-shop-main ul.products {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 34px 18px;
}

.woocommerce-page ul.products li.product .astra-shop-summary-wrap {
	text-align: center;
}

.woocommerce ul.products li.product .ast-woo-product-category {
	display: none !important;
}

.woocommerce ul.products li.product a img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: contain;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	min-height: 42px;
	margin-top: 2px;
}

.woocommerce ul.products li.product .button {
	min-width: 112px;
}

/* Single product */
.single-product #primary {
	padding-top: 34px;
	padding-bottom: 58px;
}

.single-product div.product {
	padding-bottom: 0;
}

.single-product div.product .woocommerce-product-gallery,
.single-product div.product .summary {
	width: calc(50% - 22px);
}

.single-product div.product .woocommerce-product-gallery {
	padding-right: 0;
}

.single-product div.product .summary {
	display: flex;
	flex-direction: column;
	padding-left: 0;
}

.single-product div.product .summary > .woocommerce-breadcrumb {
	order: 1;
	margin: 0 0 25px;
}

.woocommerce-js.single-product div.product div.summary .single-product-category {
	display: none !important;
}

.single-product div.product .summary .product_title {
	order: 2;
	margin-bottom: 14px;
	font-size: clamp(24px, 2.2vw, 32px);
}

.single-product div.product .summary .woocommerce-product-details__short-description {
	order: 3;
	margin-bottom: 22px;
	line-height: 1.65;
}

.single-product div.product .summary .price {
	order: 4;
	margin: 4px 0 18px;
	font-size: 24px;
	line-height: 1.25;
}

.single-product div.product .summary form.cart,
.single-product div.product .summary form.variations_form {
	order: 5;
	margin: 4px 0 22px;
}

.single-product div.product .summary .product_meta {
	display: none !important;
	order: 6;
}

.single-product div.product .summary .bbsw-product-trust {
	order: 7;
}

.single-product .bbs-login-to-view-prices {
	display: inline-block;
	color: var(--bbsw-text);
	font-size: 24px;
	font-weight: 700;
	text-decoration: none;
}

.single-product .bbs-login-to-view-prices:hover {
	color: var(--bbsw-orange);
}

.single-product div.product .woocommerce-product-gallery__image img {
	width: 100%;
	max-height: 650px;
	object-fit: contain;
}

.single-product div.product table.variations {
	margin-bottom: 12px;
}

.single-product div.product table.variations th,
.single-product div.product table.variations td {
	display: block;
	width: 100%;
	padding: 0;
	text-align: left;
}

.single-product div.product table.variations th {
	margin-bottom: 9px;
}

.single-product div.product table.variations td {
	position: relative;
}

.bbsw-native-variation-select {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
	opacity: 0 !important;
}

.bbsw-variation-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	margin-bottom: 10px;
}

.bbsw-variation-button {
	min-width: 82px;
	padding: 10px 14px;
	border: 1px solid #cfcfcf;
	border-radius: 3px;
	background: #fff;
	color: var(--bbsw-text);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}

.bbsw-variation-button:hover,
.bbsw-variation-button:focus-visible {
	border-color: var(--bbsw-orange);
	background: var(--bbsw-orange);
	color: #fff !important;
	outline: none;
}

.bbsw-variation-button.is-selected {
	border-color: var(--bbsw-orange);
	background: var(--bbsw-orange);
	color: #fff;
}

.bbsw-variation-button:disabled {
	border-color: #e2e2e2;
	background: #f5f5f5;
	color: #aaa;
	cursor: not-allowed;
}

.woocommerce-checkout .woocommerce-terms-and-conditions-link,
.woocommerce-checkout .woocommerce-terms-and-conditions-checkbox-text a {
	color: var(--bbsw-orange) !important;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.woocommerce-checkout .woocommerce-terms-and-conditions-link:hover,
.woocommerce-checkout .woocommerce-terms-and-conditions-link:focus-visible,
.woocommerce-checkout .woocommerce-terms-and-conditions-checkbox-text a:hover,
.woocommerce-checkout .woocommerce-terms-and-conditions-checkbox-text a:focus-visible {
	color: var(--bbsw-orange-dark) !important;
}

.single-product .reset_variations {
	display: inline-block;
	margin: 2px 0 0;
	color: #777;
	font-size: 12px;
	text-transform: uppercase;
}

.single-product .quantity .qty {
	min-width: 74px;
	border-color: #d3d3d3;
}

.bbsw-product-trust {
	margin-top: 18px;
	padding-top: 18px;
}

.bbsw-product-trust li {
	margin: 8px 0;
	font-size: 15px;
}

.bbsw-payment-methods {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 9px;
	min-height: 38px;
}

.bbsw-payment-methods img {
	display: block;
	width: 35px;
	height: 35px;
	object-fit: contain;
	filter: grayscale(1);
	opacity: .78;
}

.single-product div.product .woocommerce-tabs {
	padding-top: 28px;
}

.woocommerce div.product .woocommerce-tabs .panel {
	max-height: none;
	overflow: visible;
}

.single-product .related.products {
	padding-top: 42px;
}

@media (max-width: 980px) {
	.bbsw-shop-layout {
		grid-template-columns: 205px minmax(0, 1fr);
		gap: 24px;
	}

	.woocommerce .bbsw-shop-main ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.bbsw-description-content {
	position: relative;
	transition: max-height .25s ease;
}

.bbsw-description-content.is-collapsed {
	max-height: 350px;
	overflow: hidden;
}

.bbsw-description-content.is-collapsed::after {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 110px;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 88%);
	pointer-events: none;
	content: "";
}

.bbsw-description-toggle {
	display: block;
	min-width: 132px;
	margin: 22px auto 0;
	padding: 11px 22px;
	border: 1px solid var(--bbsw-orange);
	border-radius: 3px;
	background: var(--bbsw-orange);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

.bbsw-description-toggle:hover,
.bbsw-description-toggle:focus-visible {
	border-color: var(--bbsw-orange-dark);
	background: var(--bbsw-orange-dark);
	outline: none;
}

@media (max-width: 720px) {
	.tax-product_cat #primary,
	.woocommerce-shop #primary,
	.single-product #primary {
		padding-top: 24px;
		padding-bottom: 42px;
	}

	.bbsw-shop-layout {
		display: block;
	}

	.bbsw-shop-filters {
		position: static;
		margin-bottom: 30px;
	}

	.bbsw-filter-options {
		max-height: 230px;
	}

	.woocommerce .bbsw-shop-main ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 26px 14px;
	}

	.single-product div.product .woocommerce-product-gallery,
	.single-product div.product .summary {
		float: none;
		width: 100%;
		padding-right: 0;
		padding-left: 0;
	}

	.single-product div.product .woocommerce-product-gallery {
		margin-bottom: 28px;
	}

	.single-product div.product .summary > .woocommerce-breadcrumb {
		margin-bottom: 18px;
	}

	.single-product div.product .summary .product_title {
		font-size: 26px;
	}

	.bbsw-variation-button {
		flex: 1 1 calc(33.333% - 9px);
		min-width: 74px;
	}

	.woocommerce div.product .woocommerce-tabs ul.tabs li a {
		padding-right: 12px;
		padding-left: 12px;
	}
}
