/* Theme Name:   Eduma Child                                                                               
 Description:  Child Theme for Eduma                                                                   
 Author:       Your Name                                                                                 
 Template:     eduma
 Version:      1.1.3                                                                                     
*/

/* --- 1. จัดการโครงสร้างหลัก (เฉพาะใน Header เท่านั้น) --- */
#masthead ul.menu-main-menu.thim-ekits-menu__nav {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
}

/* ดัน Menu Right ไปทางขวาสุด */
#masthead ul.menu-main-menu li.menu-right {
    margin-left: auto !important;
    display: flex !important;
    align-items: center !important;
    float: none !important;
}

/* จัดการ UL ชั้นในของ Menu Right */
#masthead li.menu-right > ul {
    display: flex !important;
    align-items: center !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 20px;
}

/* --- 2. เส้นคั่นสีส้ม (Vertical Line) --- */
#masthead li.menu-right > ul > li.widget_courses-searching:before {
    content: "";
    display: inline-block;
    width: 2px;
    height: 25px;
    background-color: #d96c36;
    margin-right: 15px;
    vertical-align: middle;
    align-self: center;
}

/* --- 3. จัดการแว่นขยายให้ตรงระดับ --- */
#masthead li.menu-right .widget_courses-searching,
#masthead li.menu-right .widget_courses-searching .thim-widget-courses-searching,
#masthead li.menu-right .widget_courses-searching .search-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    line-height: 1 !important;
}

/* --- 4. ปุ่ม Login / สมัครสมาชิก (Logged Out State) --- */
#masthead .header-auth-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px;
    white-space: nowrap !important;
}

#masthead .my-orange-btn {
    background-color: #d96c36 !important;
    color: #fff !important;
    padding: 8px 25px !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    font-weight: bold !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease;
    margin: 0 !important;
    flex-shrink: 0 !important;
}

#masthead .my-orange-btn:hover {
    background-color: #bf5b2a !important;
    box-shadow: 0 4px 12px rgba(217, 108, 54, 0.3);
    transform: translateY(-1px);
}

/* --- 5. ระบบ Profile & Dropdown (Logged In State) --- */
#masthead .um-modern-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

#masthead .um-profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px;
}

#masthead .avatar-wrapper img {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    border: 2px solid #d96c36;
    object-fit: cover;
}

#masthead .user-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

#masthead .um-dropdown-panel {
    position: absolute;
    top: 100%;
    right: 0;
    width: 220px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    margin-top: 10px;
}

/* สะพานล่องหนเชื่อมต่อการ Hover */
#masthead .um-dropdown-panel::before {
    content: "";
    position: absolute;
    top: -20px; 
    right: 0;
    left: 0;
    height: 20px;
    background: transparent;
}

#masthead .um-modern-wrapper:hover .um-dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#masthead .dropdown-header {
    padding: 15px 20px;
    background: #f9f9f9;
    font-size: 13px;
    border-bottom: 1px solid #eee;
}

#masthead .dropdown-items {
    list-style: none !important;
    padding: 10px 0 !important;
    margin: 0 !important;
}

#masthead .dropdown-items li a {
    display: block !important;
    padding: 12px 20px !important;
    color: #555 !important;
    font-size: 14px;
    text-decoration: none !important;
}

#masthead .dropdown-items li a:hover {
    background: #fff5f0;
    color: #d96c36 !important;
}

/* --- 6. จัดการตะกร้าสินค้า (ใช้ Icon เดิมของธีม) --- */
/* ซ่อนหัวข้อ Cart เฉพาะใน Header */
#masthead li.widget_shopping_cart h4,
#masthead li[id*="woocommerce_widget_cart"] h4 {
    display: none !important;
}

/* จัดตำแหน่งตะกร้าใน Menu Right */
#masthead li.widget_shopping_cart, 
#masthead li[id*="woocommerce_widget_cart"] {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
}

/* --- 7. เก็บรายละเอียด และ Clean up --- */
#masthead #magic-line {
    display: none !important;
}

#masthead li.menu-right .widget {
    margin: 0 !important;
    padding: 0 !important;
}

#masthead li[class*="widget_custom_html"], 
#masthead li[class*="widget_text"] {
    display: flex !important;
    align-items: center !important;
}

@media (max-width: 1024px) {
    .user-name { display: none !important; }
}



/*  Course Active*/
