/**
 * WCIGR — dense mobile grids for WooCommerce shop / category / tag archives
 * (classic ul.products + common block patterns). body.wcigr-dense-wc-grids
 */

@media (max-width: 781px) {
	/* Classic Woo: product + product-category tiles (4 cols, compact chrome) */
	body.wcigr-dense-wc-grids .woocommerce ul.products {
		display: grid !important;
		grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
		column-gap: 6px !important;
		row-gap: 8px !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		width: 100% !important;
		clear: both !important;
	}
	body.wcigr-dense-wc-grids .woocommerce ul.products::before,
	body.wcigr-dense-wc-grids .woocommerce ul.products::after {
		display: none !important;
		content: none !important;
	}
	body.wcigr-dense-wc-grids .woocommerce ul.products li.product,
	body.wcigr-dense-wc-grids .woocommerce ul.products li.product-category {
		width: auto !important;
		max-width: none !important;
		float: none !important;
		clear: none !important;
		margin: 0 !important;
		padding: 0 0 4px !important;
	}
	body.wcigr-dense-wc-grids .woocommerce ul.products li.product a img,
	body.wcigr-dense-wc-grids .woocommerce ul.products li.product-category a img {
		margin: 0 0 4px !important;
		border-radius: 8px !important;
	}
	body.wcigr-dense-wc-grids .woocommerce ul.products li.product .woocommerce-loop-product__title,
	body.wcigr-dense-wc-grids .woocommerce ul.products li.product .woocommerce-loop-category__title,
	body.wcigr-dense-wc-grids .woocommerce ul.products li.product-category .woocommerce-loop-category__title,
	body.wcigr-dense-wc-grids .woocommerce ul.products li.product-category h2,
	body.wcigr-dense-wc-grids .woocommerce ul.products li.product h2 {
		font-size: 9.5px !important;
		line-height: 1.2 !important;
		font-weight: 800 !important;
		padding: 0 2px !important;
		margin: 0 !important;
	}
	body.wcigr-dense-wc-grids .woocommerce ul.products li.product .price,
	body.wcigr-dense-wc-grids .woocommerce ul.products li.product-category .count {
		font-size: 9px !important;
		margin-top: 2px !important;
		display: block !important;
		line-height: 1.15 !important;
	}

	body.wcigr-dense-wc-grids .woocommerce ul.products li.product .button,
	body.wcigr-dense-wc-grids .woocommerce ul.products li.product a.add_to_cart_button,
	body.wcigr-dense-wc-grids .woocommerce ul.products li.product .added_to_cart {
		font-size: 8px !important;
		line-height: 1.15 !important;
		padding: 4px 6px !important;
		min-height: 0 !important;
		border-radius: 6px !important;
	}

	/* WooCommerce Blocks: product categories (grid / list layouts) */
	body.wcigr-dense-wc-grids .wc-block-product-categories.is-grid,
	body.wcigr-dense-wc-grids .wp-block-woocommerce-product-categories.is-grid,
	body.wcigr-dense-wc-grids ul.wc-block-product-categories-list.is-grid {
		display: grid !important;
		grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
		gap: 6px !important;
	}
	body.wcigr-dense-wc-grids .wc-block-product-categories-list.is-grid .wc-block-product-categories-list-item,
	body.wcigr-dense-wc-grids .wp-block-woocommerce-product-categories.is-grid li {
		margin: 0 !important;
		width: auto !important;
		max-width: none !important;
	}
	body.wcigr-dense-wc-grids .wc-block-product-categories-list-item__image,
	body.wcigr-dense-wc-grids .wp-block-woocommerce-product-categories img {
		border-radius: 8px !important;
	}
	body.wcigr-dense-wc-grids .wc-block-product-categories-list-item__name {
		font-size: 9.5px !important;
		line-height: 1.2 !important;
		font-weight: 800 !important;
		margin-top: 4px !important;
	}
}
