.tungchi-group-buy-badge-front {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
	padding: 6px 12px;
	border: 1px solid #e4c29f;
	border-radius: 999px;
	background: linear-gradient(135deg, #fff4e8 0%, #fffaf5 100%);
	box-shadow: 0 6px 14px rgba(111, 68, 31, 0.08);
	color: #8b572a;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.02em;
}

.tungchi-group-buy-badge-front::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 999px;
	background: #cf7f33;
	box-shadow: 0 0 0 4px rgba(207, 127, 51, 0.14);
	flex: 0 0 auto;
}

.tungchi-group-buy-badge-front--image {
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	pointer-events: none;
	z-index: 6;
}

.tungchi-group-buy-badge-front--image::before {
	display: none;
}

.tungchi-group-buy-badge-front__image {
	display: block;
	max-width: 140px;
	height: auto;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.single-product .et_pb_wc_images,
.single-product .woocommerce-product-gallery,
.single-product .images {
	position: relative;
}

.woocommerce ul.products li.product .tungchi-group-buy-badge-front--archive.tungchi-group-buy-badge-front--image,
.woocommerce-page ul.products li.product .tungchi-group-buy-badge-front--archive.tungchi-group-buy-badge-front--image {
	position: absolute;
	top: 12px;
	left: 12px;
	margin: 0;
}

.woocommerce ul.products li.product .tungchi-group-buy-badge-front--archive.tungchi-group-buy-badge-front--image .tungchi-group-buy-badge-front__image,
.woocommerce-page ul.products li.product .tungchi-group-buy-badge-front--archive.tungchi-group-buy-badge-front--image .tungchi-group-buy-badge-front__image {
	max-width: 96px;
}

.woocommerce ul.products li.product .tungchi-group-buy-badge-front--archive {
	margin-bottom: 4px;
}

.woocommerce ul.products li.product.outofstock .woocommerce-LoopProduct-link,
.woocommerce-page ul.products li.product.outofstock .woocommerce-LoopProduct-link {
	pointer-events: none;
	cursor: default;
}

.woocommerce ul.products li.product.outofstock .tungchi-out-of-stock-button,
.woocommerce-page ul.products li.product.outofstock .tungchi-out-of-stock-button {
	cursor: default;
}

.single-product div.product .tungchi-group-buy-badge-front--single {
	margin-top: 12px;
}

.woocommerce-cart-form .product-name .tungchi-group-buy-badge-front--cart,
.shop_table .product-name .tungchi-group-buy-badge-front--cart {
	display: inline-flex;
	margin-top: 10px;
}

.woocommerce-cart-form .product-name .tungchi-group-buy-badge-front--cart.tungchi-group-buy-badge-front--image,
.shop_table .product-name .tungchi-group-buy-badge-front--cart.tungchi-group-buy-badge-front--image {
	display: inline-block;
}

.woocommerce-cart-form .product-name .tungchi-group-buy-badge-front--cart .tungchi-group-buy-badge-front__image,
.shop_table .product-name .tungchi-group-buy-badge-front--cart .tungchi-group-buy-badge-front__image {
	max-width: 92px;
}

.single-product .et_pb_wc_images > .tungchi-group-buy-badge-front--single.tungchi-group-buy-badge-front--image,
.single-product .woocommerce-product-gallery > .tungchi-group-buy-badge-front--single.tungchi-group-buy-badge-front--image,
.single-product .images > .tungchi-group-buy-badge-front--single.tungchi-group-buy-badge-front--image {
	position: absolute;
	top: 16px;
	left: 16px;
	margin: 0;
}

.single-product .et_pb_wc_images > .tungchi-group-buy-badge-front--single.tungchi-group-buy-badge-front--image .tungchi-group-buy-badge-front__image,
.single-product .woocommerce-product-gallery > .tungchi-group-buy-badge-front--single.tungchi-group-buy-badge-front--image .tungchi-group-buy-badge-front__image,
.single-product .images > .tungchi-group-buy-badge-front--single.tungchi-group-buy-badge-front--image .tungchi-group-buy-badge-front__image {
	max-width: 120px;
}

.tungchi-group-buy-gift-selector {
	margin-top: 20px;
	padding: 20px;
	border: 1px solid #ecd9c8;
	border-radius: 16px;
	background: linear-gradient(180deg, #fffaf5 0%, #fff 100%);
}

.tungchi-group-buy-gift-selector--cart {
	clear: both;
}

.tungchi-group-buy-gift-selector--hidden-source {
	display: none;
}

.tungchi-group-buy-gift-selector__header h3 {
	margin: 0 0 8px;
	font-size: 22px;
	line-height: 1.2;
	color: #6f441f;
}

.tungchi-group-buy-gift-selector__heading-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
}

.tungchi-group-buy-gift-selector__limit-box {
	display: grid;
	justify-items: center;
	gap: 6px;
	min-width: 120px;
	padding: 12px 16px;
	border: 1px solid #e5cba9;
	border-radius: 16px;
	background: linear-gradient(180deg, #fff5e6 0%, #fffdf8 100%);
	box-shadow: 0 8px 20px rgba(111, 68, 31, 0.08);
}

.tungchi-group-buy-gift-selector__limit-label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: #8b6e58;
}

.tungchi-group-buy-gift-selector__limit-value {
	font-size: 34px;
	font-weight: 800;
	line-height: 1;
	color: #cf6d1d;
}

.tungchi-group-buy-gift-selector__header p,
.tungchi-group-buy-gift-selector__footnote {
	margin: 0;
	color: #6b5a4f;
}

.tungchi-group-buy-gift-selector__status {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 14px;
}

.tungchi-group-buy-gift-selector__pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	border: 1px solid #ecd9c8;
	border-radius: 999px;
	background: #fff;
	font-size: 14px;
	color: #6f4c32;
}

