/* North Design — Store Skin: structural fallbacks only.
   The look lives in the global nd CSS. These rules just cover layout a
   classic theme can miss, so columns/grids don't collapse. */

/* Single product: ensure the two columns sit side by side (core block
   layout CSS can be absent on a classic theme). nd CSS sets the widths. */
body.single-product .wp-block-columns {
	display: flex;
	flex-wrap: wrap;
}
body.single-product .wp-block-columns > .wp-block-column {
	flex: 1 1 0;
	min-width: 0;
}
@media (max-width: 899px) {
	body.single-product .wp-block-columns > .wp-block-column {
		flex-basis: 100%;
	}
}

/* Shop archive main column width, matching the single-product wrap. */
body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag) main.wp-block-group.nd-shop-main {
	max-width: none;
	margin-inline: auto;
}

/* ---- Product cards: shop grid + home "New on the wall" grid ---- */

/* Even spacing: image -> title -> price. */
body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag) li.wc-block-product .wc-block-components-product-image {
	margin-bottom: 14px;
}
body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag) li.wc-block-product .wp-block-post-title {
	margin: 0 0 8px;
}
body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag) li.wc-block-product .wp-block-woocommerce-product-price {
	margin: 0 0 12px;
}
.nd-page ul.products li.product .woocommerce-loop-product__link img { margin-bottom: 14px; }
.nd-page ul.products li.product .woocommerce-loop-product__title { margin: 0 0 8px; }
.nd-page ul.products li.product .price { margin: 0 0 12px; display: block; }

