/* =========================================================================
   IEM VAULT — CRO layer
   Soft monochrome base + one accent, monospaced numerals, trust bar,
   mobile sticky add-to-cart.
   ========================================================================= */

:root {
	--wd-primary-color: #18181B !important;
	--iem-bg:        #FFFFFF;
	--iem-surface:   #F4F4F5;
	--iem-ink:       #18181B;
	--iem-ink-soft:  #52525B;
	--iem-line:      #E4E4E7;
	--iem-accent:    #10B981;
	--iem-accent-dk: #059669;
	--iem-accent-bg: #ECFDF5;
	--iem-mono: inherit;
}

/* ---------- 1. Palette ------------------------------------------------- */

body,
.site-content,
.website-wrapper {
	background-color: var(--iem-bg);
	color: var(--iem-ink);
}

/* Frameless grid: images sit straight on the page, no card box at all */
.wd-product,
.product-grid-item,
.wd-product .product-wrapper,
.wd-product-wrapper,
.product-grid-item .product-wrapper,
.product-grid-item .wd-product-header,
.product-grid-item .wd-product-thumb,
.product-grid-item .product-element-top {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	border-radius: 0 !important;
	padding: 0 !important;
}

.product-grid-item:hover,
.wd-product-wrapper:hover {
	border: none !important;
	box-shadow: none !important;
}

/* Spec tables: quiet grey panels, mono values */
table.woocommerce-product-attributes.shop_attributes,
.wd-specification,
.woocommerce-product-attributes {
	background-color: var(--iem-surface);
	border: 1px solid var(--iem-line);
	border-radius: 10px;
	overflow: hidden;
}

table.shop_attributes th,
table.shop_attributes td {
	border-color: var(--iem-line);
	padding: 11px 14px;
}

table.shop_attributes th {
	color: var(--iem-ink-soft);
	font-weight: 500;
	background: transparent;
}

table.shop_attributes td,
table.shop_attributes td p {
	font-family: var(--iem-mono);
	font-size: 13.5px;
	letter-spacing: -.01em;
	color: var(--iem-ink);
}


/* Primary text: soft near-black, never pure #000 */
.site-content,
.wd-page-content,
.entry-content,
.summary,
.woocommerce-tabs,
.summary h1,
.summary h2,
.summary p,
.woocommerce-tabs p,
.woocommerce-tabs li {
	color: var(--iem-ink);
}

.summary .product_meta,
.summary .product_meta a,
.woocommerce-tabs .woocommerce-Tabs-panel--additional_information p {
	color: var(--iem-ink-soft);
}

/* ---------- 2. Numerals ----------------------------------------------- */

.price,
.woocommerce-Price-amount,
.summary .price,
.product-grid-item .price,
.amount,
.iemv-offer-price,
.cart-subtotal .amount,
.order-total .amount,
.woocommerce-checkout-review-order-table .amount {
	font-family: var(--iem-mono);
	font-variant-numeric: tabular-nums;
	letter-spacing: -.02em;
}

/* Prices carry weight, not colour */
.summary .price,
.summary .price ins {
	color: var(--iem-ink);
	font-weight: 600;
}

.summary .price del {
	color: #71717A;
	font-weight: 400;
}

/* SKU codes */
.sku,
.product_meta .sku,
.wd-product-sku {
	font-family: var(--iem-mono);
	font-size: 12px;
	letter-spacing: .02em;
	color: var(--iem-ink-soft);
	background: var(--iem-surface);
	border: 1px solid var(--iem-line);
	border-radius: 4px;
	padding: 2px 6px;
	display: inline-block;
}

/* FR graph axis labels and any tabular numbers */
.iemv-fr-caption,
.iemv-fr-legend,
.iemv-spec-num {
	font-family: var(--iem-mono);
	font-variant-numeric: tabular-nums;
}

/* ---------- 3. Accent: conversion points only ------------------------- */

/* Accent belongs to the buy action on a product page — not to every loop button,
   otherwise the whole grid turns green and nothing stands out. */
