/* emergency, keep minimal */

/* ================================
   99_hotfix.css (OVERRIDE LAST)
   Goal: fix layout drift on index2
   ================================ */

/* 1) Reset กัน body/section ถูก flex จนทุกอย่างไปกึ่งกลาง */
html, body { height: 100%; }
body{
  margin: 0;
  min-height: 100%;
  display: block !important;
  align-items: initial !important;
  justify-content: initial !important;
}

/* 2) บังคับให้ Header อยู่ TOP (ไม่ลอยกลางจอ) */
.siteHeader,
header.siteHeader{
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 9999 !important;
  background: rgba(0,0,0,.55) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

/* 3) จัดโครง nav ให้เป็น flex ปกติ */
.siteHeader .navInner{
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px;
}

.siteHeader .navLinks{
  display: flex !important;
  align-items: center !important;
  gap: 18px;
  flex-wrap: wrap;
}

/* 4) กัน content ถูก header บัง (สำคัญมาก) */
main,
.page,
#main,
.siteMain{
  padding-top: 72px !important; /* ปรับได้ 64-88 ตามความสูง header */
}

/* 5) กัน hero/section ถูกตั้ง height แปลก ๆ แล้วดันของขึ้น-ลง */
.hero,
.section,
main > section{
  min-height: auto !important;
  height: auto !important;
}

/* 6) ล็อกลิงก์ไม่ให้สีเพี้ยน/อ่านยากเกิน */
a{ color: inherit; text-decoration-thickness: .08em; text-underline-offset: .2em; }
.navLinks a{ opacity: .92; }
.navLinks a:hover{ opacity: 1; }

/* ===== FORCE FIX: header layout + responsive (TEMP) ===== */

/* 1) lock header 3 columns */
.siteHeader .navInner{
  display: grid !important;
  grid-template-columns: auto 1fr auto !important;
  align-items: center !important;
  column-gap: 18px !important;
}

/* 2) left block (brand + social) stick left */
.siteHeader .brandBlock{
  justify-self: start !important;
  width: max-content !important;
}

/* 3) social align left under brand */
.siteHeader .brandBlock .social{
  justify-content: flex-start !important;
}

/* 4) center desktop nav */
.siteHeader .navLinks{
  justify-self: center !important;
  display: flex !important;
  gap: 22px !important;
  align-items: center !important;
  white-space: nowrap !important;
}

/* 5) responsive: hide desktop nav on mobile/tablet */
@media (max-width: 900px){
  .siteHeader .navLinks{ display: none !important; }
  .siteHeader .krActions{ display: flex !important; }
}

/* 6) desktop: show desktop nav, hide hamburger */
@media (min-width: 901px){
  .siteHeader .navLinks{ display: flex !important; }
  .siteHeader .krActions{ display: none !important; }
}

/* BRAND COLOR FORCE */
.siteHeader .brandText{
  color:#c9a86a !important;
}

/* ===== KRUNIKI GOLD SYSTEM (HOTFIX) ===== */

/* Brand */
.siteHeader .brandText{ color: var(--gold) !important; }

/* Remove underline everywhere */
a{ text-decoration: none !important; }

/* Desktop menu hover gold */
.siteHeader .navLinks a{
  color: var(--text-main) !important;
}
.siteHeader .navLinks a:hover,
.siteHeader .navLinks a:focus-visible{
  color: var(--gold) !important;
}

/* Buttons: gold border + active gold */
.btn, button, .cardBtn, .btnGhost, a.btn{
  border: 1px solid var(--gold-soft) !important;
  color: var(--text-main) !important;
  background: transparent !important;
}
.btn:hover, button:hover, .cardBtn:hover, .btnGhost:hover, a.btn:hover{
  border-color: var(--gold) !important;
}
.btn:active, button:active, .cardBtn:active, .btnGhost:active, a.btn:active{
  border-color: var(--gold) !important;
  background: rgba(201,168,106,.18) !important;
}

.siteHeader .brandText{
  color: var(--gold-main) !important;
}

/* ===== iPad white gap / floating header-footer safe ===== */

/* ล็อกพื้นหลังของ header ให้ชัด */
.siteHeader{
  left: 0;
  right: 0;
  background-color: rgba(0,0,0,.55);
}

/* ล็อกพื้นหลัง footer กันขาวโผล่ */
footer{
  display: block;
  width: 100%;
  background: transparent; /* ถ้าอยากให้ทึบค่อยเปลี่ยนทีหลัง */
}
