/* KHOIAUTO HEADER FIX */

:root {
  --ka-red: #970000;
  --ka-red2: #c40000;
  --ka-black: #050505;
  --ka-border: #e5e5e5;
  --ka-zalo: #0068ff;
}
/* TOP BAR */
.logo{
    display:none;
}

.ka-topbar-custom {
  width: 100%;
  background: #050505;
  color: #fff;
  font-size: 13px;
}

.ka-topbar-custom .ka-head-wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ka-top-left,
.ka-top-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.ka-topbar-custom span,
.ka-topbar-custom a {
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

/* MAIN HEADER */
.ka-main-head {
  width: 100%;
  background: #fff;
}

.ka-head-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 82px;
  display: grid !important;
  grid-template-columns: 190px 150px minmax(420px, 1fr) 140px 140px 115px;
  gap: 12px;
  align-items: center;
}

/* LOGO */
.ka-head-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.ka-head-logo img {
  display: block;
  max-width: 180px;
  height: auto;
}

/* CATEGORY */
.ka-head-cat {
  height: 46px;
  border: 1px solid var(--ka-border);
  border-radius: 8px;
  background: #fff;
  color: #111;
  padding: 0 12px;
  display: grid !important;
  grid-template-columns: 28px 1fr;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  column-gap: 8px;
  cursor: pointer;
}

.ka-head-cat span {
  grid-row: 1 / 3;
  font-size: 24px;
  line-height: 1;
}

.ka-head-cat b {
  display: block;
  font-size: 13px;
  line-height: 1;
  font-weight: 900;
  text-align: left;
}

.ka-head-cat small {
  display: block;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  color: #111;
  text-align: left;
}

/* SEARCH */
.ka-head-search {
  height: 46px !important;
  display: grid !important;
  grid-template-columns: minmax(260px, 1fr) 95px 46px;
  align-items: stretch;
  border: 1px solid var(--ka-border);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  margin: 0 !important;
}

.ka-head-search input,
.ka-head-search select,
.ka-head-search button {
  height: 46px !important;
  min-height: 46px !important;
  margin: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  line-height: 46px !important;
}

.ka-head-search input {
  border: 0 !important;
  padding: 0 16px !important;
  font-size: 14px;
  background: #fff !important;
}

.ka-head-search select {
  border: 0 !important;
  border-left: 1px solid var(--ka-border) !important;
  padding: 0 10px !important;
  font-size: 14px;
  background: #fff !important;
  color: #555;
}

.ka-head-search button {
  border: 0 !important;
  background: var(--ka-red) !important;
  color: #fff !important;
  font-size: 16px;
  cursor: pointer;
  padding: 0 !important;
}

.ka-head-search button:hover {
  background: var(--ka-red2) !important;
}

/* PHONE + ZALO */
.ka-head-phone,
.ka-head-zalo {
  height: 46px;
  border-radius: 8px;
  display: grid !important;
  grid-template-columns: 28px 1fr;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  column-gap: 8px;
  padding: 7px 10px;
  text-decoration: none !important;
}

.ka-head-phone span,
.ka-head-zalo span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.ka-head-phone strong,
.ka-head-zalo strong {
  display: block;
  font-size: 13px;
  line-height: 1;
  font-weight: 900;
}

.ka-head-phone small,
.ka-head-zalo small {
  display: block;
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
}

.ka-head-phone {
  background: var(--ka-red);
  color: #fff !important;
}

.ka-head-phone:hover {
  background: var(--ka-red2);
  color: #fff !important;
}

.ka-head-zalo {
  background: var(--ka-zalo);
  color: #fff !important;
}

.ka-head-zalo:hover {
  background: #0054d8;
  color: #fff !important;
}

/* CART */
.ka-head-cart {
  position: relative;
  height: 46px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #111 !important;
  text-decoration: none !important;
  font-size: 14px;
}

.ka-head-cart strong {
  font-weight: 900;
}

.ka-head-cart em {
  position: absolute;
  top: -2px;
  right: 0;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ka-red);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  display: grid;
  place-items: center;
}

/* Flatsome wrapper reset */
.header-main .flex-row,
.header-main .container {
  max-width: none !important;
}

.header-main .html {
  width: 100% !important;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  .ka-head-inner {
    grid-template-columns: 165px 135px 1fr 130px 130px;
  }

  .ka-head-cart {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .ka-topbar-custom .ka-head-wrap {
    justify-content: center;
  }

  .ka-top-left {
    overflow-x: auto;
    gap: 16px;
  }

  .ka-top-right {
    display: none;
  }

  .ka-head-inner {
    grid-template-columns: 150px 1fr;
    padding: 12px 0;
  }

  .ka-head-cat,
  .ka-head-phone,
  .ka-head-zalo,
  .ka-head-cart {
    display: none !important;
  }

  .ka-head-search {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 80px 46px;
  }
}

@media (max-width: 520px) {
  .ka-head-inner {
    grid-template-columns: 130px 1fr;
  }

  .ka-head-logo img {
    max-width: 130px;
  }

  .ka-head-search {
    grid-template-columns: 1fr 46px;
  }

  .ka-head-search select {
    display: none !important;
  }
}