/* 1 + 1 GRATIS promo, see inc/woocommerce/bogo.php */

.orthexa-bogo-banner {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 26px 0 20px;
	padding: 16px 16px 14px 10px;
	background: linear-gradient(135deg, #fff8f8 0%, #ffe8ea 100%);
	border: 1.5px solid #e0303a;
	border-radius: 14px;
	box-shadow: 0 6px 18px rgba(214, 21, 31, .10);
}

/* Month badge ("Septembrska akcija") sitting on the top border. */
.orthexa-bogo-banner__badge {
	position: absolute;
	top: 0;
	left: 16px;
	z-index: 1;
	padding: 3px 10px;
	border-radius: 6px;
	background: #1a1a1a;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	line-height: 1.5;
	text-transform: uppercase;
	white-space: nowrap;
	transform: translateY(-50%);
}

.orthexa-bogo-banner .orthexa-bogo-banner__image {
	flex: 0 0 26%;
	width: 26%;
	min-width: 0;
	max-width: 150px;
	height: auto;
	filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .18));
}

.orthexa-bogo-banner__body {
	flex: 1 1 auto;
	min-width: 0;
	text-align: center;
}

.orthexa-bogo-banner .orthexa-bogo-banner__title,
.orthexa-bogo-banner .orthexa-bogo-banner__subtitle,
.orthexa-bogo-banner .orthexa-bogo-banner__tiers {
	margin: 0;
}

.orthexa-bogo-banner__title {
	color: #d6151f;
	font-size: 19px;
	font-weight: 800;
	letter-spacing: .01em;
	line-height: 1.25;
	text-transform: uppercase;
}

.orthexa-bogo-banner .orthexa-bogo-banner__subtitle {
	margin-top: 4px;
	color: #2a2a2a;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
}

/* Tier row as a coupon strip. */
.orthexa-bogo-banner .orthexa-bogo-banner__tiers {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 2px 8px;
	margin-top: 10px;
	padding: 6px 10px;
	background: #fff;
	border: 1.5px dashed #e0303a;
	border-radius: 10px;
	color: #111;
	font-size: 15px;
	line-height: 1.3;
}

.orthexa-bogo-banner__tier {
	color: #d6151f;
	font-weight: 800;
	white-space: nowrap;
}

.orthexa-bogo-banner__sep {
	color: #e8a4a8;
}

/* Phones, compact banner: image beside the headline, tiers on their own row. */
@media (max-width: 575px) {
	.orthexa-bogo-banner:not(.orthexa-bogo-banner--wide) {
		display: grid;
		grid-template-columns: 26% 1fr;
		align-items: center;
		gap: 2px 10px;
		padding: 16px 10px 10px;
		text-align: center;
	}

	.orthexa-bogo-banner:not(.orthexa-bogo-banner--wide) .orthexa-bogo-banner__body {
		display: contents;
	}

	.orthexa-bogo-banner:not(.orthexa-bogo-banner--wide) .orthexa-bogo-banner__image {
		grid-row: 1 / span 2;
		width: 100%;
		max-width: none;
	}

	.orthexa-bogo-banner:not(.orthexa-bogo-banner--wide) .orthexa-bogo-banner__title {
		align-self: end;
		font-size: 15px;
	}

	.orthexa-bogo-banner:not(.orthexa-bogo-banner--wide) .orthexa-bogo-banner__subtitle {
		align-self: start;
		margin-top: 2px;
		font-size: 13px;
	}

	.orthexa-bogo-banner:not(.orthexa-bogo-banner--wide) .orthexa-bogo-banner__tiers {
		grid-column: 1 / -1;
		gap: 2px 5px;
		margin-top: 8px;
		padding: 5px 6px;
		font-size: 12px;
	}

	/* Too narrow for one row: "Naroči" above the tiers. */
	.orthexa-bogo-banner:not(.orthexa-bogo-banner--wide) .orthexa-bogo-banner__order {
		flex-basis: 100%;
	}
}

/* Full-width banner in the description. */
.orthexa-bogo-banner.orthexa-bogo-banner--wide {
	gap: 28px;
	margin: 12px 0 50px;
	padding: 26px 32px 22px 20px;
	border-width: 2px;
	border-radius: 18px;
	box-shadow: 0 10px 28px rgba(214, 21, 31, .12);
}

.orthexa-bogo-banner--wide .orthexa-bogo-banner__badge {
	left: 24px;
	padding: 4px 12px;
	font-size: 12.5px;
}

.orthexa-bogo-banner--wide .orthexa-bogo-banner__image {
	flex: 0 0 220px;
	width: 220px;
	max-width: 220px;
}

.orthexa-bogo-banner--wide .orthexa-bogo-banner__body {
	text-align: left;
}

.orthexa-bogo-banner--wide .orthexa-bogo-banner__title {
	font-size: 30px;
	line-height: 1.15;
}

