/******************************************************************
Site Name:
Author:

Stylesheet: Responsive WooCommerce Styles - Blocks

Last reviewed with plugin Version 4.8.0.

******************************************************************/

@use "sass:math";

//
// IMPORT THEME UTILITIES
//

@import "../../utilities/functions";
@import "../../utilities/variables";
@import "../../utilities/mixins";

//
// IMPORT WOO UTILITIES
//

@import "utilities/variables";
@import "utilities/mixins";

.wc-block-grid.has-3-columns:not(.alignwide):not(.alignfull) {
	font-size: 100%;
}

.wc-block-grid__products {
	margin-right: math.div($grid-gutter-width, -2);
	margin-left: math.div($grid-gutter-width, -2);
}

.wc-block-grid__product {
	text-align: left;
	border-width: math.div($grid-gutter-width, 2);
	margin-bottom: 2.992em;
}

.wp-block-button__link {
	cursor: pointer;
	position: relative;
	text-decoration: none;
	overflow: visible;
	left: auto;
	color: $secondarytext;
	background-color: $secondary;
	border: 0;
	background-image: none;
	box-shadow: none;
	text-shadow: none;
	text-transform: none;
	border-radius: 0;

	&:hover,
	&:focus {
		background-color: darken($secondary, 5%);
		text-decoration: none;
		background-image: none;
		color: $secondarytext;
	}

	&:active,
	&:visited {
		color: $secondarytext;
	}
}

.wc-block-grid__product-add-to-cart {
	&.wp-block-button {
		.wp-block-button__link {
			padding: 0.618em 1em;
			font-weight: 700;
			display: inline-block;
			font-size: 100%;
			margin: 0;
			line-height: 1;
		}
	}
}

.wc-block-grid__product-onsale {
	text-transform: uppercase;
	padding: 0.5em;
	font-size: 1em;
	font-weight: bold;
	position: absolute;
	text-align: center;
	top: 0;
	left: 0;
	margin: 0;
	background-color: $highlight;
	color: $highlightext;
	font-size: 0.857em;
	z-index: 9;

	// overrides
	border-radius: 0;
	border: 0;
}

.wc-block-grid__product-link {
	&:hover,
	&:focus {
		text-decoration: none;
	}
}

.wc-block-grid__product .wc-block-grid__product-image,
.wc-block-grid__product .wc-block-grid__product-price {
	margin-bottom: 0.5em;
}

.wc-block-grid__product .wc-block-grid__product-title,
.wc-block-grid__product .wc-block-grid__product-add-to-cart {
	margin-bottom: 0;
}

.wc-block-grid__product .wc-block-grid__product-add-to-cart {
	margin-top: 1em;
}

.wc-block-grid__product-title {
	color: $color__body-text;
	font-size: 1.125em;
	font-weight: 500;
	padding: 0.5em 0;
	margin: 0;
}

.wc-block-grid__product-price {
	color: $highlight;
	margin: 0;

	ins {
		background: inherit;
		font-weight: bold;
		display: inline-block;
		text-decoration: none;
	}

	del {
		display: inline-block;
	}
}

.wc-block-grid__product-rating {
	.star-rating {
		font-size: 0.857em;
		margin-left: 0;

		span:before {
			color: $star;
		}
	}
}
