ul.products {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px 20px;
	list-style-type: none;
	padding: 0;
	margin: 0;
}

.related.products ul.products {
	grid-template-columns: repeat( 4, 1fr );
}

@media (max-width: 1100px) {
	.related.products ul.products {
		grid-template-columns: repeat( 2, 1fr );
	}
}

@media (max-width: 768px) {
	.related.products ul.products {
		grid-template-columns: 1fr;
	}
}

.related.products {
	margin: var(--section-spacing) 0;
}

.woocommerce-product-attributes {
	width: auto;
}

.woocommerce-product-attributes th,
.woocommerce-product-attributes td {
	border: 1px solid var(--color-gray);
	padding: 0.5rem;
}

li.product {
	background: var(--color-light-gray);
	padding: 40px 20px 25px;
	border-radius: 20px;
	position: relative;
	display: flex;
	flex-direction: column;

	.onsale {
		position: absolute;
		width: 50px;
		height: 50px;
		top: -8px;
		right: -5px;
		border-radius: 50%;
		background: var(--color-accent);
		font-size: 14px;
		font-weight: 600;
		display: flex;
		align-items: center;
		justify-content: center;
		color: #fff;
	}
}

.woocommerce-loop-product__link {
	color: inherit;
	text-decoration: none;

	&:hover {
		color: inherit;
	}

	img {
		margin: 0 auto 20px;
		display: block;
		text-align: center;
		object-fit: contain;
		aspect-ratio: 3/2;
	}
}

.woocommerce-loop-product__title {
	font-size: 18px;
}

.woocommerce-loop-product-description {
	font-size: 15px;
	line-height: 24px;
	max-height: 48px;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	color: var(--color-dark);
	margin: 1em 0;
}

.onsale {
	display: none;
}

.back-to-supplies-button {
	margin: 0 0 3rem;
	padding: 0 3.5rem;
	border-width: 1px;
	gap: 0.5rem;

	svg {
		translate: -80% 0;
	}
}

.woocommerce .single-product {
	border-top: 1px solid var(--color-gray);
	padding-top: 3rem;

	.woocommerce-product-gallery {
		/* flex: 0 0 50%; */
		flex: 1;
		min-width: 30rem;
	}

	.entry-summary ~ div,
	.entry-summary ~ section {
		flex: 0 0 100%;
	}
}

.woocommerce .single-product .entry-summary {
	flex: 1;
	max-width: 47rem;
	margin-left: auto;
}

.woocommerce .single-product > .product {
	display: flex;
	flex-wrap: wrap;
	gap: 6rem 5rem;
}

.woocommerce-product-details__short-description {
	color: var(--color-mid-gray);
	font-size: 1.6rem;
	margin: 4rem 0 2rem;
}

.single-product .cart {
	display: flex;
	margin: 3rem 0;
	max-width: 40rem;
	gap: 2.5rem;
}

.single-product .cart .button {
	height: 5.3rem;
	font-size: 2.2rem;
	flex: 1;
}

.woosb-wrap {
	margin: 2rem 0;
}

.woosb-products .woosb-product {
	padding: 0.5rem 0;
	font-size: 1.5rem;
}

.woosb-products .woosb-product .woosb-price {
	flex: 0;
	width: auto;
}

.product_meta {
	display: flex;
	font-size: 1.5rem;
	gap: 0.3rem;
	color: #000;
	flex-direction: column;
}

.product_meta > span {
	display: flex;
	gap: 1rem;
}

.product_meta span span {
	color: var(--color-mid-gray);
}

.flex-viewport {
	margin: 1rem 0;
	position: relative;
}

.flex-viewport::before {
	content: '';
	position: absolute;
	bottom: 1px;
	left: 0;
	width: 100%;
	border-top: 1px solid var(--color-gray);
	z-index: 2;
}

.flex-viewport::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	border-top: 3px solid var(--color-accent);
	width: 20rem;
	max-width: 100%;
	z-index: 3;
}

