/* Homepage replacement and native WooCommerce Group Buy archive presentation. */
html.wgrm-storefront-js body.wgrm-home-storefront.wgrm-home-groupbuy-ready .elementor-element[data-id="4d8e862"],
html.wgrm-storefront-js body.wgrm-home-storefront.wgrm-home-groupbuy-ready .elementor-element[data-id="76d4059"] {
	display: none;
}

.wgrm-home-groupbuy,
.wgrm-groupbuy-archive-intro {
	box-sizing: border-box;
}

.wgrm-home-groupbuy *,
.wgrm-home-groupbuy *::before,
.wgrm-home-groupbuy *::after,
.wgrm-groupbuy-archive-intro *,
.wgrm-groupbuy-archive-intro *::before,
.wgrm-groupbuy-archive-intro *::after {
	box-sizing: border-box;
}

.wgrm-home-groupbuy {
	width: 100%;
	padding: clamp(26px, 3.5vw, 46px) 20px clamp(42px, 5vw, 66px);
	background: #fff;
}

.wgrm-home-groupbuy__inner {
	width: min(100%, 1220px);
	margin: 0 auto;
}

.wgrm-home-groupbuy__discovery {
	position: relative;
	display: grid;
	grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.55fr);
	gap: clamp(22px, 3vw, 42px);
	align-items: stretch;
	min-height: 292px;
	margin-bottom: clamp(30px, 4vw, 46px);
	padding: clamp(24px, 3vw, 38px);
	border-radius: 10px;
	background: linear-gradient(112deg, #0752c7 0%, #1269ec 55%, #0a57d3 100%);
	box-shadow: 0 18px 42px rgba(15, 86, 194, 0.18);
	color: #fff;
	overflow: hidden;
}

.wgrm-home-groupbuy__discovery::before,
.wgrm-home-groupbuy__discovery::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
}

.wgrm-home-groupbuy__discovery::before {
	width: 250px;
	height: 250px;
	right: -105px;
	top: -128px;
	border: 42px solid rgba(255, 255, 255, 0.07);
}

.wgrm-home-groupbuy__discovery::after {
	width: 150px;
	height: 150px;
	left: 28%;
	bottom: -118px;
	background: rgba(255, 255, 255, 0.05);
}

.wgrm-home-groupbuy__discovery-copy,
.wgrm-home-groupbuy__featured {
	position: relative;
	z-index: 1;
}

.wgrm-home-groupbuy__discovery-copy {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
}

.wgrm-home-groupbuy__eyebrow,
.wgrm-home-groupbuy__heading > div > span,
.wgrm-groupbuy-archive-intro__copy > span {
	display: block;
	margin-bottom: 7px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.wgrm-home-groupbuy__discovery h2 {
	max-width: 470px;
	margin: 0 0 12px;
	font-size: clamp(25px, 3vw, 39px);
	line-height: 1.12;
	color: #fff;
}

.wgrm-home-groupbuy__discovery-copy > p {
	max-width: 530px;
	margin: 0;
	font-size: 14px;
	line-height: 1.65;
	color: rgba(255, 255, 255, 0.9);
}

.wgrm-home-groupbuy__discovery-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 16px;
	margin-top: 20px;
}

.wgrm-home-groupbuy__primary-action,
.wgrm-home-groupbuy__text-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 41px;
	border-radius: 5px;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none;
}

.wgrm-home-groupbuy__primary-action {
	padding: 10px 16px;
	background: #fff;
	color: #0a58cd;
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
}

.wgrm-home-groupbuy__text-action {
	min-height: auto;
	padding: 5px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.72);
	border-radius: 0;
	color: #fff;
}

.wgrm-home-groupbuy__primary-action:hover,
.wgrm-home-groupbuy__text-action:hover {
	transform: translateY(-1px);
}

.wgrm-home-groupbuy__discovery-copy .wgrm-home-groupbuy__assurance {
	margin-top: 14px;
	font-size: 11px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.72);
}

.wgrm-home-groupbuy__featured {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	align-items: stretch;
	padding: 4px 0;
}

.wgrm-home-groupbuy__saving {
	position: absolute;
	z-index: 3;
	left: -24px;
	top: -17px;
	display: grid;
	place-items: center;
	width: 66px;
	height: 66px;
	padding: 8px;
	border: 4px solid rgba(255, 255, 255, 0.28);
	border-radius: 50%;
	background: #fb4e6d;
	font-size: 10px;
	font-weight: 900;
	line-height: 1.12;
	text-align: center;
	color: #fff;
	box-shadow: 0 10px 26px rgba(119, 23, 49, 0.24);
}

