/* iDanny day deals — intentionally inherits the existing Popular card grid. */
#idanny-home .idanny-home-products--day {
	margin-top: 42px;
}

#idanny-home .idanny-home-products--day > h2 {
	color: #11131a;
}

#idanny-home .idanny-home-products--day .idanny-home-products__viewport {
	overflow: clip;
	overflow-clip-margin: 12px;
}

#idanny-home .idanny-home-products--day ul.products > li.product,
#idanny-home .idanny-home-products--day .cmsmasters_product {
	position: relative !important;
}

#idanny-home .idanny-home-products--day .cmsmasters_product_wrapper_border {
	position: relative !important;
	overflow: hidden !important;
}

/* Day products use a custom price renderer and do not receive the regular
 * catalogue bonus node. Render the same fixed reward in every day card. */
#idanny-home .idanny-home-products--day .idanny-product-bonus {
	display: none !important;
}

#idanny-home .idanny-home-products--day .cmsmasters_product_wrapper_border::after {
	position: absolute;
	right: 14px;
	bottom: 106px;
	z-index: 40;
	color: #625cff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	content: '+300';
	pointer-events: none;
}

.idanny-day-ribbon {
	position: absolute;
	top: -12px;
	left: -12px;
	z-index: 35;
	display: block;
	width: 108px;
	height: 108px;
	/* The card frame performs the clipping. Keeping this wrapper visible avoids
	 * the rectangular cut-off at the right end of the diagonal band. */
	overflow: visible;
	pointer-events: none;
}

.idanny-day-ribbon__face {
	position: absolute;
	top: 27px;
	left: -52px;
	z-index: 3;
	display: flex;
	width: 200px;
	height: 35px;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 2px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, .2) 0%, rgba(255, 255, 255, 0) 42%),
		linear-gradient(102deg, #198cff 0%, #3d61ff 35%, #6846f4 68%, #8c32e4 100%);
	box-shadow:
		0 6px 12px rgba(76, 64, 232, .2),
		0 2px 5px rgba(31, 91, 225, .16),
		inset 0 1px 0 rgba(255, 255, 255, .34),
		inset 0 -1px 0 rgba(45, 29, 145, .18);
	transform: rotate(-45deg);
	transform-origin: center;
}

.idanny-day-ribbon__face::before {
	position: absolute;
	top: 3px;
	left: 15px;
	width: 110px;
	height: 8px;
	border-radius: 50%;
	background: linear-gradient(90deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .03));
	content: '';
}

.idanny-day-ribbon__face > span {
	position: relative;
	z-index: 2;
	color: rgba(249, 248, 255, .9);
	font-size: 10px;
	font-weight: 750;
	line-height: 1;
	letter-spacing: .065em;
	text-shadow: 0 1px 2px rgba(39, 25, 129, .34);
	white-space: nowrap;
}

.idanny-day-ribbon__tail {
	display: none;
}

.idanny-day-ribbon__tail--top {
	top: 1px;
	left: 61px;
	width: 43px;
	height: 19px;
	border-radius: 4px 10px 4px 2px;
	clip-path: polygon(0 28%, 100% 0, 82% 100%, 0 82%);
}

.idanny-day-ribbon__tail--side {
	top: 61px;
	left: 1px;
	width: 19px;
	height: 43px;
	border-radius: 2px 4px 10px 4px;
	clip-path: polygon(28% 0, 82% 0, 100% 82%, 0 100%);
}

.idanny-day-ribbon__tail--top::after,
.idanny-day-ribbon__tail--side::after {
	position: absolute;
	background: #35207e;
	content: '';
}

.idanny-day-ribbon__tail--top::after {
	left: 0;
	bottom: 0;
	width: 14px;
	height: 8px;
	clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.idanny-day-ribbon__tail--side::after {
	top: 0;
	right: 0;
	width: 8px;
	height: 14px;
	clip-path: polygon(0 0, 100% 0, 0 100%);
}

body.single-product.idanny-day-deal-product .woocommerce-product-gallery,
body.single-product.idanny-day-deal-product .cmsmasters_product_left_column {
	position: relative !important;
	overflow: hidden !important;
}

body.single-product .idanny-day-ribbon--single {
	top: 0;
	left: 0;
	width: 118px;
	height: 118px;
	opacity: 0;
	visibility: hidden;
}

body.single-product .idanny-day-ribbon--single.is-ready {
	opacity: 1;
	visibility: visible;
}

body.single-product .idanny-day-ribbon--single .idanny-day-ribbon__face {
	top: 39px;
	left: -53px;
	width: 220px;
	height: 38px;
}

body.single-product .idanny-day-ribbon--single .idanny-day-ribbon__face > span {
	font-size: 11px;
}

body.single-product .idanny-day-ribbon--single .idanny-day-ribbon__tail--top {
	left: 68px;
	width: 47px;
}

body.single-product .idanny-day-ribbon--single .idanny-day-ribbon__tail--side {
	top: 68px;
	height: 47px;
}

#idanny-home .idanny-day-price {
	display: flex;
	width: 100%;
	flex-direction: column;
	align-items: flex-start;
	gap: 1px;
}

#idanny-home .idanny-day-price__old {
	display: flex;
	flex-direction: column;
	gap: 0;
}

#idanny-home .idanny-day-price__old del {
	display: block;
	margin: 0;
}