.flex-control-thumbs {
	list-style-type: none;
	margin: 0;
	padding: 0;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 1rem;
}

.flex-control-thumbs img {
	cursor: pointer;
	transition: border-color 0.2s;
	border: 1px solid var(--color-light-gray);
}

.flex-control-thumbs .flex-active {
	border-color: var(--color-accent);
}

.woocommerce-product-gallery__trigger {
	display: none;
}

ul.tabs.wc-tabs {
	display: flex;
	list-style-type: none;
	margin: 0 0 20px;
	padding: 0;
	gap: 30px;
	border-bottom: 1px solid var(--color-gray);

	li {
		margin-bottom: -1px;
	}

	a {
		text-decoration: none;
		padding: 10px 0 30px;
		font-weight: 600;
		display: block;
		font-size: 20px;
	}

	.active {
		border-bottom: 3px solid var(--color-accent);
	}
}

@media (max-width: 768px) {
	ul.tabs.wc-tabs {
		a {
			padding: 1rem 0;
			font-size: 1.7rem;
		}
	}
}

.woocommerce-shop {
	.page-section {
		font-size: 1.7rem;
		line-height: 1.7em;
	}
}

.product-loop__container {
	display: grid;
	grid-template-columns: 265px 1fr;
	gap: 20px;
	margin: 4rem 0 var(--section-spacing);
}

.product-loop__filter {
	border-radius: 20px;
	background: var(--color-light-gray);
	padding: 3rem;
	align-self: flex-start;
	position: sticky;
	top: 130px;
}

.product-loop__filter-title {
	font-size: 2.6rem;
	font-weight: bold;
	margin: 0 0 0.5rem;
	display: flex;
	justify-content: space-between;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.product-loop__filter-title button {
	display: flex;
	gap: 0.7rem;
	align-items: center;
}

.clear-filters {
	font-size: 1.4rem;
	color: var(--color-accent);
	font-weight: normal;
}

.quantity {
	display: flex;
	border-radius: 0.3rem;
	color: var(--color-blue);
}

.quantity:has(input[type="hidden"]) {
	display: none;
}

.quantity input {
	min-width: 2rem;
	max-width: 4rem;
	border-radius: 0;
	flex: 1;
	background: transparent;
	border: 0;
	padding: 0;
	height: 3rem;
	text-align: center;
	-webkit-appearance: none;
	appearance: none;
	-moz-appearance: textfield;
	font-size: 1.5rem;
	color: inherit;

	&::-webkit-inner-spin-button, 
	&::-webkit-outer-spin-button {
		-webkit-appearance: none; 
		margin: 0; 
		display: none;
	}
}

.quantity-btn {
	background: transparent;
	text-align: center;
	width: 3rem;
	line-height: 30px;
	border: 0;
	padding: 0;
	font-size: 15px;
	color: inherit;
}

.woocommerce .single-product .price {
	font-size: 1.9rem;

	ins {
		font-weight: bold;
	}
}

.woocommerce .single-product .quantity {
	background: #EFEFEF;
	color: var(--color-mid-gray);
}

.woocommerce .single-product .quantity input {
	height: 5.3rem;
}

.woocommerce .single-product .quantity-btn {
	width: 3.5rem;
}

.add_to_cart_button{
	transition: opacity 0.2s, background-color 0.2s;

	&.loading {
		opacity: 0.5;
	}

	&.added {
		background: green;
		text-indent: -500px;
		overflow: hidden;

		&::before {
			content: 'Added to cart';
			position: relative;
			display: block;
			white-space: nowrap;
			text-indent: 0;
		}
	}
}

.product-loop__products .added_to_cart {
	display: none;
}

.loop-product-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: auto;
	gap: 10px;

	.button {
		flex: 1;
		padding: 0 10px;
	}

	.quantity {
		margin-right: auto;
	}
}

