C2K Premium Carousel
Floating Video Banner

DUAL LANGUAGE OPTION

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>C2K Wellness Language Selection</title>
<style>
html, body {
margin: 0;
padding: 0;
height: 100%;
font-family: Helvetica, Arial, sans-serif;
background: #000;
}

/* Wrapper to stack buttons and video */
.page-wrapper {
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
min-height: 30vh;
padding: 10px 0;
box-sizing: border-box;
}

/* Buttons container on top */
.language-overlay {
display: flex;
gap: 20px;
margin-bottom: 10px; /* space between buttons and video */
}

/* Button styling */
.language-btn {
display: inline-block;
background-color: #fff; /* changed to white */
border: 2px solid #eb8113;
color: #eb8113;
padding: 12px 26px; /* more horizontal padding for oval shape */
font-size: 18px;
border-radius: 999px; /* oval shape */
text-decoration: none;
font-weight: 600;
white-space: nowrap;
transition: opacity 0.2s ease;
}
.language-btn:hover {
opacity: 0.85;
}

/* Video container with adaptive sizing */
.video-container {
width: 80%;
max-width: 1920px;
aspect-ratio: 16/9;
border: 4px solid #eb8113;
border-radius: 12px;
background: #000;
}

/* Video iframe responsive */
.video-container iframe {
width: 100%;
height: 100%;
border: none;
}

/* Mobile adjustments */
@media (max-width: 768px) {
.page-wrapper {
justify-content: flex-start; /* top-align buttons and video */
padding: 5px 0;
}

.video-container {
width: 95%;
height: calc(100vh - 60px - 20px); /* occupy remaining screen height minus buttons + padding */
max-height: none; /* allow filling screen */
aspect-ratio: auto; /* let height define width if needed */
border-width: 3px;
}

.language-overlay {
margin-bottom: 10px;
}
}
</style>
</head>
<body>

<div class="page-wrapper">
<!-- Buttons on top -->
<div class="language-overlay">
<a class="language-btn" href="https://www.c2kwellness.com/healthy-with-c2k">English</a>
<a class="language-btn" href="https://www.c2kwellness.com/health-vi">Tiếng Việt</a>
</div>

<!-- Video container below -->
<div class="video-container">
<iframe id="c2kVideo" allow="autoplay; fullscreen" allowfullscreen playsinline></iframe>
</div>
</div>

<script>
const vid = document.getElementById("c2kVideo");
const timestamp = Date.now();

// Add all video IDs to `playlist`
// Set the first one in `embed/VIDEOID`
vid.src =
`https://www.youtube.com/embed/vvnAbaPX6Q4` +
`?autoplay=1&mute=0&loop=1` +
`&playlist=V0a6nvCwt8Y,6xoKNMzA1eM,DS_6EeNwSWc` +
`&controls=0&rel=0&playsinline=1&modestbranding=1` +
`&fs=0&disablekb=1&nocache=${timestamp}`;
</script>


</body>
</html>

HOME BANNER

<style>
/* ===== MAIN BANNER ===== */
#c2k-banner {
position: fixed;
left: 50%;
bottom: 5vh;
transform: translateX(-50%);
width: 75vw;
height: 75vh;
z-index: 99999;
border-radius: 20px;
overflow: hidden;
box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* ===== SLIDES ===== */
.c2k-slide {
position: absolute;
inset: 0;
background-size: cover;
background-position: center;
opacity: 0;
pointer-events: none;
transition: opacity 1s ease;
}

.c2k-slide.active {
opacity: 1;
pointer-events: auto;
cursor: pointer;
}

/* ===== CLOSE BUTTON ===== */
#c2k-close {
position: absolute;
top: 16px;
right: 16px;
z-index: 3;
background: #fff;
border: none;
width: 40px;
height: 40px;
font-size: 26px;
border-radius: 50%;
cursor: pointer;
}

/* ===== COLLAPSED CTA ===== */
#c2k-mini {
position: fixed;
top: 50%;
left: 0;
transform: translateY(-50%);
background: #eb8113;
color: #fff;
font-weight: 700;
padding: 16px 18px;
border-radius: 0 12px 12px 0;
cursor: pointer;
z-index: 99999;
display: none;
}

