
/* LunaMed Shop — scoped to WooCommerce product archives; the cart actions also to the module browser (/module-overzicht/) */
body.woocommerce-shop,
body.tax-product_cat,
body.tax-product_tag,
.lunamed-modules-browser {
	--lm-primary: #135A83;
	--lm-secondary: #2EC1FB;
	--lm-white: #FFFFFF;
	--lm-bg: #F0F2F5;
	--lm-cta: #FDC14D;
	--lm-cta-hover: #F6DD9C;
	--lm-text: #1F2937;
	--lm-muted: #667085;
	--lm-border: #DDE5EB;
}

/* Page background and readable content width */
body.woocommerce-shop .site-main,
body.tax-product_cat .site-main,
body.tax-product_tag .site-main {
	max-width: 1240px;
	margin: 0 auto;
	padding: 42px 24px 72px;
}

body.woocommerce-shop #content,
body.tax-product_cat #content,
body.tax-product_tag #content {
	background: var(--lm-bg);
}

/* Heading */
body.woocommerce-shop .woocommerce-products-header__title,
body.tax-product_cat .woocommerce-products-header__title,
body.tax-product_tag .woocommerce-products-header__title,
body.woocommerce-shop .page-title {
	font-family: "Montserrat", Sans-serif;
	font-size: clamp(30px, 3.2vw, 44px);
	line-height: 1.15;
	font-weight: 700;
	color: var(--lm-primary);
	margin: 0 0 26px;
}

/* Breadcrumb */
body.woocommerce-shop .woocommerce-breadcrumb,
body.tax-product_cat .woocommerce-breadcrumb,
body.tax-product_tag .woocommerce-breadcrumb {
	color: var(--lm-muted);
	font-family: "Nunito", Sans-serif;
	font-size: 14px;
	margin-bottom: 20px;
}
body.woocommerce-shop .woocommerce-breadcrumb a,
body.tax-product_cat .woocommerce-breadcrumb a,
body.tax-product_tag .woocommerce-breadcrumb a {
	color: var(--lm-primary);
}

/* Results + sorting */
body.woocommerce-shop .woocommerce-result-count,
body.tax-product_cat .woocommerce-result-count,
body.tax-product_tag .woocommerce-result-count {
	font-family: "Nunito", Sans-serif;
	font-size: 15px;
	color: var(--lm-muted);
	margin: 10px 0 28px;
}
body.woocommerce-shop .woocommerce-ordering,
body.tax-product_cat .woocommerce-ordering,
body.tax-product_tag .woocommerce-ordering {
	margin: 0 0 28px;
}
body.woocommerce-shop .woocommerce-ordering select,
body.tax-product_cat .woocommerce-ordering select,
body.tax-product_tag .woocommerce-ordering select {
	min-height: 44px;
	padding: 8px 38px 8px 12px;
	border: 1px solid var(--lm-border);
	border-radius: 9px;
	background: var(--lm-white);
	color: var(--lm-text);
	font-family: "Nunito", Sans-serif;
	font-size: 15px;
}

/* Grid */
body.woocommerce-shop ul.products,
body.tax-product_cat ul.products,
body.tax-product_tag ul.products {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 22px;
	margin: 0 !important;
	clear: both;
}
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 {
	display: none !important;
}

/* WooCommerce loop wrapper; de kaart zelf komt uit LunaMed Modules */
body.woocommerce-shop ul.products li.product,
body.tax-product_cat ul.products li.product,
body.tax-product_tag ul.products li.product {
	width: auto !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	overflow: visible !important;
	display: block;
	min-width: 0;
}

body.woocommerce-shop ul.products li.product > .lunamed-module-card,
body.tax-product_cat ul.products li.product > .lunamed-module-card,
body.tax-product_tag ul.products li.product > .lunamed-module-card {
	height: 100%;
}

body.woocommerce-shop .lunamed-module-card__content,
body.tax-product_cat .lunamed-module-card__content,
body.tax-product_tag .lunamed-module-card__content {
	min-height: 0;
}

