/**
 * Shop mirror: minimal fixes on top of vendor CSS stack.
 */

body.woocommerce-shop,
body.post-type-archive-product,
body.woocommerce-shop #page,
body.post-type-archive-product #page,
body.woocommerce-shop .site-content,
body.post-type-archive-product .site-content,
body.woocommerce-shop .ast-container,
body.post-type-archive-product .ast-container,
body.woocommerce-shop .ast-woocommerce-container,
body.post-type-archive-product .ast-woocommerce-container {
	background: #000 !important;
}

body.woocommerce-shop #masthead,
body.post-type-archive-product #masthead {
	position: relative;
	z-index: 1000000 !important;
}

body.woocommerce-shop .ast-woocommerce-container img,
body.post-type-archive-product .ast-woocommerce-container img {
	height: auto;
	max-width: 100%;
}

/* 分類目錄 / 主內容與 header 底線之間留白（對齊參考 /shop/） */
body.woocommerce-shop #content .ast-container,
body.post-type-archive-product #content .ast-container,
body.tax-product_cat #content .ast-container,
body.tax-product_tag #content .ast-container {
	padding-top: 2.5rem;
}

@media (max-width: 921px) {
	body.woocommerce-shop #content .ast-container,
	body.post-type-archive-product #content .ast-container,
	body.tax-product_cat #content .ast-container,
	body.tax-product_tag #content .ast-container {
		padding-top: 1.5rem;
	}
}

body.woocommerce-shop [data-simpdog-cart-overlay].sc-popover-overlay,
body.woocommerce-shop [data-simpdog-cart-drawer],
body.post-type-archive-product [data-simpdog-cart-overlay].sc-popover-overlay,
body.post-type-archive-product [data-simpdog-cart-drawer] {
	z-index: 1000020 !important;
}

/* Product grid: 2 cards per row (reference shop with left sidebar) */
body.woocommerce-shop #primary ul.products,
body.post-type-archive-product #primary ul.products {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5em;
	margin: 0;
	padding: 0;
	list-style: none;
}

body.woocommerce-shop #primary ul.products li.product,
body.post-type-archive-product #primary ul.products li.product {
	width: calc(50% - 0.75em) !important;
	max-width: calc(50% - 0.75em) !important;
	flex: 0 0 calc(50% - 0.75em) !important;
	margin: 0 !important;
	float: none !important;
	clear: none !important;
}

@media (max-width: 544px) {
	body.woocommerce-shop #primary ul.products li.product,
	body.post-type-archive-product #primary ul.products li.product {
		width: calc(50% - 0.5em) !important;
		max-width: calc(50% - 0.5em) !important;
		flex: 0 0 calc(50% - 0.5em) !important;
	}

	body.woocommerce-shop #primary ul.products,
	body.post-type-archive-product #primary ul.products {
		gap: 1em;
	}
}

/* Footer (Elementor 383) — parity with reference Shop page */
body.woocommerce-shop #colophon,
body.post-type-archive-product #colophon {
	margin-top: 0 !important;
	position: relative;
	z-index: 1;
	background: #000 !important;
}

body.woocommerce-shop .footer-width-fixer,
body.post-type-archive-product .footer-width-fixer {
	width: 100% !important;
}

body.woocommerce-shop #colophon .elementor-383,
body.post-type-archive-product #colophon .elementor-383 {
	width: 100%;
}

body.woocommerce-shop #colophon .hfe-nav-menu__toggle,
body.post-type-archive-product #colophon .hfe-nav-menu__toggle {
	display: none !important;
}

body.woocommerce-shop #colophon .hfe-nav-menu__layout-horizontal,
body.post-type-archive-product #colophon .hfe-nav-menu__layout-horizontal {
	display: block !important;
}
