/* ปุ่มลอยติดต่อ (แสดงตลอดเวลา) - ใช้ทุกหน้า */
#chaty-widget-0 { display: none !important; }
.floating-contact-widget { position: fixed; right: 10px; bottom: 25px; z-index: 9999; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.floating-contact-widget a { display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 50%; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,0.12); text-decoration: none; transition: transform 0.2s, box-shadow 0.2s; }
.floating-contact-widget a:hover { transform: scale(1.05); box-shadow: 0 4px 16px rgba(0,0,0,0.18); }
.floating-contact-widget a svg { width: 28px; height: 28px; }
.floating-contact-widget a .icon-line { fill: #00B900; }
.floating-contact-widget a .icon-phone { stroke: #4CBB17; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.floating-contact-widget a .icon-chat { stroke: #4CBB17; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.floating-contact-widget a .icon-arrow { stroke: #4CBB17; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* ปุ่มกลับขึ้นบน: แสดงเมื่อเลื่อนลงเกิน 50% ของหน้า */
.floating-contact-widget a.scroll-top-btn { opacity: 0; pointer-events: none; transform: scale(0.85); transition: opacity 0.25s, transform 0.25s; }
.floating-contact-widget a.scroll-top-btn.show-scroll-top { opacity: 1; pointer-events: auto; transform: scale(1); }
.floating-contact-widget a.scroll-top-btn.show-scroll-top:hover { transform: scale(1.05); }

/* ─── Header หลัก Elementor (post 5633) — ให้ใกล้เคียง React .frontend-header / .frontend-header-inner ─── */
.elementor-5633 .elementor-element.elementor-element-2a0718d00 {
  position: sticky;
  top: 0;
  z-index: 50;
}

.elementor-5633 .elementor-element.elementor-element-2a0718d00 > .elementor-container {
  max-width: 1600px;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 20px 24px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 23.244%) minmax(0, 43.088%) minmax(0, 33.668%);
  column-gap: 20px;
  align-items: center;
  box-sizing: border-box;
}

.elementor-5633 .elementor-element.elementor-element-2a0718d00 > .elementor-container > .elementor-column {
  width: auto !important;
  max-width: none !important;
  flex-basis: auto !important;
}

@media (max-width: 1024px) {
  .elementor-5633 .elementor-element.elementor-element-371ec2e20 {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  /*
   * เมนู WPR อยู่ใน 7e89b60 ที่มี elementor-hidden-tablet/mobile — บนแท็บ/มือถือ Elementor ซ่อนทั้งกล่อง
   * (รวมปุ่มแฮมเบอร์เกอร์) ต้องปลดซ่อนที่นี่เพราะไฟล์นี้โหลดทุกหน้า (property-filter-inline.css มีแค่หน้าแรก)
   */
  .elementor-5633 .elementor-element.elementor-element-7e89b60 {
    display: flex !important;
  }

  /* แถวเดียว: โลโก้ | แฮมเบอร์เกอร์ — ไม่ stack 2 แถว (ลดความสูงให้ใกล้ ~135px เหมือน React) */
  .elementor-5633 .elementor-element.elementor-element-2a0718d00 > .elementor-container {
    grid-template-columns: 1fr auto !important;
    grid-template-areas: "day-h-logo day-h-nav";
    column-gap: 12px;
    row-gap: 0 !important;
    padding: 12px 16px !important;
    align-items: center;
  }

  .elementor-5633 .elementor-element.elementor-element-0df9034 {
    grid-area: day-h-logo;
    min-width: 0;
  }

  .elementor-5633 .elementor-element.elementor-element-c864b24 {
    grid-area: day-h-nav;
    justify-self: end;
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto !important;
  }

  /* เทียบ .frontend-header-col--nav: กล่อง widget ไม่กางเกินปุ่มแฮมเบอร์เกอร์ (~33×19px) */
  .elementor-5633 .elementor-element.elementor-element-c864b24 .elementor-widget-wrap.elementor-element-populated {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
    min-height: 0 !important;
  }

  .elementor-5633 .elementor-element.elementor-element-c864b24 .elementor-widget {
    margin-bottom: 0 !important;
    width: auto !important;
    max-width: none !important;
  }

  .elementor-5633 .elementor-element.elementor-element-c864b24 .elementor-widget-container {
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
  }

  .elementor-5633 .elementor-element.elementor-element-7e89b60 .wpr-mobile-toggle-wrap {
    justify-content: flex-end !important;
    align-items: center !important;
    width: auto !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .elementor-5633 .elementor-element.elementor-element-8d7534e {
    display: none !important;
  }

  .elementor-5633 .elementor-element.elementor-element-2a0718d00 .elementor-column {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .elementor-5633 .elementor-element.elementor-element-2a0718d00 .elementor-widget-wrap {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  /* เดสก์ท็อปเมนูแนวนอนซ่อน — เหลือแบบมือถือ + แฮมเบอร์เกอร์ */
  .elementor-5633 .elementor-element.elementor-element-827ee11 .wpr-nav-menu-container.wpr-nav-menu-horizontal {
    display: none !important;
  }

  .elementor-5633 .elementor-element.elementor-element-827ee11 .wpr-mobile-nav-menu-container {
    display: block !important;
    width: auto;
  }

  .elementor-5633 .elementor-element.elementor-element-827ee11 .wpr-mobile-toggle-wrap {
    display: flex !important;
    justify-content: flex-end;
    align-items: center;
  }

  /* ปุ่มแฮมเบอร์เกอร์ — ตรงกับ React .frontend-nav-toggle (33px กว้าง, 3 เส้น×3px + gap 5px ≈ 19px สูง) */
  .elementor-5633 .elementor-element.elementor-element-827ee11 .wpr-mobile-toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 5px;
    width: 33px;
    min-height: 0;
    height: auto;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    cursor: pointer;
    margin: 0;
    color: #19c6b7;
    box-sizing: border-box;
  }

  .elementor-5633 .elementor-element.elementor-element-827ee11 .wpr-mobile-toggle-line {
    display: block !important;
    height: 3px;
    width: 100%;
    background-color: currentColor !important;
    border-radius: 1px;
  }

  /* โลโก้กะทัดรัดบนแท็บ/มือถือ */
  .elementor-5633 .elementor-element.elementor-element-1ec2ca4 img {
    width: auto !important;
    max-width: min(200px, 55vw) !important;
    height: auto !important;
    max-height: 44px !important;
    object-fit: contain;
  }

  .elementor-5633 .elementor-element.elementor-element-93bee22 {
    --width: 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 767px) {
  .elementor-5633 .elementor-element.elementor-element-2a0718d00 {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  /* คงแถวเดียว (สืบทอดจากบล็อก 1024px) — ไม่เปลี่ยนเป็น grid 1 คอลัมน์ */
  .elementor-5633 .elementor-element.elementor-element-2a0718d00 > .elementor-container {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* ทับกฎหน้าแรกที่จำกัดคอลัมน์เมนู 25% — ให้แคบเท่าปุ่มเหมือน React */
  .elementor-5633 .elementor-element.elementor-element-c864b24 {
    width: auto !important;
    max-width: none !important;
  }
}