#idanny-home .idanny-day-price__current {
	display: block;
	color: inherit;
	font: inherit;
	white-space: nowrap;
}

/* Three price rows: regular, sale and the current deal price. */
#idanny-home .idanny-home-products--day .cmsmasters_product_info_wrap,
#idanny-home .idanny-home-products--day .cmsmasters_product_info,
#idanny-home .idanny-home-products--day .price {
	height: 54px !important;
	min-height: 54px !important;
}

/* Keep the cart button aligned with Popular product cards. */
#idanny-home .idanny-home-products--day .cmsmasters_product_add_wrap {
	transform: translateY(-16px) !important;
}

/* Match the price block's bottom inset to Popular product cards. */
#idanny-home .idanny-home-products--day .cmsmasters_product_info {
	transform: translateY(-16px) !important;
}

#idanny-home .idanny-home-products--day .cmsmasters_product_add_inner {
	transform: none !important;
}

@media only screen and (max-width: 767px) {
	#idanny-home .idanny-home-products--day {
		margin-top: 31px;
	}

	#idanny-home .idanny-home-products--day .cmsmasters_product_wrapper_border::after {
		right: 10px;
		bottom: 82px;
	}

	/* The three-row day price uses a 54px box versus 36px in regular cards.
	 * Move the complete bottom row together by that remaining visual offset. */
	#idanny-home .idanny-home-products--day .cmsmasters_product_info_wrap {
		transform: translateY(16px) !important;
	}

	#idanny-home .idanny-home-products--day .cmsmasters_product_info,
	#idanny-home .idanny-home-products--day .cmsmasters_product_add_wrap {
		transform: none !important;
	}

	/* The cart bottom is now correct; only lift the three-line price so its
	 * current-price baseline matches the regular two-line product cards. */
	#idanny-home .idanny-home-products--day .cmsmasters_product_info {
		transform: translateY(-14px) !important;
	}

	/* Match the cart button baseline used by Popular products while leaving
	 * the independently positioned three-line price untouched. */
	#idanny-home .idanny-home-products--day .cmsmasters_product_add_wrap {
		transform: translateY(-16px) !important;
	}

	#idanny-home .idanny-home-products--day .cmsmasters_product_button.add_to_cart_button {
		background-color: #5260f7 !important;
		background-image:
			url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 4.5h2l1.9 8.2a2 2 0 0 0 2 1.6h7.5a2 2 0 0 0 2-1.6L20 7.2H7'/%3E%3Cpath d='M11.8 8.2v4M9.8 10.2h4'/%3E%3Ccircle cx='10' cy='18.5' r='1.25'/%3E%3Ccircle cx='17' cy='18.5' r='1.25'/%3E%3C/svg%3E"),
			linear-gradient(135deg, #315fff 0%, #6a42ef 100%) !important;
		background-position: center, center !important;
		background-size: 23px 23px, 100% 100% !important;
		background-repeat: no-repeat !important;
	}

	#idanny-home .idanny-home-products--day .cmsmasters_product_info_wrap,
	#idanny-home .idanny-home-products--day .cmsmasters_product_info,
	#idanny-home .idanny-home-products--day .price {
		height: 54px !important;
		min-height: 54px !important;
	}

	#idanny-home .idanny-home-products--day .cmsmasters_product_header,
	#idanny-home .idanny-home-products--day .cmsmasters_product_title,
	#idanny-home .idanny-home-products--day .cmsmasters_product_title a {
		flex-basis: 60px !important;
		height: 60px !important;
		min-height: 60px !important;
		max-height: 60px !important;
		-webkit-line-clamp: 3 !important;
		line-clamp: 3 !important;
	}

	#idanny-home .idanny-home-products--day .idanny-day-ribbon {
		top: -10px !important;
		left: -10px !important;
		width: 92px;
		height: 92px;
	}

	.idanny-day-ribbon__face {
		top: 21px;
		left: -50px;
		width: 180px;
		height: 31px;
	}

	.idanny-day-ribbon__face > span {
		font-size: 8.5px;
		letter-spacing: .055em;
	}

	.idanny-day-ribbon__tail--top {
		left: 51px;
		width: 38px;
		height: 17px;
	}

	.idanny-day-ribbon__tail--side {
		top: 51px;
		width: 17px;
		height: 38px;
	}

	body.single-product .idanny-day-ribbon--single {
		top: 0;
		left: 0;
		width: 102px;
		height: 102px;
	}

	body.single-product .idanny-day-ribbon--single .idanny-day-ribbon__face {
		top: 33px;
		left: -49px;
		width: 195px;
		height: 33px;
	}

	body.single-product .idanny-day-ribbon--single .idanny-day-ribbon__face > span {
		font-size: 9px;
	}

	body.single-product .idanny-day-ribbon--single .idanny-day-ribbon__tail--top {
		left: 57px;
		width: 42px;
	}

	body.single-product .idanny-day-ribbon--single .idanny-day-ribbon__tail--side {
		top: 57px;
		height: 42px;
	}

	#idanny-home .idanny-home-products--day .price .idanny-day-price__current,
	#idanny-home .idanny-home-products--day .price .idanny-day-price__current .amount {
		color: #17171c !important;
		font-size: 13px !important;
		font-weight: 700 !important;
		line-height: 1.15 !important;
	}

}
