/* DigitalGrow 1+1 Gift for WooCommerce */
/* Lookbek / Justinka final visual styling */

.product .thumbnail-wrapper,
.products .product .thumbnail-wrapper,
.products section.product .thumbnail-wrapper > a,
.product .thumbnail-wrapper > a {
	position: relative;
	display: block;
}

/* Product loop badge */
.dg-bogo-loop-label,
.products section.product .thumbnail-wrapper > a .dg-bogo-loop-label,
.product .thumbnail-wrapper > a .dg-bogo-loop-label {
	position: absolute;
	top: 42px;
	left: 12px;
	z-index: 6;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 22px;
	padding: 4px 8px;
	border-radius: 8px;
	background: var(--loobek-button-bg, #000000) !important;
	color: var(--loobek-button-color, #ffffff) !important;
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0;
	white-space: nowrap;
}

.products section.product .product-label,
.product .product-label {
	z-index: 7;
}

.products section.product .product-label span,
.product .product-label span {
	border-radius: 8px;
}

/* Single product gift box */
.dg-bogo-single-gift-box,
body.single-product .summary.entry-summary .dg-bogo-single-gift-box {
	margin: 18px 0 22px;
	padding: 16px;
	background: #f5f5f5 !important;
	background-color: #f5f5f5 !important;
	border: 1px solid #e5e5e5 !important;
	border-radius: 12px !important;
	color: var(--loobek-text-color, #000000);
	box-sizing: border-box;
}

/* Badge base */
.dg-bogo-badge,
.dg-bogo-cart-label,
.dg-bogo-loop-label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: fit-content;
	min-height: 22px;
	padding: 4px 8px;
	border-radius: 8px;
	background: var(--loobek-button-bg, #000000);
	color: var(--loobek-button-color, #ffffff) !important;
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0;
	white-space: nowrap;
}

.dg-bogo-badge {
	margin-bottom: 12px;
}

/* Single product gift content */
.dg-bogo-gift-content {
	display: flex;
	align-items: center;
	gap: 14px;
}

.dg-bogo-gift-image {
	width: 72px;
	height: 72px;
	flex: 0 0 72px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	overflow: hidden;
	background: var(--loobek-main-bg, #ffffff);
	border: 1px solid var(--loobek-border, #e5e5e5);
}

.dg-bogo-gift-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.dg-bogo-gift-info {
	min-width: 0;
}

.dg-bogo-gift-title {
	margin: 0 0 4px;
	font-size: 13px;
	font-weight: 600;
	line-height: 18px;
	color: var(--loobek-text-color, #000000);
}

.dg-bogo-gift-name {
	margin: 0 0 5px;
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	color: var(--loobek-text-color, #000000);
}

.dg-bogo-gift-note,
.dg-bogo-gift-unavailable p {
	margin: 0;
	font-size: 13px;
	font-weight: 400;
	line-height: 19px;
	color: var(--loobek-text-light-color, #808080);
}

/* Cart / mini cart gift item behavior */
.dg-bogo-gift-item .remove,
.dg-bogo-gift-item a.remove {
	display: none !important;
}

/* Locked gift quantity */
.dg-bogo-locked-qty {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 10px;
	border-radius: 8px;
	background: var(--loobek-quantity-bg, #f0f0f0);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	color: var(--loobek-text-color, #000000);
}

/* Cart meta wrapper */
.dg-bogo-cart-meta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	margin-top: 7px;
}

/* Gift value text */
.dg-bogo-cart-value {
	display: block;
	font-size: 12px;
	font-weight: 500;
	line-height: 17px;
	color: var(--loobek-text-light-color, #808080);
}

/* Free price */
.dg-bogo-free-price {
	display: inline-flex;
	align-items: center;
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	color: var(--loobek-text-color, #000000);
}

/* Mini cart gift quantity / price */
.dg-bogo-widget-qty {
	display: inline-flex;
	align-items: center;
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
	color: var(--loobek-text-color, #000000);
}

/* Checkout / email wrappers */
.dg-bogo-checkout-name-wrap,
.dg-bogo-email-name-wrap {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.dg-bogo-checkout-name-wrap .dg-bogo-cart-meta {
	margin-top: 5px;
}

/* Checkout: keep compact layout */
.woocommerce-checkout .dg-bogo-checkout-name-wrap {
	display: inline;
}

.woocommerce-checkout .dg-bogo-checkout-thumb {
	display: none !important;
}

/* Mini cart Lookbek refinements */
#ts-shopping-cart-sidebar .dg-bogo-cart-meta,
.ts-tiny-cart-wrapper .dg-bogo-cart-meta {
	margin-top: 6px;
}

#ts-shopping-cart-sidebar .dg-bogo-cart-label,
.ts-tiny-cart-wrapper .dg-bogo-cart-label {
	font-size: 12px;
	min-height: 22px;
	padding: 4px 8px;
	border-radius: 8px;
}

#ts-shopping-cart-sidebar .dg-bogo-cart-value,
.ts-tiny-cart-wrapper .dg-bogo-cart-value {
	font-size: 12px;
	line-height: 17px;
	color: var(--loobek-text-light-color, #808080);
}

#ts-shopping-cart-sidebar .dg-bogo-free-price,
.ts-tiny-cart-wrapper .dg-bogo-free-price,
#ts-shopping-cart-sidebar .dg-bogo-widget-qty,
.ts-tiny-cart-wrapper .dg-bogo-widget-qty {
	font-size: 13px;
	line-height: 18px;
	font-weight: 600;
	color: var(--loobek-text-color, #000000);
}

/* Cart page gift rows */
.woocommerce-cart .dg-bogo-gift-item .product-name,
.woocommerce-cart .dg-bogo-gift-item .product-price,
.woocommerce-cart .dg-bogo-gift-item .product-subtotal {
	color: var(--loobek-text-color, #000000);
}

.woocommerce-cart .dg-bogo-gift-item {
	background: var(--loobek-main-bg, #ffffff);
}

.woocommerce-cart .dg-bogo-gift-item .product-thumbnail img {
	border-radius: 8px;
}

/* Email thumbnail */
.dg-bogo-email-thumb {
	width: 48px !important;
	height: 48px !important;
	object-fit: contain !important;
	border-radius: 8px !important;
	background: #ffffff;
	border: 1px solid #e5e5e5;
	margin-right: 8px;
	vertical-align: middle;
}

/* Mobile */
@media (max-width: 767px) {
	.dg-bogo-loop-label,
	.products section.product .thumbnail-wrapper > a .dg-bogo-loop-label,
	.product .thumbnail-wrapper > a .dg-bogo-loop-label {
		top: 38px;
		left: 10px;
		font-size: 11px;
		padding: 4px 7px;
		min-height: 21px;
	}

	.dg-bogo-single-gift-box,
	body.single-product .summary.entry-summary .dg-bogo-single-gift-box {
		padding: 14px;
		margin: 16px 0 20px;
	}

	.dg-bogo-gift-content {
		align-items: flex-start;
		gap: 12px;
	}

	.dg-bogo-gift-image {
		width: 64px;
		height: 64px;
		flex-basis: 64px;
	}

	.dg-bogo-gift-title {
		font-size: 12px;
		line-height: 17px;
	}

	.dg-bogo-gift-name {
		font-size: 13px;
		line-height: 18px;
	}

	.dg-bogo-gift-note,
	.dg-bogo-gift-unavailable p {
		font-size: 12px;
		line-height: 18px;
	}

	.dg-bogo-cart-meta {
		margin-top: 6px;
	}

	.dg-bogo-badge,
	.dg-bogo-cart-label,
	.dg-bogo-loop-label {
		font-size: 11px;
		min-height: 21px;
		padding: 4px 7px;
	}

	.dg-bogo-locked-qty {
		min-width: 32px;
		height: 32px;
		font-size: 13px;
	}
}


/* Order details / thank you / admin gift badge */
.dg-bogo-order-gift-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: fit-content;
	min-height: 22px;
	margin-top: 7px;
	padding: 4px 8px;
	border-radius: 8px;
	background: #111111;
	color: #ffffff !important;
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0;
	white-space: nowrap;
}

.woocommerce-order-details .dg-bogo-order-gift-badge,
.woocommerce-view-order .dg-bogo-order-gift-badge,
.woocommerce-checkout .woocommerce-order .dg-bogo-order-gift-badge {
	display: inline-flex;
	vertical-align: middle;
}


/* v1.0.6 order / thank-you gift badge cleanup */
.dg-bogo-order-gift-badge {
	display: inline-block;
	margin-top: 7px;
	padding: 4px 8px;
	border-radius: 8px;
	background: #111111;
	color: #ffffff !important;
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
}


/* v1.0.7: public order item meta for 1+1 gift */
.woocommerce-order-details .wc-item-meta,
.woocommerce-table--order-details .wc-item-meta {
	margin-top: 6px;
}

.woocommerce-order-details .wc-item-meta li,
.woocommerce-table--order-details .wc-item-meta li {
	margin: 0;
}

.woocommerce-order-details .wc-item-meta-label,
.woocommerce-table--order-details .wc-item-meta-label {
	font-weight: 600;
}

/* v1.0.8: email rows use native WooCommerce product thumbnail only once. */