.shop_table {
	width: 100%;

	.product-thumbnail {
		width: 85px;
		align-self: flex-start;
	}

	.product-quantity,
	.product-price {
		display: none;
	}

	.product-subtotal {
		font-weight: 600;
	}

	.cart_item.woosb-cart-child {
		display: none;
	}
}

.cart-collaterals {
	display: flex;
	justify-content: flex-end;

	.cart_totals {
		max-width: 400px;
		width: 100%;

		& > h2 {
			display: none;
		}
	}

	.checkout-button {
		height: 44px;
		width: 100%;
	}

	.woocommerce-shipping-totals {
		display: none;
	}

	.shop_table {
		margin: 0 0 30px;
		padding: 30px;
		box-shadow: 0px 0px 34px 0px rgba(0, 0, 0, 0.15);
		border-radius: 5px;

		tr{
			th, td {
				padding: 15px 0;
			}
		}

		tr:not(:first-child) {
			th, td {
				border-top: 1px solid var(--color-gray);
			}
		}

		th {
			text-align: left;
			font-weight: normal;
			color: var(--color-dark);
			font-size: 16px;
		}

		td {
			text-align: right;
			font-size: 24px;
			font-weight: 600;
			color: var(--color-dark);
		}
	}
}

.woocommerce-message {
	padding: 1em 2em;
	margin: 0 0 1em;
	background: var(--color-light-gray);
	border-radius: 20px;
	font-size: 16px;
	color: var(--color-blue);
	outline-color: var(--color-accent);
	accent-color: var(--color-accent);
	
	.button {
		margin-left: 1rem;
	}
}

.woocommerce-cart-form {
	margin-top: 2rem;

	thead {
		display: none;
	}
}

[name="update_cart"] {
	display: none;
}

.cart-page-count {
	color: var(--color-dark);
	font-weight: 600;
}

.cart_item {
	display: flex;
	flex-wrap: wrap;
	margin: 0 0 20px;
	padding-bottom: 20px;
	gap: 20px;
	border-bottom: 1px solid var(--color-accent-light);

	.product-remove {
		order: 10;
	}

	.product-name {
		flex: 1;
		align-self: center;

		a {
			font-weight: 600;
			color: inherit;
			text-decoration: none;
		}
	}

	.remove {
		border-radius: 30px;
		padding: 0 10px;
		height: 30px;
		display: block;
		line-height: 30px;
		background: var(--color-gray-darker);
		transition: background-color 0.2s;
		font-weight: 600;
		font-size: 15px;
		color: #fff;
		text-decoration: none;
		
		&:hover {
			background: var(--color-red);
		}
	}
}

@media (max-width: 900px) {
	.shop_table .cart_item {
		display: grid;
		grid-template-columns: 8.5rem auto 1fr;
	}

	.shop_table .product-name {
		grid-column: 2 / 4;
	}

	.shop_table .product-remove {
		grid-row: 2;
		grid-column: 2;
	}

	.shop_table .product-subtotal {
		grid-column: 3;
	}

	.shop_table .product-thumbnail {
		grid-row: span 2;
	}
}

.cart-item__subitem {
	font-size: 0.9em;
	line-height: 2em;
}

/* form.woocommerce-checkout {
	display: flex;
	gap: 30px;
	font-size: 14px;
	color: var(--color-dark);

	h2, h3 {
		font-size: 20px;
		line-height: 1.5em;
		margin: 0 0 0.8em;
	}
} */

#customer_details {
	flex: 1;
}

.checkout__order-info {
	flex: 1 0 380px;
}

.woocommerce-billing-fields__field-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
}

.form-row {
	flex: 1;
	margin: 0;

	label {
		display: block;
	}

	input[type="text"],
	input[type="email"],
	input[type="phone"],
	input[type="password"] {
		border-radius: 30px;
		background: var(--color-light-gray);
		border: 0;
		padding: 0 15px;
		width: 100%;
		height: 40px;
	}
}

