@font-face {
  font-family: "Sarabun";
  src: url("../font/sarabun-300.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sarabun";
  src: url("../font/sarabun-v17-latin_thai-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Sarabun";
  src: url("../font/sarabun-v17-latin_thai-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bulma-family-primary: "Sarabun", system-ui, sans-serif;
}

body {
  font-family: "Sarabun", system-ui, sans-serif;
  font-weight: 400;
}

.title,
.button,
.navbar-item.is-active,
strong {
  font-weight: 700;
}

.subtitle,
.help,
.input::placeholder {
  font-weight: 300;
}

.fulldhv {
  min-height: 100svh;
}
.hero .title {
  font-weight: 300; /* ใช้ความหนา 100 ตามที่คุณต้องการ */
  letter-spacing: 0.03em; /* เพิ่มช่องไฟตัวอักษรเล็กน้อยเพื่อความหรู */
  font-size: 3.5rem; /* ปรับขนาดให้ใหญ่เด่นชัดบน Desktop */
  line-height: 1.4; /* ปรับระยะห่างบรรทัดให้เหมาะสม */
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero .subtitle {
  font-weight: 400;
  margin-top: 1.5rem;
}

.hero .button.is-dark {
  background-color: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  color: #fff !important;
}

.hero .button.is-dark:hover {
  background-color: #fff !important;
  color: #000 !important;
}
.container {
  max-width: 960px;
}
.navbar {
  height: 52px;
  box-shadow: none !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.is-flex.is-align-items-center {
  gap: 0.7rem;
}
.navbar-brand .logo {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  padding: 0;
  position: relative;
  text-decoration: none;
  color: #111;
  transition: color 0.3s ease;
}
.navbar-brand .logo::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: #111; /* สีเดียวกับตัวอักษร */
  transition: width 0.3s ease;
}

.navbar.is-fixed-top {
  background-color: rgba(255, 255, 255, 1) !important; /* ขาวโปร่งแสง 80% */
  /* เอฟเฟกต์กระจกฝ้าแบบเว็บ Apple */
  border-bottom: 1px solid rgba(0, 0, 0, 0.05); /* เส้นขอบบางเฉียบดูแพง */
}
/* ปรับสีปุ่ม Hamburger ให้เป็นสีเดียวกับโลโก้ */
.navbar-burger {
  color: #111 !important;
  height: 52px; /* ให้เท่ากับความสูง Navbar */
  transition: all 0.3s ease;
}

/* ลูกเล่น: เมื่อ Hover ให้ขีดกลางสั้นลงเล็กน้อย */
.navbar-burger:hover span:nth-child(2) {
  width: 50%;
  margin-left: auto;
}
.navbar .icon {
  display: flex;
  justify-content: center;
  width: 24px; /* กำหนดความกว้างพื้นที่ไอคอนให้เท่ากันทุกปุ่ม */
}
.search-container {
  display: flex;
  align-items: center;
  position: relative;
  margin-right: 1rem;
}

.search-input {
  width: 0;
  opacity: 0;
  border: none;
  border-bottom: 1px solid #111;
  background: transparent;
  outline: none;
  padding: 5px 0;
  font-family: "Sarabun", sans-serif;
  font-weight: 300;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); /* ความนุ่มระดับเดียวกับ Filter Bar */
  pointer-events: none;
}

/* เมื่อกดค้นหา จะเพิ่ม Class นี้ด้วย JS */
.search-input.is-active {
  width: 180px; /* ความกว้างตอนกางออก */
  opacity: 1;
  padding: 5px 10px;
  pointer-events: auto;
}

.search-button {
  background: none;
  border: none;
  cursor: pointer;
  color: #111;
  display: flex;
  align-items: center;
  padding: 5px;
  transition: transform 0.3s ease;
}

.search-button:hover {
  transform: scale(1.1);
}
.hero {
  /* ไล่เฉดสีดำจางๆ (0.5 คือความเข้ม 50%) เพื่อให้รูปดูซอฟต์ลงและข้อความสีขาวเด่นขึ้น */
  background-image:
    linear-gradient(rgba(10, 25, 47, 0.6), rgba(10, 25, 47, 0.6)),
    url(../img/bg/desktop.avif);

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* อย่าลืมปรับสีข้อความใน Hero ให้เป็นสีขาวเพื่อให้ตัดกับ Overlay */
.hero .title,
.hero .subtitle {
  color: #ffffff;
  text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.3); /* เพิ่มเงาให้ตัวอักษรดูพรีเมียมขึ้น */
}
.hero-body-custom {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.filterbar {
  top: 52px;
}
#filter-bar {
  position: fixed;
  top: 52px;
  left: 0;
  width: 100%;
  background: white;
  z-index: 999;
  pointer-events: none;

  /* สภาวะตอน "ซ่อน" (เด้งกลับ) */
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;

  /* ปรับตรงนี้: ใช้ ease-in-out และเพิ่ม delay ให้ visibility */
  transition:
    transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.4s ease-in-out,
    visibility 0s linear 0.5s; /* รอให้ transform วิ่งเสร็จก่อนค่อย hidden */

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

#filter-bar.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  /* สภาวะตอน "แสดง" (ลงมา) */
  transition:
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.5s ease-out;
}

/* ตรวจสอบให้แน่ใจว่า Navbar ของคุณมี z-index สูงกว่า */
.navbar.is-fixed-top {
  z-index: 1000 !important;
}
.section {
  padding: 1.5rem 1.5rem;
}
section.mb-6 {
  transition: opacity 0.3s ease;
}
.section-title {
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 32px;
  height: 2px;
  background: #1e2a38;
  border-radius: 2px;
}

.section .subtitle {
  margin-bottom: 0.9rem;
}
.plate-image {
  aspect-ratio: 2.3 / 1;
}
.plate-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.card {
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.card img {
  border-radius: 0 !important;
}
.card-image img {
  border-radius: 0 !important;
}
.card-content {
  padding: 7px 12px 0px;
}

.plate-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.plate-card__price {
  margin: 0 0 7px;
  font-size: 16px;
  font-weight: 400;
  color: #111;
}

.button.is-dark.is-outlined {
  font-weight: 400;
  border-color: #e8e8e8;
}

.button.is-dark.is-outlined:hover {
  background-color: #28a745;

  border-color: #28a745;
  color: #fff;
}

#filter-type {
  padding-bottom: 0.25rem;
  margin-bottom: 0.5rem;
}
#filter-type .button {
  padding: 0.25em 0.6em;
  font-size: 16px;
  flex-wrap: wrap;
  height: 32px;
  color: #888;
  background: transparent;
  border: none;

  transition: all 0.2s ease;
}
#filter-type .button:hover {
  color: #111;

  text-decoration: none;
}
#filter-type .button.is-active {
  color: #111;
  position: relative;
}
#sub-filter-type {
  display: flex;
  height: 40px;
  align-items: center;

  overflow-x: auto;
  flex-wrap: nowrap; /* สำคัญมาก */
  white-space: nowrap;
  gap: 1rem;
  padding: 0.2rem 0 0.4rem;

  gap: 0.25rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

