@charset "utf-8";
@media screen and (min-width: 671px) and (max-width: 900px){
.header {
	height: auto;
	width: 100%;
	float: left;
}
.box-header-top {
	background-color: #e26cb4;
	float: left;
	height: auto;
	width: 100%;
}

.mq {
	/* ส่วนของดาวและกรอบนอก (เหมือนเดิมเป๊ะ) */
	font-family: serithairegular;
	font-size: 1rem;
	color: #FFF;
	background-image: url(../images/icon-star.png);
	background-size: 30px;
	background-repeat: no-repeat;
	background-position: left center;
	float: left;
	width: 30%;
	padding-top: 7px;
	padding-bottom: 5px;
	margin-top: 5px;
	margin-left: 2%;
	line-height: 160%;
	position: relative;
}

/* กล่องใหม่: ทำหน้าที่เป็น "หน้าต่าง" บังข้อความ */
.mq-content {
    margin-left: 50px; /* เว้นที่ให้ดาวจากขอบซ้าย 50px */
    overflow: hidden;  /* ตัดข้อความที่วิ่งเลยออกไป */
    display: block;
}

.mq-content span {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%; 
    animation: marquee 15s linear infinite;
}

@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}
/* แถม: หยุดวิ่งเมื่อเอาเมาส์วาง (ถ้าต้องการ) */
.mq:hover span {
    animation-play-state: paused;
}
.box-login{
	float: right;
	height: auto;
	width: auto;
}
/* ปุ่มเข้าสู่ระบบ */
.box-login a {
	background-image: url(../images/icon-login.png);
	background-repeat: no-repeat;
	background-position: 20px center;
	background-size: 22px;
	float: right;
	font-size: 1rem;
	color: #FFF;
	border: 2px solid #FFF;
	border-radius: 12px;
	display: inline-block;
	cursor: pointer;
	text-decoration: none;
	background-color: #e26cb4; /* อัปเดตสีใหม่ */
	transition: 0.3s;
	margin-top: 5px;
	margin-right: 50px;
	margin-bottom: 5px;
	margin-left: 10px;
	padding-top: 10px;
	padding-right: 25px;
	padding-bottom: 10px;
	padding-left: 55px;
}
.box-login a:hover {
	background-color: #BE2581;
}
.box-header-middle {
	float: left;
	height: auto;
	width: 100%;
	background-color: #cea0de;
	background-image: url(../images/bg-line-01.png);
	background-repeat: repeat;
	background-position: center center;
	padding-top: 0.1%;
	padding-bottom: 0.1%;
}

.logo {
	float: left;
	height: auto;
	width: 90px;
	perspective: 1200px;
	margin-left: 2%;
	transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* ปรับให้ขยายนุ่มนวล */
	cursor: pointer; /* เปลี่ยนเมาส์เป็นรูปมือเมื่อชี้ */
	margin-top: 1px;
	margin-bottom: 1px;		
}
.logo:hover {
	/* ขยายใหญ่ขึ้น 10% (1.1) */
    transform: scale(1.1);
}
.logo:active {
	transform: scale(0.98);
}
.logo img {
	height: auto;
	width: 100%;
}
.menu {
	height: auto;
	width: 50%;
	margin-top: 15px;
	text-align: center;
	display: flex;
	justify-content: center;
	float: left;
	margin-left: 10%;
}
.menu ul {
	background-color: #e9d3ed;
	border-radius: 15px;
	width: auto;
	display: table;
	text-align: center;
	padding-top: 0.8%;
	padding-right: 1%;
	padding-bottom: 0.8%;
	padding-left: 1%;
}
.menu ul li {
	display: inline-block;
	float: none;
	list-style-type: none;
	margin-right: 1vw;
	margin-left: 1vw;
	height: auto;
	width: auto;
}
.menu ul li.break-line {
	flex-basis: 100%; /* บังคับกินพื้นที่เต็ม 100% เพื่อตัดบรรทัด */
	width: 100%;
	height: 5px;     /* ช่องว่างระยะห่างระหว่างบรรทัดบนกับบรรทัดล่าง */
	margin: 0;        /* ล้างค่า margin ไม่ให้ขอบเบี้ยว */
}
.menu ul li a {
	font-family: "FC Lamoon";
	font-size: 1.5rem;
	color: #000;
	text-decoration: none;
	display: inline-block; /* สำคัญ: ต้องเป็น inline-block หรือ block เพื่อให้ขยับได้ */
    transition: all 0.3s ease; /* กำหนดความเร็วในการขยับ (0.3 วินาที) */
}
.menu ul li a:hover {
	font-family: "FC Lamoon";
	font-size: 1.5rem;
	color: #92278f;
	text-decoration: none;
	transform: translateY(-5px); /* ขยับขึ้น 5px (ค่าติดลบคือขึ้นข้างบน) */
}
.box-bag a{
	float: right;
	height: auto;
	width: auto;
	background-color: #fde594;
	background-image: url(../images/icon-bag.png);
	background-repeat: no-repeat;
	background-position: 10px center;
	padding-top: 12px;
	padding-bottom: 10px;
	padding-left: 40px;
	background-size: 25px;
	border-radius: 15px;
	display: inline-block;
	cursor: pointer;
	text-decoration: none;
	margin-top: 25px;
	margin-right: 50px;
	margin-left: 2%;
	padding-right: 10px;
	text-align: right;
	font-family: serithairegular;
	font-size: 1rem;
	font-weight: bold;
	color: #333;
}
.box-bag a:hover {
	float: right;
	height: auto;
	width: auto;
	background-color: #FBCE35;
	background-image: url(../images/icon-bag.png);
	background-repeat: no-repeat;
	background-position: 10px center;
	padding-top: 12px;
	padding-bottom: 10px;
	padding-left: 40px;
	background-size: 25px;
	border-radius: 15px;
	display: inline-block;
	cursor: pointer;
	text-decoration: none;
	padding-right: 10px;
	text-align: right;
	font-family: serithairegular;
	font-size: 1rem;
}




