/* Single product */

.woocommerce div.product form.cart .variations {
	margin-bottom: var(--wp--preset--spacing--40);
}

.woocommerce div.product form.cart .variations label {
	font-weight: 400;
}

.variations_form .variations .label,
.variations_form .variations .value,
.variations_form .variations tbody,
.variations_form .variations tr {
	display: block;
}

.woocommerce div.product form.cart table.variations td select {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
	margin: 0;
	min-width: unset;
	width: 100%;
}

.woocommerce div.product .wc-block-components-quantity-selector:after {
	border-left: none;
	border-radius: 0;
	border-right: none;
	border-top: none;
	opacity: 1;
}

.woocommerce div.product form.cart::after {
	grid-column: 1 / -1;
}

.woocommerce div.product form.cart div.quantity {
	margin-right: var(--wp--preset--spacing--50) !important;
}

.variations_form .woocommerce-variation-price {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-large);
	margin-bottom: var(--wp--preset--spacing--40);
}

.wp-block-woocommerce-add-to-cart-form .variations_button > .single_add_to_cart_button,
.wp-block-woocommerce-add-to-cart-form form.cart > .single_add_to_cart_button {
	display: block;
	grid-column: 2 / -1;
	width: 100%;
}

.wp-block-woocommerce-product-image-gallery .onsale {
	display: none;
}

.woocommerce div.product .wp-block-woocommerce-product-image-gallery {
	max-width: 100%;
}

.woocommerce div.product div.images .woocommerce-product-gallery__trigger {
	z-index: 90;
}

.woocommerce div.product .wp-block-woocommerce-product-image-gallery .woocommerce-product-gallery--with-images .flex-viewport .woocommerce-product-gallery__image {
	aspect-ratio: 1 / 1;
	background-color: var(--wp--preset--color--lavendar-200);
	box-sizing: border-box;
	padding: var(--wp--preset--spacing--30);
}

.woocommerce div.product .wp-block-woocommerce-product-image-gallery .woocommerce-product-gallery--with-images .flex-viewport .woocommerce-product-gallery__image a {
	height: 100%;
}

.woocommerce div.product .wp-block-woocommerce-product-image-gallery .woocommerce-product-gallery--with-images .flex-viewport .woocommerce-product-gallery__image img {
	height: 100%;
	object-fit: contain;
	object-position: center;
}

.woocommerce div.product .wp-block-woocommerce-product-image-gallery .woocommerce-product-gallery--with-images .flex-control-thumbs li {
	background-color: var(--wp--preset--color--lavendar-200);
}

@media screen and (max-width: 767px) {
	.woocommerce div.product .wp-block-woocommerce-product-image-gallery .woocommerce-product-gallery--with-images .flex-viewport {
		margin-bottom: var(--wp--preset--spacing--30);
	}

	.woocommerce div.product .wp-block-woocommerce-product-image-gallery .woocommerce-product-gallery--with-images .flex-control-thumbs li {
		margin-right: var(--wp--preset--spacing--30);
	}
}

@media screen and (min-width: 768px) {
	.woocommerce div.product .wp-block-woocommerce-product-image-gallery .woocommerce-product-gallery--with-images {
		display: flex;
		gap: var(--wp--preset--spacing--30);
	}

	.woocommerce div.product .wp-block-woocommerce-product-image-gallery .woocommerce-product-gallery--with-images .flex-control-thumbs {
		display: flex;
		flex-basis: 80px;
		flex-direction: column;
		flex-shrink: 0;
		gap: var(--wp--preset--spacing--30);
		order: 1;
	}

	.woocommerce div.product .wp-block-woocommerce-product-image-gallery .woocommerce-product-gallery--with-images .flex-viewport {
		order: 2;
	}

	.woocommerce div.product .wp-block-woocommerce-product-image-gallery .woocommerce-product-gallery--with-images .flex-control-thumbs li {
		float: none;
		width: unset;
	}
}

/* Fix product collection block grid styles */

.wp-block-woocommerce-product-collection .wp-block-woocommerce-product-template {
	gap: var(--wp--preset--spacing--70);
}

.wp-block-woocommerce-product-collection .wp-block-woocommerce-product-template.columns-3 {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
}

.wp-block-woocommerce-product-collection .wp-block-woocommerce-product-template.columns-4 {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
}