/* ===== DESKTOP IMAGES ===== */
@media (min-width: 769px) {
.slide-1 {
background-image: url("https://primary.jwwb.nl/public/n/w/w/temp-gkvqkiepscrtkilodacl/9c3cf993-5896-4448-94c8-45ab1170b124-high.jpg?enable-io=true&width=1920");
}
.slide-2 {
background-image: url("https://primary.jwwb.nl/public/n/w/w/temp-gkvqkiepscrtkilodacl/happy-lunar-vn-high-hu87ze.png?enable-io=true&crop=1.294%3A1&width=1252");
}
.slide-3 {
background-image: url("https://primary.jwwb.nl/public/n/w/w/temp-gkvqkiepscrtkilodacl/9c3cf993-5896-4448-94c8-45ab1170b124-high.jpg?enable-io=true&width=1920");
}
.slide-4 {
background-image: url("https://primary.jwwb.nl/public/n/w/w/temp-gkvqkiepscrtkilodacl/happy-lunar-en-high-eps50r.png?enable-io=true&crop=1.3356%3A1%2Coffset-y100&width=1252");
}
}

/* ===== MOBILE IMAGES ===== */
@media (max-width: 768px) {
#c2k-banner {
width: 90vw;
height: 70vh;
}
.slide-1 {
background-image: url("https://primary.jwwb.nl/public/n/w/w/temp-gkvqkiepscrtkilodacl/gemini_generated_image_732u39732u39732u-high.png?enable-io=true&width=816");
}
.slide-2 {
background-image: url("https://primary.jwwb.nl/public/n/w/w/temp-gkvqkiepscrtkilodacl/gemini_generated_image_8vilry8vilry8vil-high.png?enable-io=true&width=816");
}
.slide-3 {
background-image: url("https://primary.jwwb.nl/public/n/w/w/temp-gkvqkiepscrtkilodacl/happy-lunar-mobile-high.png?enable-io=true&crop=0.7762%3A1&width=532");
}
.slide-4 {
background-image: url("https://primary.jwwb.nl/public/n/w/w/temp-gkvqkiepscrtkilodacl/gemini_generated_image_mpg95qmpg95qmpg9-high.png?enable-io=true&width=816");
}

}
</style>

<div id="c2k-banner">
<button id="c2k-close">×</button>

<div class="c2k-slide slide-1 active"></div>
<div class="c2k-slide slide-2"></div>
<div class="c2k-slide slide-3"></div>
<div class="c2k-slide slide-4"></div>
</div>

<div id="c2k-mini">TET SAVINGS from FEB 1 to 28</div>

<script>
document.addEventListener("DOMContentLoaded", () => {
const banner = document.getElementById("c2k-banner");
const closeBtn = document.getElementById("c2k-close");
const miniCTA = document.getElementById("c2k-mini");
const slides = document.querySelectorAll(".c2k-slide");

const isMobile = window.matchMedia("(max-width: 768px)").matches;

/* ===== DESKTOP RANDOM LINK (ONCE) ===== */
const desktopLinks = [
"https://www.c2khealthandbeauty.com/product/20889167/c2k-nad-60-capsules-vien",
"https://www.c2khealthandbeauty.com/product/20888618/c2k-fuicoidan-60-capsules-vien"
];
const desktopRandom =
desktopLinks[Math.floor(Math.random() * desktopLinks.length)];

/* ===== CLICK HANDLING (ACTIVE SLIDE ONLY) ===== */
banner.addEventListener("click", e => {
const activeSlide = document.querySelector(".c2k-slide.active");
if (!activeSlide) return;

if (isMobile) {
if (activeSlide.classList.contains("slide-1")) {
window.open(
"https://www.c2khealthandbeauty.com/product/20889167/c2k-nad-60-capsules-vien",
"_blank"
);
} else {
window.open(
"https://www.c2khealthandbeauty.com/product/20888618/c2k-fuicoidan-60-capsules-vien",
"_blank"
);
}
} else {
if (activeSlide.classList.contains("slide-1")) {
window.open(desktopRandom, "_blank");
}
}
});

/* ===== SLIDE ROTATION ===== */
let index = 0;
setInterval(() => {
slides[index].classList.remove("active");
index = (index + 1) % slides.length;
slides[index].classList.add("active");
}, 5000);

/* ===== CLOSE / REOPEN ===== */
closeBtn.onclick = e => {
e.stopPropagation();
banner.style.display = "none";
miniCTA.style.display = "block";
};

miniCTA.onclick = () => {
banner.style.display = "block";
miniCTA.style.display = "none";
};
});
</script>