.box-roof {
	background-image: url(../images/icon-roof-footer.png);
	background-repeat: repeat-x;
	background-position: center -12px;
	background-size: 45px;
	float: left;
	height: 2em;
	width: 100%;
	border-top-width: 1px;
	border-top-style: solid;
	border-top-color: #fde594;
}

.box-header-footer {
	float: left;
	height: auto;
	width: 90%;
	border-bottom-width: 1px;
	border-bottom-style: solid;
	border-bottom-color: #92278f;
	padding-bottom: 0.3%;
	margin-left: 5%;
	margin-bottom: 5px;
}
.box-sub-menu {
	float: left;
	height: auto;
	width: 20%;
	
}


.box-search-right {
	float: right;
	height: auto;
	width: 60%;
}


.box-cartoon-search {
  float: right;
  width: 70px;
  height: auto;
}

.box-cartoon-search img {
  width: 100%;
  height: auto;
  animation: pulse 4s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}



/* 1. กำหนดการเคลื่อนที่จากซ้ายมาขวา */
@keyframes slideInLeftToRight {
  0% {
    opacity: 0;
    transform: translateX(-100px); /* เริ่มจากทางซ้าย 100px */
  }
  100% {
    opacity: 1;
    transform: translateX(0); /* กลับมาตำแหน่งปกติ */
  }
}

/* 2. ซ่อนองค์ประกอบไว้ก่อน (Pre-state) */
.splide__slide .text-a,
.splide__slide .text-b,
.splide__slide .btn-yellow {
  opacity: 0;
}

/* 3. สั่งทำงานเมื่อสไลด์นั้น Active (.is-active คือคลาสมาตรฐานของ Splide) */

/* ข้อความที่ 1: AAAAA */
.splide__slide.is-active .text-a {
	animation: slideInLeftToRight 0.7s ease-out forwards;
	animation-delay: 0.3s; /* มาก่อนเพื่อน */
	font-family: serithairegular;
	font-size: 2rem;
	color: #FFF;
}

/* ข้อความที่ 2: BBBBB */
.splide__slide.is-active .text-b {
	animation: slideInLeftToRight 0.7s ease-out forwards;
	animation-delay: 0.8s; /* ตามมาอันดับสอง */
	font-family: serithairegular;
	font-size: 1.5rem;
	color: #FFF;
	margin-bottom: 20px;
}

/* ปุ่มสีเหลือง */
.splide__slide.is-active .btn-yellow {
	animation: slideInLeftToRight 0.7s ease-out forwards;
	animation-delay: 1.3s; /* มาอันดับสุดท้าย */
	/* ตกแต่งปุ่มเหลือง */
	background-color: #f1c40f;
	color: #000;
	border: none;
	border-radius: 50px;
	font-weight: normal;
	cursor: pointer;
	font-family: serithairegular;
	font-size: 1.2rem;
	padding-top: 15px;
	padding-right: 30px;
	padding-bottom: 12px;
	padding-left: 30px;
}
.content-overlay {
	position: absolute;
	z-index: 9999;
	left: 50px;
	top: 60px;
}

#backToTop {
	display: none;
	position: fixed;
	bottom: 25px; /* ขยับขึ้นจากขอบล่างนิดหน่อย */
	right: 30px;
	z-index: 9999;
	border: none;
	outline: none;
	background-color: #cea0de;
	color: white;
	cursor: pointer;
	border-radius: 50%;
	/* --- ส่วนที่ปรับปรุงใหม่ --- */
	width: 65px;         /* ขยายขนาดปุ่มให้ใหญ่ขึ้น */
	height: 65px;        /* ขยายขนาดปุ่มให้ใหญ่ขึ้น */
	font-size: 32px;     /* ขยายขนาดลูกศรให้ใหญ่ขึ้น */
	font-weight: bold;   /* เพิ่มความหนาให้เส้นลูกศร */
	line-height: 65px;   /* จัดให้ลูกศรอยู่กึ่งกลางแนวตั้ง */
	text-align: center;  /* จัดให้ลูกศรอยู่กึ่งกลางแนวนอน */
	/* ------------------------- */

	transition: all 0.3s ease;
	box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.25); /* เพิ่มเงาให้เข้มขึ้นตามขนาดปุ่ม */
}

#backToTop:hover {
  background-color: #e26cb4;
  box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.35);
  transform: translateY(-5px); /* ให้ลอยสูงขึ้นอีกนิดตอนเอาเมาส์วาง */
}
}