.header-wrapper,
.header-main,
.header-bottom {
  background: #fdfdfd;
}

.header-wrapper {
  border-bottom: 1px solid #eadfc9;
}

.header-top {
  display: none;
}

/* Container */
.header-main .header-inner,
.header-bottom .header-inner {
  max-width: 1200px;
}
.header-main {
  min-height: 58px;
  border-bottom: 0;
}

.header-main .header-inner {
  min-height: 58px;
  position: relative;
  padding-left: 150px;
}

/* Logo chiếm 2 hàng bên trái */
.header-main .logo {
  position: absolute;
  left: 0;
  top: 0;
  width: 145px;
  height: 106px;
  margin: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-main .logo a {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-main .logo img {
  max-width: 128px;
  max-height: 96px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Cột phải Header Main: chỉ giữ HTML shortcode */
.header-main .flex-right {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.header-main .flex-right > ul,
.header-main .flex-right .header-nav,
.header-main .flex-right .header-nav-main,
.header-main .flex-right .nav {
  display: flex;
  width: 100%;
  justify-content: flex-end;
  align-items: center;
  margin: 0;
}

/* Ẩn các item mặc định nếu lỡ còn sót, chỉ giữ HTML */
.header-main .flex-right > ul > li:not(.html),
.header-main .flex-right .header-nav-main > li:not(.html),
.header-main .flex-right .nav > li:not(.html) {
  display: none;
}

.header-main .flex-right > ul > li.html,
.header-main .flex-right .header-nav-main > li.html,
.header-main .flex-right .nav > li.html {
  display: block;
  width: 100%;
}

/* Tools: search + cart + hotline */
.dsbm-header-tools,
.dsbm-header-tools * {
  box-sizing: border-box;
}

.dsbm-header-tools {
  min-height: 58px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

/* Search */
.dsbm-header-search-form {
  display: flex;
  align-items: stretch;
  width: 285px;
  height: 36px;
  margin: 0;
}

.dsbm-header-search-form input[type="search"] {
  width: 100%;
  height: 36px;
  margin: 0;
  border: 1px solid #e2d8c8;
  border-right: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  padding: 0 13px;
  color: #333;
  font-size: 13px;
}

.dsbm-header-search-form input[type="search"]::placeholder {
  color: #8c8479;
}

.dsbm-header-search-form button {
  width: 38px;
  min-width: 38px;
  height: 36px;
  min-height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #b51e1e;
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}

/* Cart */
.dsbm-header-cart {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #2d2925;
  text-decoration: none;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.dsbm-header-cart::before {
  content: "🛒";
  font-size: 17px;
  line-height: 1;
}

.dsbm-header-cart small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #b51e1e;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

/* Hotline */
.dsbm-header-hotline {
  display: inline-flex;
  flex-direction: column;
  position: relative;
  padding-left: 27px;
  color: #2d2925;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.1;
}

.dsbm-header-hotline::before {
  content: "☎";
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #b51e1e;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.dsbm-header-hotline strong {
  color: #b51e1e;
  font-size: 14px;
  font-weight: 900;
}

.dsbm-header-hotline small {
  color: #5a5048;
  font-size: 10px;
  font-weight: 600;
}

/* =========================
   HEADER BOTTOM - MAIN MENU
========================= */

.header-bottom {
  min-height: 46px;
  border-top: 0;
  border-bottom: 0;
}

.header-bottom .header-inner {
  min-height: 46px;
  padding-left: 150px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

/* Ép toàn bộ menu về trái */
.header-bottom .flex-left,
.header-bottom .flex-center,
.header-bottom .flex-right {
  display: flex;
  align-items: center;
}

.header-bottom .flex-left {
  flex: 1 1 auto;
  justify-content: flex-start;
}

.header-bottom .flex-center {
  justify-content: flex-start;
}

.header-bottom .flex-right {
  display: none;
}

/* Menu Flatsome gốc */
.header-bottom .nav,
.header-bottom .header-nav,
.header-bottom .header-nav-main {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  margin: 0;
}

.header-bottom .nav > li,
.header-bottom .header-nav-main > li {
  margin: 0;
}

.header-bottom .nav > li > a,
.header-bottom .header-nav-main > li > a {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 22px 0 0;
  color: #2f2a25;
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.header-bottom .nav > li > a:hover,
.header-bottom .header-nav-main > li > a:hover,
.header-bottom .nav > li.active > a,
.header-bottom .header-nav-main > li.active > a,
.header-bottom .nav > li.current-menu-item > a,
.header-bottom .header-nav-main > li.current-menu-item > a {
  color: #b51e1e;
}

.header-bottom .nav-dropdown {
  border: 1px solid #eadfc9;
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1024px) {
  .header-main .header-inner,
  .header-bottom .header-inner {
    padding-left: 128px;
  }

  .header-main .logo {
    width: 124px;
    height: 104px;
  }

  .header-main .logo img {
    max-width: 108px;
    max-height: 92px;
  }

  .dsbm-header-tools {
    gap: 10px;
  }

  .dsbm-header-search-form {
    width: 230px;
  }

  .header-bottom .nav > li > a,
  .header-bottom .header-nav-main > li > a {
    font-size: 12px;
    padding-right: 14px;
  }

  .dsbm-header-hotline small {
    display: none;
  }
}

@media (max-width: 849px) {
  .header-main .header-inner {
    min-height: 68px;
    padding-left: 84px;
  }

  .header-main .logo {
    width: 78px;
    height: 68px;
  }

  .header-main .logo img {
    max-width: 68px;
    max-height: 58px;
  }

  .dsbm-header-tools {
    min-height: 68px;
    gap: 8px;
  }

  .dsbm-header-search-form {
    width: 100%;
  }

  .dsbm-header-cart span,
  .dsbm-header-hotline {
    display: none;
  }

  .header-bottom {
    display: none;
  }
}