VNMESE - BANNER

<style>
/* ===== MAIN BANNER ===== */
#c2k-banner {
position: fixed;
left: 50%;
bottom: 5vh;
transform: translateX(-50%);
width: 75vw;
height: 75vh;
z-index: 99999;
border-radius: 20px;
overflow: hidden;
box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* ===== SLIDES ===== */
.c2k-slide {
position: absolute;
inset: 0;
background-size: cover;
background-position: center;
opacity: 0;
pointer-events: none;
transition: opacity 0.6s ease;
}

.c2k-slide.active {
opacity: 1;
pointer-events: auto;
cursor: pointer;
}

/* ===== CLOSE BUTTON ===== */
#c2k-close {
position: absolute;
top: 16px;
right: 16px;
z-index: 3;
background: #fff;
border: none;
width: 40px;
height: 40px;
font-size: 26px;
border-radius: 50%;
cursor: pointer;
}

/* ===== COLLAPSED CTA ===== */
#c2k-mini {
position: fixed;
top: 25%;
left: 0;
transform: translateY(-50%);
background: #eb8113;
color: #fff;
font-weight: 700;
padding: 16px 18px;
border-radius: 0 12px 12px 0;
cursor: pointer;
z-index: 99999;
display: none;
}

/* ===== DESKTOP IMAGES ===== */
@media (min-width: 768px) {
.slide-1 {
background-image: url("https://primary.jwwb.nl/public/n/w/w/temp-gkvqkiepscrtkilodacl/7706db99-137c-482e-9451-81513ab8ea4b-high.jpg?enable-io=true&width=1920");
}
.slide-2 {
background-image: url("https://primary.jwwb.nl/public/n/w/w/temp-gkvqkiepscrtkilodacl/happy-lunar-vn-high-hu87ze.png?enable-io=true&crop=1.294%3A1&width=1252");
}
.slide-3 {
background-image: url("https://primary.jwwb.nl/public/n/w/w/temp-gkvqkiepscrtkilodacl/7706db99-137c-482e-9451-81513ab8ea4b-high.jpg?enable-io=true&width=1920");
}
.slide-4 {
background-image: url("https://primary.jwwb.nl/public/n/w/w/temp-gkvqkiepscrtkilodacl/corda-high.png?enable-io=true&crop=1.3015%3A1%2Coffset-y83&width=816");
}
}

/* ===== MOBILE IMAGES ===== */
@media (max-width: 768px) {
#c2k-banner {
width: 90vw;
height: 70vh;
}
.slide-1 {
background-image: url("https://primary.jwwb.nl/public/n/w/w/temp-gkvqkiepscrtkilodacl/gemini_generated_image_732u39732u39732u-high.png?enable-io=true&width=816");
}
.slide-2 {
background-image: url("https://primary.jwwb.nl/public/n/w/w/temp-gkvqkiepscrtkilodacl/gemini_generated_image_8vilry8vilry8vil-high.png?enable-io=true&width=816");
}
.slide-3 {
background-image: url("https://primary.jwwb.nl/public/n/w/w/temp-gkvqkiepscrtkilodacl/gemini_generated_image_z6s4rlz6s4rlz6s4-high.png?enable-io=true&width=816");
}
.slide-4 {
background-image: url("https://primary.jwwb.nl/public/n/w/w/temp-gkvqkiepscrtkilodacl/corda-high.png?enable-io=true&crop=1.3015%3A1%2Coffset-y83&width=816");
}
}
</style>