.single-product .single_add_to_cart_button,
.single-product .single_add_to_cart_button.button.alt,
.single-product .woocommerce-variation-add-to-cart .single_add_to_cart_button {
	background-color: var(--iem-accent) !important;
	border-color: var(--iem-accent) !important;
	color: #FFFFFF !important;
	font-weight: 600;
	letter-spacing: .01em;
	box-shadow: 0 1px 2px rgba(16, 185, 129, .25);
	transition: background-color .16s ease, border-color .16s ease, transform .06s ease;
}

.single-product .single_add_to_cart_button:hover,
.single-product .single_add_to_cart_button.button.alt:hover {
	background-color: var(--iem-accent-dk) !important;
	border-color: var(--iem-accent-dk) !important;
	color: #FFFFFF !important;
}

.single-product .single_add_to_cart_button:active {
	transform: translateY(1px);
}

/* Out of stock stays neutral — no accent for a dead end */
body.single-product .single_add_to_cart_button.button.alt.disabled,
body.single-product .single_add_to_cart_button.button.alt[disabled],
body.single-product .single_add_to_cart_button.button.alt.wc-variation-is-unavailable,
body.single-product.iemv-product-oos .single_add_to_cart_button.button.alt,
body.single-product.iemv-product-oos .woocommerce-variation-add-to-cart .single_add_to_cart_button.button.alt,
.single-product .single_add_to_cart_button.disabled,
.single-product .single_add_to_cart_button[disabled],
.single-product .single_add_to_cart_button.wc-variation-is-unavailable,
.single-product .woocommerce-variation-add-to-cart .single_add_to_cart_button.disabled,
.single-product .woocommerce-variation-add-to-cart .single_add_to_cart_button[disabled],
.single-product .woocommerce-variation-add-to-cart .single_add_to_cart_button.wc-variation-is-unavailable,
body.iemv-product-oos .single_add_to_cart_button,
body.iemv-product-oos .woocommerce-variation-add-to-cart .single_add_to_cart_button,
.single_add_to_cart_button.disabled,
.single_add_to_cart_button[disabled] {
	background-color: #E4E4E7 !important;
	border-color: #E4E4E7 !important;
	color: #71717A !important;
	box-shadow: none !important;
	cursor: not-allowed !important;
	pointer-events: none !important;
	opacity: 1 !important;
}

/* Keep WoodMart's compact stepper width when qty uses type="text" for Western numerals */
div.quantity input[type="text"].qty {
	width: 36px !important;
	min-width: 36px;
	border-inline: none !important;
	border-radius: 0 !important;
	padding-inline: 2px !important;
	text-align: center;
}

/* Stock badge */
.stock.in-stock,
.product-grid-item .stock.in-stock {
	color: var(--iem-accent-dk) !important;
	background-color: var(--iem-accent-bg);
	border: 1px solid #A7F3D0;
	border-radius: 999px;
	padding: 3px 9px;
	font-size: 12px;
	font-weight: 600;
	display: inline-block;
	line-height: 1.3;
}

.stock.out-of-stock {
	color: #71717A !important;
	background-color: var(--iem-surface);
	border: 1px solid var(--iem-line);
	border-radius: 999px;
	padding: 3px 9px;
	font-size: 12px;
	display: inline-block;
}

/* ---------- 4. Trust bar under Add to Cart ---------------------------- */

.iemv-trust {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 18px 0 6px;
	padding: 14px 16px;
	background: var(--iem-surface);
	border: 1px solid var(--iem-line);
	border-radius: 10px;
}

.iemv-trust__item {
	display: flex;
	align-items: center;
	gap: 11px;
	font-size: 13.5px;
	line-height: 1.45;
	color: var(--iem-ink);
}

