/*
 * Geeks On Call catalogue presentation fixes.
 *
 * Supplier feeds contain thumbnail files with mixed proportions and some files
 * are smaller than WooCommerce's configured crop size. A consistent frame is
 * therefore applied in CSS without cutting off any part of the product.
 */
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap {
	aspect-ratio: 1 / 1;
	background: #fff;
	overflow: hidden;
	position: relative;
}

.woocommerce ul.products li.product .astra-shop-thumbnail-wrap > a.woocommerce-LoopProduct-link,
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap > a.woocommerce-loop-product__link {
	align-items: center;
	display: flex;
	height: 100%;
	justify-content: center;
	width: 100%;
}

.woocommerce ul.products li.product .astra-shop-thumbnail-wrap img.attachment-woocommerce_thumbnail {
	background: #fff;
	height: 100%;
	margin: 0;
	object-fit: contain;
	object-position: center;
	width: 100%;
}

/* Keep the product information and actions aligned within each grid row. */
.woocommerce ul.products li.product .astra-shop-summary-wrap {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
}

.woocommerce ul.products li.product .astra-shop-summary-wrap > .button {
	align-self: flex-start;
	margin-top: auto;
}

/*
 * Astra 4.13.10 ships `.woocommerce a.added_to_cart { display: none; }`.
 * WooCommerce creates this link after a successful AJAX add-to-cart request,
 * so restore it for the shop and product-category grids.
 */
.woocommerce ul.products li.product a.added_to_cart.wc-forward {
	align-items: center;
	align-self: flex-start;
	background: #102a56;
	border-radius: 3px;
	color: #fff;
	display: inline-flex !important;
	font-weight: 700;
	justify-content: center;
	margin-top: 10px;
	min-height: 40px;
	padding: 8px 16px;
}

.woocommerce ul.products li.product a.added_to_cart.wc-forward:focus,
.woocommerce ul.products li.product a.added_to_cart.wc-forward:hover {
	background: #1477b8;
	color: #fff;
}

@media (max-width: 544px) {
	.woocommerce ul.products li.product .astra-shop-summary-wrap > .button,
	.woocommerce ul.products li.product a.added_to_cart.wc-forward {
		align-self: stretch;
		text-align: center;
	}
}