<div id="c2k-banner">
<button id="c2k-close">×</button>

<div class="c2k-slide slide-1 active"></div>
<div class="c2k-slide slide-2"></div>
<div class="c2k-slide slide-3"></div>
<div class="c2k-slide slide-4"></div>
</div>

<div id="c2k-mini">KHUYẾN MÃI ĐẶC BIỆT từ 1-28/2</div>

<script>
document.addEventListener("DOMContentLoaded", () => {
const banner = document.getElementById("c2k-banner");
const closeBtn = document.getElementById("c2k-close");
const miniCTA = document.getElementById("c2k-mini");
const slides = document.querySelectorAll(".c2k-slide");

const isMobile = window.matchMedia("(max-width: 768px)").matches;

/* ===== DESKTOP RANDOM LINK (ONCE) ===== */
const desktopLinks = [
"https://www.c2khealthandbeauty.com/product/20889167/c2k-nad-60-capsules-vien",
"https://www.c2khealthandbeauty.com/product/20888618/c2k-fuicoidan-60-capsules-vien"
];
const desktopRandom =
desktopLinks[Math.floor(Math.random() * desktopLinks.length)];

const slide4Link =
"https://www.c2khealthandbeauty.com/product/21953721/thien-trieu-bird-s-nest-drink-nuoc-yen-sao-thien-trieu";

/* ===== CLICK HANDLING (ACTIVE SLIDE ONLY) ===== */
banner.addEventListener("click", e => {
const activeSlide = document.querySelector(".c2k-slide.active");
if (!activeSlide) return;

/* FORCE SLIDE 4 TO SPECIAL URL */
if (activeSlide.classList.contains("slide-4")) {
window.open(slide4Link, "_blank");
return;
}

if (isMobile) {
if (activeSlide.classList.contains("slide-1")) {
window.open(
"https://www.c2khealthandbeauty.com/product/20889167/c2k-nad-60-capsules-vien",
"_blank"
);
} else {
window.open(
"https://www.c2khealthandbeauty.com/product/20888618/c2k-fuicoidan-60-capsules-vien",
"_blank"
);
}
} else {
if (activeSlide.classList.contains("slide-1")) {
window.open(desktopRandom, "_blank");
}
}
});

/* ===== SLIDE ROTATION ===== */
let index = 0;
setInterval(() => {
slides[index].classList.remove("active");
index = (index + 1) % slides.length;
slides[index].classList.add("active");
}, 5000);

/* ===== CLOSE / REOPEN ===== */
closeBtn.onclick = e => {
e.stopPropagation();
banner.style.display = "none";
miniCTA.style.display = "block";
};

miniCTA.onclick = () => {
banner.style.display = "block";
miniCTA.style.display = "none";
};
});
</script>

ENGLISH - BANNER

<style>
/* ===== MAIN BANNER ===== */
#c2k-banner {
position: fixed;
left: 50%;
bottom: 5vh;
transform: translateX(-50%);
width: 75vw;
height: 75vh;
z-index: 99999;
border-radius: 20px;
overflow: hidden;
box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* ===== SLIDES ===== */
.c2k-slide {
position: absolute;
inset: 0;
background-size: cover;
background-position: center;
opacity: 0;
pointer-events: none;
transition: opacity 0.6s ease;
}

.c2k-slide.active {
opacity: 1;
pointer-events: auto;
cursor: pointer;
}

/* =========================
CLOSE BUTTON
========================= */
#c2k-close {
position: absolute;
top: 16px;
right: 16px;
z-index: 5;
background: #fff;
border: none;
width: 40px;
height: 40px;
font-size: 26px;
border-radius: 50%;
cursor: pointer;
}

/* =========================
COLLAPSED CTA ========================= */
#c2k-mini {
position: fixed;
top: 25%;
left: 0;
transform: translateY(-50%);
background: #eb8113;
color: #fff;
font-weight: 700;
padding: 16px 18px;
border-radius: 0 12px 12px 0;
cursor: pointer;
z-index: 99999;
display: none;
user-select: none;
}