.wp-block-woocommerce-product-collection .wp-block-woocommerce-product-template.columns-3 > li.product,
.wp-block-woocommerce-product-collection .wp-block-woocommerce-product-template.columns-4 > li.product {
	width: unset;
}

@media screen and (max-width: 1079px) {
	.wp-block-woocommerce-product-collection .wp-block-woocommerce-product-template.columns-4 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (max-width: 767px) {
	.wp-block-woocommerce-product-collection .wp-block-woocommerce-product-template.columns-3 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (max-width: 599px) {
	.wp-block-woocommerce-product-collection .wp-block-woocommerce-product-template.columns-4,
	.wp-block-woocommerce-product-collection .wp-block-woocommerce-product-template.columns-3 {
		grid-template-columns: 1fr;
	}
}

.single-product .wp-block-woocommerce-product-collection .wp-block-woocommerce-product-template .wp-block-woocommerce-product-image img {
	object-position: left;
}

.wc-block-store-notices .woocommerce-notices-wrapper {
	position: relative;
}

.wc-block-store-notices .wc-block-components-notice-banner {
	border-radius: 0;
	margin-left: auto;
	margin-right: 0;
	max-height: 100vh;
	max-width: 20rem;
	overflow: hidden;
	position: relative;
	right: 0;
	transition:
		right 0.5s ease,
		opacity 0.5s ease,
		visibility 0.5s ease,
		max-height 0.5s ease 0.5s;
	z-index: 99;
}

.wc-block-store-notices .wc-block-components-notice-banner .wc-block-components-notice-banner__content {
	align-items: flex-start;
	display: flex;
	gap: var(--wp--preset--spacing--20);
	justify-content: space-between;
}

.wc-block-store-notices .wc-block-components-notice-banner .wc-notice-dismiss {
	background-color: transparent;
	border: none;
	cursor: pointer;
	font-size: inherit;
	order: 2;
	padding: 0.5rem;
	transition: all 0.3s ease;
	transition-property: background-color, opacity, color;
}

.wc-block-store-notices .wc-block-components-notice-banner .wc-notice-dismiss:hover {
	color: var(--wp--preset--color--primary);
	opacity: 0.7;
}

.wc-block-store-notices .wc-block-components-notice-banner .wc-notice-dismiss:active,
.wc-block-store-notices .wc-block-components-notice-banner .wc-notice-dismiss:focus {
	background-color: var(--wp--preset--color--lavendar-100);
	opacity: 1;
}

.wc-block-store-notices .wc-block-components-notice-banner .wc-notice-content {
	align-items: flex-start;
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--40);
	order: 1;
}

.wc-block-store-notices .wc-block-components-notice-banner .wc-notice-dismiss::before {
	background-color: currentColor;
	content: "";
	display: block;
	height: 1.5em;
	mask-image: url(../icon/close.svg);
	mask-position: center;
	mask-repeat: no-repeat;
	mask-size: contain;
	width: 1.5em;
}

.wc-block-store-notices .wc-block-components-notice-banner.animate-hide-toast {
	max-height: 0px;
	opacity: 0;
	padding: 0;
	right: calc(var(--wp--style--root--padding-right) * -1);
	visibility: hidden;
}

.wc-block-store-notices .wc-block-components-notice-banner.is-success {
	background-color: var(--wp--preset--color--lavendar-900);
	border-color: var(--wp--preset--color--lavendar-900);
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.wc-block-store-notices .wc-block-components-notice-banner.is-success > svg {
	display: none;
}

.wc-block-store-notices .wc-block-components-notice-banner > .wc-block-components-notice-banner__content .wc-forward {
	background-color: var(--wp--preset--color--primary) !important;
	color: var(--wp--preset--color--base) !important;
	float: none;
	font-size: 0.75em;
	opacity: 1;
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--40) !important;
	text-decoration: none;
	transition:
		background-color 0.3s ease,
		color 0.3s ease;
}

.wc-block-store-notices .wc-block-components-notice-banner > .wc-block-components-notice-banner__content .wc-forward:hover {
	background-color: var(--wp--preset--color--lavendar-100) !important;
	color: var(--wp--preset--color--primary) !important;
}

/* Product Archive -- Filters */

.wc-block-product-categories__dropdown select {
	appearance: none;
	background-color: transparent;
	background-image: url(../icon/chevron-down.svg);
	background-position: calc(100% - 0.75rem) center;
	background-repeat: no-repeat;
	background-size: 1.5em;
	border: 1px solid var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
	padding: 0.75rem 2.5rem 0.75rem 0.75rem;
}

.wc-block-product-categories__button {
	background-color: var(--wp--preset--color--iris-100);
	border: none;
	border-radius: 0;
	color: var(--wp--preset--color--base);
}

.wc-block-product-categories__button:hover,
.wc-block-product-categories__button:active {
	background-color: var(--wp--preset--color--lavendar-100);
	color: var(--wp--preset--color--primary);
}

.woocommerce-ordering select {
	appearance: none;
	background-color: transparent;
	background-image: url(../icon/chevron-down.svg);
	background-position: right;
	background-repeat: no-repeat;
	background-size: 1.5em;
	border: none;
	color: var(--wp--preset--color--primary);
	padding: 0.5em;
}

.wc-block-components-product-button > .wc-block-components-product-button__button.has-lavendar-100-background-color:hover,
.wc-block-components-product-button > .wc-block-components-product-button__button.has-lavendar-100-background-color:focus {
	background-color: var(--wp--preset--color--primary) !important;
	color: var(--wp--preset--color--base) !important;
}

.wc-block-components-product-button > .wc-block-components-product-button__button.has-lavendar-100-background-color:active {
	background-color: var(--wp--preset--color--lavendar-500) !important;
}

/* Mini Cart */

:root {
	--drawer-width: 560px;
}

.wc-block-components-drawer__screen-overlay {
	backdrop-filter: blur(1px);
	background-color: rgba(0, 0, 0, 0.3);
}

.wc-block-mini-cart__items {
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
	scrollbar-color: var(--wp--preset--color--lavendar-500) transparent;
	scrollbar-width: thin;
}

.wc-block-mini-cart__button::after {
	content: "Cart";
	margin-left: 2px;
}

.wc-block-components-button.wc-block-components-drawer__close {
	color: var(--wp--preset--color--contrast) !important;
	right: var(--wp--preset--spacing--50);
	top: var(--wp--preset--spacing--40);
}

.wc-block-components-button.wc-block-components-drawer__close > svg {
	display: none;
}

.wc-block-components-button.wc-block-components-drawer__close::after {
	background-color: currentColor;
	content: "";
	display: block;
	height: 1.5rem;
	mask-image: url(../icon/close.svg);
	mask-position: center;
	mask-repeat: no-repeat;
	mask-size: contain;
	width: 1.5rem;
}

h2.wc-block-mini-cart__title {
	border-bottom: 1px solid var(--wp--preset--color--lavendar-900);
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	margin: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50) 0 var(--wp--preset--spacing--50);
	mask-image: unset;
	padding-bottom: var(--wp--preset--spacing--30);
}