#sub-filter-type::-webkit-scrollbar {
  display: none;
}

#sub-filter-type .button {
  white-space: nowrap;
  flex: 0 0 auto; /* กันปุ่มถูกบีบ */
  height: 36px;
  padding: 0 0.8rem;
  font-size: 16px;
  font-weight: 300;
  min-height: unset;
  color: #737373;
}
#sub-filter-type .button.is-active {
  font-weight: 300;
  position: relative;
}
.search-icon {
  background: transparent;
  border: none;
  color: #111; /* สีเดียวกับโลโก้ "ทะเบียน" */
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1); /* ใช้ความนุ่มระดับเดียวกับ Filter Bar */
  pointer-events: auto; /* ให้กดได้ */
}

/* เอฟเฟกต์ตอน Hover ที่ไอคอนให้ดูมีมิติขึ้น */
.search-icon:hover {
  transform: scale(1.1); /* ขยายขนาดเล็กน้อยแบบนุ่มนวล */
  color: #000;
}

/* กำหนดระยะห่างให้ปุ่มที่อยู่ต่อจากไอคอน */
#sub-filter-type .button:not(.search-icon) {
  /* ...สไตล์เดิมของคุณ... */
  margin-left: 0;
}
/* คอนเทนเนอร์ของ Search */
.search-wrapper {
  background: #f8f8f8; /* เทาจางๆ ให้ดูนิ่ง */
  border-radius: 20px;
  margin-right: 0.75rem;
  margin-left: 0;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 1px solid transparent;
}

