/**
 * Catalog archive product cards (/shop/, product categories, tags).
 * Independent of picostrap Sass recompile so layout fixes ship immediately.
 */

body.woocommerce-shop #woocommerce-wrapper,
body.tax-product_cat #woocommerce-wrapper,
body.tax-product_tag #woocommerce-wrapper,
body.post-type-archive-product #woocommerce-wrapper {
	padding-bottom: 3rem;
}

body.woocommerce-shop ul.products,
body.tax-product_cat ul.products,
body.tax-product_tag ul.products,
body.post-type-archive-product ul.products {
	display: grid;
	grid-template-columns: repeat(1, minmax(0, 1fr));
	gap: 1.25rem;
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
	width: 100%;
	clear: both;
}

/* Woo clearfix ::before/::after become empty grid cells — kill them. */
body.woocommerce-shop ul.products::before,
body.woocommerce-shop ul.products::after,
body.tax-product_cat ul.products::before,
body.tax-product_cat ul.products::after,
body.tax-product_tag ul.products::before,
body.tax-product_tag ul.products::after,
body.post-type-archive-product ul.products::before,
body.post-type-archive-product ul.products::after {
	display: none !important;
	content: none !important;
}

@media (min-width: 576px) {
	body.woocommerce-shop ul.products,
	body.tax-product_cat ul.products,
	body.tax-product_tag ul.products,
	body.post-type-archive-product ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 992px) {
	body.woocommerce-shop ul.products,
	body.tax-product_cat ul.products,
	body.tax-product_tag ul.products,
	body.post-type-archive-product ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

body.woocommerce-shop ul.products li.product,
body.tax-product_cat ul.products li.product,
body.tax-product_tag ul.products li.product,
body.post-type-archive-product ul.products li.product {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	float: none !important;
	clear: none !important;
	display: flex;
	flex-direction: column;
	height: auto;
	padding: 1rem;
	background: var(--bs-white, #fff);
	border: 1px solid rgba(25, 30, 66, 0.12);
	border-radius: 0.5rem;
	overflow: hidden;
	box-sizing: border-box;
}

body.woocommerce-shop ul.products li.product::before,
body.woocommerce-shop ul.products li.product::after,
body.tax-product_cat ul.products li.product::before,
body.tax-product_cat ul.products li.product::after,
body.tax-product_tag ul.products li.product::before,
body.tax-product_tag ul.products li.product::after,
body.post-type-archive-product ul.products li.product::before,
body.post-type-archive-product ul.products li.product::after {
	display: none !important;
	content: none !important;
}

body.woocommerce-shop ul.products li.product a.woocommerce-LoopProduct-link,
body.tax-product_cat ul.products li.product a.woocommerce-LoopProduct-link,
body.tax-product_tag ul.products li.product a.woocommerce-LoopProduct-link,
body.post-type-archive-product ul.products li.product a.woocommerce-LoopProduct-link {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	text-decoration: none;
	color: inherit;
	min-width: 0;
}

body.woocommerce-shop ul.products li.product img.wp-post-image,
body.tax-product_cat ul.products li.product img.wp-post-image,
body.tax-product_tag ul.products li.product img.wp-post-image,
body.post-type-archive-product ul.products li.product img.wp-post-image {
	width: 100%;
	height: 160px;
	object-fit: contain;
	background: var(--bs-light, #f8f9fa);
	border-radius: 0.375rem;
	margin: 0 0 1rem;
}

body.woocommerce-shop ul.products li.product .woocommerce-loop-product__title,
body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
body.tax-product_tag ul.products li.product .woocommerce-loop-product__title,
body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title {
	font-size: 1.05rem !important;
	font-weight: 700;
	line-height: 1.35;
	margin: 0 0 0.5rem;
}

body.woocommerce-shop ul.products li.product .price,
body.tax-product_cat ul.products li.product .price,
body.tax-product_tag ul.products li.product .price,
body.post-type-archive-product ul.products li.product .price {
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 0.75rem;
	color: var(--bs-dark, #191e42);
}

body.woocommerce-shop ul.products li.product .moso-shop-archive-cta,
body.tax-product_cat ul.products li.product .moso-shop-archive-cta,
body.tax-product_tag ul.products li.product .moso-shop-archive-cta,
body.post-type-archive-product ul.products li.product .moso-shop-archive-cta {
	margin-top: auto;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--bs-primary, #0d6efd);
}

/* Hide any leftover LiveCanvas / full body dumps if a hook still fires. */
body.woocommerce-shop ul.products li.product .woo-product-description,
body.tax-product_cat ul.products li.product .woo-product-description,
body.tax-product_tag ul.products li.product .woo-product-description,
body.post-type-archive-product ul.products li.product .woo-product-description,
body.woocommerce-shop .woo-product-description,
body.tax-product_cat .woo-product-description,
body.tax-product_tag .woo-product-description,
body.post-type-archive-product .woo-product-description {
	display: none !important;
}

body.woocommerce-shop .woocommerce-result-count,
body.woocommerce-shop .woocommerce-ordering,
body.tax-product_cat .woocommerce-result-count,
body.tax-product_cat .woocommerce-ordering,
body.tax-product_tag .woocommerce-result-count,
body.tax-product_tag .woocommerce-ordering,
body.post-type-archive-product .woocommerce-result-count,
body.post-type-archive-product .woocommerce-ordering {
	margin-bottom: 1.25rem;
}