/* ===== DESKTOP IMAGES ===== */
@media (min-width: 769px) {
.slide-1 {
background-image: url("https://primary.jwwb.nl/public/n/w/w/temp-gkvqkiepscrtkilodacl/7706db99-137c-482e-9451-81513ab8ea4b-high.jpg?enable-io=true&width=1920");
}
.slide-2 {
background-image: url("https://primary.jwwb.nl/public/n/w/w/temp-gkvqkiepscrtkilodacl/happy-lunar-en-high-eps50r.png?enable-io=true&crop=1.3356%3A1%2Coffset-y100&width=1252");
}
.slide-3 {
background-image: url("https://primary.jwwb.nl/public/n/w/w/temp-gkvqkiepscrtkilodacl/7706db99-137c-482e-9451-81513ab8ea4b-high.jpg?enable-io=true&width=1920");
}
.slide-4 {
background-image: url("https://primary.jwwb.nl/public/n/w/w/temp-gkvqkiepscrtkilodacl/corda-high.png?enable-io=true&crop=1.3015%3A1%2Coffset-y83&width=816");
}
}

/* ===== MOBILE IMAGES ===== */
@media (max-width: 768px) {
#c2k-banner {
width: 90vw;
height: 70vh;
}
.slide-1 {
background-image: url("https://primary.jwwb.nl/public/n/w/w/temp-gkvqkiepscrtkilodacl/gemini_generated_image_732u39732u39732u-high.png?enable-io=true&width=816");
}
.slide-2 {
background-image: url("https://primary.jwwb.nl/public/n/w/w/temp-gkvqkiepscrtkilodacl/gemini_generated_image_8vilry8vilry8vil-high.png?enable-io=true&width=816");
}
.slide-3 {
background-image: url("https://primary.jwwb.nl/public/n/w/w/temp-gkvqkiepscrtkilodacl/gemini_generated_image_64syjt64syjt64sy-high.png?enable-io=true&width=816");
}
.slide-4 {
background-image: url("https://primary.jwwb.nl/public/n/w/w/temp-gkvqkiepscrtkilodacl/happy-lunar-mobile-high.png?enable-io=true&crop=0.7762%3A1&width=532");
}
}
</style>

<div id="c2k-banner">
<button id="c2k-close">×</button>

<div class="c2k-slide slide-1 active"></div>
<div class="c2k-slide slide-2"></div>
<div class="c2k-slide slide-3"></div>
<div class="c2k-slide slide-4"></div>
</div>

<div id="c2k-mini">TET SAVINGS from FEB 1 to 28</div>

<script>
document.addEventListener("DOMContentLoaded", () => {
const banner = document.getElementById("c2k-banner");
const closeBtn = document.getElementById("c2k-close");
const miniCTA = document.getElementById("c2k-mini");
const slides = document.querySelectorAll(".c2k-slide");

const isMobile = window.matchMedia("(max-width: 768px)").matches;

/* ===== DESKTOP RANDOM LINK (ONCE) ===== */
const desktopLinks = [
"https://www.c2khealthandbeauty.com/product/20889167/c2k-nad-60-capsules-vien",
"https://www.c2khealthandbeauty.com/product/20888618/c2k-fuicoidan-60-capsules-vien"
];
const desktopRandom =
desktopLinks[Math.floor(Math.random() * desktopLinks.length)];

const slide4Link =
"https://www.c2khealthandbeauty.com/product/21953721/thien-trieu-bird-s-nest-drink-nuoc-yen-sao-thien-trieu";

/* ===== CLICK HANDLING (ACTIVE SLIDE ONLY) ===== */
banner.addEventListener("click", e => {
const activeSlide = document.querySelector(".c2k-slide.active");
if (!activeSlide) return;

/* FORCE SLIDE 4 TO SPECIAL URL */
if (activeSlide.classList.contains("slide-4")) {
window.open(slide4Link, "_blank");
return;
}

if (isMobile) {
if (activeSlide.classList.contains("slide-1")) {
window.open(
"https://www.c2khealthandbeauty.com/product/20889167/c2k-nad-60-capsules-vien",
"_blank"
);
} else {
window.open(
"https://www.c2khealthandbeauty.com/product/20888618/c2k-fuicoidan-60-capsules-vien",
"_blank"
);
}
} else {
if (activeSlide.classList.contains("slide-1")) {
window.open(desktopRandom, "_blank");
}
}
});


/* ===== SLIDE ROTATION ===== */
let index = 0;
setInterval(() => {
slides[index].classList.remove("active");
index = (index + 1) % slides.length;
slides[index].classList.add("active");
}, 5000);

/* ===== CLOSE / REOPEN ===== */
closeBtn.onclick = e => {
e.stopPropagation();
banner.style.display = "none";
miniCTA.style.display = "block";
};

miniCTA.onclick = () => {
banner.style.display = "block";
miniCTA.style.display = "none";
};
});
</script>