.tungchi-group-buy-gift-selector__sync {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border: 1px solid #d9ead9;
	border-radius: 999px;
	background: #f5fbf4;
	font-size: 14px;
	font-weight: 700;
	color: #35663b;
}

.tungchi-group-buy-gift-selector__sync-dot {
	width: 10px;
	height: 10px;
	border-radius: 999px;
	background: #67a56d;
	box-shadow: 0 0 0 4px rgba(103, 165, 109, 0.14);
	flex: 0 0 auto;
}

.tungchi-group-buy-gift-selector__sync[data-gift-sync-state="dirty"] {
	border-color: #f0d0a6;
	background: #fff8ef;
	color: #9a631f;
}

.tungchi-group-buy-gift-selector__sync[data-gift-sync-state="dirty"] .tungchi-group-buy-gift-selector__sync-dot {
	background: #d8913b;
	box-shadow: 0 0 0 4px rgba(216, 145, 59, 0.14);
}

.tungchi-group-buy-gift-selector__sync[data-gift-sync-state="updating"] {
	border-color: #cddaf8;
	background: #f4f7ff;
	color: #315ab3;
}

.tungchi-group-buy-gift-selector__sync[data-gift-sync-state="updating"] .tungchi-group-buy-gift-selector__sync-dot {
	background: #4875db;
	box-shadow: 0 0 0 4px rgba(72, 117, 219, 0.14);
	animation: tungchi-group-buy-sync-pulse 1s ease-in-out infinite;
}

.tungchi-group-buy-gift-selector__warning {
	margin-top: 12px;
	padding: 12px 14px;
	border: 1px solid #f1b8a6;
	border-radius: 12px;
	background: #fff1ec;
	color: #a6462a;
	font-weight: 600;
}

.tungchi-group-buy-gift-selector__list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	margin-top: 18px;
}

