/**
 * Dynamic Deal Sections – Frontend Styles v2
 */

/* ── Section ─────────────────────────────────────────────────────────── */

.dds-deal-section {
	padding: 70px 0 0;
}

/* ── Featured card ───────────────────────────────────────────────────── */

.dds-featured-card {
	background: #fff;
	overflow: hidden;
	margin-bottom: 70px;
}

/* ── Image column ────────────────────────────────────────────────────── */

.dds-col-img {
	background: #f5f5f5;
	border-radius: 15px;
}

.dds-image-wrap {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 500px;
}

.dds-img-link {
	display: block;
	text-align: center;
	width: 100%;
	padding: 65px 90px;
	height: 100%;
}

.dds-img {
	object-fit: contain;
	display: inline-block;
	height: 100%;
}

/* ── Speech bubble ───────────────────────────────────────────────────── */

.dds-bubble {
	position: absolute;
	top: 60px;
	left: 40px;
	background: url(../../../../assets/images/bubble.png) no-repeat center center;
	background-size: contain;
	color: #fff;
	padding: 35px 70px 35px 30px;
	font-size: 18px;
	line-height: 1.15;
	max-width: 270px;
	min-height: 140px;
	z-index: 1;
	display: flex;
	align-items: center;
	text-align: center;
}

/* ── Content column ──────────────────────────────────────────────────── */

.dds-col-content {
	padding: 40px 35px 18px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* ── Pill badge ──────────────────────────────────────────────────────── */

.dds-pill {
	display: inline-block;
	color: #000;
	border: 1px solid var(--pink);
	border-radius: 100px;
	padding: 7px 16px 5px;
	font-size: 14px;
	letter-spacing: 0.5px;
	margin-bottom: 6px;
	width: fit-content;;
}

/* ── Product title ───────────────────────────────────────────────────── */

.dds-title {
	font-size: 34px;
	font-weight: 700;
	line-height: 1.1;
	color: #000;
	margin-bottom: 6px;
}

.dds-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s;
	svg {
		fill: #000;
		vertical-align: baseline;
	}
}

.dds-title a:hover {
	color: var( --pink );
	svg {
		fill: var( --pink );
	}
}

/* ── Description ─────────────────────────────────────────────────────── */

.dds-desc {
	font-size: 16px;
	line-height: 1.5;
	color: #000;
	margin-bottom: 14px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ── "Детальніше" link ───────────────────────────────────────────────── */

.dds-more-link {
	display: inline-block;
	font-size: 16px;
	font-weight: 500;
	color: #000;
	margin-bottom: 18px;
}

.dds-more-link:hover {
	color: var( --pink );
}

/* ── Raffle timer ────────────────────────────────────────────────────── */

.dds-fixed-block {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 26px 0;
	background: #fff;
	transition: background 0.2s ease-out;
}
.dds-timer {
	margin-bottom: 42px;

	.promo-duration-timer {
		padding: 0;
		border: 0;
		margin: 0;
		border-radius: 0;
		color: #000;
		background: transparent;
		text-align: left;

		.asp-rfw-duration-timer-type {
			margin: 0;
			padding: 0 15px;
			text-align: center;
			font-size: 12px;
			display: inline-block;
			border-left: 1px solid #E2E2E2;
			color: #7E7E7E;
			min-width: 85px;
			text-transform: uppercase;
			font-weight: 400;
			letter-spacing: 2px;

			&:first-child {
				padding-left: 0;
				border-left: none;
			}

			&:last-child {
				padding-right: 0;
			}

			br {
				display: block;
			}

			span {
				display: inline-block;
				margin: 0 0 3px;
				font-size: 32px;
				line-height: 1;
				color: #000;
				letter-spacing: 0;
			}
		}
	}
}



/* ── Buy button ──────────────────────────────────────────────────────── */

.dds-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--green);
	color: #000;
	border: 2px solid var(--green);
	border-radius: 100px;
	padding: 13px 24px;
	font-size: 18px;
	line-height: 1;
	transition: opacity 0.2s ease, color 0.2s ease;
	white-space: nowrap;
	align-self: flex-start;
	text-decoration: none;
	opacity: 1;
}

.dds-btn:hover {
	opacity: 0.9;
}

