/* Страница «Доставка и оплата»: сетка из карточек 2×N + блок «Контактная информация» в конце.
 * Внутри каждой карточки — заголовок, текст (HTML из инфоблока) и большая серая цифра в углу. */

.lf-delivery {
	width: 100%;
	padding: 0 0 clamp(32px, 6vw, 72px);
	font-family: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: #0a0a0a;
}

.lf-delivery-empty {
	margin: 0 0 24px;
	padding: 16px 20px;
	background: #fff7ed;
	border: 1px solid #fed7aa;
	border-radius: 8px;
	color: #9a3412;
	font-size: 15px;
}

.lf-delivery-empty code {
	padding: 1px 6px;
	background: #fde68a;
	border-radius: 4px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 13px;
	color: #78350f;
}

/* ───── Сетка карточек ───── */

.lf-delivery__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(16px, 1.6vw, 24px);
}

.lf-delivery-block {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 16px;
	padding: clamp(20px, 2vw, 28px) clamp(24px, 2.4vw, 36px);
	overflow: hidden;
	isolation: isolate;
	box-shadow: 0 2px 14px rgba(15, 23, 42, 0.03);
	min-height: 280px;
}

/* ───── Bottom-right float — текст обтекает цифру ─────
 * 1) ::before — невидимый спейсер, float:right, занимает правую колонку сверху.
 *    shape-outside: inset(0 0 0 100%) делает его «прозрачным» для текста.
 * 2) .lf-delivery-block__num — float:right + clear:right, садится ПОД спейсером → визуально в нижнем-правом углу.
 *    Текст обтекает только цифру, а не спейсер. */

/* Контент карточки */
.lf-delivery-block__title {
	position: relative;
	z-index: 1;
	margin: 0 0 24px;
	font-family: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-weight: 600;
	font-size: 24px;
	line-height: 1.25;
	color: #404042;
}

.lf-delivery-block__text {
	position: relative;
	z-index: 1;
	flex: 1;
	font-family: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.5;
	color: #0a0a0a;
}

/* Невидимый спейсер — заполняет правую колонку сверху до цифры.
 * shape-outside: inset(0 0 0 100%) = ноль видимой площади для обтекания,
 * текст его не обтекает — просто «видит» пустое место. */
.lf-delivery-block__text::before {
	content: "";
	float: right;
	width: clamp(70px, 8vw, 110px);
	height: calc(100% - clamp(80px, 9vw, 130px));
	shape-outside: inset(0 0 0 100%);
}

/* Цифра — float:right + clear:right → садится ПОД спейсером = в нижний правый угол.
 * Текст обтекает её естественным образом. */
.lf-delivery-block__num {
	float: right;
	clear: right;
	width: clamp(70px, 8vw, 110px);
	margin: 8px 0 0 12px;
	text-align: right;
	font-family: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-weight: 600;
	font-size: clamp(96px, 10vw, 160px);
	line-height: 0.85;
	color: rgba(15, 23, 42, 0.06);
	pointer-events: none;
	user-select: none;
}

.lf-delivery-block__text p {
	margin: 0 0 24px;
}

.lf-delivery-block__text p:last-child {
	margin-bottom: 0;
}

.lf-delivery-block__text strong {
	font-weight: 600;
}

/* <br> внутри текста инфоблока — даёт визуальный отступ 24px как в макете.
 * Ставим margin-top следующему за <br> элементу — это надёжно работает во всех браузерах
 * (стилизовать сам void-элемент <br> ненадёжно). */
.lf-delivery-block__text br + * {
	margin-top: 24px !important;
}

/* Маркированный список — без стандартных точек, с кастомным круглым маркером */
.lf-delivery-block__text ul {
	list-style: none;
	margin: 24px 0;
	padding: 0;
}

.lf-delivery-block__text ul:last-child {
	margin-bottom: 0;
}

.lf-delivery-block__text li {
	position: relative;
	padding-left: 18px;
	margin: 0 0 8px;
}

.lf-delivery-block__text li:last-child {
	margin-bottom: 0;
}

.lf-delivery-block__text li::before {
	content: "";
	position: absolute;
	left: 4px;
	top: 0.6em;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: #0a0a0a;
}

/* Маленькие отступы для вложенных списков и абзацев между ними */
.lf-delivery-block__text ul + p,
.lf-delivery-block__text p + ul {
	margin-top: 0;
}

/* Класс для произвольных серых фрагментов внутри текста инфоблока (см. <span class="lf-muted">) */
.lf-delivery .lf-muted {
	color: #6b7280;
}

.lf-delivery-block__text a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
	transition: color 0.15s ease;
}

.lf-delivery-block__text a:hover {
	color: #404042;
}

/* ───── Карточка «Контактная информация» ───── */

.lf-delivery-block--contact {
	min-height: 0;
}

/* В контактном блоке нет цифры — убираем спейсер, float-резерв и num */
.lf-delivery-block--contact .lf-delivery-block__text::before {
	display: none !important;
	float: none !important;
	width: 0 !important;
	height: 0 !important;
}

/* В карточке контактов нет цифры — цифровой блок не выводится в шаблоне.
 * Если когда-то понадобится скрыть .lf-delivery-block__num — раскомментировать. */

/* Телефон в контактном блоке не должен переноситься (на 320px цифры рвёт пополам) */
.lf-delivery-block__phone {
	white-space: nowrap;
}

/* Email в контактном блоке не должен ломаться по дефису "lero-fabric" — keep-all сохраняет адрес целиком */
.lf-delivery-block__text a[href^="mailto:"] {
	white-space: nowrap;
}

.lf-delivery-block__callback {
	color: inherit;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	transition: color 0.15s ease;
}

.lf-delivery-block__callback:hover,
.lf-delivery-block__callback:focus-visible {
	color: #404042;
}

/* ───────── Адаптив ───────── */

@media (max-width: 991px) {
	.lf-delivery__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}

	.lf-delivery-block {
		padding: clamp(20px, 4vw, 28px) clamp(20px, 4vw, 28px) clamp(36px, 6vw, 48px);
		min-height: 0;
	}

	/* В одну колонку не нужно flex-grow на тексте — иначе float-спейсер ведёт себя нестабильно */
	.lf-delivery-block__text {
		flex: 0 1 auto;
	}

	.lf-delivery-block__num {
		font-size: clamp(80px, 16vw, 140px);
	}

	.lf-delivery-block__text::before {
		width: clamp(60px, 14vw, 100px);
	}

	.lf-delivery-block__num {
		width: clamp(60px, 14vw, 100px);
	}
}

@media (max-width: 767px) {
	.lf-delivery {
		padding-bottom: clamp(24px, 6vw, 48px);
	}

	.lf-delivery-block {
		border-radius: 12px;
		padding: 20px 18px 36px;
	}

	.lf-delivery-block__title {
		font-size: 1.125rem;
	}

	.lf-delivery-block__text {
		font-size: 15px;
	}

	.lf-delivery-block__num {
		font-size: 96px;
		width: 70px;
	}

	.lf-delivery-block__text::before {
		width: 70px;
	}
}

@media (max-width: 479px) {
	.lf-delivery-block__num {
		font-size: 84px;
		width: 60px;
	}

	.lf-delivery-block__text::before {
		width: 60px;
	}
}
