@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css");

/* ==========================================================
   CUSTOMER SHARED HEADER v1
   ใช้กับหน้าสมาชิกเพื่อให้ Header เหมือนหน้า Home
   ========================================================== */
.customer-site-header {
    width: 100%;
    background: #711923 !important;
    border-bottom: 1px solid #5c1119 !important;
    box-shadow: 0 4px 18px rgba(61, 16, 22, .16) !important;
    position: relative;
    z-index: 1200;
}

.customer-site-header-inner {
    width: 100% !important;
    max-width: none !important;
    min-height: 74px;
    margin: 0 !important;
    padding: 10px clamp(18px, 4vw, 72px) !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box;
}

.customer-site-brand {
    flex: 0 0 auto;
}

.customer-site-header .brand-mark {
    background: #fff8ef !important;
    color: #711923 !important;
    border-color: #e4c395 !important;
}

.customer-site-header .brand-copy strong { color: #fff !important; }
.customer-site-header .brand-copy small { color: rgba(255,255,255,.72) !important; }

.customer-site-nav {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex: 1 1 auto !important;
    width: auto !important;
    margin-left: auto !important;
    gap: 10px !important;
}

.customer-site-nav > a {
    color: rgba(255,255,255,.94) !important;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 10px;
}
.customer-site-nav > a:hover,
.customer-site-nav > a.active { background: rgba(255,255,255,.10); color:#fff !important; }
.customer-site-nav > .nav-login { background: transparent !important; border: 0 !important; box-shadow: none !important; }


/* กลุ่ม Action ของสมาชิกอยู่ชิดขวาเสมอ: [แจ้งเตือน] [ชื่อผู้ใช้] */
.customer-account-actions {
    margin-left: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    flex: 0 0 auto !important;
}

/* Override กฎเก่าของหน้า Home ที่เคยดัน user-menu ออกจากปุ่มแจ้งเตือน */
body.grab-home .customer-site-header .customer-account-actions .customer-user-menu,
body.grab-home .customer-site-header .customer-account-actions .user-menu,
.customer-site-header .customer-account-actions .customer-user-menu,
.customer-site-header .customer-account-actions .user-menu {
    margin-left: 0 !important;
}

/* กระดิ่งต้องอยู่ทางซ้ายของชื่อผู้ใช้ */
.customer-notif-menu {
    position: relative;
    flex: 0 0 auto;
}

.customer-notif-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border: 1px solid rgba(255,255,255,.20);
    border-radius: 11px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.customer-notif-button:hover,
.customer-notif-menu.is-open .customer-notif-button { background: rgba(255,255,255,.15); }

.customer-notif-count {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f3b52f;
    color: #5b1820;
    font-size: 11px;
    line-height: 1;
    font-weight: 800;
}

.customer-notif-box {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(340px, calc(100vw - 28px));
    background: #fff;
    border: 1px solid #eadfd6;
    border-radius: 13px;
    box-shadow: 0 16px 38px rgba(47, 19, 22, .20);
    color: #333;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-5px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
    z-index: 1400;
}
.customer-notif-menu.is-open .customer-notif-box {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.customer-notif-head {
    padding: 11px 14px;
    background: #fbf7f3;
    border-bottom: 1px solid #eee4dd;
    font-weight: 700;
    color: #5e1720;
}
.customer-notif-list { max-height: 310px; overflow-y: auto; }
.customer-notif-item {
    display: block;
    padding: 11px 14px;
    color: #332d2a !important;
    text-decoration: none;
    border-bottom: 1px solid #f0e9e4;
}
.customer-notif-item:last-child { border-bottom: 0; }
.customer-notif-item:hover { background: #fff8f4; }
.customer-notif-item strong { display:block; font-size: 13px; line-height:1.45; }
.customer-notif-item small {
    display:block;
    margin-top:4px;
    color:#7d726d;
    font-size:11.5px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.customer-notif-empty { padding: 24px 16px; text-align:center; color:#8d8580; font-size:13px; }

/* Profile dropdown */
.customer-site-header .customer-user-menu {
    margin-left: 0 !important;
    position: relative !important;
    flex: 0 0 auto !important;
}
.customer-site-header .user-name {
    color: #fff !important;
    background: rgba(255,255,255,.09) !important;
    border-color: rgba(255,255,255,.20) !important;
}
.customer-site-header .user-name:hover,
.customer-site-header .user-menu.is-open .user-name { background: rgba(255,255,255,.15) !important; }
.customer-site-header .dropdown-content {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    width: 230px !important;
    min-width: 230px !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 2px !important;
    padding: 7px !important;
    z-index: 1400 !important;
    background: #fff !important;
    border: 1px solid #eadfd6 !important;
    border-radius: 13px !important;
    box-shadow: 0 14px 34px rgba(67, 25, 29, .16) !important;
}
.customer-site-header .dropdown-content a {
    display:block !important;
    width:100% !important;
    padding:10px 12px !important;
    color:#3f3733 !important;
    text-decoration:none !important;
    white-space:nowrap !important;
    border-radius:9px;
    box-sizing:border-box;
}
.customer-site-header .dropdown-content a:hover,
.customer-site-header .dropdown-content a.active { background:#fbf2ef !important; color:#8c1c29 !important; }
.customer-site-header .dropdown-content .logout-link {
    color:#bd2a39 !important;
    border-top:1px solid #f0e4de;
    margin-top:3px;
    padding-top:11px !important;
}

@media (max-width: 760px) {
    .customer-site-header-inner { min-height:64px; padding:8px 14px !important; gap:10px; }
    .customer-site-header .brand-copy small { display:none; }
    .customer-site-nav { gap:6px !important; }
    .customer-account-actions { gap:6px !important; }
    .customer-notif-label { display:none; }
    .customer-notif-button { padding:8px 10px; }
    .customer-site-header .user-name { max-width:190px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
}

@media (max-width: 520px) {
    .customer-site-header .brand-copy { display:none; }
    .customer-site-header .brand-mark { width:42px; height:42px; }
    .customer-site-header .user-name { max-width:150px; font-size:13px !important; }
    .customer-notif-box { right:-158px; }
}

/* ==========================================================
   CUSTOMER DROPDOWN HOVER/ACTIVE CLEANUP v4 — 2026-09-12
   - ไม่ใช้พื้นหลังสีชมพูเมื่อ hover/เลือกเมนูใน dropdown
   - ใช้ตัวอักษรสีแดง + ตัวหนาแทน
   - บังคับ box-sizing เพื่อไม่ให้พื้นที่ hover ล้นกรอบด้านขวา
   ========================================================== */
.customer-site-header .dropdown-content a,
body.grab-home .customer-site-header .dropdown-content a {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    background: transparent !important;
}

.customer-site-header .dropdown-content a:hover,
.customer-site-header .dropdown-content a:focus-visible,
.customer-site-header .dropdown-content a.active,
body.grab-home .customer-site-header .dropdown-content a:hover,
body.grab-home .customer-site-header .dropdown-content a:focus-visible,
body.grab-home .customer-site-header .dropdown-content a.active {
    background: transparent !important;
    color: #a52332 !important;
    font-weight: 700 !important;
}

.customer-site-header .dropdown-content a.active:hover,
body.grab-home .customer-site-header .dropdown-content a.active:hover {
    background: transparent !important;
    color: #a52332 !important;
}

/* ==========================================================
   CUSTOMER ICONS + INSTANT DROPDOWN v5 — 2026-09-19
   - แทน Emoji ด้วย Font Awesome โดยไม่เปลี่ยนฟอนต์ข้อความเดิม
   - ไม่มีช่องว่างระหว่างปุ่มผู้ใช้กับ dropdown เพื่อให้ hover ต่อเนื่อง
   ========================================================== */
.customer-notif-icon,
.customer-user-leading-icon,
.customer-notif-head > i,
.customer-notif-item strong > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.customer-notif-icon { width: 16px; }
.customer-user-leading-icon {
    width: 17px;
    min-width: 17px;
    flex: 0 0 17px;
    line-height: 1;
}
.customer-user-leading-icon > i { display: block; }
.customer-notif-head > i { margin-right: 6px; color: #a52332; }
.customer-notif-item strong > i { width: 18px; margin-right: 5px; color: #a52332; }
.customer-site-header .user-name { gap: 8px !important; }
.customer-site-header .user-name .user-menu-caret { font-size: 10px; opacity: .86; margin-left: 2px; flex: 0 0 auto; }
.customer-user-display-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