.wc-block-mini-cart__products-table .wc-block-mini-cart-items .wc-block-cart-items__row {
	border-bottom: 1px solid var(--wp--preset--color--lavendar-200);
	grid-template-columns: 1fr 1fr !important;
	padding-bottom: var(--wp--preset--spacing--50) !important;
	padding-top: var(--wp--preset--spacing--40) !important;
}

.wc-block-mini-cart__products-table .wc-block-mini-cart-items .wc-block-cart-items__row .wc-block-cart-item__wrap {
	display: flex;
	flex-direction: column;
}

.wc-block-mini-cart__products-table .wc-block-mini-cart-items .wc-block-cart-items__row .wc-block-components-product-name {
	margin: 0;
	order: 1;
}

.wc-block-mini-cart__products-table .wc-block-mini-cart-items .wc-block-cart-items__row .wc-block-components-product-metadata {
	font-size: var(--wp--preset--font-size--tiny);
	order: 2;
}

.wc-block-mini-cart__products-table .wc-block-mini-cart-items .wc-block-cart-items__row .wc-block-cart-item__prices {
	order: 3;
}

.wc-block-mini-cart__products-table .wc-block-mini-cart-items .wc-block-cart-items__row .wc-block-cart-item__image {
	padding-right: var(--wp--preset--spacing--40) !important;
}

.wc-block-mini-cart__products-table .wc-block-mini-cart-items .wc-block-cart-items__row .wc-block-cart-item__total,
.wc-block-mini-cart__products-table .wc-block-mini-cart-items .wc-block-cart-items__row .wc-block-components-product-badge {
	display: none;
}

