/*
 * Offer banners (offer-banners.php): нижняя плашка, два баннера в статье и
 * попап — общие для всех офферов. Цвета и фон оффера — переменные --eob-*
 * из разметки и тем (.eob--tiktok, .eob--instagram); значения по умолчанию —
 * светлая тема ($100, Bundle). Размеры — из макета Figma (десктоп / мобилка).
 */

.eob,
.eob * {
	box-sizing: border-box;
}

.eob {
	--eob-bg: #fff;
	--eob-border: rgba(17, 17, 20, 0.08);
	--eob-title-color: #111114;
	--eob-text-color: rgba(17, 17, 20, 0.72);
	--eob-btn-bg: #111114;
	--eob-btn-color: #fff;
	--eob-close-bg: #fff;
	--eob-close-border: rgba(17, 17, 20, 0.1);
	--eob-bar-shadow: rgba(18, 18, 20, 0.08);
	font-family: 'DM Sans', system-ui, sans-serif;
	font-variation-settings: "opsz" 14;
	color: var(--eob-title-color);
	text-align: left;
}

.eob a {
	text-decoration: none;
	color: inherit;
}

.eob-title {
	display: block;
	margin: 0;
	font-family: 'Fraunces', Georgia, serif;
	/* как в макете; opsz — авто по размеру шрифта, не «14» от DM Sans */
	font-variation-settings: "SOFT" 0, "WONK" 1;
	font-weight: 700;
	color: var(--eob-title-color);
}

.eob-title .eob-m {
	display: none;
}

.eob-accent {
	color: var(--eob-accent);
}

.eob--italic-accent .eob-accent {
	font-style: italic;
}

.eob--accent-gradient .eob-accent {
	background: var(--eob-accent-bg);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.eob-text {
	display: block;
	margin: 0;
	font-weight: 400;
	color: var(--eob-text-color);
}

/* Кнопка «GRAB THE DEAL! →» */
.eob .eob-btn {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	gap: 12px;
	height: 52px;
	padding: 0 10px 0 26px;
	border-radius: 999px;
	background: var(--eob-btn-bg);
	color: var(--eob-btn-color);
	font-family: 'DM Sans', system-ui, sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 16px;
	white-space: nowrap;
	filter: drop-shadow(0 8px 7px var(--eob-btn-shadow));
	cursor: pointer;
}

.eob-btn__dot {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 15px;
	background: var(--eob-dot);
}

.eob-btn__dot img,
.eob-close img {
	display: block;
	width: 14px;
	height: 14px;
}

.eob-close {
	position: absolute;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--eob-close-border);
	border-radius: 16px;
	background: var(--eob-close-bg);
	cursor: pointer;
}

/* ------------------------------------------------------------------
 * Темы AI Influencers
 * ---------------------------------------------------------------- */

.eob--tiktok {
	--eob-bg: #0e0e13;
	--eob-bar-bg: #0e0e13;
	--eob-border: rgba(255, 255, 255, 0.08);
	--eob-title-color: #fff;
	--eob-text-color: rgba(255, 255, 255, 0.72);
	--eob-btn-bg: #fff;
	--eob-btn-color: #0e0e13;
	--eob-close-bg: rgba(255, 255, 255, 0.08);
	--eob-close-border: rgba(255, 255, 255, 0.16);
	--eob-bar-shadow: rgba(18, 18, 20, 0.18);
}

