/* KS UI Polish v1.3 — logo / search / xem tat ca */

/* Logo: single orange brand span (child theme override) */
.header #logo,
.header-main #logo,
.header-wrapper #logo,
.stuck #logo {
  max-width: 300px;
}
.header #logo a.home,
.header #logo > a,
.header-main #logo > a,
.stuck #logo > a {
  display: inline-flex !important;
  align-items: center !important;
  text-decoration: none !important;
  max-width: 300px;
}
.header #logo .ks-brand-text,
.header-main #logo .ks-brand-text,
.stuck #logo .ks-brand-text,
#logo .ks-brand-text {
  display: inline-block !important;
  font-size: 22px !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
  color: #f58220 !important;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.header #logo img,
.header-main #logo img { display: none !important; }

/* Search: full-width first row; phone / login / cart second row */
.header-main .flex-right {
  flex: 1 1 auto !important;
  max-width: 560px;
  margin-left: auto !important;
}
.header-main .flex-right > ul.header-nav {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  column-gap: 16px !important;
  row-gap: 8px !important;
  width: 100% !important;
  margin: 0 !important;
  float: none !important;
}
.header-main .flex-right > ul.header-nav > li {
  float: none !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}
.header-main .flex-right > ul.header-nav > li.header-search-form {
  flex: 1 1 100% !important;
  width: 100% !important;
  order: -1 !important;
  display: block !important;
}
.header-main .flex-right .header-search-form .searchform-wrapper,
.header-main .flex-right .header-search-form form.searchform {
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  align-items: stretch !important;
}
.header-main .flex-right .header-button .button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 34px !important;
  margin: 0 !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}
.header-main .flex-right .account-link,
.header-main .flex-right .header-cart-link,
.header-main .flex-right .cart-item,
.header-main .flex-right .nav-top-link {
  display: inline-flex !important;
  align-items: center !important;
  height: 34px !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  vertical-align: middle !important;
}
.header-main .searchform .search-field {
  height: 40px !important;
  flex: 1 1 auto !important;
}
.header-main .searchform .ux-search-submit,
.header-main .searchform button {
  height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
}

/* Xem tất cả: one row, title left / link right, grid-aligned */
.ks-section-head.row,
.row.ks-section-head {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-bottom: 12px !important;
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  clear: both !important;
}
.ks-section-head > .col,
.ks-section-head > [class*="col-"] {
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  float: none !important;
  display: flex !important;
  align-items: center !important;
}
.ks-section-head > .col:first-child,
.ks-section-head > [class*="col-"]:first-child {
  flex: 1 1 auto !important;
  max-width: none !important;
  width: auto !important;
  justify-content: flex-start !important;
}
.ks-section-head > .col:last-child,
.ks-section-head > [class*="col-"]:last-child {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  justify-content: flex-end !important;
  text-align: right !important;
  margin-left: 12px !important;
}
.ks-section-head .section-title,
.ks-section-head .section-title-container {
  margin: 0 !important;
  width: auto !important;
  max-width: 100%;
}
.ks-section-head .section-title span,
.ks-section-head .section-title > span {
  display: inline-block !important;
  background: #f58220 !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  padding: 9px 24px 9px 14px !important;
  margin: 0 !important;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
}
.ks-section-head .button,
.ks-section-head a.button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #f58220 !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 4px !important;
  padding: 9px 16px !important;
  margin: 0 !important;
  min-height: 38px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  float: none !important;
  line-height: 1 !important;
  white-space: nowrap;
  position: static !important;
}
/* Fallback: UXBuilder rows that still put Xem tat ca left of title */
.section .row:has(.section-title):has(a.button) {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
}
.section .row:has(.section-title):has(a.button) > .col:has(a.button),
.section .row:has(.section-title):has(a.button) > [class*="col-"]:has(a.button) {
  order: 2 !important;
  flex: 0 0 auto !important;
  margin-left: auto !important;
  justify-content: flex-end !important;
}
.section .row:has(.section-title):has(a.button) > .col:has(.section-title),
.section .row:has(.section-title):has(a.button) > [class*="col-"]:has(.section-title) {
  order: 1 !important;
  flex: 1 1 auto !important;
}

@media (max-width: 549px) {
  #logo .ks-brand-text { font-size: 15px !important; white-space: normal; }
  .ks-section-head.row,
  .row.ks-section-head {
    flex-wrap: wrap !important;
  }
  .ks-section-head > .col:last-child {
    justify-content: flex-start !important;
    margin-left: 0 !important;
    margin-top: 6px;
  }
}


/* v1.3.1: kill Flatsome float grid on section heads */
.row.ks-section-head:before,
.row.ks-section-head:after,
.ks-section-head.row:before,
.ks-section-head.row:after {
  display: none !important;
  content: none !important;
}
.row.ks-section-head > .col,
.ks-section-head.row > .col {
  float: none !important;
  clear: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.row.ks-section-head > .col .col-inner,
.ks-section-head.row > .col .col-inner {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}
.row.ks-section-head > .col.large-9,
.row.ks-section-head > .col.medium-9,
.ks-section-head.row > .col.large-9,
.ks-section-head.row > .col.medium-9 {
  width: auto !important;
  max-width: calc(100% - 140px) !important;
  flex: 1 1 auto !important;
}
.row.ks-section-head > .col.large-3,
.row.ks-section-head > .col.medium-3,
.ks-section-head.row > .col.large-3,
.ks-section-head.row > .col.medium-3 {
  width: auto !important;
  max-width: none !important;
  flex: 0 0 auto !important;
  margin-left: auto !important;
}
/* second-row actions: even spacing under search */
.header-main .flex-right > ul.header-nav > li:not(.header-search-form) {
  flex: 0 0 auto !important;
}
.header-main .flex-right > ul.header-nav > li.html.header-button-1 {
  margin-right: auto !important;
}


/* v1.3.2: hide duplicate logo wrongly placed inside left header-nav */
.header-main .flex-left > ul.header-nav > a[rel="home"],
.header-main .flex-left .header-nav > a[rel="home"],
.header-main ul.header-nav-main > a[rel="home"],
.header-wrapper .flex-left > ul.header-nav > a[rel="home"] {
  display: none !important;
}
