/* XTechMart project header
   Keep all header and header-search responsive changes in this file. */

.xtech-header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 990;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.07);
  transition: box-shadow 0.4s;
}

.xtech-header.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.14);
}

.xtech-header__logo {
  display: block;
  width: 225px;
  height: auto;
  max-height: 52px;
  object-fit: contain;
}

.xtech-header .navbar-nav .nav-link {
  color: #333 !important;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 26px 11px !important;
  position: relative;
  text-transform: uppercase;
}

.xtech-header .navbar-nav .nav-link::after {
  background: var(--primary);
  border-radius: 3px 3px 0 0;
  bottom: 0;
  content: "";
  height: 3px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
  transition: width 0.3s;
  width: 0;
}

.xtech-header .navbar-nav .nav-link:hover,
.xtech-header .navbar-nav .nav-link.active {
  color: var(--primary) !important;
}

.xtech-header .navbar-nav .nav-link:hover::after,
.xtech-header .navbar-nav .nav-link.active::after {
  width: 55%;
}

.xtech-header__dropdown-row {
  align-items: stretch;
  display: flex;
}

.xtech-header__dropdown-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  color: #000;
  display: flex;
  font-size: 0.66rem;
  justify-content: center;
  margin-left: -8px;
  padding: 0 8px;
  transition: color 0.2s;
}

.xtech-header__dropdown-toggle:hover,
.xtech-header__dropdown-toggle:focus-visible,
.xtech-header__dropdown-toggle.show {
  color: var(--primary);
}

.xtech-header__dropdown-toggle i {
  transition: transform 0.2s ease;
}

.xtech-header__dropdown-toggle.show i {
  transform: rotate(180deg);
}

.xtech-header .dropdown-menu {
  border: 0;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  margin-top: 0;
  min-width: 220px;
  padding: 9px;
}

.xtech-header .dropdown-item {
  border-radius: 7px;
  color: #333;
  font-size: 0.82rem;
  padding: 9px 12px;
}

.xtech-header .dropdown-item:hover,
.xtech-header .dropdown-item:focus {
  background: rgba(0, 76, 224, 0.08);
  color: var(--primary);
}

#navSearchBtn {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #555;
  cursor: pointer;
  font-size: 1rem;
  padding: 10px 12px;
  transition: 0.3s;
}

#navSearchBtn:hover,
#navSearchBtn:focus-visible {
  background: rgba(0, 76, 224, 0.08);
  color: var(--primary);
}

#searchOv {
  align-items: center;
  background: rgba(5, 5, 5, 0.97);
  display: none;
  flex-direction: column;
  inset: 0;
  justify-content: flex-start;
  padding-top: 78px;
  position: fixed;
  z-index: 99999;
}

#searchOv.open {
  animation: xtech-search-fade 0.28s ease;
  display: flex;
}

@keyframes xtech-search-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

#searchOv .sovclose {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 1.15rem;
  height: 42px;
  justify-content: center;
  position: absolute;
  right: 28px;
  top: 22px;
  transition: 0.3s;
  width: 42px;
}

#searchOv .sovclose:hover {
  background: var(--primary);
}

.sovbox {
  max-width: 680px;
  padding: 0 18px;
  width: 100%;
}

.sovbox h4 {
  color: #fff;
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  margin-bottom: 26px;
  text-align: center;
}

.sovinput {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 60px;
  display: flex;
  overflow: hidden;
}

.sovinput input {
  background: transparent;
  border: 0;
  color: #fff;
  flex: 1;
  font-family: "Poppins", sans-serif;
  font-size: 1.05rem;
  min-width: 0;
  outline: 0;
  padding: 17px 24px;
}

.sovinput input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.sovinput button {
  background: var(--primary);
  border: 0;
  color: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0 26px;
  transition: 0.3s;
}

.sovinput button:hover {
  filter: brightness(0.88);
}

.sovcats {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
  margin-top: 28px;
}

.xtech-search-category {
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50px;
  color: rgba(255, 255, 255, 0.78);
  display: flex;
  font-family: "Poppins", sans-serif;
  font-size: 0.83rem;
  padding: 9px 18px;
  transition: 0.3s;
}

.xtech-search-category:hover,
.xtech-search-category.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.sovtrend {
  margin-top: 26px;
  text-align: center;
}

.sovtrend p {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.8rem;
  margin-bottom: 9px;
}

.sovtrend p i {
  color: #0064e0;
}

.sovtrend .ttag {
  background: rgba(0, 100, 224, 0.13);
  border: 1px solid rgba(0, 100, 224, 0.28);
  border-radius: 20px;
  color: #69a9ff;
  cursor: pointer;
  display: inline-block;
  font-family: inherit;
  font-size: 0.76rem;
  margin: 3px;
  padding: 4px 13px;
  text-transform: none;
  transition: 0.3s;
}

.sovtrend .ttag:hover {
  border-color: #0064e0;
  background: #0064e0;
  color: #ffffff;
}

@media (min-width: 992px) {
  .xtech-header__dropdown:hover .dropdown-menu {
    display: block;
  }

  .xtech-header__dropdown:hover .xtech-header__dropdown-toggle i {
    transform: rotate(180deg);
  }
}

@media (max-width: 1199.98px) {
  .xtech-header__logo {
    width: 190px;
  }

  .xtech-header .navbar-nav .nav-link {
    font-size: 0.76rem;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}

@media (max-width: 991.98px) {
  .xtech-header {
    padding: 11px 0;
  }

  .xtech-header__logo {
    width: 180px;
  }

  .xtech-header .navbar-toggler {
    box-shadow: none;
    color: var(--primary);
    font-size: 1.35rem;
    padding: 8px;
  }

  .xtech-header .navbar-collapse {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 11px;
    max-height: calc(100vh - 88px);
    overflow-y: auto;
    padding: 8px 0 4px;
  }

  .xtech-header .navbar-nav .nav-link {
    padding: 11px 4px !important;
  }

  .xtech-header .navbar-nav .nav-link::after {
    bottom: 5px;
    left: 4px;
    transform: none;
  }

  .xtech-header .navbar-nav .nav-link:hover::after,
  .xtech-header .navbar-nav .nav-link.active::after {
    width: 34px;
  }

  .xtech-header .dropdown-menu {
    border-left: 2px solid var(--primary);
    border-radius: 0;
    box-shadow: none;
    margin: 0 0 5px 4px;
    padding: 3px 8px;
  }

  .xtech-header__dropdown-row {
    justify-content: space-between;
  }

  .xtech-header__dropdown-row .nav-link {
    flex: 1;
  }

  .xtech-header__dropdown-toggle {
    font-size: 0.72rem;
    margin-left: 0;
    min-width: 44px;
    padding: 0 12px;
  }

  #navSearchBtn {
    margin-top: 4px;
  }
}

@media (max-width: 575.98px) {
  #searchOv {
    overflow-y: auto;
    padding: 82px 0 35px;
  }

  #searchOv .sovclose {
    right: 16px;
    top: 16px;
  }

  .sovbox h4 {
    font-size: 1.25rem;
    margin-bottom: 18px;
  }

  .sovinput input {
    font-size: 0.9rem;
    padding: 14px 17px;
  }

  .sovinput button {
    padding: 0 19px;
  }

  .sovcats {
    gap: 7px;
    margin-top: 20px;
  }

  .xtech-search-category {
    font-size: 0.75rem;
    padding: 7px 12px;
  }
}
