/* =========================================================
   ServerSea KB Header Override CSS
   Add at END of kb/assets/css/main.css
   ========================================================= */

/* ---------- Base helpers ---------- */
:root{
  --ss-primary: #0a5fff;
  --ss-primary-dark: #0848be;
  --ss-dark: #0f172a;
  --ss-text: #24313c;
  --ss-text-soft: #5f6f81;
  --ss-border: #e6ebf2;
  --ss-bg-soft: #f6f9fc;
  --ss-white: #ffffff;
  --ss-success: #12b76a;
  --ss-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --ss-shadow-lg: 0 18px 50px rgba(15, 23, 42, 0.14);
  --ss-radius: 14px;
  --ss-radius-sm: 10px;
}

html,
body{
  overflow-x: hidden;
}

body{
  color: var(--ss-text);
}

/* ---------- Header wrapper ---------- */
.ss-header{
  position: relative;
  z-index: 1200;
  font-family: 'Open Sans', sans-serif;
}

.ss-header a{
  text-decoration: none;
}

.ss-header a:hover{
  text-decoration: none;
}

/* ---------- Top bar ---------- */
.ss-topbar{
  background: linear-gradient(90deg, #0f172a 0%, #18253b 100%);
  color: #dbe6f5;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.ss-topbar .uk-container,
.ss-nav .uk-container{
  box-sizing: border-box;
}

.ss-topbar-inner{
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0;
}

.ss-top-left{
  flex: 1 1 auto;
  min-width: 0;
}

.ss-top-note{
  font-size: 12px;
  line-height: 1.4;
  color: #d8e3f1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  max-width: 100%;
}

.ss-news{
  flex: 0 1 auto;
  min-width: 0;
}

.ss-news span{
  display: inline-block;
  font-size: 12px;
  line-height: 1.4;
  color: #fff3bf;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 360px;
}

.ss-top-right{
  margin-left: auto;
  flex: 0 0 auto;
}

.ss-actions{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ss-actions li{
  margin: 0;
  padding: 0;
}

/* ---------- Dropdowns ---------- */
.ss-dd{
  position: relative;
}

.ss-dd-btn{
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  color: #eef5ff;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: all .2s ease;
}

.ss-dd-btn:hover,
.ss-dd-btn:focus{
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.24);
  outline: none;
}

.ss-dd-btn i{
  font-size: 12px;
}

.ss-dd-menu{
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 215px;
  background: #fff;
  border: 1px solid var(--ss-border);
  border-radius: 14px;
  box-shadow: var(--ss-shadow-lg);
  padding: 8px;
  display: none;
  z-index: 1300;
}

.ss-dd.open .ss-dd-menu{
  display: block;
}

.ss-dd-item{
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ss-text);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.4;
  transition: background .2s ease, color .2s ease;
}

.ss-dd-item:hover{
  background: #f4f8ff;
  color: var(--ss-primary);
}

.ss-dd-item img{
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex: 0 0 18px;
}

.ss-member-text,
.ss-dd-label{
  white-space: nowrap;
}

/* ---------- Cart ---------- */
.ss-cart{
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  color: var(--ss-primary);
  box-shadow: 0 8px 20px rgba(10,95,255,0.18);
  transition: transform .2s ease, box-shadow .2s ease;
}

.ss-cart:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(10,95,255,0.22);
  color: var(--ss-primary);
}

.ss-cart i{
  font-size: 15px;
}

.ss-cart-badge{
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ff4d4f;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  padding: 0 5px;
  box-shadow: 0 4px 10px rgba(255,77,79,0.35);
  display: none;
}

/* ---------- Main nav ---------- */
.ss-nav{
  background: #fff;
  border-bottom: 1px solid var(--ss-border);
  box-shadow: 0 6px 22px rgba(15,23,42,0.04);
  position: relative;
}

.ss-nav-inner{
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0;
}

.ss-brand{
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}

.ss-brand img{
  max-height: 46px;
  width: auto;
  display: block;
}

.ss-menu{
  flex: 1 1 auto;
  min-width: 0;
}

.ss-menu-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}

.ss-menu-item{
  position: relative;
  margin: 0;
  padding: 0;
}