/* ช่อง Input ตอนเริ่มต้น (ซ่อนไว้) */
.search-input-expand {
  width: 0;
  opacity: 0;
  border: none;
  background: transparent;
  outline: none;
  font-family: "Sarabun", sans-serif;
  font-weight: 300;
  font-size: 14px;
  padding: 0;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* เมื่อกดใช้งาน (Active) */
.search-wrapper.is-active {
  background: #fff;
  border-color: #eee;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.search-wrapper.is-active .search-input-expand {
  width: 140px; /* ความกว้างตอนกางออก */
  opacity: 1;
  padding: 0 12px 0 4px;
}

.search-icon {
  background: transparent !important;
  border: none !important;
  color: #111 !important;
  height: 32px !important;
  display: flex;
  align-items: center;
}

/* Custom Footer Style */
.custom-footer {
  background-color: #1a1a1a; /* สีดำเข้มแบบพรีเมียม */
  padding: 4rem 1.5rem 2rem;
  color: #ffffff;
}

.footer-divider {
  background-color: #333;
  margin: 2rem 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #b5b5b5;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #ffffff;
}

/* ปุ่ม LINE แบบพิเศษ */
.line-button {
  background-color: #06c755 !important;
  border: none;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.line-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(6, 199, 85, 0.4);
}

.line-button .icon img {
  filter: brightness(0) invert(1); /* ทำให้โลโก้ LINE เป็นสีขาว */
}

/* ปรับแต่งปุ่ม LINE ใน Footer ให้ดูพรีเมียมขึ้น */
.line-button {
  background-color: #06c755 !important;
  border: none;
  height: 3.5rem; /* เพิ่มความสูงปุ่มให้ดูเต็ม */
  padding: 0 2rem !important;
  letter-spacing: 0.5px; /* เพิ่มระยะห่างตัวอักษร */
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}

.line-button:hover {
  background-color: #05b34c !important; /* สีเข้มขึ้นนิดนึงตอน hover */
  transform: translateY(-2px); /* ลอยขึ้นเล็กน้อย */
  box-shadow: 0 8px 20px rgba(6, 199, 85, 0.3); /* เพิ่มเงาสีเขียวจางๆ */
}

/* ปรับระยะห่างในวงกลมขาวของ Logo */
.line-button .icon {
  background: #fff;
  border-radius: 50%;
  width: 32px !important;
  height: 32px !important;
  margin-right: 12px !important;
  padding: 6px; /* เพิ่มพื้นที่ว่างรอบโลโก้ LINE */
}

.line-button .icon img {
  filter: none !important; /* ใช้สีจริงของ LINE (เขียวขาว) จะดูเป็นทางการกว่า */
  width: 100%;
  height: auto;
}

@media screen and (min-width: 1024px) {
  .custom-align-desktop {
    align-items: center !important;
  }
}

/* จัดการ Layout ให้เต็มความกว้าง */
.navbar-brand.w-100 {
  width: 100%;
}

/* คอนเทนเนอร์ของ Search ใน Navbar */
.search-wrapper-nav {
  background: transparent;
  border-radius: 20px;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 1px solid transparent;
}

/* ช่อง Input ตอนเริ่มต้น (ซ่อนไว้) */
.nav-search-input {
  width: 0;
  opacity: 0;
  border: none;
  background: transparent;
  outline: none;
  font-family: "Sarabun", sans-serif;
  font-size: 14px;
  padding: 0;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* เมื่อกดใช้งาน (Active) */
.search-wrapper-nav.is-active {
  background: #f5f5f5;
  border-color: #eee;
  margin-right: 8px;
}

.search-wrapper-nav.is-active .nav-search-input {
  width: 130px; /* ความกว้างบน Mobile */
  opacity: 1;
  padding: 0 10px 0 5px;
}

/* บน Desktop ให้กางกว้างขึ้นได้อีก */
@media screen and (min-width: 1024px) {
  .search-wrapper-nav.is-active .nav-search-input {
    width: 200px;
  }
}

/* ปรับระยะปุ่มให้พอดี */
.navbar-brand .button.is-ghost {
  height: 40px;
  text-decoration: none;
}
/* คอนเทนเนอร์ Search ใน Navbar */

.search-wrapper-nav.is-active {
  background: #f5f5f5;
  padding-right: 8px;
}

/* ช่อง Input ตอนซ่อน */
.nav-search-input {
  width: 0;
  opacity: 0;
  border: none;
  background: transparent;
  outline: none;
  transition: all 0.4s ease;
  font-family: "Sarabun", sans-serif;
}

/* ช่อง Input ตอนแสดง */
.search-wrapper-nav.is-active .nav-search-input {
  width: 120px; /* บนมือถือ */
  opacity: 1;
}

.modal-content .box {
  border-radius: 15px;
  max-width: 500px;
  margin: 0 auto;
}

.plate-modal__image-container img {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid #eee;
}

/* ปิดปุ่มปิดแบบดั้งเดิมของ Bulma ถ้ามันลอยทับเนื้อหา */
.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.1);
}
@media screen and (min-width: 1024px) {
  .search-wrapper-nav.is-active .nav-search-input {
    width: 200px; /* บนคอม */
  }
}
