/**
 * Dream Lashes — глюе-слой главной страницы (front-page).
 *
 * Базовые стили секций (.hero, .bento, .brands, .grid4, .card, .life, .b2b, .tbar)
 * живут в theme.css (перенос app.css). Здесь — только мост между разметкой
 * WooCommerce (content-product) и сеткой макета, плюс мелкие правки обёртки.
 * Подключается условно только на is_front_page().
 */

/* Обёртка секций главной: без внешних отступов, чтобы hero прилегал к шапке. */
main.dl-home {
	display: block;
	margin: 0;
}

/* content-product от агента C — это article.card. На случай стокового
   фолбэка WooCommerce (li.product) выравниваем его в сетках макета. */
.dl-home .grid4 > li.product,
.dl-home .grid4 > .product,
.dl-home .grid4 ul.products,
.dl-home .grid4 li {
	list-style: none;
	margin: 0;
	padding: 0;
	width: auto;
	float: none;
}

/* Карточки товара в лентах главной тянутся на всю высоту ячейки. */
.dl-home .grid4 > .card,
.dl-home .grid4 > .product {
	height: 100%;
}

/* Кнопка «в корзину» карточки: сохраняем кликабельность поверх ссылок макета. */
.dl-home .card .add {
	position: relative;
	z-index: 3;
}

/* Пэкшоты героя из Woo-миниатюр (могут быть не квадратные) — вписываем аккуратно. */
.dl-home .hv-card img {
	object-position: center;
}

/*
 * Управляемый промослайдер отдельной второй секцией.
 *
 * Hero выше не входит в карусель и не меняет свою разметку. Без JavaScript
 * виден первый промослайд, а неработающие элементы управления скрыты.
 */
.dl-home .hero-carousel .hero-grid {
	padding-bottom: clamp(92px, 8vw, 112px);
}

.dl-home .hero-promo-section {
	background: #fbf5ed;
	min-height: clamp(620px, 76svh, 720px);
}

.dl-home .hero-promo-section .hero-slides,
.dl-home .hero-promo-slide {
	min-height: inherit;
}

.dl-home .hero-slide[hidden] {
	display: none;
}

.dl-home .hero-promo-slide {
	isolation: isolate;
	position: relative;
}

