@charset "utf-8";
/* =========================================
   1. โครงสร้างหลักและปุ่มแฮมเบอร์เกอร์
   ========================================= */
.hamburger {
	font-family: 'Noto Sans Thai', sans-serif;
	font-size: 1rem;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background-color: #fde594;
	color: #666666;
	border-radius: 50px;
	transition: all 0.3s ease;
	outline: none;
	padding-top: 10px;
	padding-right: 18px;
	padding-bottom: 10px;
	padding-left: 18px;
	height: auto;
	width: 120px;
	border-top-width: 0px;
	border-right-width: 0px;
	border-bottom-width: 0px;
	border-left-width: 0px;
}

.hamburger:hover {
	background-color: #FCD756;
	color: #333;
	transform: scale(1.05);
}

.sidenav {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    background-color: #cea0de;
    overflow-x: hidden;
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 12px rgba(0,0,0,0.2);
    padding-top: 20px;
    box-sizing: border-box;
}

.sidenav.active {
    width: 40% !important;
}

@media screen and (max-width: 600px) {
    .sidenav.active { width: 100% !important; }
	
	.hamburger {
	font-family: 'Noto Sans Thai', sans-serif;
	font-size: 1rem;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background-color: #FFFFFF;
	color: #666666;
	border: 2px solid #fde594;
	border-radius: 50px;
	transition: all 0.3s ease;
	outline: none;
	padding-top: 7px;
	padding-right: 18px;
	padding-bottom: 7px;
	padding-left: 18px;
	height: auto;
	width: 122px;
}
}

/* =========================================
   2. ส่วนหัวและเนื้อหาภายในเมนู
   ========================================= */
.closebtn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 38px;
    text-decoration: none;
    color: #92278f;
    z-index: 1001;
    font-weight: bold;
    line-height: 1;
    transition: 0.3s;
}

.menu-header-label {
    font-family: 'Noto Sans Thai', sans-serif;
    display: block !important;
    padding: 20px 25px 10px 25px;
    font-size: 1.4rem;
    font-weight: 700;
    color: #92278f;
    border-bottom: 2px solid rgba(146, 39, 143, 0.2);
    margin: 0 20px 20px 20px;
}

.menu-content {
    padding: 0 25px 40px 10px;
    height: calc(100% - 130px);
    overflow-y: auto;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* =========================================
   3. ระบบเส้นนำสายตา (Tree View Lines)
   ========================================= */
/* สร้างเส้นแนวตั้งสำหรับเมนูย่อย */
.category-content, 
.dropdown-container-01, 
.dropdown-container-02, 
.dropdown-container-01-02 {
    position: relative;
    margin-left: 25px; /* เว้นที่ให้เส้น */
    border-left: 1px dashed rgba(146, 39, 143, 0.5); /* เส้นแนวตั้งสีม่วงจาง */
}

/* สร้างเส้นแนวนอนเชื่อมเข้าหาเมนู */
.dropdown-btn-01::before, 
.dropdown-btn-02::before, 
.dropdown-container-02 p a::before {
    content: "";
    position: absolute;
    left: -25px; /* ลากจากเส้นแนวตั้ง */
    top: 50%;
    width: 15px; /* ความยาวเส้นแนวนอน */
    height: 1px;
    border-top: 1px dashed rgba(146, 39, 143, 0.5);
}

/* =========================================
   4. รายการเมนูและลูกเล่น (Menu Items)
   ========================================= */
.category-trigger, .dropdown-btn-01, .dropdown-btn-02 {
    font-family: 'Noto Sans Thai', sans-serif;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    border: none;
    outline: none;
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

/* เครื่องหมาย + และ - */
.category-trigger span, .dropdown-btn-01 span, .dropdown-btn-02 span {
    width: 30px;
    height: 30px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-family: monospace;
    font-size: 1.3rem;
    font-weight: bold;
}

/* Level 1: หมวดใหญ่ (ไม่มีเส้นนำสายตาข้างหน้า) */
.category-trigger { 
    width: calc(100% - 10px); margin: 8px 5px; padding: 12px 15px;
    background: rgba(255,255,255,0.5); border-radius: 8px; color: #92278f; font-weight: 700;
}
.category-trigger:hover {
    background-color: #92278f !important; color: #fff !important;
    transform: translateX(5px);
}

/* Level 2: Identity */
.dropdown-btn-01 { 
    width: calc(100% - 15px); margin: 5px 5px; padding: 10px 15px;
    background: #fff; border-radius: 6px; border-left: 5px solid #92278f; font-weight: 400;
    position: relative;
}
.dropdown-btn-01:hover {
    background-color: #fde594 !important; color: #333 !important;
    transform: translateX(8px);
}

/* Level 3 & 4: Official / รอบปณ. */
.dropdown-btn-02 { 
    width: calc(100% - 20px); margin: 4px 5px; padding: 8px 15px;
    background: rgba(255,255,255,0.7); border: 1px dashed rgba(146,39,143,0.3); border-radius: 20px 5px 5px 20px;
    position: relative;
}
.dropdown-btn-02:hover {
    background-color: #e26cb4 !important; color: #fff !important;
    transform: translateX(10px);
}

/* Level 5: ลิงก์สินค้า */
.dropdown-container-02 p a {
    font-family: 'Noto Sans Thai', sans-serif;
    color: #92278f;
    background-color: rgba(255, 255, 255, 0.4);
    padding: 10px 15px;
    margin: 5px 5px 5px 15px; 
    border-radius: 6px;
    border-left: 4px solid transparent;
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
    word-break: break-word;
    position: relative;
}
.dropdown-container-02 p a:hover {
    background-color: #92278f !important; color: #ffffff !important;
    border-left: 6px solid #fde594 !important;
    padding-left: 20px;
    transform: translateX(5px);
    box-shadow: 2px 4px 8px rgba(0,0,0,0.1);
}

/* =========================================
   5. สถานะพิเศษและ Scrollbar
   ========================================= */
.active-btn, .category-trigger.active { 
    background-color: #92278f !important; color: white !important; 
}

.category-content, .dropdown-container-01, .dropdown-container-02, .dropdown-container-01-02 { 
    display: none; 
}

/* Scrollbar Customization */
.menu-content::-webkit-scrollbar { width: 6px; }
.menu-content::-webkit-scrollbar-track { background: rgba(146, 39, 143, 0.1); border-radius: 10px; }
.menu-content::-webkit-scrollbar-thumb { background: #92278f; border-radius: 10px; }
.menu-content::-webkit-scrollbar-thumb:hover { background: #e26cb4; }

.menu-content {
    scrollbar-width: thin;
    scrollbar-color: #92278f rgba(146, 39, 143, 0.1);
}