/* NTV Video KOL/KOC 1.5.0 — section video khách hàng trang chủ ("Ghé thăm nhà khách hàng").
   Bố cục học theo kiểu băng chuyền video dọc + thẻ sản phẩm nổi; màu Nệm Thuần Việt (hồng #EB2364).
   Mọi lớp đều bắt đầu bằng .ntv-vkk để không đụng CSS của Flatsome. */

.ntv-vkk {
	--ntv-vkk-mau: #EB2364;
	--ntv-vkk-mau-nhat: #FDE8EF;
	--ntv-vkk-vien: #F2D7E0;
	--ntv-vkk-chu: #1f2328;
	--ntv-vkk-phu: #6b7280;
	--ntv-vkk-khe: 12px;
	--ntv-vkk-so-o: 1.11;
	--ntv-vkk-so-khe: 1;
	box-sizing: border-box;
	width: 100%;
	max-width: 1410px;
	margin: 0 auto 24px;
	padding: 15px 16px 20px;
	border: 1px solid var(--ntv-vkk-vien);
	border-radius: 10px;
	background: #fff;
	color: var(--ntv-vkk-chu);
}

.ntv-vkk *,
.ntv-vkk *::before,
.ntv-vkk *::after {
	box-sizing: border-box;
}

.ntv-vkk [hidden] {
	display: none !important;
}

/* ---- Đầu khung: tiêu đề trái, 2 mũi tên phải, kẻ mảnh dưới ---- */
.ntv-vkk__dau {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-bottom: 12px;
	margin-bottom: 16px;
	border-bottom: 1px solid var(--ntv-vkk-vien);
}

.ntv-vkk .ntv-vkk__tieude {
	margin: 0;
	padding: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--ntv-vkk-chu);
	text-transform: none;
	letter-spacing: 0;
}

.ntv-vkk__nav {
	display: flex;
	flex: 0 0 auto;
	gap: 8px;
}

.ntv-vkk .ntv-vkk__mui {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 1px solid var(--ntv-vkk-mau);
	border-radius: 8px;
	background: #fff;
	color: var(--ntv-vkk-mau);
	line-height: 1;
	cursor: pointer;
	box-shadow: none;
	transition: background .15s, color .15s, opacity .15s;
}

.ntv-vkk .ntv-vkk__mui:hover:not(:disabled) {
	background: var(--ntv-vkk-mau);
	color: #fff;
}

.ntv-vkk .ntv-vkk__mui:disabled {
	border-color: var(--ntv-vkk-vien);
	color: #c9a9b5;
	cursor: default;
}

/* ---- Băng chuyền: cuộn ngang tự nhiên + dính ô (scroll-snap) ---- */
.ntv-vkk__ray {
	display: flex;
	gap: var(--ntv-vkk-khe);
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
}

.ntv-vkk__ray::-webkit-scrollbar {
	display: none;
}

.ntv-vkk__o {
	position: relative;
	flex: 0 0 calc((100% - var(--ntv-vkk-khe) * var(--ntv-vkk-so-khe)) / var(--ntv-vkk-so-o));
	scroll-snap-align: start;
	min-width: 0;
}

/* Số ô thấy được: mobile 1 ô + mép ô kế, desktop ~4,5 ô (ô cuối lấp ló gợi vuốt). */
@media (min-width: 576px) {
	.ntv-vkk { --ntv-vkk-so-o: 2.22; --ntv-vkk-so-khe: 2; }
}

@media (min-width: 992px) {
	.ntv-vkk { --ntv-vkk-so-o: 3.33; --ntv-vkk-so-khe: 3; padding: 15px 25px 25px; }
	.ntv-vkk .ntv-vkk__tieude { font-size: 20px; }
}

@media (min-width: 1280px) {
	.ntv-vkk { --ntv-vkk-so-o: 4.44; --ntv-vkk-so-khe: 4; }
}

/* ---- Ô video 9:16 ---- */
.ntv-vkk__khung {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 9 / 16;
	overflow: hidden;
	border-radius: 16px;
	background: linear-gradient(160deg, #3a2a31, #17151a);
	cursor: pointer;
}

@supports not (aspect-ratio: 9 / 16) {
	.ntv-vkk__khung { height: 0; padding-top: 177.78%; }
}

.ntv-vkk .ntv-vkk__bia {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	pointer-events: none;
}

.ntv-vkk__toi {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .14);
	transition: background .2s;
	pointer-events: none;
}

.ntv-vkk__khung:hover .ntv-vkk__toi {
	background: rgba(0, 0, 0, .24);
}

.ntv-vkk .ntv-vkk__phat {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	min-height: 0;
	margin: 0;
	padding: 0 0 0 4px;
	border: 0;
	border-radius: 50%;
	background: var(--ntv-vkk-mau);
	color: #fff;
	transform: translate(-50%, -50%);
	box-shadow: 0 6px 16px rgba(235, 35, 100, .35);
	cursor: pointer;
	transition: transform .15s;
}

.ntv-vkk__khung:hover .ntv-vkk__phat {
	transform: translate(-50%, -50%) scale(1.06);
}

@media (min-width: 992px) {
	.ntv-vkk .ntv-vkk__phat { width: 64px; height: 64px; }
}

