/* Product Deals Grid for Elementor */

.pdg-wrap {
	width: 100%;
}

/* ---------- Heading row ---------- */
.pdg-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 18px;
}

.pdg-wrap .pdg-heading {
	margin: 0;
	padding: 0;
	font-size: 34px;
	font-weight: 800;
	line-height: 1.1;
	color: #111;
}

.pdg-wrap .pdg-viewall {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	color: #0f4d2e;
	text-decoration: none;
	white-space: nowrap;
}

.pdg-viewall svg {
	width: 16px;
	height: 16px;
	transition: transform .25s ease;
}

.pdg-viewall:hover svg {
	transform: translateX(4px);
}

/* ---------- Grid ---------- */
.pdg-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 16px;
}

/* ---------- Card ---------- */
.pdg-wrap .pdg-card {
	position: relative;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	padding: 14px;
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
	transition: transform .3s ease, box-shadow .3s ease;
}

.pdg-wrap .pdg-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 30px rgba(0, 0, 0, .1);
}

/* Badge */
.pdg-wrap .pdg-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 3;
	padding: 5px 10px;
	border-radius: 6px;
	background: #0f4d2e;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
}

/* Heart */
.pdg-wrap .pdg-heart {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #111;
	cursor: pointer;
	box-shadow: none;
	transition: color .2s ease, background-color .2s ease, transform .2s ease;
}

.pdg-wrap .pdg-heart svg {
	display: block;
	width: 20px;
	height: 20px;
	fill: transparent;
	stroke: currentColor;
	stroke-width: 2;
	transition: fill .2s ease;
}

.pdg-wrap .pdg-heart:hover {
	transform: scale(1.12);
	background: transparent;
	color: #e0263f;
}

.pdg-wrap .pdg-heart.is-active {
	color: #e0263f;
}

.pdg-wrap .pdg-heart.is-active svg {
	fill: currentColor;
}

/* Image (theme-proof sizing) */
.pdg-wrap .pdg-media {
	position: relative;
	display: block;
	width: 100%;
	height: 230px;
	margin: 0 0 14px;
	overflow: hidden;
}

.pdg-wrap .pdg-grid .pdg-card .pdg-media img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	object-fit: contain !important;
	object-position: center !important;
	transition: transform .5s ease;
}

.pdg-wrap .pdg-card:hover .pdg-media img {
	transform: scale(1.05);
}

/* Info */
.pdg-info {
	display: flex;
	flex: 1;
	flex-direction: column;
}

.pdg-wrap .pdg-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	margin: 0 0 8px;
	padding: 0;
	overflow: hidden;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.45;
	color: #111;
}

.pdg-wrap .pdg-title a {
	color: inherit;
	text-decoration: none;
}

.pdg-wrap .pdg-title a:hover {
	text-decoration: underline;
}

/* Rating */
.pdg-rating {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 8px;
	font-size: 13px;
	line-height: 1;
	color: #777;
}

.pdg-stars {
	position: relative;
	display: inline-block;
	font-size: 15px;
	letter-spacing: 2px;
	line-height: 1;
	color: #d9d9d9;
}

.pdg-stars::before {
	content: "\2605\2605\2605\2605\2605";
}

.pdg-stars::after {
	content: "\2605\2605\2605\2605\2605";
	position: absolute;
	top: 0;
	left: 0;
	width: var(--pdg-rating, 0%);
	overflow: hidden;
	white-space: nowrap;
	color: #f5b301;
}

/* Price */
.pdg-price {
	margin-top: auto;
	font-size: 21px;
	font-weight: 700;
	line-height: 1.2;
	color: #0f4d2e;
}

.pdg-price .price,
.pdg-price .woocommerce-Price-amount {
	color: inherit;
}

.pdg-price .price {
	display: inline-flex;
	flex-direction: row-reverse;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: flex-end;
	gap: 4px 12px;
}

.pdg-price ins {
	background: none;
	text-decoration: none;
	font-weight: 700;
}

.pdg-price del {
	font-size: .8em;
	font-weight: 400;
	color: #8a8a8a;
	opacity: 1;
	text-decoration: line-through;
}

.pdg-price .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.pdg-price:not(.pdg-has-sale) {
	color: #111;
}

.pdg-empty {
	padding: 24px;
	border: 1px dashed #ccc;
	border-radius: 10px;
	text-align: center;
	color: #777;
}

/* ---------- Responsive defaults (Elementor controls override these) ---------- */
@media (max-width: 1024px) {
	.pdg-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	.pdg-wrap .pdg-heading {
		font-size: 28px;
	}
	.pdg-wrap .pdg-media {
		height: 200px;
	}
}

@media (max-width: 767px) {
	.pdg-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}
	.pdg-wrap .pdg-heading {
		font-size: 24px;
	}
	.pdg-wrap .pdg-card {
		padding: 10px;
	}
	.pdg-wrap .pdg-media {
		height: 160px;
	}
	.pdg-wrap .pdg-title {
		font-size: 14px;
	}
	.pdg-price {
		font-size: 18px;
	}

	/* Optional: swipe sideways instead of stacking */
	.pdg-grid.pdg-swipe {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 8px;
	}
	.pdg-grid.pdg-swipe .pdg-card {
		flex: 0 0 62%;
		scroll-snap-align: start;
	}
}


/* Product condition */
.pdg-wrap .pdg-condition {
	display: inline-flex;
	align-self: flex-start;
	align-items: center;
	gap: 4px;
	margin: 0 0 8px;
	padding: 4px 8px;
	border-radius: 5px;
	background: #f1f5f2;
	color: #24543a;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
}
.pdg-wrap .pdg-condition-label {
	font-weight: 500;
}
