/**
 * Post grid styles
 * Loads on front end and back end
 */

.wpd-block-product-grid {
	margin: 0 0 1.2em 0;
	position: relative;

	.is-grid {
		display: grid;
		grid-template-columns: 1fr 1fr;
		grid-template-rows: 1fr;
		grid-gap: 0 1em;

		article {
			margin-bottom: 2.5em;
		}

		@media only screen and (max-width: 600px) {
			article.entry {
				margin-bottom: 2em;
			}
		}
	}

	.is-grid.columns-2 {
		grid-template-columns: 1fr 1fr;

		@media only screen and (max-width: 600px) {
			grid-template-columns: 1fr;
		}
	}

	.is-grid.columns-3 {
		grid-template-columns: 1fr 1fr 1fr;

		@media only screen and (max-width: 600px) {
			grid-template-columns: 1fr;
		}
	}

	.is-grid.columns-4 {
		grid-template-columns: 1fr 1fr 1fr 1fr;

		@media only screen and (max-width: 600px) {
			grid-template-columns: 1fr;
		}
	}

	.is-grid.columns-5 {
		grid-template-columns: 1fr 1fr 1fr 1fr 1fr;

		@media only screen and (max-width: 600px) {
			grid-template-columns: 1fr;
		}
	}

	.is-grid {
		@media only screen and (max-width: 600px) {
			grid-template-columns: 1fr;
		}
	}

	.wpd-product-grid-section-title {
		text-align: left;
	}

	.wpd-block-product-grid-title {
		font-size: 24px;
		margin-top: 0;
		margin-bottom: 12px;
	}

	.wpd-block-product-grid-image {
		margin-bottom: 1.2em;

		img {
			display: block;
			width: 100%;
		}
	}

	.wpd-block-product-grid-text {
		text-align: left;
	}

	a {
		text-decoration: none;
	}

	.entry .entry-header {
		margin: 0;
	}

	.entry-header h2 {
		margin-top: 0;
		margin-bottom: 15px;
		font-size: 28px;
		line-height: 1.2;

		a {
			color: $black;
			box-shadow: none;
			transition: .3s ease;
			text-decoration: none;

			&:hover {
				box-shadow: inset 0 -2px 0;
				color: inherit;
			}
		}
	}

	.wpd-block-product-grid-byline {
		font-size: 13px;
		color: $lightgray;
		margin-bottom: 0;
	}

	.wpd-block-product-grid-author,
	.wpd-block-product-grid-date {
		display: inline-block;

		/*
		&:not(:last-child):after {
			content: "\B7";
			vertical-align: middle;
			margin: 0 5px;
			line-height: 1;
		}
		*/
	}

	.wpd-block-product-grid-author a {
		box-shadow: none;
		color: inherit;
		text-decoration: none;

		&:hover {
			color: inherit;
			box-shadow: 0 -1px 0 inset;
			color: inherit;
		}
	}

	.wpd-block-product-grid-text p {
		margin: 0 0 15px 0;
		line-height: 1.5;
		font-size: 18px;

		@media only screen and (max-width: 600px) {
			font-size: 16px;
		}

		&:last-of-type {
			margin-bottom: 0;
		}
	}

	.wpd-block-product-grid-link {
		display: inline-block;
		box-shadow: none;
		transition: .3s ease;
		font-weight: bold;
		color: $black;
		text-decoration: none;

		&:hover {
			box-shadow: 0 -2px 0 inset;
		}
	}

	.wpd-block-product-grid-excerpt div + p {
		margin-top: 15px;
	}

	.is-grid.columns-2 span.wpd-productinfo {
		font-size: 15px;
	}

	.is-list {
		article {
			display: grid;
			grid-template-columns: 30% 1fr;
			grid-template-rows: 1fr;
			grid-gap: 0 2em;

			&:before {
				display: none;
			}

			&:not(:last-child) {
				margin-bottom: 5%;
				padding-bottom: 5%;
			}

			@media only screen and (min-width: 600px) {
				&:not(:last-child) {
					border-bottom: solid 1px #eee;
				}
			}

			@media only screen and (max-width: 600px) {
				grid-template-columns: 1fr;
			}
		}

		span.wpd-productinfo {
			font-size: 15px;
		}

		.wpd-block-product-grid-image {
			margin-bottom: 0;

			@media only screen and (max-width: 600px) {
				margin-bottom: 5%;
			}
		}

		a.button.wpd-buy-btn {
			width: auto;
			min-width: 140px;
		}
		.wpd-block-product-grid-text h2 {
			font-size: 28px;
		}

		.wpd-block-product-grid-title {
			@media only screen and (min-width: 600px) {
				font-size: 34px;
			}
		}

		.no-thumb .wpd-block-product-grid-text {
			grid-column: span 2;
		}
	}
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    height: 1px;
    overflow: hidden;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}