/* =========================================
   ShipX.co — Global Stylesheet
   Full Truckload & Express Transport Platform
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600;700;800;900&display=swap');

/* ── CSS Variables ────────────────────────── */
:root {
  /* Brand Colors */
  --green-dark:   #0a4f47;
  --green-main:   #0f8b72;
  --green-mid:    #12a48b;
  --green-light:  #e6f7f3;
  --green-glow:   rgba(15,139,114,.18);

  --gold-dark:    #a07830;
  --gold-main:    #c7a04a;
  --gold-light:   #fff7e0;
  --gold-glow:    rgba(199,160,74,.18);

  --dark-bg:      #0f1a18;
  --dark-card:    #162420;
  --dark-border:  rgba(255,255,255,.08);
  --dark-text:    rgba(255,255,255,.92);
  --dark-muted:   rgba(255,255,255,.55);

  --light-bg:     #f4f8f6;
  --light-card:   #ffffff;
  --light-border: #dce9e4;
  --light-text:   #172824;
  --light-muted:  #5a7068;

  /* Active Theme (light default) */
  --bg:      var(--light-bg);
  --card:    var(--light-card);
  --border:  var(--light-border);
  --text:    var(--light-text);
  --muted:   var(--light-muted);

  /* Layout */
  --max-w:   1200px;
  --radius:  20px;
  --radius-lg: 32px;
  --shadow-sm: 0 2px 12px rgba(10,79,71,.07);
  --shadow:    0 8px 40px rgba(10,79,71,.10);
  --shadow-lg: 0 20px 80px rgba(10,79,71,.15);

  /* Nav */
  --nav-h: 68px;
}

/* ── Dark Mode ────────────────────────────── */
[data-theme="dark"] {
  --bg:     var(--dark-bg);
  --card:   var(--dark-card);
  --border: var(--dark-border);
  --text:   var(--dark-text);
  --muted:  var(--dark-muted);
}

/* ── Reset & Base ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Noto Sans Thai', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
  transition: background .3s, color .3s;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Typography ───────────────────────────── */
h1, h2, h3, h4 {
  line-height: 1.15;
  letter-spacing: -.025em;
  font-weight: 800;
}

h1 { font-size: clamp(36px, 6vw, 68px); }
h2 { font-size: clamp(26px, 4vw, 46px); }
h3 { font-size: clamp(20px, 3vw, 28px); }
h4 { font-size: 18px; }

.text-green  { color: var(--green-main); }
.text-gold   { color: var(--gold-main); }
.text-muted  { color: var(--muted); }

/* ── Layout ───────────────────────────────── */
.wrap,
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 96px 0; }

/* ── Navigation ───────────────────────────── */
/* พื้นกระจกฝ้าของหัวเพจอยู่บน ::before ไม่ใช่บน #nav เอง (CENTRAL-W10 ข้อ 3 · แผงแชต AI ของแถบ SSO)
   backdrop-filter / filter / transform บนบรรพบุรุษทำให้ position:fixed ของลูกหลานยึดกล่องนั้นแทนหน้าจอ —
   แถบ SSO ฝังอยู่ใน #nav แผงแชต AI (fixed · top 0 · สูง 100vh) จึงเคยถูกขังอยู่ในหัวเพจสูง 68px
   ⛔ ห้ามใส่ backdrop-filter/filter/transform/will-change/contain ที่ #nav หรือ .nav-sso-slot อีก */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid var(--border);
  transition: border .3s;
}
#nav::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: rgba(244,248,246,.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: background .3s;
}

[data-theme="dark"] #nav::before {
  background: rgba(15,26,24,.88);
}

#nav.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo { display: flex; align-items: center; flex-shrink: 0; }
.nav-logo img { height: 38px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: background .2s, color .2s;
  white-space: nowrap;
}

.nav-links a:hover, .nav-links a.active {
  background: var(--green-light);
  color: var(--green-dark);
}

[data-theme="dark"] .nav-links a:hover,
[data-theme="dark"] .nav-links a.active {
  background: rgba(15,139,114,.15);
  color: #4fcfb8;
}

/* Dropdown */
.nav-dropdown { position: relative; }

.nav-dropdown-toggle {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, color .2s;
}

.nav-dropdown-toggle:hover,
.nav-dropdown.open .nav-dropdown-toggle {
  background: var(--green-light);
  color: var(--green-dark);
}

[data-theme="dark"] .nav-dropdown-toggle:hover,
[data-theme="dark"] .nav-dropdown.open .nav-dropdown-toggle {
  background: rgba(15,139,114,.15);
  color: #4fcfb8;
}

.nav-dropdown-toggle svg {
  transition: transform .25s;
  flex-shrink: 0;
  opacity: .7;
  width: 13px;
  height: 13px;
  margin-left: 1px;
}

.nav-dropdown-toggle:hover svg,
.nav-dropdown.open .nav-dropdown-toggle svg {
  opacity: 1;
}

.nav-dropdown.open .nav-dropdown-toggle svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 240px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .2s, visibility .2s, transform .2s;
  z-index: 100;
}

.nav-dropdown.open .nav-dropdown-menu,
.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  transition: background .2s;
}

.nav-dropdown-menu a:hover {
  background: var(--green-light);
}

[data-theme="dark"] .nav-dropdown-menu a:hover {
  background: rgba(15,139,114,.12);
}

.nav-dropdown-menu .dm-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  background: var(--green-light);
}