/* ---- Thẻ sản phẩm nổi ở đáy ô ---- */
.ntv-vkk .ntv-vkk__sp,
.ntv-vkk-lb .ntv-vkk__sp {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px;
	border-radius: 12px;
	background: #fff;
	color: var(--ntv-vkk-chu, #1f2328);
	text-decoration: none;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .16);
}

.ntv-vkk .ntv-vkk__sp {
	position: absolute;
	left: 10px;
	right: 10px;
	bottom: 10px;
	z-index: 2;
}

.ntv-vkk__sp-anh {
	flex: 0 0 48px;
	width: 48px !important;
	height: 48px !important;
	margin: 0 !important;
	border-radius: 6px;
	object-fit: cover;
	background: #f4f4f5;
}

.ntv-vkk__sp-chu {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.25;
}

.ntv-vkk__sp-dong {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
}

.ntv-vkk__sp-goc {
	color: var(--ntv-vkk-phu, #6b7280);
	text-decoration: line-through;
	white-space: nowrap;
}

.ntv-vkk__sp-giam {
	padding: 1px 7px;
	border-radius: 10px;
	background: var(--ntv-vkk-mau-nhat, #FDE8EF);
	color: var(--ntv-vkk-mau, #EB2364);
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
}

.ntv-vkk__sp-gia {
	margin-top: 1px;
	color: var(--ntv-vkk-mau, #EB2364);
	font-size: 16px;
	font-weight: 700;
	white-space: nowrap;
}

.ntv-vkk__sp-tu {
	font-size: 12px;
	font-weight: 600;
}

.ntv-vkk__sp-ten {
	display: -webkit-box;
	margin-top: 2px;
	overflow: hidden;
	color: var(--ntv-vkk-chu, #1f2328);
	font-size: 12px;
	font-weight: 600;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

@media (min-width: 992px) {
	.ntv-vkk__sp-gia { font-size: 17px; }
}

/* ================================================================
   Khung xem lớn (lightbox) — gắn thẳng vào <body>
   ================================================================ */
.ntv-vkk-lb {
	--ntv-vkk-mau: #EB2364;
	--ntv-vkk-mau-nhat: #FDE8EF;
	--ntv-vkk-chu: #1f2328;
	--ntv-vkk-phu: #6b7280;
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(15, 10, 14, .62);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	animation: ntv-vkk-hien .18s ease-out;
}

.ntv-vkk-lb[hidden] {
	display: none !important;
}

.ntv-vkk-lb *,
.ntv-vkk-lb *::before,
.ntv-vkk-lb *::after {
	box-sizing: border-box;
}

@keyframes ntv-vkk-hien {
	from { opacity: 0; }
	to { opacity: 1; }
}

.ntv-vkk-lb__hop {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: min(380px, calc(100vw - 32px), calc((100vh - 150px) * 9 / 16));
	width: min(380px, calc(100vw - 32px), calc((100dvh - 150px) * 9 / 16));
	padding: 10px;
	border-radius: 18px;
	background: #000;
}

.ntv-vkk-lb__man {
	position: relative;
	width: 100%;
	aspect-ratio: 9 / 16;
	overflow: hidden;
	border-radius: 12px;
	background: #000;
}

.ntv-vkk-lb__man video,
.ntv-vkk-lb__man iframe {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	background: #000;
	object-fit: contain;
}

.ntv-vkk-lb .ntv-vkk-lb__nut {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 50%;
	background: rgba(30, 30, 34, .55);
	color: #fff;
	cursor: pointer;
	line-height: 1;
	box-shadow: none;
}

.ntv-vkk-lb .ntv-vkk-lb__nut:hover:not(:disabled) {
	background: var(--ntv-vkk-mau);
	border-color: var(--ntv-vkk-mau);
}

.ntv-vkk-lb .ntv-vkk-lb__nut:disabled {
	opacity: .3;
	cursor: default;
}

.ntv-vkk-lb__truoc,
.ntv-vkk-lb__sau {
	top: 50%;
	transform: translateY(-50%);
}

.ntv-vkk-lb__truoc { left: -64px; }
.ntv-vkk-lb__sau { right: -64px; }

.ntv-vkk-lb .ntv-vkk-lb__dong {
	top: -14px;
	right: -14px;
	z-index: 3;
	width: 36px;
	height: 36px;
	border-width: 0;
	background: #fff;
	color: #222;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}

/* Điện thoại: mũi tên đè lên mép video, nút đóng nằm trong hộp. */
@media (max-width: 575px) {
	.ntv-vkk-lb { padding: 10px; }
	.ntv-vkk-lb__hop {
		width: min(380px, calc(100vw - 20px), calc((100vh - 130px) * 9 / 16));
		width: min(380px, calc(100vw - 20px), calc((100dvh - 130px) * 9 / 16));
	}
	.ntv-vkk-lb .ntv-vkk-lb__nut { width: 42px; height: 42px; }
	.ntv-vkk-lb__truoc { left: 4px; }
	.ntv-vkk-lb__sau { right: 4px; }
	.ntv-vkk-lb .ntv-vkk-lb__dong { top: 16px; right: 16px; width: 34px; height: 34px; }
}

html.ntv-vkk-khoa,
html.ntv-vkk-khoa body {
	overflow: hidden !important;
}

@media (prefers-reduced-motion: reduce) {
	.ntv-vkk__ray { scroll-behavior: auto; }
	.ntv-vkk-lb { animation: none; }
	.ntv-vkk .ntv-vkk__phat,
	.ntv-vkk__toi { transition: none; }
}
