.lilac-aha-slider {
	padding: 32px 0;
}

.lilac-aha-slider__header {
	text-align: center;
	margin: 0 0 32px;
}

.lilac-aha-slider__heading {
	margin: 0;
}

.lilac-aha-slider__heading-highlight {
	color: #b08d57;
	border-bottom: 2px solid #b08d57;
}

.lilac-aha-slider__heading-suffix {
	color: inherit;
}

/*
 * Splide: slide giữa cao nhất, các slide thấp dần sang 2 bên theo data-dist
 * (JS gắn: 0 = giữa, 1, 2, 3+). Mọi slide GIỮ NGUYÊN bề rộng (Splide chia
 * đều perPage) -> lấp khít đúng perPage slide, không lòi slide thừa ở mép.
 *
 * KHÔNG đổi chiều cao thật (aspect-ratio/height) khi trượt: làm vậy buộc
 * trình duyệt tính lại layout mỗi frame (giật) và chiều cao cả element co
 * giãn theo, đẩy nội dung trên/dưới. Thay vào đó mọi media luôn cao bằng
 * nhau (7/10), chỉ "cắt" bớt trên + dưới bằng clip-path, card sản phẩm dịch
 * lên bằng transform đúng bằng phần bị cắt -> nhìn như thấp dần, căn giữa
 * theo chiều dọc, nhưng layout đứng yên hoàn toàn.
 *
 * --lilac-slide-clip: phần cắt MỖI đầu, tính theo tỉ lệ bề rộng slide
 * (nhân 100cqw ở phần tử con; slide là container nên cqw = % bề rộng slide).
 * Media cao 10/7 W. dist1 hiện tỉ lệ 5/6 (cao 1.2W) -> cắt (1.4286-1.2)/2 =
 * 0.1143W mỗi đầu; dist2+ hiện 1/1 -> cắt 0.2143W mỗi đầu.
 * Đăng ký @property kiểu <number> để transition được biến này (trình duyệt
 * cũ không hỗ trợ thì chỉ đổi ngay không mượt, layout vẫn đúng).
 */
@property --lilac-slide-clip {
	syntax: '<number>';
	inherits: true;
	initial-value: 0;
}

.lilac-aha-slider .lilac-aha-slider__splide .splide__slide {
	container-type: inline-size;
	--lilac-slide-clip: 0.2143;
	transition: --lilac-slide-clip 0.25s ease-out;
}

.lilac-aha-slider .lilac-aha-slider__splide .splide__slide[data-dist="0"] {
	--lilac-slide-clip: 0;
}

.lilac-aha-slider .lilac-aha-slider__splide .splide__slide[data-dist="1"] {
	--lilac-slide-clip: 0.1143;
}

.lilac-aha-slider .lilac-aha-slider__splide.is-dist-jump .splide__slide {
	transition: none;
}

.lilac-aha-slider .lilac-aha-slider__splide .lilac-aha-slider__media {
	aspect-ratio: 7 / 10;
	clip-path: inset( calc( var( --lilac-slide-clip ) * 100cqw ) 0 round 12px );
}

.lilac-aha-slider .lilac-aha-slider__splide .lilac-aha-slider__product {
	transform: translateY( calc( var( --lilac-slide-clip ) * -100cqw ) );
}

/* Panel xem nhanh chỉ phủ đúng phần đang nhìn thấy của slide */
.lilac-aha-slider .lilac-aha-slider__splide .lilac-aha-slider__quickview {
	top: calc( var( --lilac-slide-clip ) * 100cqw );
	bottom: calc( var( --lilac-slide-clip ) * 100cqw );
}

.lilac-aha-slider .lilac-aha-slider__splide .splide__arrow--prev,
.lilac-aha-slider .lilac-aha-slider__splide .splide__arrow--next {
	padding: 0 !important;
}

/* Kéo bằng chuột/tay (tự xử lý trong JS, mỗi lần kéo = 1 slide) */
.lilac-aha-slider__splide .splide__track {
	cursor: grab;
	touch-action: pan-y;
	user-select: none;
	-webkit-user-select: none;
}

.lilac-aha-slider__splide .splide__track:active {
	cursor: grabbing;
}

.lilac-aha-slider__splide img,
.lilac-aha-slider__splide video {
	-webkit-user-drag: none;
	user-drag: none;
}

.lilac-aha-slider__slide {
	position: relative;
}

.lilac-aha-slider__media {
	aspect-ratio: 3 / 4;
	overflow: hidden;
	border-radius: 12px;
	background: #f2f2f2;
}

.lilac-aha-slider__media img,
.lilac-aha-slider__media video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Card sản phẩm thu nhỏ dưới media */
.lilac-aha-slider__product {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 12px;
	border: 1px solid #ccc;
	padding: 10px;
	border-radius: 10px;
}

.lilac-aha-slider__product-thumb {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 4px;
	overflow: hidden;
}

.lilac-aha-slider__product-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.lilac-aha-slider__product-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.lilac-aha-slider__product-title {
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.lilac-aha-slider__product-price {
	font-size: 13px;
	color: #666;
}

.lilac-aha-slider__product-price ins {
	text-decoration: none;
	color: #b08d57;
}

.lilac-aha-slider__product-price del {
	opacity: 0.6;
}

.lilac-aha-slider__quickview-toggle {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	padding: 0 !important;
	border-radius: 10px;
	border: none;
	background: #222;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.lilac-aha-slider__quickview-toggle:hover {
	background: #444;
}

/* Panel xem nhanh: trượt lên đè trong chính slide, ẩn mặc định */
.lilac-aha-slider__quickview {
	position: absolute;
	inset: 0;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 12px;
	padding: 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 10px;
	overflow-y: auto;
	transform: translateY(101%);
	opacity: 0;
	visibility: hidden;
	transition: transform 0.35s ease, opacity 0.35s ease, visibility 0.35s;
	z-index: 5;
}

.lilac-aha-slider__quickview.is-open {
	transform: translateY(0);
	opacity: 1;
	visibility: visible;
}

.lilac-aha-slider__quickview-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	padding: 0 !important;
	border-radius: 8px;
	border: 1px solid #ccc;
	background: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transform: rotate(90deg);
}

.lilac-aha-slider__quickview-thumb {
	border-radius: 6px;
	overflow: hidden;
}

.lilac-aha-slider__quickview-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.lilac-aha-slider__quickview-title {
	font-size: 14px;
	font-weight: 600;
}

.lilac-aha-slider__quickview-price {
	font-size: 14px;
	color: #b08d57;
}

.lilac-aha-slider__quickview-cart {
	width: 100%;
	margin-top: 8px;
}

.lilac-aha-slider__quickview-cart form.cart {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.lilac-aha-slider__quickview-cart .button {
	width: 100%;
	border-radius: 30px;
	background: #222;
	color: #fff;
	border: none;
	padding: 12px 20px;
	cursor: pointer;
}

.lilac-aha-slider__quickview-link {
	display: inline-block;
	width: 100%;
	padding: 12px 20px;
	border-radius: 30px;
	border: 1px solid #222;
	color: inherit;
	text-decoration: none;
	font-size: 13px;
}

.lilac-aha-slider__quickview-link:hover {
	background: #f5f5f5;
}