VIDEO BANNER (BEST VERSION)

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Floating Video Banner</title>

<style>
body{
margin:0;
height:2000px;
}

/* ---------- FLOATING VIDEO ---------- */
.floating-video{
position:fixed;
left:10px; /* FIXED LEFT */
top:50%;
transform:translateY(-50%);

z-index:9999;

width:clamp(140px,18vw,260px);
aspect-ratio:9/16;

border-radius:16px;
overflow:hidden;
background:#000;

cursor:grab;
touch-action:none;
}

.floating-video.dragging{
cursor:grabbing;
}

.floating-video iframe{
width:100%;
height:100%;
border:none;
pointer-events:none;
}

@media (max-width:480px){
.floating-video{
width:35vw;
left:5px; /* mobile left */
}
}
</style>
</head>

<body>

<div class="floating-video" id="floatVideo">
<iframe
id="ytplayer"
src=""
allow="autoplay; encrypted-media"
allowfullscreen>
</iframe>
</div>

<script>
const container = document.getElementById("floatVideo");
const iframe = document.getElementById("ytplayer");

/* ---------- DEVICE CHECK ---------- */
const isTouch =
('ontouchstart' in window) || navigator.maxTouchPoints > 0;

/* ---------- LOAD VIDEO ---------- */
const videoID="7DbP3CwvQKc";

iframe.src=
`https://www.youtube.com/embed/${videoID}?enablejsapi=1&playsinline=1&controls=0&modestbranding=1`
+(isTouch?"":"&autoplay=1");

/* ---------- YOUTUBE CONTROL ---------- */
function yt(cmd){
iframe.contentWindow.postMessage(
JSON.stringify({
event:"command",
func:cmd,
args:[]
}),
"*");
}

let playing=!isTouch;

/* ---------- DRAG SYSTEM (VERTICAL ONLY) ---------- */
let startY=0;
let offsetY=0;
let dragging=false;
let moved=false;

function pointerDown(e){

if(!container.contains(e.target)) return;

const p=e.touches?e.touches[0]:e;

startY=p.clientY;

const rect=container.getBoundingClientRect();
offsetY=startY-rect.top;

dragging=true;
moved=false;

container.classList.add("dragging");
}

function pointerMove(e){
if(!dragging) return;

const p=e.touches?e.touches[0]:e;

const dy=Math.abs(p.clientY-startY);
if(dy>6) moved=true;

let newTop=p.clientY-offsetY;

const maxTop=window.innerHeight-container.offsetHeight;
newTop=Math.max(0,Math.min(maxTop,newTop));

container.style.top=newTop+"px";
container.style.transform="none";

/* lock to LEFT permanently */
container.style.left="10px";
}

function pointerUp(e){
if(!dragging) return;

container.classList.remove("dragging");

if(!moved && container.contains(e.target)){
if(playing){ yt("pauseVideo"); }
else{ yt("playVideo"); }
playing=!playing;
}

dragging=false;
}

/* DESKTOP */
container.addEventListener("mousedown",pointerDown);
window.addEventListener("mousemove",pointerMove);
window.addEventListener("mouseup",pointerUp);

/* MOBILE */
container.addEventListener("touchstart",pointerDown,{passive:true});
window.addEventListener("touchmove",pointerMove,{passive:true});
window.addEventListener("touchend",pointerUp);
</script>

</body>
</html>