.iemv-trust__item svg {
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	stroke: var(--iem-accent-dk);
	stroke-width: 1.6;
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.iemv-trust__item span[dir] {
	display: inline-block;
}

@media (min-width: 769px) {
	.iemv-trust {
		padding: 16px 18px;
	}
}

/* ---------- 5. Mobile sticky add-to-cart ------------------------------ */

.iemv-sticky {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9990;
	display: none;
	align-items: center;
	gap: 10px;
	padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
	background: rgba(255, 255, 255, .97);
	backdrop-filter: saturate(180%) blur(8px);
	border-top: 1px solid var(--iem-line);
	box-shadow: 0 -6px 24px rgba(24, 24, 27, .08);
	transform: translateY(110%);
	transition: transform .24s ease;
	will-change: transform;
}

.iemv-sticky.is-visible {
	transform: translateY(0) !important;
	visibility: visible;
}

.iemv-sticky__info {
	flex: 1 1 auto;
	min-width: 0;
}

.iemv-sticky__name {
	font-size: 12.5px;
	line-height: 1.25;
	color: var(--iem-ink-soft);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.iemv-sticky__price {
	font-family: var(--iem-mono);
	font-variant-numeric: tabular-nums;
	font-size: 15px;
	font-weight: 600;
	color: var(--iem-ink);
	line-height: 1.2;
}

.iemv-sticky__price del {
	color: #71717A;
	font-weight: 400;
	font-size: 12px;
	margin-left: 6px;
}

.iemv-sticky .iemv-sticky__btn {
	flex: 0 0 auto;
	background: var(--iem-accent);
	border: 1px solid var(--iem-accent);
	color: #fff;
	font-weight: 600;
	font-size: 14px;
	padding: 11px 18px;
	border-radius: 8px;
	cursor: pointer;
	white-space: nowrap;
}

.iemv-sticky .iemv-sticky__btn:active {
	background: var(--iem-accent-dk);
}

.iemv-sticky .iemv-sticky__btn[disabled] {
	background: #E4E4E7;
	border-color: #E4E4E7;
	color: #71717A;
}

@media (max-width: 1024px) {
	.iemv-sticky {
		display: flex;
		z-index: 340;
	}

	/* Sit cleanly above WoodMart's 55px mobile bottom toolbar without overlapping it */
	body:has(.wd-toolbar) .iemv-sticky {
		bottom: 55px;
		padding-bottom: 10px;
	}

	/* keep the floating WhatsApp bubble clear of the toolbar & sticky bar */
	body.single-product .iemv-wa {
		bottom: 72px !important;
	}

	body.single-product.iemv-sticky-open .iemv-wa {
		bottom: 132px !important;
	}
}

@media (min-width: 1025px) {
	.iemv-sticky {
		display: none !important;
	}
}

/* ---------- 7. Sidebar filters ---------------------------------------- */

.wd-swatches-filter .wd-filter-lable,
.wd-swatches-filter label,
.wd-filter-list .wd-filter-lable,
.widget_layered_nav ul li a,
.widget_layered_nav_filters ul li a,
.wd-filter-list li > a,
.woocommerce-widget-layered-nav-list__item a {
	color: var(--iem-ink) !important;
	font-weight: 500;
}

.wd-swatches-filter .count,
.wd-filter-list .count,
.widget_layered_nav .count,
.wd-filter-product-number {
	color: #71717A !important;
	font-family: var(--iem-mono);
	font-size: 11.5px;
}

/* ---------- 8. Conversion buttons ------------------------------------- */

/* Cart: proceed to checkout */
.cart_totals .checkout-button,
.wc-proceed-to-checkout .checkout-button,
a.checkout-button.button {
	background-color: var(--iem-accent) !important;
	border-color: var(--iem-accent) !important;
	color: #fff !important;
	font-weight: 600;
}

.cart_totals .checkout-button:hover,
.wc-proceed-to-checkout .checkout-button:hover {
	background-color: var(--iem-accent-dk) !important;
	border-color: var(--iem-accent-dk) !important;
}

/* Mini-cart checkout */
.widget_shopping_cart .checkout,
.shopping-cart-widget-side .checkout,
.wd-cart-side .checkout,
aside .widget_shopping_cart a.button.checkout,
.wd-header-cart-side a.checkout {
	background-color: var(--iem-accent) !important;
	border-color: var(--iem-accent) !important;
	color: #fff !important;
	font-weight: 600;
}

/* Coupon stays a quiet outline — it is a secondary action */
button[name="apply_coupon"],
.woocommerce-cart button[name="apply_coupon"] {
	background-color: transparent !important;
	border: 1px solid var(--iem-ink) !important;
	color: var(--iem-ink) !important;
	font-weight: 600;
}

button[name="apply_coupon"]:hover {
	background-color: var(--iem-ink) !important;
	color: #fff !important;
}

/* Block checkout: place order + total */
.wc-block-components-checkout-place-order-button,
.wp-block-woocommerce-checkout .wc-block-components-button.wc-block-components-checkout-place-order-button {
	background-color: var(--iem-accent) !important;
	border-color: var(--iem-accent) !important;
	color: #fff !important;
	font-weight: 600;
}

.wc-block-components-checkout-place-order-button:hover {
	background-color: var(--iem-accent-dk) !important;
	border-color: var(--iem-accent-dk) !important;
}

.wc-block-components-totals-item__value,
.wc-block-components-total__value,
.wc-block-components-order-summary-item__total-price,
.wc-block-components-product-price__value {
	color: var(--iem-ink) !important;
	font-family: var(--iem-mono);
	font-variant-numeric: tabular-nums;
	font-weight: 600;
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-size: 18px;
}

/* ---------- 9. Thank-you WhatsApp block -------------------------------- */

.iemv-wa-thanks {
	border: 1px solid var(--iem-line);
	background: var(--iem-surface);
	border-radius: 10px;
	padding: 18px 20px;
	margin: 22px 0;
}

.iemv-wa-thanks strong {
	display: block;
	font-family: var(--iem-mono);
	font-size: 14px;
	color: var(--iem-ink);
	margin-bottom: 6px;
}

.iemv-wa-thanks p {
	margin: 0 0 14px;
	font-size: 14px;
	line-height: 1.55;
	color: #444;
}

.iemv-wa-confirm {
	display: inline-block;
	background: var(--iem-accent);
	color: #fff !important;
	font-weight: 600;
	font-size: 14px;
	padding: 11px 18px;
	border-radius: 8px;
	text-decoration: none !important;
}

.iemv-wa-confirm:hover {
	background: var(--iem-accent-dk);
	color: #fff !important;
}

/* ---------- 10. Checkout tidy ----------------------------------------- */

/* The contact block already captures the phone; a second phone under the address is noise. */
.wc-block-components-address-form__phone,
.wc-block-components-text-input:has(#shipping-phone) {
	display: none !important;
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value .wc-block-components-formatted-money-amount {
	color: #18181B !important;
	font-family: var(--iem-mono);
	font-weight: 700;
}

/* ---------- 11. Price + Availability filters match the brand list ---------- */

.iemv-filter-widget,
.iemv-filter-widget .iemv-f,
.iemv-filter-widget .iemv-f-row,
.iemv-filter-widget .iemv-f-row a,
.iemv-filter-widget .iemv-lbl,
.iemv-filter-widget label,
.iemv-filter-widget li {
	opacity: 1 !important;
	color: #18181B !important;
}

.iemv-filter-widget .iemv-cnt {
	opacity: 1 !important;
	color: #71717A !important;
}

.iemv-filter-widget input[type="checkbox"] + span,
.iemv-filter-widget .iemv-box {
	opacity: 1 !important;
}


/* ---------- 6. Frequency response graph: clearance above the tabs ---------- */

/* WoodMart pulls the tab row up by 41px, so 36px of visible air needs 77px. */
.iem-fr-graph {
	margin-bottom: 77px !important;
}

@media (max-width: 768px) {
	.iem-fr-graph {
		margin-bottom: 60px !important;
	}
}

/* -------------------------------------------------------------------------
 * Mobile chrome: WhatsApp bubble vs scroll-to-top, cart badge colour
 * ---------------------------------------------------------------------- */

/* Brand emerald on every numeric cart badge (header + bottom bar) */
.wd-tools-icon .wd-cart-number,
.wd-tools-icon .wd-tools-count {
	background-color: #10B981 !important;
	color: #fff !important;
}

@media (max-width: 768px) {
	/* the 40px scroll-to-top circle sat behind the WhatsApp bubble */
	.scrollToTop {
		display: none !important;
	}

	html body .iemv-wa {
		bottom: 72px !important;
		right: 16px !important;
	}

	html body.single-product.iemv-sticky-open .iemv-wa {
		bottom: 132px !important;
	}
}