.wgrm-home-featured-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 12px 12px 14px;
	border: 1px solid rgba(255, 255, 255, 0.44);
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 12px 28px rgba(6, 47, 121, 0.2);
	color: #1f2937;
	text-decoration: none;
	overflow: hidden;
	transition: transform 160ms ease, box-shadow 160ms ease;
}

.wgrm-home-featured-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 16px 34px rgba(6, 47, 121, 0.27);
}

.wgrm-home-featured-card__platform,
.wgrm-home-featured-card__discount {
	position: absolute;
	z-index: 2;
	top: 9px;
	padding: 4px 7px;
	border-radius: 999px;
	font-size: 9px;
	font-weight: 900;
	line-height: 1;
}

.wgrm-home-featured-card__platform {
	left: 9px;
	background: #edf4ff;
	color: #0c5ed7;
}

.wgrm-home-featured-card__discount {
	right: 9px;
	background: #ffedf1;
	color: #da3552;
}

.wgrm-home-featured-card__image {
	display: grid;
	place-items: center;
	aspect-ratio: 1 / 1;
	margin: 15px 0 9px;
	overflow: hidden;
}

.wgrm-home-featured-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.wgrm-home-featured-card > strong {
	display: -webkit-box;
	min-height: 32px;
	margin-top: auto;
	overflow: hidden;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.35;
	color: #1f2937;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.wgrm-home-featured-card__price-label {
	margin-top: 7px;
	font-size: 9px;
	line-height: 1.2;
	color: #7a8493;
}

.wgrm-home-featured-card__price {
	margin-top: 2px;
	font-size: 13px;
	font-weight: 800;
	line-height: 1.2;
	color: #e5485f;
}

.wgrm-home-featured-card__price .woocommerce-Price-amount {
	color: inherit;
}

.wgrm-home-groupbuy__featured-empty {
	display: flex;
	grid-column: 1 / -1;
	flex-direction: column;
	justify-content: center;
	min-height: 220px;
	padding: 30px;
	border: 1px dashed rgba(255, 255, 255, 0.5);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.1);
	text-align: center;
}

.wgrm-home-groupbuy__featured-empty strong {
	font-size: 18px;
	color: #fff;
}

.wgrm-home-groupbuy__featured-empty span {
	margin-top: 7px;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.8);
}

.wgrm-home-groupbuy__heading {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 20px;
}

.wgrm-home-groupbuy__heading > div:first-child {
	min-width: 0;
}

.wgrm-home-groupbuy__heading > div > span,
.wgrm-groupbuy-archive-intro__copy > span {
	margin-bottom: 4px;
	color: #ef9419;
}

.wgrm-home-groupbuy__heading h2 {
	margin: 0;
	font-size: clamp(24px, 2.6vw, 34px);
	line-height: 1.15;
	color: #182230;
}

.wgrm-home-groupbuy__heading p {
	margin: 7px 0 0;
	font-size: 13px;
	line-height: 1.55;
	color: #697386;
}

.wgrm-home-groupbuy__archive-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}

.wgrm-home-groupbuy__archive-links a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 34px;
	padding: 7px 12px;
	border: 1px solid #dce3ec;
	border-radius: 4px;
	background: #fff;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #344054;
	text-decoration: none;
}

.wgrm-home-groupbuy__archive-links .wgrm-home-groupbuy__view-all {
	border-color: #1769df;
	background: #1769df;
	color: #fff;
}

/* Woodmart's loop-start template uses CSS variables rather than ul.products. */
.wgrm-home-groupbuy .products.wd-products {
	--wd-col-lg: 5;
	--wd-col-md: 3;
	--wd-col-sm: 2;
	--wd-gap-lg: 20px;
	--wd-gap-sm: 12px;
}

.wgrm-home-groupbuy .wd-products-element,
.wgrm-home-groupbuy .products.wd-products {
	width: 100%;
}

.wgrm-home-groupbuy__empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 180px;
	padding: 28px;
	border: 1px dashed #d6dee8;
	border-radius: 8px;
	background: #f8fafc;
	text-align: center;
}

.wgrm-home-groupbuy__empty strong {
	font-size: 18px;
	color: #1f2937;
}

.wgrm-home-groupbuy__empty span {
	margin-top: 6px;
	font-size: 13px;
	color: #697386;
}