.eob--instagram {
	--eob-bg: linear-gradient(154.35deg, #fff1e6, #ffe4ee 55%, #f1e6ff);
	--eob-bar-bg: linear-gradient(to right, #fff1e6, #ffe4ee 55%, #f1e6ff);
	--eob-border: rgba(17, 17, 20, 0.06);
}

.eob--instagram.eob-popup {
	--eob-bg: linear-gradient(126.85deg, #fff1e6, #ffe4ee 55%, #f1e6ff);
}

/* ------------------------------------------------------------------
 * Коллаж AI Influencers: карточки, подпись «@claire AI», чипы, свечение.
 * --k — масштаб подписи и чипов (база — чип высотой 30px).
 * ---------------------------------------------------------------- */

.eob-visual {
	position: absolute;
	display: block;
}

.eob-visual--mobile {
	display: none;
}

.eob-card {
	position: absolute;
	display: block;
	border-radius: var(--rr);
}

/* TikTok: рамка-градиент */
.eob--tiktok .eob-card {
	border: var(--stroke) solid transparent;
	background: linear-gradient(to bottom right, #25f4ee, #fe2c55) border-box;
}

.eob-card__photo {
	position: absolute;
	inset: 0;
	display: block;
	overflow: hidden;
	border-radius: calc(var(--rr) - var(--stroke, 0px));
	background: #0e0e13;
}

/* Instagram: «кольцо сторис» вокруг фото и белый зазор */
.eob--instagram .eob-card {
	background: linear-gradient(58deg, #feda75, #fa7e1e 25%, #d62976 50%, #962fbf 75%, #4f5bd5);
}

.eob--instagram .eob-card__photo {
	inset: var(--ring);
	border-radius: var(--pr);
	box-shadow: 0 0 0 var(--gap) #fff;
}

.eob-card__photo img {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	object-fit: cover;
}

.eob-card__shade {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 48%;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.62));
}

.eob-caption {
	position: absolute;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: calc(5px * var(--k));
	color: #fff;
	font-size: calc(11px * var(--k));
	font-weight: 600;
	line-height: calc(13px * var(--k));
	white-space: nowrap;
}

.eob-caption__ai {
	height: calc(14px * var(--k));
	padding: 0 calc(4px * var(--k));
	border-radius: calc(4px * var(--k));
	background: #fe2c55;
	font-size: calc(8.5px * var(--k));
	font-weight: 700;
	line-height: calc(14px * var(--k));
	letter-spacing: calc(0.5px * var(--k));
}

.eob--instagram .eob-caption__ai {
	background: linear-gradient(39deg, #f58529, #dd2a7b 50%, #8134af);
}

.eob-chip {
	position: absolute;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: calc(6px * var(--k));
	height: calc(30px * var(--k));
	padding: 0 calc(11px * var(--k)) 0 calc(9px * var(--k));
	border-radius: 999px;
	font-size: calc(12.5px * var(--k));
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
}

.eob-chip img {
	display: block;
	width: calc(14px * var(--k));
	height: calc(14px * var(--k));
}

.eob--tiktok .eob-chip {
	border: calc(1px * var(--k)) solid rgba(255, 255, 255, 0.14);
	background: #1b1b22;
	color: #fff;
}

.eob--instagram .eob-chip {
	background: #fff;
	color: #111114;
	box-shadow: 0 calc(6px * var(--k)) calc(8px * var(--k)) rgba(129, 52, 175, 0.35);
}

.eob-glow {
	position: absolute;
	border-radius: 50%;
	background: radial-gradient(50% 50% at 50% 50%, var(--c), rgba(0, 0, 0, 0));
	pointer-events: none;
}

/* ------------------------------------------------------------------
 * Нижняя плашка
 * ---------------------------------------------------------------- */

.eob-bar {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 9990;
	height: 140px;
	overflow: hidden;
	background: var(--eob-bar-bg);
	box-shadow: 0 -4px 18px var(--eob-bar-shadow);
}

.eob-bar__row {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 34px;
	max-width: 1440px;
	height: 100%;
	margin: 0 auto;
	padding: 0 90px;
}

.eob-bar__media {
	position: relative;
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 230px;
	height: 140px;
}

.eob--collage .eob-bar__media {
	width: auto;
}

.eob-bar .eob-visual {
	position: relative;
}

.eob-bar__glow {
	position: absolute;
	top: -40px;
	left: 50%;
	width: 300px;
	height: 220px;
	margin-left: -150px;
	border-radius: 128px;
	opacity: 0.75;
	background: radial-gradient(50% 50% at 50% 50%, rgba(var(--eob-glow), 1), rgba(var(--eob-glow), 0));
	pointer-events: none;
}

.eob-bar__media > img {
	position: relative;
	width: var(--eob-bar-img-w);
	height: var(--eob-bar-img-h);
	max-width: 230px;
	object-fit: cover;
}

.eob-bar__texts {
	flex: none;
	width: var(--eob-bar-texts-w);
}

.eob-bar .eob-title {
	font-size: 30px;
	line-height: 34.5px;
	letter-spacing: -0.6px;
	white-space: nowrap;
}

.eob-bar .eob-text {
	padding-top: 6px;
	font-size: 16.5px;
	line-height: 23.1px;
	white-space: nowrap;
}

.eob--collage.eob-bar .eob-text {
	font-size: 16px;
	line-height: 22px;
}

.eob-bar > .eob-close {
	top: 54px;
	right: 24px;
}

/* TikTok: в макете текст отодвинут от коллажа на 77 (место под свечение),
   коллаж при этом остаётся на 184 — сдвигаем центр строки левым отступом. */
@media (min-width: 1101px) {
	.eob--tiktok .eob-bar__row {
		padding-left: 132px;
	}

	.eob--tiktok .eob-bar__media {
		margin-right: 43px;
	}
}

/* Узкий десктоп: строка плашки не влезает в 1440 — ужимаем отступы. */
@media (max-width: 1100px) {
	.eob-bar__row {
		gap: 20px;
		padding: 0 64px 0 16px;
	}

	.eob-bar__texts {
		flex: 0 1 auto;
		width: auto;
		min-width: 0;
	}

	.eob-bar .eob-title {
		font-size: 26px;
		line-height: 30px;
	}

	.eob-bar .eob-text {
		white-space: normal;
	}
}

@media (max-width: 900px) and (min-width: 768px) {
	.eob-bar__media {
		display: none;
	}
}

/* Мобилка: 390 × 283 */
@media (max-width: 767px) {
	.eob-bar {
		height: auto;
	}

	.eob-bar__row {
		flex-direction: column;
		gap: 0;
		max-width: none;
		padding: 12px 18px 22px;
	}

	.eob--collage .eob-bar__row {
		padding-top: 16px;
	}

	.eob-bar__media {
		width: auto;
		height: 118px;
	}

	.eob--collage .eob-bar__media {
		height: 94px;
	}

	.eob-bar .eob-visual--desktop {
		display: none;
	}

	.eob-bar .eob-visual--mobile {
		display: block;
	}

	.eob-bar__glow {
		top: -42px;
		width: 250px;
		height: 190px;
		margin-left: -125px;
		border-radius: 109px;
	}

	.eob-bar__media > img {
		width: var(--eob-bar-img-mw);
		height: 118px;
		max-width: 260px;
		object-fit: contain;
	}

	.eob-bar__texts {
		width: 100%;
		text-align: center;
	}

	.eob-bar .eob-title {
		padding-top: 8px;
		font-size: 22px;
		line-height: 26.4px;
		letter-spacing: -0.44px;
		white-space: normal;
	}

	/* Instagram: в макете заголовок мельче — «Your online store + 5 AI influencers!» в одну строку. */
	.eob--instagram.eob-bar .eob-title {
		font-size: 20px;
		letter-spacing: -0.4px;
	}

	.eob-bar .eob-text {
		padding-top: 4px;
		font-size: 14px;
		line-height: 18.9px;
		white-space: normal;
	}

	.eob--collage.eob-bar .eob-text {
		max-width: 340px;
		margin: 0 auto;
		font-size: 13.5px;
		line-height: 18.5px;
	}

	.eob-bar .eob-btn {
		width: 100%;
		height: 48px;
		margin-top: 26px;
		padding-left: 22px;
	}

	.eob-bar > .eob-close {
		top: 10px;
		right: 10px;
	}
}

/* ------------------------------------------------------------------
 * Баннеры в статье: article1 — картинка справа, article2 — слева.
 * Десктоп 760 × 365, мобилка 342 × 365 — по ширине контейнера.
 * ---------------------------------------------------------------- */

.eob-article {
	container-type: inline-size;
	max-width: 760px;
	margin: 32px auto;
}

.eob-article .eob-article__card {
	position: relative;
	display: block;
	height: 365px;
	overflow: hidden;
	border: 1px solid var(--eob-border);
	border-radius: 20px;
	background: var(--eob-bg);
}

.eob-article__media {
	position: absolute;
	top: 0;
	display: block;
	height: 365px;
	overflow: hidden;
}

.eob-article__media img {
	position: absolute;
	max-width: none;
}

.eob-article__media--mobile {
	display: none;
}

.eob-article__fade {
	position: absolute;
	top: 0;
	z-index: 1; /* поверх обеих картинок (мобильная в разметке после неё) */
	height: 365px;
}

.eob-article__body {
	position: absolute;
	top: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	height: 363px;
}

.eob-badge {
	display: inline-flex;
	align-items: center;
	height: 30px;
	padding: 0 15px;
	border: 1px solid var(--eob-badge-line);
	border-radius: 999px;
	background: var(--eob-badge-bg);
	color: var(--eob-badge-color, var(--eob-accent));
	font-size: 11.5px;
	font-weight: 700;
	line-height: 11.5px;
	letter-spacing: 1.61px;
	text-transform: uppercase;
	white-space: nowrap;
}

.eob-article .eob-title {
	padding: 18px 0 12px;
	font-size: 35px;
	line-height: 39.2px;
	letter-spacing: -0.7px;
}

.eob-article .eob-text {
	padding-bottom: 24px;
	font-size: 16.5px;
	line-height: 24.75px;
}

/* article1: фото 410 справа, белая растушёвка 70 по его левому краю, текст слева */
.eob-article1 .eob-article__media--desktop {
	right: 0;
	width: 410px;
}

.eob-article1 .eob-article__fade {
	right: 340px;
	width: 71px; /* +1px за край фото: без волоска на стыке */
	background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
}

.eob-article1 .eob-article__body {
	left: 38px;
	width: min(310px, calc(100% - 448px));
}

/* article2: объект 400 слева, растушёвка 140 по его правому краю, текст справа */
.eob-article2 .eob-article__media--desktop {
	left: 0;
	width: 400px;
}

.eob-article2 .eob-article__fade {
	left: 260px;
	width: 141px; /* +1px за край картинки: без волоска на стыке */
	background: linear-gradient(to left, #fff, rgba(255, 255, 255, 0));
}

.eob-article2 .eob-article__body {
	right: 36px;
	width: min(320px, calc(100% - 438px));
}

/* AI Influencers: коллаж вместо фото, свои размеры текста */
.eob--collage.eob-article1 .eob-visual--desktop {
	top: calc(var(--y) - 1px);
	right: calc(var(--r) - 1px);
}

.eob--collage.eob-article2 .eob-visual--desktop {
	top: calc(var(--y) - 1px);
	left: calc(var(--x) - 1px);
}

.eob--collage.eob-article1 .eob-article__body {
	left: 39px;
	width: min(340px, calc(100% - 418px));
}

.eob--collage.eob-article2 .eob-article__body {
	right: 29px;
	width: min(310px, calc(100% - 448px));
}

.eob--collage.eob-article .eob-title {
	padding: 16px 0 10px;
	font-size: 30px;
	line-height: 33.6px;
	letter-spacing: -0.6px;
}

.eob--collage.eob-article .eob-text {
	padding-bottom: 22px;
	font-size: 15.5px;
	line-height: 22px;
}

@container (max-width: 699px) {
	.eob-article .eob-article__card {
		height: auto;
		min-height: 365px;
		border-radius: 18px;
		background: linear-gradient(to bottom, var(--eob-tint), var(--eob-tint) 49.315%, #fff 94.521%);
	}

	.eob--collage .eob-article__card {
		background: var(--eob-bg);
	}

	.eob--instagram .eob-article__card {
		--eob-bg: linear-gradient(133.14deg, #fff1e6, #ffe4ee 55%, #f1e6ff);
	}

	.eob-article .eob-article__media--desktop,
	.eob-article .eob-visual--desktop,
	.eob-article .eob-title .eob-d {
		display: none;
	}

	.eob-article .eob-title .eob-m {
		display: inline;
	}

	.eob-article .eob-visual--mobile {
		display: block;
		top: calc(var(--y) - 1px);
		left: 50%;
		transform: translateX(-50%);
	}

	.eob-article .eob-article__media--mobile {
		display: block;
		left: 0;
		width: 100%;
		height: 180px;
		background: var(--eob-media-bg);
	}

	/* Окно шире макетных 342 — картинка растёт по ширине, без искажения. */
	.eob-article .eob-article__media--mobile img {
		height: auto !important;
	}

	.eob-article .eob-article__fade {
		top: 103px;
		right: auto;
		left: 0;
		width: 100%;
		height: 77px;
		background: linear-gradient(180deg,
			color-mix(in srgb, var(--eob-tint) 0%, transparent) 0%,
			color-mix(in srgb, var(--eob-tint) 55%, transparent) 45%,
			color-mix(in srgb, var(--eob-tint) 90%, transparent) 78%,
			var(--eob-tint) 100%);
	}

	.eob-article .eob-article__body {
		position: relative;
		top: auto;
		right: auto;
		left: auto;
		/* Как в макете: текст прижат к кнопке, блок кончается в 22px от низа при любой
		   длине текста; padding-top — граница картинки, длинный текст растит карточку. */
		justify-content: flex-end;
		width: auto;
		height: auto;
		min-height: 363px;
		padding: 194px 21px 22px;
	}

	/* та же специфичность, что у десктопных правил коллажа, — иначе их ширина остаётся */
	.eob--collage.eob-article .eob-article__body {
		right: auto;
		left: auto;
		width: auto;
		padding-top: 178px;
	}

	.eob-article .eob-badge {
		display: none;
	}

	.eob-article .eob-title {
		padding: 0 0 6px;
		font-size: 22px;
		line-height: 25.96px;
		letter-spacing: -0.44px;
	}

	.eob--collage.eob-article .eob-title {
		padding: 0 0 6px;
		font-size: 22px;
		line-height: 25.5px;
		letter-spacing: -0.44px;
	}

	.eob-article .eob-text {
		padding: 0;
		font-size: 14.5px;
		line-height: 21.025px;
	}

	.eob--collage.eob-article .eob-text {
		padding: 0;
		font-size: 14px;
		line-height: 19.6px;
	}

	.eob-article .eob-btn {
		width: 100%;
		height: 48px;
		margin-top: 24px;
		padding-left: 22px;
	}

	/* Отступ текста от кнопки в макетах коллажей. */
	.eob--tiktok.eob-article .eob-btn {
		margin-top: 17px;
	}

	.eob--instagram.eob-article .eob-btn {
		margin-top: 27px;
	}
}

/* ------------------------------------------------------------------
 * Попап: десктоп 440 × 587, мобилка 390 × 544
 * ---------------------------------------------------------------- */

.eob-overlay {
	position: fixed;
	inset: 0;
	z-index: 9991;
	background: rgba(0, 0, 0, 0.55);
}

.eob-popup {
	position: fixed;
	top: 50%;
	left: 50%;
	z-index: 9992;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 440px;
	max-width: calc(100vw - 24px);
	max-height: calc(100vh - 24px);
	overflow: hidden;
	border: 1px solid var(--eob-border);
	border-radius: 22px;
	background: var(--eob-bg);
	text-align: center;
	transform: translate(-50%, -50%);
}

.eob-popup > .eob-close {
	top: 13px;
	right: 14px;
}

.eob-popup__kicker {
	padding: 54px 40px 0;
	color: var(--eob-text-color);
	font-size: 15.5px;
	font-weight: 500;
	line-height: 21.7px;
}

.eob-popup .eob-title {
	width: 100%;
	padding: 8px 30px 0;
	font-size: 29px;
	line-height: 33.06px;
	letter-spacing: -0.58px;
	text-align: center;
}

.eob-popup .eob-btn {
	height: 54px;
	margin-top: 20px;
}

.eob-popup__bottom {
	position: relative;
	flex: none;
	width: 100%;
	height: 343px;
	margin-top: 20px;
	background: var(--eob-popup-bottom, none);
}

.eob-popup__img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	max-width: none;
	height: 287px;
	object-fit: cover;
}

.eob-popup__fade {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 46px;
	background: linear-gradient(to bottom, #fff, rgba(255, 255, 255, 0));
}

.eob-popup .eob-visual {
	top: calc(var(--y) - 244px);
	left: 50%;
	transform: translateX(-50%);
}

.eob .eob-popup__link {
	position: absolute;
	right: 0;
	bottom: 26px;
	left: 0;
	z-index: 3;
	color: var(--eob-link);
	font-size: 14px;
	font-weight: 600;
	line-height: 18.2px;
	text-decoration: underline;
}

.eob--collage .eob-popup__link {
	font-size: 13.5px;
	line-height: 18px;
}

@media (max-width: 480px) {
	.eob-popup {
		width: 390px;
	}

	.eob-popup__kicker {
		padding-top: 50px;
		font-size: 14.5px;
		line-height: 20.3px;
	}

	.eob--collage .eob-popup__kicker {
		font-size: 15px;
		line-height: 21px;
	}

	.eob-popup .eob-title {
		padding: 8px 22px 0;
		font-size: 26px;
		line-height: 29.64px;
		letter-spacing: -0.52px;
	}

	.eob-popup__bottom {
		height: 312px;
	}

	.eob-popup__img {
		height: 256px;
	}

	.eob-popup .eob-visual--desktop {
		display: none;
	}

	.eob-popup .eob-visual--mobile {
		display: block;
		top: calc(var(--y) - 231px);
	}

	.eob .eob-popup__link {
		bottom: 22px;
		font-size: 13px;
		line-height: 16.9px;
	}

	.eob--collage .eob-popup__link {
		font-size: 12.5px;
		line-height: 17px;
	}
}

/* ------------------------------------------------------------------
 * Превью в редакторе: плашка и попап — на месте блока, ссылки не кликаются.
 * ---------------------------------------------------------------- */

.eob--preview.eob-bar,
.eob--preview.eob-popup {
	position: relative;
	top: auto;
	right: auto;
	bottom: auto;
	left: auto;
	z-index: auto;
	max-height: none;
	transform: none;
}

.eob--preview.eob-popup {
	margin: 0 auto;
}

.eob--preview a,
.eob--preview .eob-close {
	pointer-events: none;
}