/* Title + price follow Woodmart's fonts, in bold. */
body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag) li.wc-block-product .wp-block-post-title,
body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag) li.wc-block-product .wp-block-post-title a,
.nd-page ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--wd-title-font, inherit) !important;
	font-weight: 700 !important;
}
body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag) li.wc-block-product .wp-block-woocommerce-product-price,
.nd-page ul.products li.product .price {
	font-family: var(--wd-text-font, inherit) !important;
	font-weight: 700 !important;
	color: var(--nd-ink, #1F2421) !important;
}

/* Full-width, green Add to cart (shop grid + home grid). */
body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag) li.wc-block-product .wp-block-button,
body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag) li.wc-block-product .wp-block-button__link,
.nd-page ul.products li.product .button,
.nd-page ul.products li.product a.add_to_cart_button {
	display: block !important;
	width: 100% !important;
	box-sizing: border-box !important;
	text-align: center !important;
}
body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag) li.wc-block-product .wp-block-button { margin-top: 10px; }
body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag) li.wc-block-product .wp-block-button__link,
.nd-page ul.products li.product .button,
.nd-page ul.products li.product a.add_to_cart_button {
	background: var(--nd-accent, #2E4A3F) !important;
	color: var(--nd-accent-ink, #fff) !important;
	border: 1px solid var(--nd-accent, #2E4A3F) !important;
	font-family: var(--wd-text-font, inherit) !important;
}
body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag) li.wc-block-product .wp-block-button__link:hover,
.nd-page ul.products li.product .button:hover,
.nd-page ul.products li.product a.add_to_cart_button:hover {
	background: transparent !important;
	color: var(--nd-accent, #2E4A3F) !important;
}

/* Product page: no gallery zoom / magnifier control. */
body.single-product .woocommerce-product-gallery__trigger {
	display: none !important;
}

/* Empty-state button (fallback if the global button class isn't present). */
.nd-shop-empty .nd-btn--primary {
	display: inline-block;
	background: var(--nd-accent, #2E4A3F);
	color: var(--nd-accent-ink, #fff);
	padding: 13px 22px;
	border-radius: var(--nd-radius, 2px);
	font-weight: 600;
	text-decoration: none;
}
.nd-shop-empty .nd-btn--primary:hover {
	background: transparent;
	color: var(--nd-accent, #2E4A3F);
	box-shadow: inset 0 0 0 1px var(--nd-accent, #2E4A3F);
}

/* ---- Single product: hide duplicate Woodmart sale labels ---- */
/* The discount is already shown by the strikethrough price, and the theme
   prints the "-17%" label twice; hide both. */
body.single-product .product-labels,
body.single-product .wp-block-columns .onsale {
	display: none !important;
}

/* ---- Single product: related products grid (align + match shop cards) ---- */
body.single-product .wp-block-woocommerce-product-collection ul.wc-block-product-template {
	display: grid !important;
	grid-template-columns: repeat(2, 1fr);
	gap: 40px 20px;
	margin: 0; padding: 0; list-style: none;
}
@media (min-width: 700px) {
	body.single-product .wp-block-woocommerce-product-collection ul.wc-block-product-template { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1000px) {
	body.single-product .wp-block-woocommerce-product-collection ul.wc-block-product-template { grid-template-columns: repeat(5, 1fr); gap: 44px 24px; }
}
body.single-product .wp-block-woocommerce-product-collection li.wc-block-product {
	display: flex !important;
	flex-direction: column;
	margin: 0 !important;
	width: auto !important;
	list-style: none;
}
/* Uniform card images. */
body.single-product .wp-block-woocommerce-product-collection li.wc-block-product .wc-block-components-product-image { margin: 0 0 14px; }
body.single-product .wp-block-woocommerce-product-collection li.wc-block-product .wc-block-components-product-image img {
	aspect-ratio: 4 / 5 !important;
	width: 100% !important;
	height: auto !important;
	object-fit: cover !important;
}
/* Title + price: Woodmart font, bold, consistent spacing. */
body.single-product .wp-block-woocommerce-product-collection li.wc-block-product .wp-block-post-title,
body.single-product .wp-block-woocommerce-product-collection li.wc-block-product .wp-block-post-title a {
	font-family: var(--wd-title-font, inherit) !important;
	font-weight: 700 !important;
	font-size: 1rem !important;
	line-height: 1.3;
	margin: 0 0 8px !important;
}
body.single-product .wp-block-woocommerce-product-collection li.wc-block-product .wp-block-woocommerce-product-price {
	font-family: var(--wd-text-font, inherit) !important;
	font-weight: 700 !important;
	color: var(--nd-ink, #1F2421) !important;
	font-size: var(--nd-step--1, .95rem) !important;
	margin: 0 0 12px !important;
}
/* Button sits at the bottom of every card, full-width and green. */
body.single-product .wp-block-woocommerce-product-collection li.wc-block-product .wp-block-button { margin-top: auto; width: 100%; }
body.single-product .wp-block-woocommerce-product-collection li.wc-block-product .wp-block-button__link {
	display: block !important;
	width: 100% !important;
	box-sizing: border-box !important;
	text-align: center !important;
	background: var(--nd-accent, #2E4A3F) !important;
	color: var(--nd-accent-ink, #fff) !important;
	border: 1px solid var(--nd-accent, #2E4A3F) !important;
	font-family: var(--wd-text-font, inherit) !important;
}
body.single-product .wp-block-woocommerce-product-collection li.wc-block-product .wp-block-button__link:hover {
	background: transparent !important;
	color: var(--nd-accent, #2E4A3F) !important;
}
/* No sale badge on related cards (match the shop grid). */
body.single-product .wp-block-woocommerce-product-collection .wc-block-components-product-sale-badge,
body.single-product .wp-block-woocommerce-product-collection .onsale { display: none !important; }

/* ---- Single product: balance columns so the image isn't oversized ---- */
/* The gallery column is pinned to flex-basis:512px in the block markup, which
   makes it ~70% of the row. Rebalance to a sensible ratio. */
body.single-product .wp-block-columns > .wp-block-column:first-child {
	flex: 1 1 54% !important;
	max-width: 54% !important;
}
body.single-product .wp-block-columns > .wp-block-column:last-child {
	flex: 1 1 46% !important;
	max-width: 46% !important;
}
@media (max-width: 899px) {
	body.single-product .wp-block-columns > .wp-block-column:first-child,
	body.single-product .wp-block-columns > .wp-block-column:last-child {
		flex-basis: 100% !important;
		max-width: 100% !important;
	}
}
/* Keep the main image within its column and cap its height (no upscaling /
   distortion for either orientation). */
body.single-product .wp-block-woocommerce-product-image-gallery img {
	width: auto !important;
	max-width: 100%;
	max-height: 620px;
	margin-inline: auto;
	display: block;
}

/* ---- Short-description trust row (icons) ----
   These styles used to live in a per-product inline script. Baked in here so
   the icons are always sized correctly, on every product. */
.ea-micro-trust {
	display: flex; flex-direction: column; gap: 11px;
	padding: 22px 0; margin: 20px 0 24px;
	border-top: 1px solid var(--nd-line, #E5E2DB);
	border-bottom: 1px solid var(--nd-line, #E5E2DB);
	font-family: var(--nd-font-body, inherit);
}
.ea-micro-trust .ea-mt-item, .ea-mt-item {
	display: flex !important; align-items: center; gap: 12px;
	font-size: var(--nd-step--1, .9rem); color: var(--nd-muted, #5E625D); line-height: 1.5;
}
.ea-mt-item svg {
	width: 16px !important; height: 16px !important;
	stroke: var(--nd-accent, #2E4A3F); fill: none; stroke-width: 2;
	stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto;
}
.ea-mt-item strong { color: var(--nd-ink, #1F2421); font-weight: 600; }

/* ---- Woodmart native product grid (.wd-product) ----
   On sites where Elementor Pro / Woodmart render the shop, the plugin's own
   grid template is bypassed. Style Woodmart's cards to match: uniform 4/5
   images, full-width green Add to cart, no sale label on the shop. */
.wd-products .wd-product .product-image-link img,
.wd-products .wd-product .wd-product-img-link img,
.wd-products .wd-product .hover-img,
.wd-product .product-image-link img,
.wd-product .wd-product-img-link img {
	aspect-ratio: 4 / 5 !important;
	width: 100% !important;
	height: auto !important;
	object-fit: cover !important;
}
.wd-product .wd-add-btn > a,
.wd-product a.add_to_cart_button,
.wd-product .add-to-cart-loop a,
.wd-product .wd-buttons .add_to_cart_button {
	display: block !important;
	width: 100% !important;
	text-align: center !important;
	background: var(--nd-accent, #2E4A3F) !important;
	color: var(--nd-accent-ink, #fff) !important;
	border-color: var(--nd-accent, #2E4A3F) !important;
}
.wd-product .wd-add-btn > a:hover,
.wd-product a.add_to_cart_button:hover {
	background: transparent !important;
	color: var(--nd-accent, #2E4A3F) !important;
}
body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag,.woocommerce-shop) .wd-product .product-labels {
	display: none !important;
}
