/**
 * WooCommerce Block Grid
 * - Used by:
 *   .wp-block-product-new
 *   .wp-block-product-best-sellers
 *   .wp-block-product-on-sale
 *   .wp-block-product-top-rated
 *   .wp-block-product-categroy
 *   .wp-block-products-by-attribute
 */

#content .wc-block-grid {

	.wc-block-grid__product,
	.wc-block-grid__product-link {

		& > *:not(:first-child) {
			margin-top: map-deep-get($config-global, "spacing", "unit");
		}

		& > *:not(:last-child) {
			margin-bottom: map-deep-get($config-global, "spacing", "unit");
		}

		& > *:not(img):empty + * {
			margin-top: 0;
		}

		& > *:last-child {
			margin-bottom: 0;
		}

		& > *:empty {
			margin: 0;
		}
	}

	.wc-block-grid__product-onsale {
		@extend %onsale-style;
	}

	.wc-block-grid__product-title {
		@include font-family( map-deep-get($config-global, "font", "family", "primary") );
		font-size: map-deep-get($config-global, "font", "size", "base")
	}

	.wc-block-grid__product-rating .star-rating span:before {
		color: map-deep-get($config-global, "color", "secondary", "default");
	}

	.wc-block-grid__product-price {
		color: map-deep-get($config-global, "color", "foreground", "dark");
		font-size: map-deep-get($config-global, "font", "size", "md");
		line-height: map-deep-get($config-global, "font", "line-height", "heading");

		ins {
			color: map-deep-get($config-global, "color", "alert", "success");
			font-weight: bold;
			text-decoration: none;
		}
	}

	.wc-block-grid__product .wc-block-grid__product-onsale {
		right: calc(-0.5em + #{map-deep-get($config-global, "spacing", "unit")});
		margin: 0
	}
}
