/* แถบบน LandLinkGo + ค้นหา + ล็อกอิน — ทุกหน้ายกเว้น home */
:root{
  --pd-top-bar-h:56px;
}
.pd-top-bar{
  position:sticky;
  top:0;
  z-index:200;
  width:100%;
  min-height:var(--pd-top-bar-h);
  display:flex;
  align-items:center;
  background:rgba(255,255,255,.97);
  border-bottom:1px solid #dfe1e5;
  box-shadow:0 1px 0 rgba(32,33,36,.06);
  backdrop-filter:blur(10px);
}
.pd-top-bar-inner{
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  max-width:1320px;
  margin:0 auto;
  padding:8px 16px;
  min-width:0;
  box-sizing:border-box;
}
.pd-top-bar-brand{
  display:inline-flex;
  align-items:center;
  flex-shrink:0;
  padding:6px 2px;
  font-size:20px;
  font-weight:1000;
  letter-spacing:-.02em;
  color:#202124;
  text-decoration:none;
  line-height:1;
}
.pd-top-bar-brand:hover{ color:#1a1a1a; }
.pd-top-bar-search{
  flex:1 1 auto;
  min-width:0;
  max-width:min(520px, 100%);
}
.pd-top-bar-search-box{
  display:flex;
  align-items:center;
  gap:8px;
  height:40px;
  padding:0 14px;
  border-radius:999px;
  background:#f1f3f4;
  border:1px solid transparent;
  transition:background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.pd-top-bar-search-box:focus-within{
  background:#fff;
  border-color:rgba(26,115,232,.45);
  box-shadow:0 0 0 3px rgba(26,115,232,.12);
}
.pd-top-bar-search-ico{
  width:18px;
  height:18px;
  flex-shrink:0;
  color:#64748b;
}
.pd-top-bar-search-box input{
  flex:1;
  min-width:0;
  border:none;
  outline:none;
  background:transparent;
  font:inherit;
  font-size:14px;
  font-weight:850;
  color:#202124;
}
.pd-top-bar-search-box input::placeholder{ color:#94a3b8; }
.pd-top-bar-end{
  display:flex;
  align-items:center;
  gap:10px;
  flex-shrink:0;
  margin-left:auto;
  min-width:0;
}
.pd-top-bar-subtitle{
  flex-shrink:0;
  font-size:12px;
  font-weight:1000;
  color:#6b7280;
  white-space:nowrap;
}
.pd-top-bar-avatar{
  width:36px;
  height:36px;
  flex:0 0 36px;
  border-radius:999px;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  border:2px solid #e8eaed;
  background:linear-gradient(135deg,#eef2ff,#dbeafe);
  text-decoration:none;
  color:#1e3a8a;
  font-size:12px;
  font-weight:900;
  line-height:1;
}
.pd-top-bar-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.pd-top-bar-avatar-ph{
  display:block;
}
.pd-top-bar-chat{
  display:none !important;
}
#pdTopBarChat .chat-launcher,
.pd-top-bar-chat-btn.chat-launcher{
  position:relative;
  width:40px;
  height:40px;
  border:1px solid #dfe1e5;
  border-radius:999px;
  background:#fff;
  color:#202124;
  font-size:0;
  display:grid;
  place-items:center;
  padding:0;
  box-shadow:none;
  transform:none;
  cursor:pointer;
  transition:background .15s ease, border-color .15s ease;
}
#pdTopBarChat .chat-launcher:hover,
.pd-top-bar-chat-btn.chat-launcher:hover{
  background:#f1f3f4;
  border-color:#c7dcff;
  transform:none;
  box-shadow:none;
}
#pdTopBarChat .chat-launcher-icon svg,
.pd-top-bar-chat-btn .chat-launcher-icon svg{
  width:20px;
  height:20px;
}
#pdTopBarChat .chat-launcher-badge,
.pd-top-bar-chat-btn .chat-launcher-badge{
  top:-4px;
  right:-4px;
  min-width:18px;
  height:18px;
  padding:0 5px;
  font-size:10px;
  border-width:2px;
}
.pd-top-bar-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-shrink:0;
}
.pd-top-bar-actions .pill,
.pd-top-bar-actions .btn,
.pd-top-bar-pill,
.pd-top-bar-btn{
  border:1px solid #dfe1e5;
  background:#fff;
  border-radius:14px;
  padding:9px 12px;
  font-weight:900;
  font-size:12px;
  color:#202124;
  text-decoration:none;
  cursor:pointer;
  font-family:inherit;
  line-height:1.2;
  white-space:nowrap;
}
.pd-top-bar-actions .pill,
.pd-top-bar-pill{
  color:#6b7280;
  cursor:default;
}
.pd-top-bar-actions .btn.primary,
.pd-top-bar-btn-primary{
  background:#1a1a1a;
  color:#fff;
  border-color:#1a1a1a;
}
.pd-top-bar-actions .btn.primary:hover,
.pd-top-bar-btn-primary:hover{
  background:#333;
  border-color:#333;
}
.pd-top-bar-actions .btn:hover,
.pd-top-bar-btn:hover{
  border-color:#c6c9cc;
  background:#f1f3f4;
}
@media (max-width:900px){
  .pd-top-bar-subtitle{ display:none; }
}
@media (max-width:1024px){
  .pd-top-bar-inner{
    flex-wrap:wrap;
    align-items:center;
    padding:8px 12px 10px;
    gap:8px;
  }
  .pd-top-bar-brand{
    order:1;
    font-size:18px;
    font-weight:1000;
  }
  .pd-top-bar-end{
    order:2;
    gap:6px;
    margin-left:auto;
  }
  .pd-top-bar-search{
    order:3;
    flex:1 1 100%;
    max-width:none;
  }
  .pd-top-bar-subtitle{ display:none !important; }
  .pd-top-bar--mobile-compact .pd-top-bar-actions{
    gap:6px;
  }
  .pd-top-bar--mobile-compact .pd-top-bar-actions > .pill,
  .pd-top-bar--mobile-compact .pd-top-bar-actions > .btn,
  .pd-top-bar--mobile-compact .pd-top-bar-actions > .pd-lang-wrap,
  .pd-top-bar--mobile-compact .pd-top-bar-actions > #LandLinkGoLangSelect{
    display:none !important;
  }
  #pdTopBarChat .chat-launcher,
  .pd-top-bar-chat-btn.chat-launcher,
  .pd-top-bar--mobile-compact .pd-notif-bell,
  .pd-top-bar--mobile-compact .pd-top-bar-avatar{
    width:40px;
    height:40px;
  }
  .pd-top-bar--mobile-compact .pd-top-bar-avatar{
    flex-basis:40px;
  }
  .pd-top-bar--mobile-compact #pdTopBarChat .chat-launcher,
  .pd-top-bar--mobile-compact .pd-top-bar-chat-btn.chat-launcher{
    background:linear-gradient(145deg,#e8f2ff 0%,#c7dcff 100%);
    border-color:#aec8f5;
    box-shadow:0 1px 4px rgba(26,115,232,.08);
  }
  .pd-top-bar-mobile-menu{
    position:relative;
    flex-shrink:0;
    display:none;
  }
  .pd-top-bar--mobile-compact .pd-top-bar-mobile-menu{
    display:block;
  }
  .pd-top-bar-menu-btn{
    width:40px;
    height:40px;
    padding:0;
    border:none;
    border-radius:10px;
    background:transparent;
    color:#202124;
    display:grid;
    place-items:center;
    cursor:pointer;
  }
  .pd-top-bar-menu-btn:hover{
    background:#f1f3f4;
  }
  .pd-top-bar-menu-ico{
    display:block;
    width:18px;
    height:2px;
    border-radius:999px;
    background:#202124;
    box-shadow:0 -6px 0 #202124, 0 6px 0 #202124;
  }
  .pd-top-bar--mobile-compact .pd-top-bar-inner,
  .pd-top-bar--mobile-compact .pd-top-bar-end,
  .pd-top-bar--mobile-compact .pd-top-bar-mobile-menu{
    overflow:visible;
  }
  .pd-top-bar--menu-open{
    z-index:8000;
    overflow:visible;
  }
  .pd-top-bar-menu-panel{
    position:absolute;
    right:0;
    top:calc(100% + 6px);
    min-width:0;
    width:max-content;
    max-width:min(200px, calc(100vw - 24px));
    max-height:min(70vh, 360px);
    overflow:auto;
    -webkit-overflow-scrolling:touch;
    padding:6px;
    background:#fff;
    border:1px solid #dfe1e5;
    border-radius:12px;
    box-shadow:0 10px 24px rgba(15,23,42,.14);
    z-index:8010;
    display:flex;
    flex-direction:column;
    gap:4px;
  }
  .pd-top-bar-menu-panel .pd-top-bar-pill,
  .pd-top-bar-menu-panel #pdAuthBadge,
  .pd-top-bar-menu-panel #authBadge{
    display:none !important;
  }
  .pd-top-bar-menu-panel[hidden]{
    display:none !important;
  }
  .pd-top-bar-menu-panel .pd-top-bar-pill{
    display:block;
    width:100%;
    margin:0;
    padding:8px 10px 2px;
    border:none;
    background:transparent;
    color:#64748b;
    font-size:12px;
    font-weight:900;
    white-space:normal;
    text-align:left;
    cursor:default;
  }
  .pd-top-bar-menu-panel .pd-top-bar-btn{
    width:100%;
    justify-content:center;
    border-radius:10px;
    min-height:0;
    height:auto;
    padding:8px 12px;
    font-size:13px;
    font-weight:800;
  }
  .pd-top-bar-menu-panel .pd-top-bar-btn.primary{
    background:#1a1a1a;
    color:#fff;
    border-color:#1a1a1a;
  }
  .pd-top-bar-menu-panel .pd-lang-wrap,
  .pd-top-bar-menu-panel #LandLinkGoLangSelect{
    width:100%;
    min-width:0;
    max-width:none;
    margin-top:0;
  }
  .pd-top-bar-menu-panel #LandLinkGoLangSelect{
    min-height:0;
    min-width:0;
    height:auto;
    border-radius:10px;
    padding:8px 12px;
    font-size:13px;
    font-weight:800;
    text-align:left;
    cursor:pointer;
    border:1px solid #dfe1e5;
    background:#fff;
  }
  .pd-top-bar-menu-panel .pd-lang-wrap{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:0;
    overflow:visible;
  }
  .pd-top-bar-menu-panel .llg-lang-menu{
    position:static;
    margin-top:4px;
    padding:2px;
    max-height:none;
    overflow:visible;
    box-shadow:none;
    border:1px solid #eef2f6;
  }
  .pd-top-bar-menu-panel .llg-lang-option{
    padding:7px 10px;
    font-size:13px;
    border-radius:8px;
  }
}

.pd-lang-wrap{
  position:relative;
  flex:0 0 auto;
  min-width:108px;
}
.llg-lang-select{
  display:block;
  width:100%;
  min-width:108px;
  max-width:160px;
  box-sizing:border-box;
  font:inherit;
  white-space:nowrap;
}
.llg-lang-menu{
  position:absolute;
  left:auto;
  right:0;
  top:calc(100% + 4px);
  z-index:9000;
  min-width:max(100%, 148px);
  width:max-content;
  max-width:min(220px, calc(100vw - 24px));
  background:#fff;
  border:1px solid #dfe1e5;
  border-radius:12px;
  box-shadow:0 10px 24px rgba(15,23,42,.12);
  padding:4px;
  box-sizing:border-box;
}
.llg-lang-menu[hidden]{
  display:none !important;
}
.llg-lang-option{
  display:block;
  width:100%;
  text-align:left;
  border:none;
  background:transparent;
  border-radius:10px;
  padding:10px 12px;
  font:inherit;
  font-size:14px;
  font-weight:800;
  color:#202124;
  cursor:pointer;
  white-space:nowrap;
  line-height:1.3;
}
.llg-lang-option:hover,
.llg-lang-option.is-active{
  background:#f1f3f4;
}