/* Compact dual actions */
body.woocommerce-shop .lunamed-module-actions,
body.tax-product_cat .lunamed-module-actions,
body.tax-product_tag .lunamed-module-actions,
.lunamed-modules-explorer .lunamed-module-actions {
	margin: auto 0 0;
	padding-top: 14px;
	display: grid;
	grid-template-columns: minmax(0, 44%) minmax(0, 56%);
	gap: 8px;
	align-items: stretch;
	justify-content: center;
	width: 100%;
}

body.woocommerce-shop .lunamed-module-actions .lunamed-module-button,
body.tax-product_cat .lunamed-module-actions .lunamed-module-button,
body.tax-product_tag .lunamed-module-actions .lunamed-module-button,
.lunamed-modules-explorer .lunamed-module-actions .lunamed-module-button {
	width: 100% !important;
	min-width: 0;
	min-height: 42px;
	margin: 0 !important;
	padding: 9px 7px !important;
	border-radius: 8px !important;
	font-family: "Nunito", Sans-serif !important;
	font-size: 13.5px !important;
	line-height: 1.1 !important;
	font-weight: 800 !important;
	text-align: center;
	box-shadow: none !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}

body.woocommerce-shop .lunamed-module-actions .lunamed-module-view,
body.tax-product_cat .lunamed-module-actions .lunamed-module-view,
body.tax-product_tag .lunamed-module-actions .lunamed-module-view,
.lunamed-modules-explorer .lunamed-module-actions .lunamed-module-view {
	background: #fff !important;
	color: var(--lm-primary) !important;
	border: 1px solid var(--lm-primary) !important;
}

body.woocommerce-shop .lunamed-module-actions .lunamed-module-view:hover,
body.tax-product_cat .lunamed-module-actions .lunamed-module-view:hover,
body.tax-product_tag .lunamed-module-actions .lunamed-module-view:hover,
.lunamed-modules-explorer .lunamed-module-actions .lunamed-module-view:hover {
	background: #EEF6FA !important;
	color: var(--lm-primary) !important;
	transform: translateY(-1px);
}

body.woocommerce-shop .lunamed-module-actions .lunamed-module-cart,
body.tax-product_cat .lunamed-module-actions .lunamed-module-cart,
body.tax-product_tag .lunamed-module-actions .lunamed-module-cart,
.lunamed-modules-explorer .lunamed-module-actions .lunamed-module-cart {
	background: var(--lm-cta) !important;
	color: var(--lm-primary) !important;
	border: 1px solid var(--lm-cta) !important;
	cursor: pointer;
}

body.woocommerce-shop .lunamed-module-actions .lunamed-module-cart:hover,
body.tax-product_cat .lunamed-module-actions .lunamed-module-cart:hover,
body.tax-product_tag .lunamed-module-actions .lunamed-module-cart:hover,
.lunamed-modules-explorer .lunamed-module-actions .lunamed-module-cart:hover {
	background: var(--lm-cta-hover) !important;
	border-color: var(--lm-cta-hover) !important;
	color: var(--lm-primary) !important;
	transform: translateY(-1px);
}

body.woocommerce-shop .lunamed-module-actions .lunamed-module-cart:disabled,
body.tax-product_cat .lunamed-module-actions .lunamed-module-cart:disabled,
body.tax-product_tag .lunamed-module-actions .lunamed-module-cart:disabled,
.lunamed-modules-explorer .lunamed-module-actions .lunamed-module-cart:disabled {
	cursor: wait;
	opacity: .82;
}

body.woocommerce-shop .lunamed-module-actions .lunamed-module-cart.is-added,
body.tax-product_cat .lunamed-module-actions .lunamed-module-cart.is-added,
body.tax-product_tag .lunamed-module-actions .lunamed-module-cart.is-added,
.lunamed-modules-explorer .lunamed-module-actions .lunamed-module-cart.is-added {
	background: #EAF7EF !important;
	border-color: #B7DEC5 !important;
	color: #216E39 !important;
}

/* Compacte weergave module-overzicht: tabel (desktop) en compacte kaarten (tablet/mobiel) */
.lunamed-compare-actions--table {
	display: grid;
	gap: 6px;
	min-width: 124px;
}

.lunamed-compare-actions--table .lunamed-compare-button,
.lunamed-compare-actions--table .lunamed-compare-button:visited {
	width: 100%;
	min-height: 34px;
	padding: 6px 12px;
	border: 1px solid var(--lm-primary);
	background: #fff;
	color: var(--lm-primary);
}