.dds-btn.added-to-cart {
	background: #fff;
}
.dds-btn--disabled {
	opacity: 0.45;
	pointer-events: none;
	cursor: default;
}

.dds-col-content .added_to_cart.wc-forward {
	display: none;
}
/* ── Add-to-cart notice (matches WC single-product style, floats at top) */

.dds-added-notice {
	position: fixed;
	top: -120px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 9999;
	min-width: 320px;
	max-width: 90vw;
	transition: top 0.35s ease;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
	border-radius: 4px;
}

.dds-added-notice--visible {
	top: 16px;
}

/* ── Slider ──────────────────────────────────────────────────────────── */

.dds-slider {
	position: relative;
}

/* ── Owl Carousel nav buttons ────────────────────────────────────────── */
.dds-owl-slider.owl-carousel {
	padding: 0 10px;
}
.dds-owl-slider.owl-carousel .owl-nav {
	margin: 0;
}

.dds-owl-slider.owl-carousel .owl-nav button.owl-prev,
.dds-owl-slider.owl-carousel .owl-nav button.owl-next {
	width: 55px;
	height: 55px;
	border-radius: 50%;
	border: none;
	background: #E8E8E8;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	color: var(--black1);
	transition: opacity 0.18s ease;
	line-height: 0;
	opacity: 0.7;
	position: absolute;
	top: calc(50% - 27px);
	left: -20px;
	z-index: 10;
}

.dds-owl-slider.owl-carousel .owl-nav button.owl-next {
	right: -20px;
	left: auto;
}

.dds-owl-slider.owl-carousel .owl-nav button:hover {
	background: #E8E8E8;
	opacity: 1;
}

.dds-owl-slider.owl-carousel .owl-nav button span {
	display: none;
}

/* ── Slider product cards ────────────────────────────────────────────── */

.dds-slide-card {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	padding: 0;
	justify-content: space-between;
	min-height: 580px;
}

.dds-slide-card .added_to_cart {
	display: none;
}
.dds-slide-card .dds-pill {
	margin-bottom: 10px;
	font-size: 12px;
	padding: 4px 14px;
}

.dds-slide-img-link {
	display: flex;
	text-align: center;
	background: #f5f5f5;
	border-radius: 15px;
	padding: 18px 26px;
	margin-bottom: 15px;
	height: 300px;
	justify-content: center;
	align-items: center;
}

.dds-slide-img {
	max-height: 270px;
	width: auto;
	max-width: 100%;
	object-fit: contain;
	display: inline-block;
}

.dds-slide-content {
	display: flex;
	flex-direction: column;
}

.dds-slide-category {
	font-size: 16px;
	font-weight: 600;
	color: var(--pink);
	margin-bottom: 3px;

	svg {
		fill: var(--pink);
	}
}

.dds-slide-title {
	font-size: 20px;
	font-weight: 500;
	line-height: 1.1;
	color: #000;
	margin-bottom: 5px;
}

.dds-slide-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s;
}

.dds-slide-title a:hover {
	color: var( --pink );
}

.dds-slide-desc {
	font-size: 14px;
	line-height: 1.5;
	color: #7E7E7E;
	margin-bottom: 15px;
	/* clamp to 3 lines */
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	max-height: 63px;
}

.dds-slide-more-link {
	font-size: 14px;
	margin-bottom: 0;
}
.dds-buttons-block {
	margin-top: 30px;
}
.dds-slide-btn {
	padding: 11px 18px;
	font-size: 16px;
	text-align: center;
}

/* ── Desktop ( < 1440 px ) ────────────────────────────────────────────── */

@media ( max-width: 1440px ) {
	.dds-more-link {
		margin-bottom: 14px;
	}
	.dds-slide-more-link {
		margin-bottom: 0;
	}

	.dds-timer {
		& .promo-duration-timer {
			.asp-rfw-duration-timer-type {
				margin: 0;
				min-width: 80px;
			}
		}
	}

	.dds-slide-card {
		min-height: 600px;
	}
}