.form-row-wide {
	flex: 0 0 100%;
}

#billing_country_field {
	display: none;
}

.required {
	color: var(--color-red);
}

#payment {
	background: var(--color-light-gray);
	border-radius: 5px;
	margin-top: 30px;
}

.wc_payment_methods {
	padding: 15px 30px 0;
	margin: 0 0 1.5em;
}

.form-row.place-order {
	border-top: 1px solid var(--color-gray);
	color: var(--color-gray-darker);
	font-size: 13px;
	padding: 15px;
	text-align: center;
}

.woocommerce-terms-and-conditions-wrapper {
	line-height: 1.5em;
	max-width: 640px;
	margin: 0 auto 1em;

	.validate-required {
		margin-top: 1em;
		font-size: 14px;
		color: var(--color-dark);
	}
}

.wc_payment_method > label {
	font-weight: 600;
	font-size: 20px;
	line-height: 1.5em;
	display: block;
	margin: 0 0 1em;
}

body .wc-stripe_cc-container .StripeElement:not(.payment-type) {
	border-radius: 50px;
}

#place_order {
	height: 44px;
	width: 100%;
}

.form-row-third {
	width: 32%;
}

.wc-empty-cart-message {
	margin-bottom: 1.5em;
}

@media (max-width: 900px) {
	.product-loop__container {
		display: flex;
		flex-direction: column;
	}

	.product-loop__filter {
		position: relative;
		top: auto;
		width: 100%;
	}

	ul.products {
		gap: 20px;
		grid-template-columns: repeat(auto-fill, minmax(30rem, 1fr));
	}
}

.product-list__filter {
	list-style-type: none;
}

.product-list__filter-title {
	list-style-type: none;
	padding: 1rem 0;

	[open] > & {
		pointer-events: none;
	}
}

@media (max-width: 900px) {
	[open] .product-list__filter-title {
		pointer-events: all;
	}

	.product-loop__filter {
		padding: 2.5rem 2rem 1.5rem;
	}

	.product-list__filter-title {
		display: flex;
		gap: 1rem;
		align-items: center;
		font-weight: normal;
	}

	.product-list__filter-title::after {
		content: '';
		width: 0.7rem;
		height: 0.7rem;
		border: 1px solid currentColor;
		border-width: 0 1px 1px 0;
		rotate: 225deg;
		translate: 0 3px;
	}

	[open] .product-list__filter-title::after {
		rotate: 45deg;
		translate: 0 -1px;
	}

	.product-loop__filter-title {
		font-size: 1.7rem;
	}
}

.page-section--loading .product-loop__container {
	opacity: 0.7;
	pointer-events: none;
}

.product-list__filter ul {
	list-style-type: none;
	padding: 0;
	margin: 0;
	display: block;
	line-height: 1.4em;
}

.product-list__filter li {
	position: relative;
}

.product-list__filter li label {
	display: flex;
	align-items: center;
	padding: 0.5rem 0;
	gap: 0.4em;
	font-size: 1.5rem;
	letter-spacing: -0.03em;
	cursor: pointer;
}

.product-list__filter li label::before {
	content: '';
	width: 1.5rem;
	flex-shrink: 0;
	height: 1.5rem;
	border-radius: 0.4rem;
	display: block;
	border: 2px solid currentColor;
}

.product-list__filter input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
}

.product-list__filter input:focus-visible + label {
	outline: 2px solid var(--color-accent);
	outline-offset: 2px;
}

.product-list__filter :checked + label::after {
	content: '';
	position: absolute;
	top: 48%;
	left: 5px;
	width: 5px;
	height: 7px;
	border-width: 0 2px 2px 0;
	border-style: solid;
	rotate: 45deg;
	translate: 0 -50%;
}

.product-list__filter :checked + label {
	color: var(--color-accent);
}