/* เว้นระยะห่างระหว่างแต่ละหัวข้อเมนู */
.header-bottom-nav.nav-left > li {
    margin-right: 55px !important;
}

/* ลบ margin ของเมนูตัวสุดท้ายออก เพื่อไม่ให้ล้นขอบขวา */
.header-bottom-nav.nav-left > li:last-child {
    margin-right: 0px !important;
}
/* 1. ขยายกล่องฝั่งตรงกลาง (Flex Item) ให้กว้าง 50% และจัดกลาง */
.header-main .flex-col.flex-center,
.header-main .flex-col:has(.header-search-form) {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    justify-content: center !important;
    margin: 0 auto !important;
}

/* 2. บังคับตัวช่องค้นหาให้ยืดเต็ม 100% ของกล่อง 50% นั้น */
.header-search-form.search-form {
    width: 95% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
}

/* แก้เบอร์โทรในแถบบนมองไม่เห็น */
.header-top a,
.header-top a:hover,
.header-top a:focus,
.header-top .nav > li > a {
    color: #ffffff !important;
}

.widget_shopping_cart .buttons .checkout {
    display: none !important;
}

/* เมนู "สินค้า" แบบ 3 คอลัมน์เต็มความกว้าง container (เฉพาะ desktop) */
@media (min-width: 850px) {
  /* ให้ container เป็นตัวอ้างอิงความกว้างของ dropdown ปลด relative ของตัวที่อยู่ระหว่างกลาง */
  .header-bottom .flex-row.container { position: relative; }
  .header-bottom .flex-col,
  .header-bottom-nav,
  .header-bottom-nav > li.has-dropdown:first-child { position: static !important; }

  .header-bottom-nav > li.has-dropdown:first-child > ul.nav-dropdown {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    column-count: 3;
    column-gap: 40px;
    padding: 30px 20px !important;
  }
  .header-bottom-nav > li.has-dropdown:first-child:hover > ul.nav-dropdown {
    left: 0 !important;
    right: 0 !important;
  }

  .header-bottom-nav > li.has-dropdown:first-child > ul.nav-dropdown > li {
    break-inside: avoid;
    margin: 0 !important;
    padding: 0 !important;
  }
  .header-bottom-nav > li.has-dropdown:first-child > ul.nav-dropdown > li > a {
    margin: 0 !important;           /* ล้าง margin ซ้ายขวาของลิงก์ใน dropdown ธีม */
    border-bottom: 1px solid #e5e5e5 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 14px 0 !important;
    line-height: 1.4 !important;
  }
  .header-bottom-nav > li.has-dropdown:first-child > ul.nav-dropdown > li > a::before {
    content: "›";
    margin-right: 14px;
  }
}