/* Native shop archive context. The product loop remains fully owned by WooCommerce/Woodmart. */
.wgrm-groupbuy-archive-intro {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 28px;
	width: 100%;
	margin: 0 0 26px;
	padding: clamp(20px, 2.6vw, 30px);
	border: 1px solid #dce7f7;
	border-radius: 8px;
	background: linear-gradient(110deg, #f4f8ff 0%, #fff 66%);
}

.wgrm-groupbuy-archive-intro__copy {
	flex: 1 1 620px;
	min-width: 0;
	max-width: 760px;
}

.wgrm-groupbuy-archive-intro__copy h2 {
	margin: 0;
	font-size: clamp(22px, 2.4vw, 31px);
	line-height: 1.18;
	color: #172033;
}

.wgrm-groupbuy-archive-intro__copy p {
	max-width: 68ch;
	margin: 8px 0 0;
	font-size: 13px;
	line-height: 1.6;
	color: #657084;
	overflow-wrap: anywhere;
}

.wgrm-groupbuy-archive-tabs {
	display: flex;
	flex: 0 1 auto;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 8px;
}

.wgrm-groupbuy-archive-tabs__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	padding: 8px 13px;
	border: 1px solid #d8e0ea;
	border-radius: 5px;
	background: #fff;
	font-size: 11px;
	font-weight: 800;
	color: #354052;
	text-decoration: none;
	transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.wgrm-home-groupbuy__primary-action:focus-visible,
.wgrm-home-groupbuy__text-action:focus-visible,
.wgrm-home-groupbuy__archive-links a:focus-visible,
.wgrm-home-featured-card:focus-visible,
.wgrm-groupbuy-archive-tabs__link:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 3px;
}

.wgrm-groupbuy-archive-tabs__link:hover,
.wgrm-groupbuy-archive-tabs__link.is-active {
	border-color: #1469e8;
	background: #1469e8;
	color: #fff;
}

body.wgrm-groupbuy-archive .woocommerce-products-header__title,
body.wgrm-groupbuy-archive .page-title {
	text-wrap: balance;
}

@media (max-width: 1024px) {
	.wgrm-home-groupbuy__discovery {
		grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
	}

	.wgrm-home-groupbuy__featured {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.wgrm-home-featured-card:nth-of-type(4) {
		display: none;
	}

	.wgrm-home-groupbuy .products.wd-products {
		--wd-col-lg: 3;
		--wd-col-md: 3;
	}
}

@media (max-width: 780px) {
	.wgrm-home-groupbuy {
		padding-inline: 14px;
	}

	.wgrm-home-groupbuy__discovery {
		grid-template-columns: 1fr;
		min-height: 0;
	}

	.wgrm-home-groupbuy__featured {
		grid-template-columns: repeat(3, minmax(150px, 1fr));
		overflow-x: auto;
		padding: 18px 2px 4px;
		scroll-snap-type: x proximity;
	}

	.wgrm-home-featured-card {
		scroll-snap-align: start;
	}

	.wgrm-home-featured-card:nth-of-type(4) {
		display: flex;
	}

	.wgrm-home-groupbuy__saving {
		left: 2px;
		top: 0;
	}

	.wgrm-home-groupbuy__heading,
	.wgrm-groupbuy-archive-intro {
		align-items: flex-start;
		flex-direction: column;
	}

	.wgrm-home-groupbuy__archive-links,
	.wgrm-groupbuy-archive-tabs {
		width: 100%;
		justify-content: flex-start;
	}

	.wgrm-home-groupbuy .products.wd-products {
		--wd-col-lg: 2;
		--wd-col-md: 2;
		--wd-col-sm: 2;
	}
}

@media (max-width: 480px) {
	.wgrm-home-groupbuy__discovery {
		padding: 22px 18px;
	}

	.wgrm-home-groupbuy__discovery-actions,
	.wgrm-home-groupbuy__primary-action {
		width: 100%;
	}

	.wgrm-home-groupbuy__featured {
		grid-template-columns: repeat(3, minmax(138px, 1fr));
	}

	.wgrm-home-groupbuy__archive-links {
		width: 100%;
	}

	.wgrm-home-groupbuy__archive-links a {
		flex: 1 1 auto;
	}

	.wgrm-home-groupbuy__archive-links .wgrm-home-groupbuy__view-all {
		flex-basis: 100%;
	}

	.wgrm-home-groupbuy .products.wd-products {
		--wd-col-lg: 2;
		--wd-col-md: 2;
		--wd-col-sm: 2;
		--wd-gap-sm: 10px;
	}

	.wgrm-groupbuy-archive-tabs__link {
		flex: 1 1 auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wgrm-home-featured-card,
	.wgrm-groupbuy-archive-tabs__link {
		transition: none;
	}

	.wgrm-home-featured-card:hover,
	.wgrm-home-groupbuy__primary-action:hover,
	.wgrm-home-groupbuy__text-action:hover {
		transform: none;
	}
}

@media (min-width: 781px) {
	.wgrm-home-groupbuy__featured--count-2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.wgrm-home-groupbuy__featured--count-1 {
		grid-template-columns: minmax(0, 240px);
		justify-content: center;
	}
}
