/* ===========================================================================
   AUDIKUNG canonical site nav + footer  —  single source of truth
   Generated into pages by build-nav.py. Edit nav.config.json, not the markup.
   Scoped to .aknav* / .akfoot* so it never collides with legacy page CSS.
   =========================================================================== */
:root {
  --aknav-bg: var(--bg, #030712);
  --aknav-gold: var(--gold, #c9a84c);
  --aknav-gold-light: var(--gold-light, #E5C586);
  --aknav-text: var(--text, #f0f0f5);
  --aknav-muted: var(--text-muted, #8888a0);
  --aknav-border: var(--border, rgba(255,255,255,0.08));
  --aknav-head: var(--font-head, 'Kanit', sans-serif);
  --aknav-body: var(--font-body, 'Sarabun', sans-serif);
}

/* ---- bar ---- */
.aknav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; padding: 0 5%;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--aknav-border);
  font-family: var(--aknav-body);
}
.aknav * { box-sizing: border-box; }
.aknav-logo {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--aknav-head); font-size: 1.4rem; font-weight: 700;
  letter-spacing: 3px; color: var(--aknav-gold); text-decoration: none;
  text-shadow: 0 0 20px rgba(201,168,76,0.5);
}
.aknav-logo img { height: 32px; width: 32px; border-radius: 50%; object-fit: cover; object-position: center top; flex-shrink: 0; }

/* ---- desktop menu ---- */
.aknav-menu { display: flex; align-items: center; gap: 1.5rem; list-style: none; margin: 0; padding: 0; flex-wrap: nowrap; white-space: nowrap; }
.aknav-group { position: relative; }
.aknav-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.95rem; color: var(--aknav-muted); text-decoration: none;
  background: none; border: none; cursor: pointer; font-family: var(--aknav-body);
  padding: 20px 4px; transition: color 0.2s;  /* tall hit area spanning the bar */
}
.aknav-link:hover, .aknav-group.is-open .aknav-link { color: var(--aknav-text); }
.aknav-link.is-active { color: var(--aknav-gold); }
.aknav-caret { width: 9px; height: 9px; fill: none; stroke: currentColor; stroke-width: 2.2; transition: transform 0.2s; }
.aknav-group.is-open .aknav-caret { transform: rotate(180deg); }

/* ---- dropdown ---- */
.aknav-drop {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(8px);
  min-width: 200px; padding: 8px;
  background: rgba(7,13,36,0.97); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--aknav-border); border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  display: flex; gap: 4px;
}
.aknav-group.is-open .aknav-drop {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(6px);
}
.aknav-col { display: flex; flex-direction: column; min-width: 168px; }
.aknav-drop.is-mega {
  position: fixed; top: 64px; left: 50%; right: auto;
  transform: translateX(-50%) translateY(8px);
  max-width: min(940px, 94vw); flex-wrap: wrap;
  padding: 16px; gap: 8px 22px;
}
.aknav-group.is-open .aknav-drop.is-mega { transform: translateX(-50%) translateY(0); }
.aknav-colhead { font-family: var(--aknav-head); font-size: 0.72rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--aknav-gold); padding: 6px 12px 4px; opacity: 0.85; }
.aknav-drop a {
  display: block; padding: 8px 12px; border-radius: 8px;
  font-size: 0.9rem; color: var(--aknav-muted); text-decoration: none; white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.aknav-drop a:hover { background: rgba(255,255,255,0.06); color: var(--aknav-text); }
.aknav-drop a.is-active { color: var(--aknav-gold); }

/* ---- right side ---- */
.aknav-right { display: flex; align-items: center; gap: 1.2rem; }
.aknav-products { font-size: 0.95rem; color: var(--aknav-muted); text-decoration: none; transition: color 0.2s; }
.aknav-products:hover { color: var(--aknav-text); }
.aknav-products-hl {
  color: var(--aknav-gold); border: 1px solid rgba(201,168,76,0.55);
  padding: 0.42rem 0.95rem; border-radius: 6px; font-weight: 600;
  transition: background 0.2s, box-shadow 0.2s, color 0.2s;
}
.aknav-products-hl:hover { color: var(--aknav-gold-light); background: rgba(201,168,76,0.12); box-shadow: 0 0 14px rgba(201,168,76,0.25); }
.aknav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.9rem; font-weight: 600; color: #030712; background: var(--aknav-gold);
  padding: 0.45rem 1.2rem; border-radius: 6px; text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s;
}
.aknav-cta:hover { background: var(--aknav-gold-light); box-shadow: 0 0 18px rgba(201,168,76,0.5); }
.aknav-cta svg { vertical-align: -2px; }