.nav-dropdown-menu .dm-title { font-weight: 700; display: block; }
.nav-dropdown-menu .dm-sub   { font-size: 12px; color: var(--muted); }

/* ── Services mega-menu ── */
.nav-services-menu {
  min-width: 560px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: 14px;
}
.nav-dropdown:hover .nav-services-menu,
.nav-dropdown.open .nav-services-menu {
  transform: translateX(-50%) translateY(0);
}
.nsm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nsm-card {
  display: flex; flex-direction: column; gap: 0;
  padding: 14px 14px 12px; border-radius: 14px;
  text-decoration: none; transition: transform .2s, box-shadow .2s;
  position: relative; overflow: hidden; color: #fff !important;
}
.nsm-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,.22); }
.nav-services-menu .nsm-green:hover  { background: linear-gradient(135deg,#0a2622,#0f8b72) !important; }
.nav-services-menu .nsm-orange:hover { background: linear-gradient(135deg,#3d1800,#c05000) !important; }
.nav-services-menu .nsm-blue:hover   { background: linear-gradient(135deg,#0a1628,#1565c0) !important; }
.nav-services-menu .nsm-purple:hover { background: linear-gradient(135deg,#1a0533,#6a1b9a) !important; }
.nsm-green  { background: linear-gradient(135deg,#0d3530,#13a882); }
.nsm-orange { background: linear-gradient(135deg,#4a2000,#d96000); }
.nsm-blue   { background: linear-gradient(135deg,#0d1f3c,#1a72d4); }
.nsm-purple { background: linear-gradient(135deg,#220840,#7b22b0); }
.nsm-card::after {
  content:''; position:absolute; bottom:-24px; right:-24px;
  width:80px; height:80px; border-radius:50%; background:rgba(255,255,255,.07);
}
.nsm-icon   { font-size: 28px; margin-bottom: 8px; line-height: 1; }
.nsm-name   { display: block; font-size: 15px; font-weight: 900; color: #fff; margin-bottom: 4px; text-shadow: 0 1px 4px rgba(0,0,0,.4); letter-spacing: .2px; }
.nsm-th { font-size: 12.5px; font-weight: 700; color: rgba(255,255,255,.9); letter-spacing: 0; }
.nsm-slogan { display: block; font-size: 12.5px; color: rgba(255,255,255,.92); line-height: 1.5; margin-bottom: 10px; text-shadow: 0 1px 3px rgba(0,0,0,.35); }
.nsm-cta {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 700; color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.2);
  padding: 4px 10px; border-radius: 50px; width: fit-content; margin-top: auto;
}
.nsm-footer {
  text-align: center; padding: 10px 4px 2px;
  font-size: 11.5px; color: var(--muted);
}
.nsm-actions {
  display: flex; gap: 6px; margin-top: auto; padding-top: 10px;
}
.nsm-btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; text-decoration: none;
  padding: 5px 11px; border-radius: 50px; transition: opacity .2s;
  white-space: nowrap;
}
.nsm-btn:hover { opacity: .85; }
.nsm-btn-info {
  background: rgba(255,255,255,.18); color: rgba(255,255,255,.9) !important;
  border: 1px solid rgba(255,255,255,.3);
}
.nsm-btn-book {
  background: rgba(255,255,255,.95); color: #111 !important;
  border: 1px solid rgba(255,255,255,.9);
  font-weight: 800;
}
.nsm-coming-soon {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: auto; padding-top: 10px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .5px;
  color: rgba(255,255,255,.55);
  background: rgba(255,255,255,.08);
  border: 1px dashed rgba(255,255,255,.25);
  border-radius: 50px; padding: 5px 14px;
  width: fit-content;
  animation: csBlink 2.4s ease-in-out infinite;
}
@keyframes csBlink {
  0%,100% { opacity: 1; }
  50%      { opacity: .55; }
}
.nsm-cs-badge {
  position: absolute; top: 9px; right: 9px;
  font-size: 9.5px; font-weight: 800; letter-spacing: .4px;
  color: rgba(255,255,255,.9);
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50px; padding: 2px 8px;
  pointer-events: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Nav icon buttons */
.nav-icon-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  transition: background .2s, color .2s;
  font-size: 16px;
  cursor: pointer;
}

.nav-icon-btn:hover {
  background: var(--green-light);
  color: var(--green-main);
}

[data-theme="dark"] .nav-icon-btn:hover {
  background: rgba(15,139,114,.15);
  color: #4fcfb8;
}

/* Language selector */
.lang-select {
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: border .2s;
}

.lang-select:hover { border-color: var(--green-main); }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}

.nav-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

/* Mobile nav */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 24px;
  z-index: 999;
  box-shadow: var(--shadow-lg);
}

.nav-mobile.open { display: block; }

.nav-mobile a {
  display: block;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.nav-mobile a:last-child { border-bottom: 0; }

/* Body offset for fixed nav */
body { padding-top: var(--nav-h); }

/* ── Buttons ───────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 28px;
  height: 52px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, filter .2s;
  white-space: nowrap;
  border: none;
  text-decoration: none;
}

.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--green-main), var(--green-dark));
  color: #fff;
  box-shadow: 0 8px 24px var(--green-glow);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-main), var(--gold-dark));
  color: #fff;
  box-shadow: 0 8px 24px var(--gold-glow);
}

.btn-outline {
  background: transparent;
  color: var(--green-main);
  border: 2px solid var(--green-main);
}

.btn-outline:hover { background: var(--green-light); }

.btn-ghost {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover { background: rgba(255,255,255,.2); }

.btn-sm {
  height: 40px;
  padding: 0 18px;
  font-size: 13px;
  border-radius: 10px;
}

.btn-lg {
  height: 62px;
  padding: 0 36px;
  font-size: 17px;
  border-radius: 18px;
}

/* ── Section Headers ────────────────────────── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--green-main);
  background: var(--green-light);
  padding: 6px 14px;
  border-radius: 99px;
  margin-bottom: 16px;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}

.section-header p {
  color: var(--muted);
  font-size: 18px;
  margin-top: 12px;
}

/* ── Cards ─────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .3s, box-shadow .3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

/* ── Chips / Tags ──────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 700;
}

.chip-green {
  background: var(--green-light);
  color: var(--green-dark);
  border: 1px solid rgba(15,139,114,.2);
}

.chip-gold {
  background: var(--gold-light);
  color: var(--gold-dark);
  border: 1px solid rgba(199,160,74,.2);
}

.chip-dark {
  background: rgba(255,255,255,.08);
  color: var(--dark-text);
  border: 1px solid rgba(255,255,255,.12);
}

/* ── Stats Counter ─────────────────────────── */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.stat-item strong {
  display: block;
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: -.03em;
  color: var(--green-main);
  line-height: 1;
}

.stat-item span {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
  display: block;
}

/* ── Grids ─────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ── Animations ────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: .5; }
  100% { transform: scale(1.8); opacity: 0; }
}

.animate-up  { animation: fadeUp .7s ease both; }
.animate-in  { animation: fadeIn .5s ease both; }
.float       { animation: float 4s ease-in-out infinite; }

/* Stagger delays */
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
.delay-4 { animation-delay: .4s; }
.delay-5 { animation-delay: .5s; }

/* ── Footer ───────────────────────────────── */
#footer {
  background: #071410;
  color: rgba(255,255,255,.85);
  padding: 0 0 0;
}

.footer-accent-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--green-main) 0%, var(--gold-main) 60%, var(--green-mid) 100%);
}

/* Newsletter */
.footer-newsletter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 36px 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-wrap: wrap;
}

.footer-newsletter-badge {
  display: inline-block;
  background: rgba(15,139,114,.18);
  color: #4fcfb8;
  border: 1px solid rgba(79,207,184,.2);
  border-radius: 30px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: 8px;
}

.footer-newsletter-text h4 {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.footer-newsletter-text p {
  font-size: 13.5px;
  color: rgba(255,255,255,.5);
}

.footer-newsletter-form {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.footer-newsletter-form input {
  width: 280px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  padding: 0 16px;
  outline: none;
  transition: border-color .2s;
}

.footer-newsletter-form input::placeholder { color: rgba(255,255,255,.3); }
.footer-newsletter-form input:focus { border-color: var(--green-main); }

.footer-newsletter-form button {
  height: 44px;
  padding: 0 22px;
  border-radius: 12px;
  background: var(--green-main);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, transform .1s;
}

.footer-newsletter-form button:hover { background: #0fa889; transform: translateY(-1px); }

.footer-divider {
  height: 1px;
  background: rgba(255,255,255,.06);
  margin: 0;
}

/* Main grid */
.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1.1fr;
  gap: 48px;
  padding: 48px 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

/* ── Footer brand headline animations ── */
@keyframes footer-logo-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fbh-slide-in {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fbh-shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.footer-brand-headline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
  animation: fbh-slide-in .7s .15s ease both;
}
.fbh-domain {
  font-size: 15px;
  font-weight: 900;
  background: linear-gradient(90deg, #0f8b72, #a8f0e2, #0f8b72);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fbh-shimmer 3.5s linear infinite;
}
.fbh-dash { color: rgba(255,255,255,.3); font-size: 13px; }
.fbh-services { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.fbh-sep { color: rgba(255,255,255,.25); font-size: 11px; }
.fbh-t { font-size: 12px; font-weight: 700; color: #4ecca3; }
.fbh-e { font-size: 12px; font-weight: 700; color: #ff9a5c; }
.fbh-g { font-size: 12px; font-weight: 700; color: #6ab4ff; }
.fbh-v { font-size: 12px; font-weight: 700; color: #c084fc; }

.footer-brand-desc {
  font-size: 13px;
  color: rgba(255,255,255,.45);
  margin-top: 0;
  max-width: 290px;
  line-height: 1.9;
  animation: fbh-slide-in .7s .3s ease both;
}
.footer-brand-desc strong {
  color: rgba(255,255,255,.7);
  font-weight: 700;
}

.footer-brand p {
  font-size: 13.5px;
  color: rgba(255,255,255,.48);
  margin-top: 0;
  max-width: 280px;
  line-height: 1.85;
}

/* Trust badges */
.footer-trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  padding: 4px 11px;
  font-size: 12px;
  color: rgba(255,255,255,.6);
  font-weight: 500;
}

.footer-badge svg { color: var(--green-main); flex-shrink: 0; }

.footer-apps { margin-top: 20px; }

/* Columns */
.footer-col h5 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.35);
  margin-bottom: 18px;
}

.footer-col a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: rgba(255,255,255,.62);
  padding: 5px 0;
  transition: color .2s;
}

.footer-col a svg { flex-shrink: 0; color: rgba(255,255,255,.3); transition: color .2s; }
.footer-col a:hover { color: #4fcfb8; }
.footer-col a:hover svg { color: #4fcfb8; }

/* Contact links */
.footer-contact-link {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
}

.footer-contact-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.footer-contact-icon--phone { background: rgba(34,197,94,.12); color: #4ade80; }
.footer-contact-icon--email { background: rgba(99,102,241,.12); color: #818cf8; }
.footer-contact-icon--line  { background: rgba(5,200,95,.12); color: #06c75f; }
.footer-contact-icon--web   { background: rgba(15,139,114,.12); color: #4fcfb8; }

/* Hotline box */
.footer-hotline {
  margin-top: 24px;
  padding: 14px 16px;
  background: rgba(15,139,114,.1);
  border: 1px solid rgba(15,139,114,.2);
  border-radius: 12px;
}

.footer-hotline-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--green-main);
  margin-bottom: 4px;
}

.footer-hotline-number {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  letter-spacing: .03em;
}

/* Bottom bar */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 24px 0;
  font-size: 12.5px;
  color: rgba(255,255,255,.28);
}

.footer-bottom-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom-left a {
  color: rgba(255,255,255,.4);
  transition: color .2s;
}

.footer-bottom-left a:hover { color: rgba(255,255,255,.7); }

/* Socials */
.footer-socials {
  display: flex;
  gap: 8px;
}

.footer-social-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.09);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.5);
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}

.footer-social-btn:hover { transform: translateY(-2px); color: #fff; border-color: transparent; }
.footer-social-btn--fb:hover   { background: #1877f2; }
.footer-social-btn--line:hover { background: #06c75f; }
.footer-social-btn--ig:hover   { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.footer-social-btn--tt:hover   { background: #010101; }

/* ── Login Modal ──────────────────────────── */
.lm-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(5,15,12,.7);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .3s, visibility .3s;
  padding: 20px;
}
.lm-overlay.open { opacity: 1; visibility: visible; }

.lm-card {
  background: linear-gradient(160deg, #0b1e1a 0%, #0f2820 60%, #0a1a16 100%);
  border: 1px solid rgba(110,220,191,.15);
  border-radius: 24px;
  padding: 40px 36px;
  width: 100%; max-width: 440px;
  box-shadow: 0 32px 80px rgba(0,0,0,.6), 0 0 60px rgba(15,139,114,.08);
  position: relative;
  transform: translateY(20px);
  transition: transform .35s ease;
}
.lm-overlay.open .lm-card { transform: translateY(0); }

.lm-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.5); font-size: 18px; line-height: 32px;
  cursor: pointer; text-align: center;
  transition: background .2s, color .2s;
}
.lm-close:hover { background: rgba(255,255,255,.12); color: #fff; }

.lm-logo { text-align: center; margin-bottom: 20px; }
.lm-logo img { height: 36px; margin: 0 auto; }

.lm-title { text-align: center; color: #fff; font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.lm-sub   { text-align: center; color: rgba(255,255,255,.5); font-size: 14px; margin-bottom: 24px; }

/* Mode tabs */
.lm-tabs {
  display: flex; background: rgba(255,255,255,.06);
  border-radius: 12px; padding: 4px; margin-bottom: 24px;
}
.lm-tab {
  flex: 1; padding: 9px 0; text-align: center;
  font-size: 13px; font-weight: 700; cursor: pointer;
  border-radius: 9px; color: rgba(255,255,255,.5);
  transition: background .2s, color .2s;
}
.lm-tab.active { background: var(--green-main); color: #fff; }

/* BestsoGroup SSO — primary login (real, not "coming soon") */
.lm-sso-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; border-radius: 12px; font-size: 14px; font-weight: 800;
  text-decoration: none; color: #062018; font-family: inherit;
  background: linear-gradient(135deg, #6edcbf, #35b892);
  box-shadow: 0 6px 18px rgba(53,184,146,.28); transition: transform .2s, box-shadow .2s;
}
.lm-sso-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(53,184,146,.4); }
.lm-sso-btn svg { flex: 0 0 auto; }

/* Social buttons */
.lm-social { display: flex; flex-direction: column; gap: 9px; margin-bottom: 18px; }
.lm-social-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 44px; border-radius: 12px; font-size: 14px; font-weight: 700;
  cursor: pointer; border: none; font-family: inherit; transition: opacity .2s;
  position: relative; color: #fff;
}
.lm-social-btn:hover { opacity: .9; }
.lm-social-line { background: #06c755; }
.lm-social-google { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); color: rgba(255,255,255,.9); }
.lm-social-fb { background: #1877f2; }
.lm-social-soon {
  position: absolute; top: -7px; right: 10px;
  background: #c7a04a; color: #fff; font-size: 10px; font-weight: 800;
  padding: 2px 7px; border-radius: 99px; line-height: 1.6;
}

.lm-divider {
  text-align: center; font-size: 13px; color: rgba(255,255,255,.3);
  margin: 16px 0; position: relative;
}
.lm-divider::before, .lm-divider::after {
  content: ''; position: absolute; top: 50%; width: 38%;
  height: 1px; background: rgba(255,255,255,.1);
}
.lm-divider::before { left: 0; }
.lm-divider::after  { right: 0; }

/* Form fields */
.lm-form-group { margin-bottom: 14px; }
.lm-label {
  display: block; font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,.65); margin-bottom: 6px;
}
.lm-input-wrap { position: relative; }
.lm-input-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: rgba(255,255,255,.35);
}
.lm-input {
  width: 100%; height: 46px; border-radius: 12px;
  background: rgba(255,255,255,.07); border: 1.5px solid rgba(255,255,255,.12);
  color: #fff; font-family: inherit; font-size: 14px;
  padding: 0 14px 0 40px; outline: none;
  transition: border-color .2s, background .2s;
}
.lm-input::placeholder { color: rgba(255,255,255,.25); }
.lm-input:focus { border-color: var(--green-main); background: rgba(15,139,114,.1); }
.lm-input.lm-has-pw-toggle { padding-right: 44px; }

.lm-pw-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 0;
  color: rgba(255,255,255,.3); display: flex; align-items: center;
}

/* Country code row */
.lm-phone-row { display: flex; gap: 8px; }
.lm-cc-select {
  height: 46px; border-radius: 12px; padding: 0 10px;
  background: rgba(255,255,255,.07); border: 1.5px solid rgba(255,255,255,.12);
  color: #fff; font-family: inherit; font-size: 13px; font-weight: 600;
  outline: none; cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: border-color .2s;
}
.lm-cc-select:focus { border-color: var(--green-main); }

.lm-submit-btn {
  width: 100%; height: 48px; border-radius: 13px; border: none;
  background: linear-gradient(135deg, var(--green-main), var(--green-dark));
  color: #fff; font-family: inherit; font-size: 15px; font-weight: 800;
  cursor: pointer; margin-top: 6px; position: relative;
  transition: opacity .2s, transform .2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.lm-submit-btn:hover { opacity: .92; transform: translateY(-1px); }
.lm-submit-btn:disabled { opacity: .5; pointer-events: none; }
.lm-submit-btn.loading .btn-text { opacity: 0; }
.lm-submit-btn .btn-spinner {
  position: absolute; width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,.3); border-top-color: #fff;
  border-radius: 50%; animation: lm-spin .7s linear infinite;
  opacity: 0;
}
.lm-submit-btn.loading .btn-spinner { opacity: 1; }
@keyframes lm-spin { to { transform: rotate(360deg); } }

.lm-footer-links { text-align: center; margin-top: 18px; font-size: 13px; color: rgba(255,255,255,.4); }
.lm-footer-links a { color: #6edcbf; font-weight: 700; }
.lm-footer-links a:hover { color: #a8f0e2; }
.lm-footer-links button.lm-link-btn { background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; }
.lm-alert { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.3); border-radius: 10px; padding: 10px 14px; font-size: 13px; color: #fca5a5; margin-bottom: 14px; }
.lm-success { background: rgba(15,139,114,.15); border: 1px solid rgba(15,139,114,.3); border-radius: 10px; padding: 10px 14px; font-size: 13px; color: #6edcbf; margin-bottom: 14px; }

/* Mode switch — now at top, white */
.lm-mode-switch {
  text-align: center; font-size: 13px; color: rgba(255,255,255,.7);
  margin-top: 0;
}
.lm-mode-switch button {
  background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: 13px; color: #fff; font-weight: 700; padding: 0;
  text-decoration: none;
  transition: color .2s;
}
.lm-mode-switch button:hover { color: #6edcbf; }

/* Compact input for register modal */
.lm-input-sm { height: 40px !important; font-size: 13px !important; }

/* Register card — compact, no scroll */
.lm-card-reg {
  max-width: 480px;
  padding: 24px 28px;
}
.lm-card-reg .lm-form-group { margin-bottom: 0; }

@media (max-width: 520px) {
  .lm-card-reg { padding: 20px 18px; }
  .lm-card-reg [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
}

@media (max-width: 480px) {
  .lm-card { padding: 28px 20px; }
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-newsletter { flex-direction: column; gap: 20px; }
  .footer-newsletter-form input { width: 100%; }
}

@media (max-width: 768px) {
  section { padding: 64px 0; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-bottom-left { justify-content: center; }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-newsletter-form { flex-direction: column; }
  .footer-newsletter-form input { width: 100%; }
  .footer-newsletter-form button { width: 100%; }
}

@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats-row { gap: 24px; }
  .wrap { padding: 0 16px; }
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
}

/* ── Language Dropdown ────────────────────── */
.lang-dropdown { position: relative; }
.lang-toggle {
  display: flex; align-items: center; gap: 5px;
  border: 1px solid var(--border); padding: 6px 11px; border-radius: 10px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  background: transparent; color: var(--text); font-family: inherit;
  transition: border-color .2s, background .2s;
  white-space: nowrap;
}
.lang-toggle:hover { border-color: var(--green-main); background: rgba(15,139,114,.06); }
.lang-menu {
  display: none;
  position: absolute; top: calc(100% + 8px); right: 0;
  background: #ffffff;
  border: 1px solid #dce9e4;
  border-radius: 14px; padding: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,.16), 0 2px 8px rgba(0,0,0,.08);
  z-index: 1200;
  /* แสดงผลแบบ 2 คอลัมน์ · ยึดมุมขวาของปุ่ม ไม่ลอยล้นจอ · เลื่อนแนวตั้งเมื่อภาษาเยอะ (สูงสุด 32) */
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 2px;
  max-width: min(92vw, 460px);
  max-height: min(70vh, 520px);
  overflow-y: auto;
}
[data-theme="dark"] .lang-menu {
  background: #1a2e2a;
  border-color: rgba(255,255,255,.1);
}
.lang-dropdown.open .lang-menu { display: grid; }
.lang-menu a {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 9px 14px; border-radius: 9px;
  font-size: 13.5px; color: #172824; text-decoration: none;
  transition: background .15s; font-weight: 500;
  white-space: nowrap; line-height: 1;
}
[data-theme="dark"] .lang-menu a { color: rgba(255,255,255,.88); }
.lang-menu a .lang-flag { font-size: 18px; line-height: 1; flex-shrink: 0; }
.lang-menu a .lang-name { line-height: 1.3; }
.lang-menu a:hover  { background: rgba(15,139,114,.09); color: var(--green-main); }
[data-theme="dark"] .lang-menu a:hover { color: #4fcfb8; }
.lang-menu a.active { background: rgba(15,139,114,.12); color: var(--green-main); font-weight: 700; }

/* ── Footer Download App Buttons ─────────── */
.footer-apps-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  margin-bottom: 12px;
}
.footer-apps-btns {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 9px;
}
.footer-app-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 16px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  transition: background .2s, border-color .2s, transform .15s;
  font-size: 12px;
  line-height: 1;
}
.footer-app-btn:hover {
  background: rgba(255,255,255,.13);
  border-color: rgba(255,255,255,.22);
  transform: translateY(-1px);
  color: #fff;
}
.footer-app-btn svg { flex-shrink: 0; opacity: .9; }
.footer-app-btn div span { display: block; font-size: 10px; color: rgba(255,255,255,.55); margin-bottom: 2px; }
.footer-app-btn div b  { font-size: 13px; font-weight: 800; letter-spacing: -.01em; }

/* ── AI Chatbot Widget ────────────────────── */
.ai-chat-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 8800;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.ai-chat-toggle {
  display: flex; align-items: center; gap: 9px;
  background: linear-gradient(135deg, #0f8b72, #0a6658);
  color: #fff;
  border: none; border-radius: 99px;
  padding: 14px 20px;
  font-size: 14px; font-weight: 700; font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 28px rgba(15,139,114,.45), 0 2px 8px rgba(0,0,0,.2);
  transition: transform .2s, box-shadow .2s;
  white-space: nowrap;
  position: relative;
}
.ai-chat-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(15,139,114,.55), 0 2px 8px rgba(0,0,0,.25);
}
.ai-chat-icon-chat  { display: block; }
.ai-chat-icon-close { display: none; }
.ai-chat-widget.open .ai-chat-icon-chat  { display: none; }
.ai-chat-widget.open .ai-chat-icon-close { display: block; }
.ai-chat-badge {
  position: absolute; top: -4px; right: -4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #ef4444; color: #fff;
  font-size: 10px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  animation: pulseBadge 2s infinite;
}
.ai-chat-widget.open .ai-chat-badge { display: none; }
@keyframes pulseBadge {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.2); }
}
.ai-chat-panel {
  width: 320px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.18), 0 4px 20px rgba(0,0,0,.1);
  border: 1px solid #e0eeea;
  overflow: hidden;
  display: none;
  flex-direction: column;
  max-height: 460px;
}
.ai-chat-widget.open .ai-chat-panel { display: flex; }
[data-theme="dark"] .ai-chat-panel { background: #0f2820; border-color: rgba(15,139,114,.2); }
.ai-chat-header {
  background: linear-gradient(135deg, #0f8b72, #0a6658);
  padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  color: #fff;
}
.ai-chat-header-info { display: flex; align-items: center; gap: 10px; }
.ai-chat-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.ai-chat-name { font-size: 14px; font-weight: 800; }
.ai-chat-status { font-size: 11px; color: #a8f0e2; }
.ai-chat-close {
  background: rgba(255,255,255,.15); border: none; border-radius: 8px;
  width: 28px; height: 28px; color: #fff;
  cursor: pointer; font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.ai-chat-close:hover { background: rgba(255,255,255,.25); }
.ai-chat-body {
  flex: 1; overflow-y: auto;
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.ai-chat-bubble { max-width: 90%; }
.ai-bubble {
  background: #f0faf7;
  border: 1px solid #c8ede4;
  border-radius: 4px 14px 14px 14px;
  padding: 10px 13px;
}
[data-theme="dark"] .ai-bubble { background: rgba(15,139,114,.12); border-color: rgba(15,139,114,.2); }
.ai-bubble p { font-size: 13px; color: #172824; margin: 0; line-height: 1.55; }
[data-theme="dark"] .ai-bubble p { color: rgba(255,255,255,.88); }
.user-bubble {
  align-self: flex-end;
  background: linear-gradient(135deg, #0f8b72, #0a6658);
  border-radius: 14px 4px 14px 14px;
  padding: 10px 13px;
}
.user-bubble p { font-size: 13px; color: #fff; margin: 0; line-height: 1.55; }
.ai-chat-quick-btns {
  display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px;
}
.ai-chat-quick-btns button {
  padding: 6px 11px; border-radius: 99px;
  background: rgba(15,139,114,.08);
  border: 1px solid rgba(15,139,114,.2);
  color: #0f8b72; font-size: 12px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: background .15s;
}
.ai-chat-quick-btns button:hover { background: rgba(15,139,114,.16); }
.ai-chat-footer {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid #e0eeea;
  background: #fff;
}
[data-theme="dark"] .ai-chat-footer { background: #0f2820; border-color: rgba(15,139,114,.15); }
.ai-chat-footer input {
  flex: 1; border: 1px solid #d4e9e2; border-radius: 10px;
  padding: 8px 12px; font-size: 13px; font-family: inherit;
  background: #f5faf8; color: #172824; outline: none;
  transition: border-color .2s;
}
.ai-chat-footer input:focus { border-color: #0f8b72; }
[data-theme="dark"] .ai-chat-footer input { background: rgba(255,255,255,.06); color: #e8f5f0; border-color: rgba(15,139,114,.25); }
.ai-chat-footer button {
  width: 36px; height: 36px; border-radius: 10px;
  background: #0f8b72; border: none; color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: background .2s;
}
.ai-chat-footer button:hover { background: #0a6658; }
[data-theme="dark"] .lang-menu a.active { color: #4fcfb8; }

/* ── แถบ SSO ของ BestsoGroup (ช่อง data-mount บนหัวเพจ · partials/bestso-sso-bar) ──
   คำขอเจ้าของ 1 พ.ย. 2026: แถบต้องชิด "ขอบขวาของจอ" ในแถวหัวเพจ ไม่ใช่ต่อท้ายปุ่มจอง
   ในกล่อง .nav-inner ที่จัดกลาง 1200px (ที่จอ 1920 แถบเคยลอยห่างขอบขวา ~360px)
   แถบวาดตัวเองใน Shadow DOM — ช่องนี้แค่จัดตำแหน่ง ไม่มีสีของตัวเอง (ธีมมืด/สว่างไม่กระทบ)

   · ช่องเป็นลูกตรงของ #nav (fixed เต็มความกว้าง = กล่องอ้างอิงของ absolute) วางชิดขวา
     16px · 24px ตั้งแต่ 1280px
   · กันไม่ให้ทับปุ่มของเว็บด้วย padding-right ของ .nav-inner:
       ต้องกัน = กว้างแถบ + ระยะขอบ + ช่องว่าง − ที่ว่างนอกกล่องฝั่งขวา ((ความกว้าง #nav − 1200px) / 2)
     จอกว้างพอ (≥ ~1650px) ไม่กันเพิ่มเลย โลโก้/เมนูอยู่ที่เดิมเป๊ะ · จอแคบลงค่อย ๆ กันเพิ่ม
     ใช้ 100% (= ความกว้าง #nav) ไม่ใช่ 100vw ซึ่งรวม scrollbar
   · --bsb-slot-w = ความกว้างแถบ md แบบ inline ของเครือ (ปุ่ม 38×3 + บัญชี 42 + ช่องไฟ + padding ≈ 192px)
     CSS อ่านความกว้างจริงไม่ได้ จึงเผื่อเป็น 196px — ส่วนกลางขยายแถบเมื่อไรแก้ค่านี้ค่าเดียว
   · กฎกันที่ทุกข้อผูกกับ :has(> .nav-sso-slot:not(:empty)) — สคริปต์แถบโหลดไม่ขึ้น หัวเพจเหมือนเดิม
   ค่าเดียวกันนี้ใช้ใน header.blade.php (master) ด้วย — แก้ที่นี่ต้องแก้ที่นั่น */
:root { --bsb-slot-w: 196px; --bsb-slot-r: 16px; --bsb-slot-gap: 12px; }
@media (min-width: 1280px) { :root { --bsb-slot-r: 24px; } }
.nav-sso-slot { display: inline-flex; align-items: center; justify-content: flex-end; flex-shrink: 0; min-height: 38px; }
.nav-sso-slot:empty { display: none; }
#nav > .nav-sso-slot {
  /* จัดกลางแนวตั้งด้วย top/bottom 0 + align-items (ไม่ใช้ transform — ดูหมายเหตุที่ #nav) */
  position: absolute; top: 0; bottom: 0; right: var(--bsb-slot-r);
  z-index: 2; /* เหนือเนื้อหาแถบหัว · ต่ำกว่าเมนูโปรไฟล์/ภาษาที่ลอยลงมา (อยู่ใน .nav-inner คนละชั้น) */
}
#nav:has(> .nav-sso-slot:not(:empty)) > .nav-inner {
  padding-right: max(24px, calc(var(--bsb-slot-w) + var(--bsb-slot-r) + var(--bsb-slot-gap) - max(0px, (100% - var(--max-w)) / 2)));
}
/* แถวเมนูเต็ม (โลโก้ + ลิงก์ 6 ตัว + ภาษา/ธีม/เข้าสู่ระบบ/จอง) กว้างราว 1,180–1,200px
   ซึ่งเต็มกล่อง 1200px พอดีอยู่แล้ว — มีแถบอีก ~230px ทางขวาจะใส่ได้ก็ต่อเมื่อจอกว้าง ≥ ~1,700px
   วัดจริง (ล็อต W6-EDGE-B · Playwright · โลโก้จำลอง 120×38): ปุ่มจองล้ำเข้าใต้แถบ 135px ที่ 1280 · 127px ที่ 1440
   → เมื่อมีแถบ: ต่ำกว่า 1600px ย้ายลิงก์เมนูเข้าปุ่มแฮมเบอร์เกอร์ (เมนูเดียวกับมือถือ มีครบทุกลิงก์)
     1600–1799px บีบช่องไฟ 32→16 และพาดดิ้งลิงก์ 14→10 แทน · ตั้งแต่ 1800px แถวเหมือนเดิมทุกพิกเซล
   ⛔ ไม่ซ่อนปุ่มจอง/เข้าสู่ระบบบนจอคอม — เป็นปุ่มทำเงินหลัก */
@media (max-width: 1599.98px) {
  #nav:has(> .nav-sso-slot:not(:empty)) .nav-links { display: none; }
  #nav:has(> .nav-sso-slot:not(:empty)) .nav-hamburger { display: flex; }
}
@media (min-width: 1600px) and (max-width: 1799.98px) {
  #nav:has(> .nav-sso-slot:not(:empty)) > .nav-inner { gap: 16px; }
  #nav:has(> .nav-sso-slot:not(:empty)) .nav-links a { padding-left: 10px; padding-right: 10px; }
}
/* โหมดแฮมเบอร์เกอร์ (≤1599px เมื่อมีแถบ): ช่องไฟระหว่างโลโก้/ปุ่ม/แฮมเบอร์เกอร์ 32→12
   ≤1024px ปุ่ม "เข้าสู่ระบบ" หลบให้ (มีในเมนูแฮมเบอร์เกอร์แล้ว) · ≤767px ปุ่ม "จอง" หลบด้วย (มีในเมนูเช่นกัน)
   วัดจริงก่อนแก้: แฮมเบอร์เกอร์ถูกดันเข้าใต้แถบที่ 768 และหัวเพจล้นจอ 6px ที่ 601 */
@media (max-width: 1599.98px) {
  #nav:has(> .nav-sso-slot:not(:empty)) > .nav-inner { gap: 12px; }
  /* ไม่มีลิงก์เมนูคั่นกลางแล้ว → ดันกลุ่มปุ่ม + แฮมเบอร์เกอร์ไปชิดแถบทางขวา (เดิมปุ่มติดโลโก้ ช่องว่างกลางแถว)
     แฮมเบอร์เกอร์มี margin-left:auto เป็น inline style จึงต้อง !important */
  #nav:has(> .nav-sso-slot:not(:empty)) .nav-actions { margin-left: auto; }
  #nav:has(> .nav-sso-slot:not(:empty)) .nav-hamburger { margin-left: 0 !important; }
}
@media (max-width: 1024px) {
  #nav:has(> .nav-sso-slot:not(:empty)) .nav-actions .btn-outline.nav-hide-sm { display: none; }
}
@media (max-width: 767.98px) {
  #nav:has(> .nav-sso-slot:not(:empty)) .nav-actions .nav-hide-sm { display: none; }
}
/* ≤600px: แถวเดียวใส่แถบไม่พอ (โลโก้ + ภาษา + แฮมเบอร์เกอร์ + แถบ ~196px เกินจอ 360–480)
   → หัวเพจสูงขึ้นเป็นสองแถว แถบอยู่แถวล่างชิดขวา · ขยาย --nav-h ซึ่ง body (padding-top)
     และเมนูมือถือ (top) อ่านอยู่แล้ว เนื้อหาจึงเลื่อนลงตามเอง ไม่มีอะไรถูกหัวเพจทับ */
@media (max-width: 600px) {
  html:has(#nav > .nav-sso-slot:not(:empty)) { --nav-h: 124px; }
  #nav:has(> .nav-sso-slot:not(:empty)) { align-items: flex-start; }
  #nav:has(> .nav-sso-slot:not(:empty)) > .nav-inner { height: 68px; padding-right: 14px; }
  #nav > .nav-sso-slot { top: auto; bottom: 8px; right: 14px; }
}
.nav-mobile-theme {
  display: none; align-items: center; gap: 10px; width: 100%;
  padding: 12px 0; border: 0; border-bottom: 1px solid var(--border);
  background: transparent; color: var(--text);
  font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; text-align: left;
}
@media (max-width: 600px) {
  .nav-inner { gap: 10px; padding: 0 14px; }
  .nav-actions { gap: 6px; }
  .nav-actions .nav-hide-sm { display: none; }
  .nav-profile-name, .nav-profile-btn > i { display: none; }
}
@media (max-width: 480px) {
  .nav-actions .theme-toggle { display: none; }
  .nav-mobile-theme { display: flex; }
  .lang-toggle > span:not(.lang-flag), .lang-toggle > svg { display: none; }
  .lang-toggle { padding: 6px 8px; }
  .nav-logo img { height: 30px; }
}

/* ── บัญชีของฉัน / ทางเข้าด้วยบัญชี BestSo (CONTRACT L · partials/bestso-guest-entry · bestso-account-menu) ── */
/* ปุ่มเดียว "เข้าสู่ระบบ / สมัครด้วย BestSo" ยาวกว่าปุ่ม "เข้าสู่ระบบ" เดิม: ช่วงที่แถวเมนูเต็ม (1600–1799 มีแถบ) เหลือแค่ไอคอน */
@media (min-width: 1600px) and (max-width: 1799.98px) {
  #nav:has(> .nav-sso-slot:not(:empty)) .bsx-entry--nav .bsx-signin .bsx-label { display: none; }
  #nav:has(> .nav-sso-slot:not(:empty)) .bsx-entry--nav .bsx-signin { padding: 0 11px; }
}
@media (max-width: 1024px) {
  #nav:has(> .nav-sso-slot:not(:empty)) .nav-actions .bsx-nav-guest { display: none; }
}
#nav .bsx-entry--nav .bsx-other { font-size: 11.5px; }
@media (max-width: 1399.98px) { #nav .bsx-entry--nav .bsx-other { display: none; } }
/* ในกล่องล็อกอิน (พื้นเข้มเสมอ) */
.lm-card .bsx-other { color: rgba(255,255,255,.72); }
.lm-card .bsx-other:hover { color: #6edcbf; }
.lm-card .bsx-one-account { color: rgba(255,255,255,.5); }
.lm-card .bsx-signed-out-note { color: #fcd38a; background: rgba(245,166,35,.12); }
.lm-card .bsx-legacy summary::-webkit-details-marker { display: none; }
.lm-card .bsx-legacy[open] summary { margin-bottom: 14px; }
.nav-mobile .bsx-entry--mobile { margin-bottom: 4px; }