.lunamed-compare-actions--table .lunamed-compare-button:hover,
.lunamed-compare-actions--table .lunamed-compare-button:focus {
	background: #EEF6FA;
	color: var(--lm-primary);
}

.lunamed-compare-actions--card {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: 9px;
}

.lunamed-compare-actions--card .lunamed-compare-card__compact-link,
.lunamed-compare-actions--card .lunamed-compare-card__compact-link:visited {
	margin-top: 0;
}

.lunamed-compare-actions .lunamed-compare-cart {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 34px;
	margin: 0;
	padding: 6px 12px !important;
	border: 1px solid var(--lm-cta) !important;
	border-radius: 5px !important;
	background: var(--lm-cta) !important;
	color: var(--lm-primary) !important;
	font-family: inherit;
	font-size: 12px !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	white-space: nowrap;
	box-shadow: none !important;
	cursor: pointer;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.lunamed-compare-actions--table .lunamed-compare-cart {
	width: 100%;
}

.lunamed-compare-actions .lunamed-compare-cart:hover {
	background: var(--lm-cta-hover) !important;
	border-color: var(--lm-cta-hover) !important;
	color: var(--lm-primary) !important;
}

.lunamed-compare-actions .lunamed-compare-cart:disabled {
	cursor: wait;
	opacity: .82;
}

.lunamed-compare-actions .lunamed-compare-cart.is-added {
	background: #EAF7EF !important;
	border-color: #B7DEC5 !important;
	color: #216E39 !important;
}

@media (max-width: 767px) {
	.lunamed-compare-actions--card {
		margin-top: 6px;
	}

	.lunamed-compare-actions--card .lunamed-compare-cart {
		min-height: 32px;
		font-size: 11.5px !important;
	}
}


/* Notices */
body.woocommerce-shop .woocommerce-message,
body.woocommerce-shop .woocommerce-info,
body.woocommerce-shop .woocommerce-error,
body.tax-product_cat .woocommerce-message,
body.tax-product_cat .woocommerce-info,
body.tax-product_cat .woocommerce-error {
	border: 1px solid var(--lm-border);
	border-top: 3px solid var(--lm-secondary);
	border-radius: 10px;
	background: var(--lm-white);
	color: var(--lm-text);
	box-shadow: 0 4px 16px rgba(19, 90, 131, .05);
	font-family: "Nunito", Sans-serif;
}

/* Tablet */
@media (max-width: 1024px) {
	body.woocommerce-shop .site-main,
	body.tax-product_cat .site-main,
	body.tax-product_tag .site-main {
		padding: 34px 20px 56px;
	}
	body.woocommerce-shop ul.products,
	body.tax-product_cat ul.products,
	body.tax-product_tag ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 22px;
	}
}

/* Mobile */
@media (max-width: 767px) {
	body.woocommerce-shop .site-main,
	body.tax-product_cat .site-main,
	body.tax-product_tag .site-main {
		padding: 18px 10px 34px;
	}
	body.woocommerce-shop .woocommerce-result-count,
	body.tax-product_cat .woocommerce-result-count,
	body.tax-product_tag .woocommerce-result-count {
		float: none;
		margin: 0 0 12px;
	}
	body.woocommerce-shop .woocommerce-ordering,
	body.tax-product_cat .woocommerce-ordering,
	body.tax-product_tag .woocommerce-ordering {
		float: none;
		width: 100%;
		margin: 0 0 20px;
	}
	body.woocommerce-shop .woocommerce-ordering select,
	body.tax-product_cat .woocommerce-ordering select,
	body.tax-product_tag .woocommerce-ordering select {
		width: 100%;
		min-height: 48px;
		font-size: 16px;
	}
	body.woocommerce-shop ul.products,
	body.tax-product_cat ul.products,
	body.tax-product_tag ul.products {
		grid-template-columns: 1fr;
		gap: 14px;
	}
	body.woocommerce-shop .lunamed-module-actions,
	body.tax-product_cat .lunamed-module-actions,
	body.tax-product_tag .lunamed-module-actions,
	.lunamed-modules-explorer .lunamed-module-actions {
		margin: auto 0 0;
		padding-top: 11px;
		width: 100%;
		grid-template-columns: minmax(0, 43%) minmax(0, 57%);
		gap: 7px;
	}
	body.woocommerce-shop .lunamed-module-actions .lunamed-module-button,
	body.tax-product_cat .lunamed-module-actions .lunamed-module-button,
	body.tax-product_tag .lunamed-module-actions .lunamed-module-button,
	.lunamed-modules-explorer .lunamed-module-actions .lunamed-module-button {
		min-height: 40px;
		font-size: 13.5px !important;
		padding: 8px 6px !important;
	}
}


