/* =========================================
   Techzu WooCommerce Free Gifts
   Taime product page styling
   ========================================= */

.tz-product-free-gifts {
	box-sizing: border-box;
	width: 100%;
	margin: 22px 0;
	padding: 18px;
	background: #fff;
	border: 1px solid #e8e4df;
	border-radius: 8px;
	font-family: inherit;
	color: inherit;
}

/* Section heading */
.tz-product-free-gifts .tz-free-gifts-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 16px;
	padding: 0;
	color: #222;
	font-family: inherit;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.4;
}

/* Gift list */
.tz-product-free-gifts .tz-free-gifts-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Individual gift row */
.tz-product-free-gifts .tz-free-gift-item {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 10px;
	background: #faf9f7;
	border: 1px solid #efede9;
	border-radius: 6px;
	list-style: none;
	transition: border-color 0.2s ease,
				background-color 0.2s ease;
}

.tz-product-free-gifts .tz-free-gift-item:hover {
	background: #fff;
	border-color: #ded8cf;
}

/* Gift thumbnail */
.tz-product-free-gifts .tz-free-gift-image {
	display: flex;
	flex: 0 0 64px;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	overflow: hidden;
	margin: 0;
	padding: 0;
	background: #fff;
	border: 1px solid #eeece8;
	border-radius: 5px;
}

.tz-product-free-gifts .tz-free-gift-image img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	object-fit: contain;
	object-position: center;
}

/* Gift information */
.tz-product-free-gifts .tz-free-gift-details {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-width: 0;
	margin: 0;
	padding: 0;
}

/* Gift product name */
.tz-product-free-gifts .tz-free-gift-name {
	display: block;
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	padding: 0;
	color: #333;
	font-family: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

/* FREE label */
.tz-product-free-gifts .tz-free-gift-price {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 5px 9px;
	background: #eaf5ec;
	border: 1px solid #d4e9d8;
	border-radius: 4px;
	color: #23743b;
	font-family: inherit;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.04em;
	white-space: nowrap;
}

/* Elementor and WooCommerce compatibility */
.elementor-widget .tz-product-free-gifts,
.woocommerce .tz-product-free-gifts {
	box-sizing: border-box;
}

.tz-product-free-gifts ul,
.tz-product-free-gifts li {
	list-style: none;
}

/* Tablet */
@media (max-width: 767px) {
	.tz-product-free-gifts {
		margin: 18px 0;
		padding: 15px;
	}

	.tz-product-free-gifts .tz-free-gifts-title {
		font-size: 17px;
		margin-bottom: 13px;
	}

	.tz-product-free-gifts .tz-free-gift-item {
		gap: 11px;
		padding: 9px;
	}

	.tz-product-free-gifts .tz-free-gift-image {
		flex-basis: 58px;
		width: 58px;
		height: 58px;
	}
}

/* Small mobile */
@media (max-width: 480px) {
	.tz-product-free-gifts {
		margin: 16px 0;
		padding: 12px;
		border-radius: 6px;
	}

	.tz-product-free-gifts .tz-free-gifts-title {
		font-size: 16px;
		line-height: 1.45;
	}

	.tz-product-free-gifts .tz-free-gift-list {
		gap: 8px;
	}

	.tz-product-free-gifts .tz-free-gift-item {
		gap: 10px;
		padding: 8px;
	}

	.tz-product-free-gifts .tz-free-gift-image {
		flex-basis: 52px;
		width: 52px;
		height: 52px;
	}

	.tz-product-free-gifts .tz-free-gift-details {
		gap: 8px;
	}

	.tz-product-free-gifts .tz-free-gift-name {
		font-size: 13px;
		line-height: 1.4;
	}

	.tz-product-free-gifts .tz-free-gift-price {
		padding: 4px 6px;
		font-size: 10px;
	}
}

/* Display Gift: FREE on one line */
dl.variation {
    display: flex !important;
    align-items: baseline;
    gap: 5px;
    margin: 0;
}

dl.variation dt.variation-Gift {
    display: inline-block;
    margin: 0;
    font-weight: 600;
}

dl.variation dd.variation-Gift {
    display: inline-block;
    margin: 0;
}

dl.variation dd.variation-Gift p {
    display: inline;
    margin: 0;
}


/* Display free gift quantity as plain text, not an input. */
.tzfg-locked-quantity {
	display: inline-block;
	min-width: 2em;
	text-align: center;
	font-weight: 500;
}

/* Hide quantity controls if a theme adds controls around the fixed value. */
.woocommerce-cart .cart_item .tzfg-locked-quantity input,
.woocommerce-cart .cart_item .tzfg-locked-quantity button {
	display: none !important;
}