.dl-home .hero-promo-slide::before {
	background:
		radial-gradient(circle at 76% 18%, rgba(238, 188, 177, .46), transparent 34%),
		linear-gradient(118deg, #fdf8f1 0%, #f7eee3 56%, #f2dfd8 100%);
	content: "";
	inset: 0;
	position: absolute;
	z-index: -1;
}

.dl-home .hero-promo-slide-tone-2::before {
	background:
		radial-gradient(circle at 82% 14%, rgba(216, 183, 137, .4), transparent 32%),
		linear-gradient(118deg, #fcfaf5 0%, #f4ecdf 58%, #ead8c7 100%);
}

.dl-home .hero-promo-slide-tone-3::before {
	background:
		radial-gradient(circle at 78% 18%, rgba(164, 105, 120, .24), transparent 34%),
		linear-gradient(118deg, #fdf7f3 0%, #f3e7e4 58%, #e9d3d7 100%);
}

.dl-home .hero-slide.is-active {
	animation: dl-hero-slide-in 420ms ease-out both;
}

.dl-home .hero-promo-grid {
	box-sizing: border-box;
	gap: clamp(48px, 5vw, 80px);
	grid-template-columns: minmax(0, .92fr) minmax(420px, 1.08fr);
	margin-inline: auto;
	max-width: 1360px;
	min-height: clamp(620px, 76svh, 720px);
	padding-inline: clamp(32px, 5vw, 72px);
	width: 100%;
}

.dl-home .hero-promo-copy {
	max-width: 560px;
}

.dl-home .hero-promo-meta {
	align-items: center;
	display: flex;
	gap: 14px;
	margin-bottom: 24px;
}

.dl-home .hero-promo-number {
	color: var(--wine);
	font: 600 13px/1 var(--sans);
	letter-spacing: .16em;
}

.dl-home .hero-promo-category {
	border: 1px solid rgba(122, 32, 53, .22);
	border-radius: 999px;
	color: var(--ink-soft);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	max-width: 32ch;
	overflow: hidden;
	padding: 7px 12px;
	text-overflow: ellipsis;
	text-transform: uppercase;
	transition: background-color .2s, border-color .2s, color .2s;
	white-space: nowrap;
}

.dl-home .hero-promo-category:hover {
	background: rgba(255, 255, 255, .66);
	border-color: rgba(122, 32, 53, .5);
	color: var(--wine-deep);
}

.dl-home .hero-promo-copy h2 {
	font-size: clamp(38px, 3.5vw, 54px);
	letter-spacing: -.026em;
	line-height: 1;
	margin: 16px 0 18px;
	max-width: 19ch;
	text-wrap: balance;
}

.dl-home .hero-promo-copy h2.is-long {
	font-size: clamp(32px, 2.7vw, 42px);
	line-height: 1.04;
	max-width: 23ch;
}

.dl-home .hero-promo-copy h2 em {
	color: var(--wine);
	font-style: italic;
	font-weight: 500;
}

.dl-home .hero-promo-price {
	color: var(--wine-deep);
	font: 600 clamp(24px, 2.2vw, 32px)/1.1 var(--serif);
	font-variant-numeric: tabular-nums;
	margin: -2px 0 26px;
}

.dl-home .hero-promo-price del {
	color: var(--ink-faint);
	font-size: .62em;
	margin-right: 8px;
}

.dl-home .hero-promo-price ins {
	text-decoration: none;
}

.dl-home .hero-promo-visual {
	background:
		radial-gradient(circle at 30% 22%, rgba(255, 255, 255, .9), transparent 42%),
		linear-gradient(145deg, #fff, var(--shell));
	border: 1px solid rgba(255, 255, 255, .76);
	border-radius: var(--r-lg);
	box-shadow: 0 32px 72px -48px rgba(92, 26, 39, .48);
	height: clamp(430px, 55svh, 560px);
	justify-self: end;
	min-height: 0;
	overflow: hidden;
	position: relative;
	width: min(100%, 640px);
}

.dl-home .hero-promo-visual::after {
	border: 1px solid rgba(180, 135, 77, .18);
	border-radius: 18px;
	content: "";
	inset: 10px;
	pointer-events: none;
	position: absolute;
}

.dl-home .hero-promo-visual picture,
.dl-home .hero-promo-media-link,
.dl-home .hero-promo-image {
	display: block;
	height: 100%;
	width: 100%;
}

.dl-home .hero-promo-image {
	object-fit: contain;
	padding: clamp(30px, 3vw, 46px);
	transition: transform .5s cubic-bezier(.2, .7, .3, 1);
}

.dl-home .hero-promo-media-link:hover .hero-promo-image {
	transform: scale(1.025);
}

.dl-home .hero-carousel-controls {
	align-items: center;
	bottom: 28px;
	display: none;
	gap: 10px;
	justify-content: flex-end;
	left: 50%;
	max-width: 1360px;
	padding-inline: clamp(32px, 5vw, 72px);
	position: absolute;
	transform: translateX(-50%);
	width: 100%;
	z-index: 8;
}

.dl-home .hero-carousel-count {
	align-items: baseline;
	color: var(--ink-faint);
	display: inline-flex;
	font-size: 12px;
	gap: 3px;
	letter-spacing: .08em;
	margin-right: 5px;
}

.dl-home .hero-carousel-count strong {
	color: var(--wine-deep);
	font: 600 22px/1 var(--serif);
}

.dl-home .hero-carousel.is-ready .hero-carousel-controls {
	display: flex;
}

.dl-home .hero-carousel-arrow,
.dl-home .hero-carousel-toggle,
.dl-home .hero-carousel-dot {
	appearance: none;
	background: rgba(255, 253, 249, .82);
	border: 1px solid rgba(122, 32, 53, .22);
	box-shadow: 0 8px 24px -18px rgba(74, 20, 32, .54);
	color: var(--wine-deep);
	cursor: pointer;
}

.dl-home .hero-carousel-arrow,
.dl-home .hero-carousel-toggle {
	align-items: center;
	border-radius: 50%;
	display: inline-flex;
	font-size: 17px;
	height: 40px;
	justify-content: center;
	line-height: 1;
	transition: background-color .2s, border-color .2s, transform .2s;
	width: 40px;
}

.dl-home .hero-carousel-arrow:hover,
.dl-home .hero-carousel-toggle:hover {
	background: #fff;
	border-color: rgba(122, 32, 53, .46);
	transform: translateY(-2px);
}

.dl-home .hero-carousel-dots {
	align-items: center;
	display: flex;
	gap: 7px;
	padding: 0 3px;
}

.dl-home .hero-carousel-dot {
	border-radius: 999px;
	height: 10px;
	padding: 0;
	transition: background-color .2s, width .2s;
	width: 10px;
}

.dl-home .hero-carousel-dot.is-active {
	background: var(--wine);
	border-color: var(--wine);
	width: 28px;
}

.dl-home .hero-carousel-arrow:focus-visible,
.dl-home .hero-carousel-toggle:focus-visible,
.dl-home .hero-carousel-dot:focus-visible {
	outline: 3px solid rgba(122, 32, 53, .3);
	outline-offset: 3px;
}

@keyframes dl-hero-slide-in {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@media (max-width: 960px) {
	.dl-home .hero-promo-section,
	.dl-home .hero-promo-section .hero-slides,
	.dl-home .hero-promo-slide {
		min-height: 0;
	}

	.dl-home .hero-promo-grid {
		gap: 36px;
		grid-template-columns: 1fr;
		min-height: 0;
		padding-block: 56px 112px;
	}

	.dl-home .hero-promo-visual {
		height: min(58vw, 500px);
		justify-self: stretch;
		width: 100%;
	}
}

@media (max-width: 680px) {
	.dl-home .hero-carousel .hero-grid {
		padding-bottom: 94px;
	}

	.dl-home .hero-promo-grid {
		gap: 24px;
		padding-block: 42px 96px;
		padding-inline: 18px;
	}

	.dl-home .hero-promo-copy h2 {
		font-size: clamp(30px, 8.6vw, 36px);
		line-height: 1.03;
		margin-block: 14px 16px;
		max-width: none;
		text-wrap: pretty;
	}

	.dl-home .hero-promo-copy h2.is-long {
		font-size: clamp(27px, 7.7vw, 32px);
		max-width: none;
	}

	.dl-home .hero-promo-meta {
		margin-bottom: 16px;
	}

	.dl-home .hero-promo-category {
		max-width: 19ch;
	}

	.dl-home .hero-promo-visual {
		aspect-ratio: 4 / 3;
		height: auto;
		max-height: 340px;
		min-height: 0;
	}

	.dl-home .hero-promo-image {
		padding: 22px;
	}

	.dl-home .hero-carousel-controls {
		bottom: 24px;
		gap: 7px;
		justify-content: center;
		left: 0;
		padding: 0 18px;
		top: auto;
		transform: none;
	}

	.dl-home .hero-carousel-dots {
		gap: 5px;
	}

	.dl-home .hero-carousel-dot.is-active {
		width: 20px;
	}

	.dl-home .hero-carousel-toggle {
		height: 36px;
		width: 36px;
	}

	.dl-home .hero-carousel-arrow,
	.dl-home .hero-carousel-count {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dl-home .hero-slide.is-active {
		animation: none;
	}

	.dl-home .hero-carousel-arrow,
	.dl-home .hero-carousel-toggle,
	.dl-home .hero-carousel-dot {
		transition: none;
	}

	.dl-home .hero-promo-image {
		transition: none;
	}
}