@media (max-width: 329px) {
	body.woocommerce-shop .lunamed-module-actions,
	body.tax-product_cat .lunamed-module-actions,
	body.tax-product_tag .lunamed-module-actions,
	.lunamed-modules-explorer .lunamed-module-actions {
		grid-template-columns: 1fr;
	}
}


/* Sorting is removed in PHP; this is a defensive fallback for theme overrides. */
body.woocommerce-shop .woocommerce-ordering,
body.tax-product_cat .woocommerce-ordering,
body.tax-product_tag .woocommerce-ordering {
	display: none !important;
}

/* Cart count badge on the LunaMed header cart link. */
.lunamed-cart-badge-host {
	position: relative !important;
	overflow: visible !important;
}
.lunamed-cart-count-badge {
	position: absolute;
	top: -8px;
	right: -10px;
	min-width: 19px;
	height: 19px;
	padding: 0 5px;
	border-radius: 999px;
	background: #FDC14D;
	color: #135A83;
	border: 2px solid #FFFFFF;
	font-family: "Nunito", Sans-serif;
	font-size: 11px;
	line-height: 15px;
	font-weight: 800;
	text-align: center;
	box-sizing: border-box;
	z-index: 20;
	pointer-events: none;
}
.lunamed-cart-count-badge[hidden] {
	display: none !important;
}

/* Centered add-to-cart confirmation. */
.lunamed-shop-toast {
	position: fixed;
	left: 50%;
	top: 50%;
	right: auto;
	bottom: auto;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	width: max-content;
	max-width: min(520px, calc(100vw - 32px));
	padding: 15px 18px;
	border: 1px solid #DDE5EB;
	border-radius: 12px;
	background: #FFFFFF;
	color: #1F2937;
	box-shadow: 0 18px 50px rgba(19, 90, 131, .22);
	font-family: "Nunito", Sans-serif;
	font-size: 15px;
	line-height: 1.35;
	opacity: 0;
	transform: translate(-50%, -42%);
	transition: opacity .18s ease, transform .18s ease;
}
.lunamed-shop-toast.is-visible {
	opacity: 1;
	transform: translate(-50%, -50%);
}
.lunamed-shop-toast__text {
	font-weight: 700;
}
.lunamed-shop-toast__link {
	color: #135A83 !important;
	font-weight: 800;
	text-decoration: none !important;
	white-space: nowrap;
}
.lunamed-shop-toast__link:hover {
	text-decoration: underline !important;
	text-underline-offset: 2px;
}

@media (max-width: 767px) {
	.lunamed-shop-toast {
		left: 50%;
		top: 46%;
		right: auto;
		bottom: auto;
		width: calc(100vw - 28px);
		max-width: 420px;
		padding: 13px 14px;
		gap: 10px;
		font-size: 13.5px;
		flex-wrap: wrap;
		text-align: center;
	}
	.lunamed-shop-toast__link {
		margin-left: 0;
	}
	.lunamed-cart-count-badge {
		top: -7px;
		right: -9px;
		min-width: 18px;
		height: 18px;
		font-size: 10px;
		line-height: 14px;
	}
}


/* Elementor header cart icon: ensure the count badge has a stable anchor. */
.elementor-element-561ed513,
.elementor-element-561ed513 .elementor-widget-container,
.elementor-element-561ed513 .elementor-icon-wrapper,
.elementor-element-561ed513 a.elementor-icon {
	overflow: visible !important;
}
.elementor-element-561ed513 a.elementor-icon {
	position: relative !important;
}
.elementor-element-561ed513 .lunamed-cart-count-badge {
	top: -10px;
	right: -12px;
}