/* ---- hamburger ---- */
.aknav-burger { display: none; flex-direction: column; gap: 5px; padding: 6px; background: none; border: none; cursor: pointer; }
.aknav-burger span { width: 24px; height: 2px; background: var(--aknav-text); transition: transform 0.25s, opacity 0.25s; }
.aknav.is-open .aknav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.aknav.is-open .aknav-burger span:nth-child(2) { opacity: 0; }
.aknav.is-open .aknav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- mobile panel ---- */
.aknav-mobile {
  position: fixed; top: 64px; left: 0; right: 0; bottom: 0; z-index: 999;
  background: rgba(3,7,18,0.98); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  padding: 18px 5% 60px; overflow-y: auto;
  transform: translateX(100%); transition: transform 0.28s ease; display: none;
}
.aknav-mobile.is-open { transform: translateX(0); }
.akm-group { border-bottom: 1px solid var(--aknav-border); }
.akm-head {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 16px 4px; background: none; border: none; cursor: pointer;
  font-family: var(--aknav-body); font-size: 1.05rem; color: var(--aknav-text); text-align: left;
}
.akm-head .aknav-caret { width: 12px; height: 12px; }
.akm-head.is-open .aknav-caret { transform: rotate(180deg); }
.akm-sub { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.akm-sub.is-open { max-height: 800px; }
.akm-sub a { display: block; padding: 11px 16px; font-size: 0.95rem; color: var(--aknav-muted); text-decoration: none; }
.akm-sub a:hover, .akm-sub a.is-active { color: var(--aknav-gold); }
.akm-colhead { padding: 12px 16px 2px; font-size: 0.72rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--aknav-gold); opacity: 0.8; }
.akm-cta { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 22px; padding: 14px; font-weight: 600; color: #030712; background: var(--aknav-gold); border-radius: 8px; text-decoration: none; }

@media (max-width: 1080px) {
  .aknav-menu, .aknav-right { display: none; }
  .aknav-burger { display: flex; }
  .aknav-mobile { display: block; }
}

/* ===========================================================================
   FOOTER
   =========================================================================== */
.akfoot {
  background: var(--aknav-bg); border-top: 1px solid var(--aknav-border);
  padding: 56px 5% 32px; font-family: var(--aknav-body); color: var(--aknav-muted);
}
.akfoot-top { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; max-width: 1100px; margin: 0 auto; }
.akfoot-brand { max-width: 260px; }
.akfoot-brand .akfoot-logo { display: flex; align-items: center; gap: 0.5rem; font-family: var(--aknav-head); font-size: 1.3rem; font-weight: 700; letter-spacing: 2px; color: var(--aknav-gold); text-decoration: none; }
.akfoot-brand img { height: 30px; width: 30px; border-radius: 50%; }
.akfoot-brand p { margin-top: 12px; font-size: 0.9rem; line-height: 1.7; }
.akfoot-cols { display: flex; flex-wrap: wrap; gap: 40px; }
.akfoot-col h4 { font-family: var(--aknav-head); font-size: 0.8rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--aknav-text); margin-bottom: 14px; }
.akfoot-col a { display: block; padding: 5px 0; font-size: 0.9rem; color: var(--aknav-muted); text-decoration: none; transition: color 0.15s; }
.akfoot-col a:hover { color: var(--aknav-gold); }
.akfoot-bottom { max-width: 1100px; margin: 40px auto 0; padding-top: 22px; border-top: 1px solid var(--aknav-border); font-size: 0.82rem; text-align: center; }
@media (max-width: 600px) { .akfoot-top { gap: 28px; } .akfoot-cols { gap: 28px; } }

/* ───────────────────────────────────────────────────────────────
   THAI DIACRITIC FIX (2026-06-20)
   letter-spacing pushes วรรณยุกต์/สระ off their base consonant on
   iOS Safari (and is non-idiomatic in Thai typography anyway). Every
   page is <html lang="th">, so zero tracking globally, then restore it
   only on the Latin wordmarks/display headings that should keep it.
   ─────────────────────────────────────────────────────────────── */
:lang(th) { letter-spacing: normal !important; }
.aknav-logo  { letter-spacing: 3px !important; }
.akfoot-logo { letter-spacing: 2px !important; }
.hero-name   { letter-spacing: 4px !important; }