.ss-menu-link{
  height: 78px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  color: var(--ss-text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  transition: color .2s ease;
}

.ss-menu-link:hover{
  color: var(--ss-primary);
}

.ss-menu-link i{
  font-size: 12px;
  opacity: .8;
}

/* ---------- Desktop submenu ---------- */
.ss-has-sub .ss-submenu{
  position: absolute;
  top: calc(100% - 6px);
  left: 0;
  min-width: 255px;
  background: #fff;
  border: 1px solid var(--ss-border);
  border-radius: 16px;
  box-shadow: var(--ss-shadow-lg);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
  z-index: 1250;
}

.ss-has-sub:hover .ss-submenu,
.ss-has-sub:focus-within .ss-submenu{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.ss-submenu a{
  display: block;
  padding: 11px 13px;
  border-radius: 10px;
  color: var(--ss-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  transition: background .2s ease, color .2s ease, padding-left .2s ease;
}

.ss-submenu a:hover{
  background: #f4f8ff;
  color: var(--ss-primary);
  padding-left: 16px;
}

/* ---------- Right actions ---------- */
.ss-nav-actions{
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.ss-refer-main{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #eff5ff 0%, #f8fbff 100%);
  border: 1px solid #d7e5ff;
  border-radius: 999px;
  color: var(--ss-primary);
  box-shadow: 0 10px 24px rgba(10,95,255,0.08);
  transition: all .2s ease;
}

.ss-refer-main:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(10,95,255,0.12);
  color: var(--ss-primary);
}

.ss-refer-main > i{
  font-size: 15px;
}

.ss-refer-main > span:first-of-type{
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.ss-refer-badge{
  background: var(--ss-primary);
  color: #fff;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

/* ---------- Burger ---------- */
.ss-burger{
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ss-border);
  background: #fff;
  border-radius: 12px;
  padding: 0;
  cursor: pointer;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 8px 20px rgba(15,23,42,0.06);
}

.ss-burger span{
  width: 18px;
  height: 2px;
  background: var(--ss-text);
  border-radius: 10px;
  display: block;
  transition: all .2s ease;
}

/* ---------- Drawer ---------- */
.ss-drawer{
  position: fixed;
  top: 0;
  right: 0;
  width: min(360px, 88vw);
  height: 100vh;
  background: #fff;
  z-index: 1400;
  transform: translateX(100%);
  transition: transform .28s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 50px rgba(15,23,42,0.18);
}

.ss-drawer.open{
  transform: translateX(0);
}

.ss-drawer-head{
  min-height: 78px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--ss-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.ss-drawer-head img{
  max-height: 38px;
  width: auto;
}

.ss-drawer-close{
  width: 40px;
  height: 40px;
  border: 1px solid var(--ss-border);
  background: #fff;
  color: var(--ss-text);
  border-radius: 10px;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.ss-drawer-body{
  padding: 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.ss-m-refer{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff5ff 0%, #f8fbff 100%);
  border: 1px solid #d7e5ff;
  color: var(--ss-primary);
  font-weight: 700;
  margin-bottom: 16px;
}

.ss-m-refer span{
  background: var(--ss-primary);
  color: #fff;
  font-size: 11px;
  border-radius: 999px;
  padding: 5px 9px;
}

.ss-m-item,
.ss-m-link{
  border-bottom: 1px solid #edf1f7;
}

.ss-m-link{
  display: block;
  padding: 14px 0;
  color: var(--ss-text);
  font-size: 14px;
  font-weight: 700;
}

.ss-m-btn{
  width: 100%;
  background: transparent;
  border: 0;
  padding: 15px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ss-text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.ss-m-btn span{
  font-size: 18px;
  line-height: 1;
  color: var(--ss-primary);
}

.ss-m-sub{
  display: none;
  padding: 0 0 10px 0;
}

.ss-m-item.open .ss-m-sub{
  display: block;
}

.ss-m-sub a{
  display: block;
  padding: 10px 0 10px 12px;
  color: var(--ss-text-soft);
  font-size: 13px;
  font-weight: 600;
}

.ss-m-sub a:hover{
  color: var(--ss-primary);
}

/* ---------- Overlay ---------- */
.ss-overlay{
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.55);
  z-index: 1350;
}

.ss-overlay[hidden]{
  display: none !important;
}

/* ---------- KB page tuning under new header ---------- */
.section-sub-nav{
  background: #fff;
}

.section-sub-nav .border-top{
  border-top: 1px solid #e9edf4;
}

.section-sub-nav .uk-search-default{
  width: 100%;
}

.section-sub-nav .uk-search-default .uk-search-input{
  height: 48px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e3e8f0;
  box-shadow: none;
}

.section-sub-nav .uk-search-default .uk-search-input:focus{
  border-color: #bfd4ff;
  background: #fff;
}

.section-content h1{
  font-size: 34px;
  line-height: 1.2;
  margin-bottom: 12px;
  font-weight: 700;
  color: #1a2433;
}

.section-content .uk-text-lead{
  font-size: 16px;
  color: #66788a;
}

.list-category{
  margin-top: 28px;
}

.list-category > li{
  padding: 0;
  margin-top: 14px !important;
}

.list-category > li h3{
  margin: 0;
}

.list-category > li h3 a{
  display: block;
  padding: 18px 20px;
  border: 1px solid #e7edf5;
  border-radius: 16px;
  background: #fff;
  color: #24313c;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
  transition: all .2s ease;
  box-shadow: 0 4px 16px rgba(15,23,42,0.03);
}

.list-category > li h3 a:hover{
  border-color: #cfe0ff;
  color: var(--ss-primary);
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(10,95,255,0.08);
}

.sidebar h3{
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
}

.sidebar .uk-list-large > li{
  margin-top: 10px !important;
}

.sidebar .uk-list-large > li a{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #4f6275;
  font-size: 15px;
  font-weight: 600;
  transition: color .2s ease, padding-left .2s ease;
}

.sidebar .uk-list-large > li a:hover,
.sidebar .uk-list-large > li a.uk-text-bold{
  color: var(--ss-primary);
}

.sidebar .uk-list-large > li a:hover{
  padding-left: 4px;
}

/* ---------- Footer tune ---------- */
#footer{
  background: #fbfcfe;
  border-top: 1px solid #e7edf5;
}

/* ---------- Tablet ---------- */
@media (max-width: 1199px){
  .ss-nav-inner{
    gap: 16px;
  }

  .ss-menu-link{
    padding: 0 10px;
    font-size: 13px;
  }

  .ss-refer-main > span:first-of-type{
    display: none;
  }
}

/* ---------- Mobile / Drawer mode ---------- */
@media (max-width: 991px){
  .ss-topbar-inner{
    flex-wrap: wrap;
    row-gap: 8px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .ss-top-left,
  .ss-news{
    flex: 1 1 100%;
  }

  .ss-news span{
    max-width: 100%;
  }

  .ss-top-right{
    width: 100%;
    margin-left: 0;
  }

  .ss-actions{
    justify-content: flex-end;
  }

  .ss-nav-inner{
    min-height: 72px;
  }

  .ss-brand img{
    max-height: 42px;
  }

  .ss-menu,
  .ss-refer-main{
    display: none;
  }

  .ss-burger{
    display: inline-flex;
  }

  .section-sub-nav .uk-width-2-3@m,
  .section-sub-nav .uk-width-1-3@m{
    width: 100%;
  }

  .section-sub-nav .uk-breadcrumb{
    display: none;
  }

  .ss-topbar .uk-container,
  .ss-nav .uk-container{
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* ---------- Small mobile ---------- */
@media (max-width: 639px){
  .ss-dd-btn{
    padding: 0 10px;
  }

  .ss-dd-menu{
    right: 0;
    left: auto;
    min-width: 190px;
  }

  .ss-cart{
    width: 36px;
    height: 36px;
  }

  .section-content h1{
    font-size: 28px;
  }

  .list-category > li h3 a{
    padding: 16px 16px;
    font-size: 16px;
  }

  .ss-drawer-body{
    padding: 16px;
  }
}

/* ---------- Prevent UIKit nav conflicts on new header ---------- */
.ss-header .uk-navbar,
.ss-header .uk-navbar-container,
.ss-header .uk-navbar-nav,
.ss-header .uk-navbar-dropdown{
  all: unset;
}