/* ── Tablet ( < 1199 px ) ────────────────────────────────────────────── */
@media ( max-width: 1199px ) {
	.dds-featured-card {
		overflow: visible;
		margin-bottom: 50px;
	}
	.dds-col-content {
		padding: 40px 30px 18px;
	}
	.dds-img-link {
		padding: 40px 45px 30px;
	}
	.dds-bubble {
		top: 25px;
		left: -20px;
		padding: 35px 60px 35px 25px;
		font-size: 14px;
		line-height: 1;
		max-width: 220px;
		min-height: 140px;
	}
	.dds-title {
		font-size: 30px;
		margin: 0;
	}
	.dds-desc,
	.dds-more-link {
		font-size: 14px;
		margin-bottom: 10px;
	}
	.dds-timer {
		margin-bottom: 30px;
		& .promo-duration-timer {
			.asp-rfw-duration-timer-type {
				margin: 0;
				min-width: 87px;
				font-size: 10px;
				span {
					font-size: 28px;
				}
			}
		}
	}
	.dds-btn {
		font-size: 18px;
	}
	.dds-slide-card {
		min-height: 585px;
	}
	.dds-slide-more-link {
		margin-bottom: 0;
	}
	.dds-slide-img-link {
		height: 300px;
	}
}

@media ( max-width: 991px ) {
	.dds-deal-section {
		background: #f5f5f5;
	}
	.dds-col-img,
	.dds-featured-card {
		background: transparent;
	}
	.dds-featured-card {
		padding: 0 40px;
		position: relative;

		&:before {
			content: '';
			position: absolute;
			top: 110px;
			left: 0;
			width: 100%;
			background: #fff;
			border-radius: 15px;
			z-index: 0;
			height: calc(100% - 110px);
		}
	}
	.dds-image-wrap {
		height: 300px;
	}
	.dds-bubble {
		top: -20px;
		left: 0;
		padding: 30px 55px 30px 25px;
		font-size: 14px;
		line-height: 1.1;
		max-width: 215px;
		font-weight: 400;
		min-height: 0;
	}

	.dds-img-link {
		padding: 0 40px 20px;
		text-align: center;
	}

	.dds-col-content {
		padding: 0 0 30px;
		text-align: center;
		align-items: center;
		z-index: 1;
	}
	.dds-title {
		font-size: 32px;
	}
	.dds-desc {
		font-size: 16px;
	}
	.dds-fixed-block {
		padding: 26px 20px;
		align-items: center;

		&.dds-is-fixed {
			position: fixed;
			bottom: 0;
			left: 0;
			right: 0;
			z-index: 200;
			background: linear-gradient(180deg, rgba(245, 245, 245, 0.95) 0%, #F5F5F5 30%, #F5F5F5 100%);
			border-radius: 10px;
		}
	}
	.dds-timer {
		display: inline-block;
		margin-bottom: 30px;

		& .promo-duration-timer {
			display: inline-flex;
		}
	}
	.dds-timer {
		display: inline-block;
		margin-bottom: 30px;
		.promo-duration-timer.promo-duration-timer-shop {
			display: inline-flex;

			span {
				width: 100%;
			}
		}
	}

	.dds-btn {
		align-self: center;
		min-width: 360px;
		justify-content: center;
	}

	.dds-slide-card {
		padding: 0 20px 30px;
		text-align: center;
		min-height: 560px;
	}

	.dds-slide-img-link {
		background: transparent;
		margin-bottom: 10px;
		height: auto;
	}
	.dds-slide-img {
		max-height: 250px;
	}
	.dds-slide-title {
		margin: 0;
	}
	.dds-slide-desc {
		margin-bottom: 5px;
	}

	.dds-slide-more-link {
		font-size: 14px;
		text-decoration: underline;
	}
	.dds-buttons-block {
		margin-top: 20px;
	}
	.dds-slide-btn {
		min-width: 0;
	}
}

/* ── Mobile ( < 768 px ) ─────────────────────────────────────────────── */

@media ( max-width: 767px ) {

	.dds-deal-section {
		padding: 40px 0 0;

		.container {
			padding: 0;
		}
	}

	.dds-featured-card {
		margin-bottom: 35px;
		padding: 0;
		&:before {
			top: 80px;
			height: calc(100% - 80px);
		}
	}

	/* Stack image → content */
	.dds-featured-card .row {
		flex-direction: column;
	}

	.dds-col-img,
	.dds-col-content {
		width: 100%;
		max-width: 100%;
		flex: 0 0 100%;
	}
	.dds-image-wrap {
		height: 240px;
	}
	.dds-bubble {
		font-size: 12px;
		padding: 10px 45px 10px 20px;
		line-height: 1.2;
		max-width: 200px;
		left: 20px;
		top: -10px;
		min-height: 110px;

	}

	.dds-col-content {
		padding: 0 20px;
	}

	.dds-pill {
		padding: 5px 15px 4px;
		font-size: 12px;
		margin-bottom: 4px;
	}
	.dds-title {
		font-size: 24px;
		margin-bottom: 3px;
		svg {
			width: 20px;
			height: 20px;
		}
	}
	.dds-desc {
		font-size: 14px;
		margin-bottom: 7px;
	}
	.dds-more-link {
		margin-bottom: 16px;
		font-size: 14px;
		text-decoration: underline;
	}
	.dds-slide-more-link {
		margin-bottom: 0;
	}
	.dds-fixed-block {
		padding: 25px 5px;
	}

	.dds-timer {
		margin-bottom: 16px;
		.promo-duration-timer.promo-duration-timer-shop {
			 & span:not(:first-child),
			 & .asp-rfw-duration-timer-type {
				font-size: 10px;
				padding: 0 11px;
				min-width: 80px;
			}

			span {
				width: 100%;
				font-size: 30px;
			}
		}
	}

	.dds-btn {
		display: block;
		text-align: center;
		width: 320px;
		min-width: 0;
		align-self: auto;
		padding: 14px 20px;
		font-size: 16px;
	}

	.dds-slide-card {
		padding: 0 10px 20px;
		min-height: 485px;
	}

	.dds-slide-img-link {
		margin-bottom: 7px;
		padding: 16px 10px;
		height: 200px;
	}
	.dds-slide-img {
		max-height: 180px;
	}
	.dds-slide-category {
		font-size: 14px;
		margin-bottom: 12px;
		svg {
			width: 20px;
			height: 20px;
		}
	}
	.dds-slide-title {
		font-size: 18px;
		margin-bottom: 10px;
		padding: 0;
	}
	.dds-slide-desc {
		font-size: 14px;
		margin-bottom: 5px;
	}
	.dds-slide-more-link {
		font-size: 12px;
	}
	.dds-buttons-block {
		margin-top: 20px;
	}
	.dds-slide-btn {
		padding: 13px 10px;
		font-size: 14px;
		width: 100%;
		/*margin: 0;*/
	}

	.dds-owl-slider.owl-carousel .owl-nav button.owl-prev {
		left: 0;
	}
	.dds-owl-slider.owl-carousel .owl-nav button.owl-next {
		right: 0;
	}
}

@media ( max-width: 460px ) {

	.dds-bubble {
		font-size: 12px;
		padding: 10px 45px 10px 20px;
		max-width: 170px;
		left: 4px;
		min-height: 89px;
	}
	.dds-img-link {
		padding: 0 60px 20px;
	}
	.dds-image-wrap {
		height: 180px;
	}
	.dds-slide-img-link {
		margin-bottom: 7px;
		padding: 10px 15px;
		height: 170px;
	}
	.dds-title {
		font-size: 20px;
		margin-bottom: 3px;
		svg {
			width: 17px;
			height: 17px;
		}
	}
	.dds-timer {
		& .promo-duration-timer.promo-duration-timer-shop {
			& span:not(:first-child), & .asp-rfw-duration-timer-type {
				padding: 0 10px;
				min-width: 70px;
			}
			span {
				font-size: 24px;
			}
		}
	}
	.dds-fixed-block {
		padding: 25px 0;
		width: 100%;
		&.dds-is-fixed {
			padding: 25px 20px;
		}
	}

	.dds-btn {
		width: 100%;
	}

	.dds-slide-card {
		min-height: 400px;
	}
	.dds-slide-img {
		max-height: 150px;
	}
	.dds-slide-img-link {
		margin-bottom: 0;
	}
	.dds-slide-category {
		margin-bottom: 8px;

		svg {
			width: 17px;
			height: 17px;
		}
	}
	.dds-slide-title {
		font-size: 14px;
		margin-bottom: 6px;
		padding: 0;
		min-height: 0;
	}
	.dds-slide-category,
	.dds-slide-desc {
		font-size: 13px;
	}
	.dds-slide-desc {
		margin-bottom: 5px;
		line-height: 1.2;
	}
	.dds-slide-btn {
		padding: 10px;
		font-size: 13px;
	}
}