.tungchi-group-buy-gift-option {
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 18px 20px;
	border: 1px solid #efdfd0;
	border-radius: 22px;
	background: #fff;
	transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.tungchi-group-buy-gift-option.is-selected {
	border-color: #d88d4a;
	box-shadow: 0 10px 24px rgba(111, 68, 31, 0.12);
	transform: translateY(-1px);
}

.tungchi-group-buy-gift-selector.is-over-limit .tungchi-group-buy-gift-option.is-selected {
	border-color: #d15b3b;
	box-shadow: 0 10px 24px rgba(209, 91, 59, 0.12);
}

.tungchi-group-buy-gift-option__thumb img {
	display: block;
	width: 96px;
	height: 96px;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 16px;
	flex: 0 0 auto;
}

.tungchi-group-buy-gift-option__body {
	display: grid;
	gap: 4px;
	flex: 1 1 auto;
	min-width: 0;
}

.tungchi-group-buy-gift-option__name {
	font-size: 16px;
	font-weight: 700;
	color: #2f2a25;
	line-height: 1.35;
}

.tungchi-group-buy-gift-option__meta {
	font-size: 13px;
	color: #7d6653;
}

.tungchi-group-buy-gift-option__qty {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-left: auto;
	flex: 0 0 auto;
}

.tungchi-group-buy-gift-option__qty label {
	display: flex;
	align-items: center;
	gap: 12px;
}

.tungchi-group-buy-gift-option__qty-label {
	font-size: 12px;
	font-weight: 700;
	color: #8b6e58;
	letter-spacing: 0.02em;
}

.tungchi-group-buy-gift-option__qty input.qty {
	display: none;
}

.tungchi-group-buy-gift-stepper {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 8px 10px;
	border-radius: 16px;
	background: #fbf3ea;
}

.tungchi-group-buy-gift-stepper__button {
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 12px;
	background: #efe1d2;
	color: #7c4d24;
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
}

.tungchi-group-buy-gift-stepper__button:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.tungchi-group-buy-gift-stepper__value {
	display: inline-flex;
	min-width: 24px;
	justify-content: center;
	font-size: 28px;
	font-weight: 800;
	color: #7a4a1f;
}

.tungchi-group-buy-gift-option__price {
	font-size: 18px;
	font-weight: 800;
	color: #d86b19;
}

.tungchi-group-buy-gift-note {
	margin: 6px 0 0;
	font-size: 13px;
	font-weight: 700;
	color: #8b572a;
}

@keyframes tungchi-group-buy-sync-pulse {
	0%,
	100% {
		transform: scale(1);
		opacity: 1;
	}

	50% {
		transform: scale(0.82);
		opacity: 0.55;
	}
}

.tungchi-group-buy-gift-quantity {
	display: inline-flex;
	min-width: 28px;
	justify-content: center;
	font-weight: 700;
}

.tungchi-group-buy-gift-remove-placeholder {
	display: inline-block;
	width: 1.5em;
	min-height: 1.5em;
}

.woocommerce .cart-collaterals .cart_totals .checkout-button.tungchi-group-buy-checkout-disabled,
.woocommerce-page .cart-collaterals .cart_totals .checkout-button.tungchi-group-buy-checkout-disabled {
	cursor: not-allowed;
	opacity: 0.55;
	pointer-events: none;
}

@media (max-width: 1200px) {
	.tungchi-group-buy-gift-option {
		padding: 16px 18px;
	}
}

@media (min-width: 981px) {
	.et_pb_wc_cart_products .tungchi-group-buy-gift-selector--cart {
		width: min(968px, calc(100vw - 240px));
		max-width: none;
	}
}

@media (max-width: 782px) {
	.tungchi-group-buy-gift-selector__heading-row,
	.tungchi-group-buy-gift-option,
	.tungchi-group-buy-gift-option__qty,
	.tungchi-group-buy-gift-option__qty label {
		flex-direction: column;
		align-items: stretch;
	}

	.tungchi-group-buy-gift-selector__limit-box {
		width: 100%;
	}

	.tungchi-group-buy-gift-option__thumb img {
		width: 88px;
		height: 88px;
	}

	.tungchi-group-buy-gift-option__qty {
		margin-left: 0;
		gap: 10px;
	}

	.tungchi-group-buy-gift-option__price {
		text-align: right;
	}
}

@media (max-width: 560px) {
	.tungchi-group-buy-gift-selector {
		padding: 16px;
	}

	.tungchi-group-buy-gift-stepper__button {
		width: 36px;
		height: 36px;
	}
}