.wc-block-mini-cart__products-table .wc-block-mini-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity {
	align-items: center;
	align-self: unset !important;
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--30);
	justify-content: space-between;
	order: 4;
	padding: 0;
}

.wc-block-mini-cart__products-table .wc-block-mini-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-components-quantity-selector {
	font-size: var(--wp--preset--font-size--tiny);
	margin: 0;
}

.wc-block-mini-cart__footer {
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
}

.wc-block-mini-cart__footer:after {
	border-color: var(--wp--preset--color--lavendar-900);
	left: var(--wp--preset--spacing--50);
	opacity: 1;
	right: var(--wp--preset--spacing--50);
}

.wc-block-mini-cart__footer .wc-block-mini-cart__footer-actions {
	flex-direction: column;
}

.wc-block-mini-cart__footer .wc-block-components-totals-item.wc-block-mini-cart__footer-subtotal {
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--medium);
	margin-bottom: var(--wp--preset--spacing--40);
}

.wp-block-woocommerce-mini-cart-checkout-button-block {
	gap: 0.5em;
}

.wp-block-woocommerce-mini-cart-checkout-button-block::after {
	background-color: currentColor;
	content: "";
	height: 1.5em;
	mask-image: url(../icon/arrow-long-right.svg);
	mask-position: center;
	mask-repeat: no-repeat;
	mask-size: contain;
	width: 1.5em;
}

/* General Mini-Cart & Cart */

table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name {
	text-decoration: none;
}

table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__prices {
	font-size: var(--wp--preset--font-size--tiny);
	font-weight: 700;
}

table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link {
	align-items: center;
	color: var(--wp--preset--color--neutral);
	display: inline-flex;
	gap: 0.5em;
	text-decoration: none;
}

table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link::before {
	background-color: currentColor;
	content: "";
	display: block;
	height: 1em;
	mask-image: url(../icon/bin.svg);
	mask-position: center;
	mask-repeat: no-repeat;
	mask-size: contain;
	width: 1em;
}

table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-components-quantity-selector:after {
	border-color: var(--wp--preset--color--lavendar-900);
	border-radius: 0;
	opacity: 1;
}

table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-image {
	width: 150px;
}

/* Checkout page */

.woocommerce-account .wp-block-post-title,
.woocommerce-account main .woocommerce,
.woocommerce-cart .wp-block-post-title,
.woocommerce-cart main .woocommerce,
.woocommerce-checkout .wp-block-post-title,
.woocommerce-checkout main .woocommerce {
	max-width: var(--wp--style--global--content-size);
}

.wp-block-woocommerce-checkout-order-summary-block,
.wc-block-components-totals-wrapper,
.wp-block-woocommerce-checkout-order-summary-totals-block,
.wc-block-components-order-summary .wc-block-components-order-summary-item__quantity,
.wc-block-checkout__terms.wc-block-checkout__terms--with-separator {
	border-color: var(--wp--preset--color--lavendar-900);
}

/* Checkout form fields */

.wc-block-components-form .wc-block-components-text-input input,
.wc-block-components-form .wc-blocks-components-select__container select,
.wc-block-components-textarea,
.wc-block-components-text-input input {
	border: 1px solid var(--wp--preset--color--iris-700) !important;
	color: var(--wp--preset--color--primary) !important;

	&::placeholder {
		color: var(--wp--preset--color--primary) !important;
		opacity: 0.7;
	}
}

.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"] {
	border-color: var(--wp--preset--color--iris-700);
}

.wc-block-components-form .wc-block-components-text-input input,
.wc-block-components-form .wc-blocks-components-select__container select {
	border-left: 0 !important;
	border-radius: 0 !important;
	border-right: 0 !important;
	border-top: 0 !important;
}

.wc-block-components-form .wc-block-components-text-input.has-error input,
.wc-block-components-form .wc-block-components-text-input.has-error input:active,
.wc-block-components-form .wc-block-components-text-input.has-error input:focus,
.wc-block-components-form .wc-block-components-text-input.has-error input:hover {
	border-color: #aa0f0f !important;
}

.wc-block-components-form .wc-block-components-text-input label,
.wc-block-components-text-input label {
	color: var(--wp--preset--color--primary);
}

.wc-blocks-components-select .wc-blocks-components-select__label {
	color: var(--wp--preset--color--contrast);
}