.orthexa-bogo-banner.orthexa-bogo-banner--wide .orthexa-bogo-banner__subtitle {
	margin-top: 8px;
	font-size: 19px;
}

.orthexa-bogo-banner.orthexa-bogo-banner--wide .orthexa-bogo-banner__tiers {
	display: inline-flex;
	justify-content: flex-start;
	gap: 4px 9px;
	margin-top: 16px;
	padding: 8px 14px;
	font-size: 16px;
}

.orthexa-bogo-banner__cta {
	flex: 0 0 auto;
	padding: 16px 28px;
	border-radius: 10px;
	background: #d6151f;
	box-shadow: 0 6px 14px rgba(214, 21, 31, .28);
	color: #fff !important;
	font-size: 18px;
	font-weight: 800;
	line-height: 1.2;
	text-align: center;
	text-decoration: none !important;
	text-transform: uppercase;
	white-space: nowrap;
	transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.orthexa-bogo-banner__cta::after {
	content: '→';
	display: inline-block;
	margin-left: 8px;
	transition: transform .15s ease;
}

.orthexa-bogo-banner__cta:hover,
.orthexa-bogo-banner__cta:focus {
	background: #b81019;
	box-shadow: 0 8px 18px rgba(214, 21, 31, .34);
	transform: translateY(-1px);
}

.orthexa-bogo-banner__cta:hover::after,
.orthexa-bogo-banner__cta:focus::after {
	transform: translateX(3px);
}

@media (max-width: 991px) {
	.orthexa-bogo-banner.orthexa-bogo-banner--wide {
		gap: 20px;
		padding: 24px 20px 16px 16px;
	}

	.orthexa-bogo-banner--wide .orthexa-bogo-banner__image {
		flex-basis: 160px;
		width: 160px;
	}

	.orthexa-bogo-banner--wide .orthexa-bogo-banner__title {
		font-size: 23px;
	}

	.orthexa-bogo-banner.orthexa-bogo-banner--wide .orthexa-bogo-banner__subtitle {
		font-size: 16px;
	}

	.orthexa-bogo-banner.orthexa-bogo-banner--wide .orthexa-bogo-banner__tiers {
		font-size: 15px;
	}

	.orthexa-bogo-banner__cta {
		padding: 14px 20px;
		font-size: 16px;
	}
}

/* Phones, full-width banner: everything stacked and centred. */
@media (max-width: 767px) {
	.orthexa-bogo-banner.orthexa-bogo-banner--wide {
		flex-direction: column;
		gap: 12px;
		margin-bottom: 36px;
		padding: 24px 10px 20px;
	}

	.orthexa-bogo-banner--wide .orthexa-bogo-banner__badge {
		left: 50%;
		transform: translate(-50%, -50%);
	}

	.orthexa-bogo-banner--wide .orthexa-bogo-banner__image {
		flex: none;
		width: 60%;
		max-width: 240px;
	}

	.orthexa-bogo-banner--wide .orthexa-bogo-banner__body {
		text-align: center;
	}

	.orthexa-bogo-banner--wide .orthexa-bogo-banner__title {
		font-size: 21px;
	}

	.orthexa-bogo-banner.orthexa-bogo-banner--wide .orthexa-bogo-banner__subtitle {
		font-size: 15px;
	}

	.orthexa-bogo-banner.orthexa-bogo-banner--wide .orthexa-bogo-banner__tiers {
		display: flex;
		justify-content: center;
		gap: 2px 5px;
		margin-top: 12px;
		padding: 6px;
		font-size: 12px;
	}

	/* The description column is too narrow for one row: "Naroči" above the tiers. */
	.orthexa-bogo-banner--wide .orthexa-bogo-banner__order {
		flex-basis: 100%;
	}

	.orthexa-bogo-banner__cta {
		width: 100%;
	}
}

/* Small phones: the tier row wraps, so drop the separators rather than leave one dangling. */
@media (max-width: 380px) {
	.orthexa-bogo-banner__sep {
		display: none;
	}

	.orthexa-bogo-banner.orthexa-bogo-banner .orthexa-bogo-banner__tiers {
		column-gap: 10px;
	}
}

/* Quantity picker: "10 kosov + 10 gratis". */
.orthexa-bogo-pieces__free {
	color: #d6151f;
	font-weight: 700;
}

/* Free line in cart, checkout and side cart. */
.orthexa-bogo-badge {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 7px;
	border-radius: 4px;
	background: #d6151f;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .03em;
	line-height: 1.6;
	vertical-align: middle;
}

.orthexa-bogo-price {
	color: #d6151f;
	font-weight: 700;
}

/* Read-only quantity on a free line in the FunnelKit side cart. */
.orthexa-bogo-qty {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 52px;
	padding: 6px 10px;
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	background: #fff;
	color: #111;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
}
