/**
 * HalalEco Promotions - front-end
 */

.hpr {
	--hpr-green: #5da22b;
	--hpr-green-dark: #4c8a22;
	--hpr-green-soft: #f1f7ea;
	--hpr-ink: #14170f;
	--hpr-body: #5b6055;
	--hpr-muted: #8c9188;
	--hpr-line: #e9e9e4;
	--hpr-shell: #f4f4f2;

	box-sizing: border-box;
	padding: 26px;
	border-radius: 26px;
	background: var(--hpr-shell);
	font-family: inherit;
}

.hpr *,
.hpr *::before,
.hpr *::after {
	box-sizing: border-box;
}

.hpr-empty {
	padding: 40px 26px;
	text-align: center;
	color: var(--hpr-body);
}

/* ------------------------------------------------------------------ *
 * Block
 * ------------------------------------------------------------------ */

.hpr-block {
	display: grid;
	grid-template-columns: 290px minmax(0, 1fr);
	gap: 28px;
	align-items: start;
	margin: 0 0 22px;
	padding: 22px;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 2px 10px rgba(20, 23, 15, .04);
}

.hpr-block:last-child {
	margin-bottom: 0;
}

/* ---- left column --------------------------------------------------- */

.hpr-info {
	padding: 8px 4px 4px;
}

.hpr-info-ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	margin: 0 0 16px;
	border-radius: 50%;
	background: var(--hpr-green);
	color: #fff;
}

.hpr-info-ico svg {
	width: 23px;
	height: 23px;
	display: block;
}

.hpr-info-title {
	margin: 0 0 12px;
	padding: 0;
	font-size: 20px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--hpr-green-dark);
}

.hpr-info-desc {
	margin: 0 0 18px;
	font-size: 15px;
	line-height: 1.55;
	color: var(--hpr-body);
}

.hpr-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 46px;
	padding: 0 20px;
	border-radius: 8px;
	background: var(--hpr-green-dark);
	color: #fff !important;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none !important;
	transition: background .15s ease, transform .12s ease;
}

.hpr-btn:hover {
	background: var(--hpr-green);
	color: #fff !important;
	transform: translateY(-1px);
}

.hpr-btn-arrow {
	position: relative;
	width: 15px;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
}

.hpr-btn-arrow::after {
	content: "";
	position: absolute;
	right: 0;
	top: -3px;
	width: 8px;
	height: 8px;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
	transform: rotate(45deg);
}

/* ---- product cards -------------------------------------------------- */

.hpr-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
}

.hpr-card {
	margin: 0;
	position: relative;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 2px 10px rgba(20, 23, 15, .07);
	transition: transform .15s ease, box-shadow .15s ease;
}

.hpr-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 24px rgba(20, 23, 15, .12);
}

.hpr-card-link {
	display: block;
	color: inherit !important;
	text-decoration: none !important;
}

.hpr-card-media {
	position: relative;
	display: block;
}

.hpr-card-media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	margin: 0;
	border-radius: 14px 14px 0 0;
}

.hpr-card-badge {
	position: absolute;
	right: 10px;
	bottom: -18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: var(--hpr-green);
	color: #fff;
	font-size: 14px;
	font-weight: 800;
	letter-spacing: -.01em;
	box-shadow: 0 3px 10px rgba(20, 23, 15, .18);
	z-index: 2;
}

.hpr-card-body {
	display: block;
	padding: 16px 16px 16px;
}

.hpr-card-title {
	display: block;
	margin: 0 0 4px;
	font-size: 15.5px;
	font-weight: 800;
	line-height: 1.3;
	color: var(--hpr-ink);
}

.hpr-card-sub {
	display: block;
	margin: 0 0 8px;
	font-size: 13px;
	line-height: 1.45;
	color: var(--hpr-body);
}

.hpr-card-price {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 8px;
}

.hpr-price-now {
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -.01em;
	color: var(--hpr-ink);
}

.hpr-price-now .woocommerce-Price-amount {
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
}

.hpr-unit {
	font-size: 13px;
	font-style: normal;
	font-weight: 700;
	color: var(--hpr-body);
}

.hpr-price-was {
	font-size: 14px;
	font-weight: 600;
	color: var(--hpr-muted);
	text-decoration: line-through;
}

.hpr-price-was .woocommerce-Price-amount {
	font-size: inherit;
	color: inherit;
}

/* ---- banner --------------------------------------------------------- */

.hpr-block--banner .hpr-banner {
	position: relative;
	min-height: 280px;
	display: flex;
	align-items: center;
	border-radius: 16px;
	background-color: #111;
	background-size: cover;
	background-position: center right;
	overflow: hidden;
}

.hpr-banner::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to right,
		rgba(8, 9, 7, .96) 0%,
		rgba(8, 9, 7, .88) 28%,
		rgba(8, 9, 7, .55) 55%,
		rgba(8, 9, 7, .15) 100%
	);
}

.hpr-banner-inner {
	position: relative;
	z-index: 2;
	max-width: 58%;
	padding: 32px 30px;
}

.hpr-banner-title {
	margin: 0 0 10px;
	font-size: 30px;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -.01em;
	color: #fff;
}

.hpr-banner-text {
	margin: 0 0 18px;
	font-size: 15.5px;
	line-height: 1.55;
	color: rgba(255, 255, 255, .84);
}

.hpr-btn--on-dark {
	background: var(--hpr-green);
}

.hpr-btn--on-dark:hover {
	background: var(--hpr-green-dark);
}

/* ------------------------------------------------------------------ *
 * Responsive
 * ------------------------------------------------------------------ */

@media (max-width: 1100px) {
	.hpr-block {
		grid-template-columns: 240px minmax(0, 1fr);
		gap: 20px;
	}

	.hpr-cards {
		gap: 14px;
	}
}

@media (max-width: 900px) {
	.hpr {
		padding: 16px;
		border-radius: 18px;
	}

	.hpr-block {
		grid-template-columns: 1fr;
		gap: 18px;
		padding: 18px;
	}

	.hpr-info {
		padding: 0;
	}

	.hpr-info-ico {
		margin-bottom: 12px;
	}

	.hpr-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.hpr-banner-inner {
		max-width: 100%;
		padding: 26px 22px;
	}

	.hpr-banner-title {
		font-size: 24px;
	}
}

@media (max-width: 560px) {
	.hpr-cards {
		grid-template-columns: 1fr;
	}

	.hpr-card-media img {
		aspect-ratio: 16 / 9;
	}

	.hpr-block--banner .hpr-banner {
		min-height: 240px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hpr * {
		transition: none !important;
	}
}

/* ---------------------------------------------------------------------------
   Add-to-cart button + hover quantity stepper (halaleco-loop-cart) inside a
   promotions card. The widget is rendered as a sibling of .hpr-card-link,
   so it is pinned to the bottom-right corner of the card.
   --------------------------------------------------------------------- */

.hpr-card > .hlc-cartwrap {
	position: absolute;
	right: 14px;
	bottom: 14px;
	z-index: 4;
	line-height: 0;
}

/* Stretch the card so the price always sits level with the cart button. */
.hpr-card-link {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.hpr-card-media {
	flex: 0 0 auto;
}

.hpr-card-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
}

.hpr-card-price {
	margin-top: auto;
	padding-right: 48px;
}
