/* Top menu */
.top-menu {
  display: block !important;
  min-height: 52px;
  background:
    linear-gradient(180deg, #ff6a00 0 6px, transparent 6px),
    linear-gradient(135deg, #101827 0%, #0f172a 62%, #111827 100%);
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.top-menu.desktop {
  display: block !important;
}

.top-menu-inner {
  min-height: 52px;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.top-menu-trust {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.top-menu-trust i {
  color: #ff6a00;
  margin-right: 9px;
}

.top-menu-separator {
  width: 1px;
  height: 26px;
  background: rgba(255, 255, 255, 0.22);
}

.top-menu-links {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  white-space: nowrap;
}

.top-menu a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.86);
  padding: 8px 0;
  border-radius: 999px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.top-menu a i {
  font-size: 18px;
}

.top-menu a:hover {
  color: #ffffff;
  opacity: 1;
}

/* Header */
.site-header-shell {
  position: relative;
  z-index: 2000;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: none;
}

.site-header-shell::before,
.site-header-shell::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: max(0px, calc((100vw - var(--container-max)) / 2));
  pointer-events: none;
}

.site-header-shell::before {
  left: 0;
  background: linear-gradient(90deg, rgba(255, 122, 0, 0.10), rgba(255, 255, 255, 0));
}

.site-header-shell::after {
  right: 0;
  background: linear-gradient(270deg, rgba(31, 111, 235, 0.10), rgba(255, 255, 255, 0));
}

.header-main {
  min-height: 144px;
  background: transparent;
  border-bottom: none;
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 2;
}

.logo-wrapper {
  flex-shrink: 0;
  min-width: 210px;
  padding: 8px 10px;
  border-radius: 18px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.logo-wrapper:hover {
  background: rgba(255, 255, 255, 0.78);
  transform: translateY(-1px);
}

.logo-img {
  height: 72px;
  width: auto;
}

.header-search-wrap {
  flex: 1 1 auto;
  justify-content: center;
}

.header-search-area {
  width: min(100%, 640px);
  max-width: 640px;
}

.search-box {
  min-height: 64px;
  padding-left: 14px !important;
  padding-right: 8px !important;
  background: #ffffff;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 999px;
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.search-box:focus-within {
  border-color: rgba(255, 122, 0, 0.62);
  box-shadow:
    0 22px 42px rgba(15, 23, 42, 0.11),
    0 0 0 5px rgba(255, 122, 0, 0.12);
  transform: translateY(-1px);
}

.search-leading-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: transparent;
  color: #07132e;
  font-size: 24px;
}

.smart-search-form {
  position: relative;
}

.smart-search-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  display: none;
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.18);
  z-index: 12000;
}

.smart-search-panel.is-open {
  display: block;
}

.smart-search-group {
  padding: 8px;
}

.smart-search-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
}

.smart-search-row:hover,
.smart-search-row.is-active {
  background: #f1f5f9;
  color: var(--text);
}

.smart-search-thumb {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #eef2f7;
  color: #334155;
  font-weight: 900;
}

.smart-search-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.smart-search-title {
  overflow: hidden;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-search-sub {
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.smart-search-price {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.smart-search-empty {
  padding: 14px 16px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.smart-search-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-top: 1px solid #e2e8f0;
  color: #2563eb;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.smart-search-footer:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.search-box input {
  border: none;
  background: transparent;
  padding: 10px 16px;
  outline: none;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
}

.search-box input::placeholder {
  color: #94a3b8;
}

.search-btn {
  width: 64px;
  min-width: 64px;
  height: 54px;
  min-height: 54px;
  padding: 0 !important;
  border-radius: 20px !important;
  background: linear-gradient(135deg, #ff8a00, #ff6a00) !important;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(255, 106, 0, 0.24);
}

.header-icons {
  gap: 18px;
  min-width: 430px;
  justify-content: flex-end;
}

.header-icons .nav-icon,
.mobile-icons .nav-icon {
  min-width: 48px;
  min-height: 48px;
  padding: 0 14px;
  border: none;
  border-radius: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text);
  box-shadow: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.header-icons > a.nav-icon,
.header-icons .mobile-notif-item > a.nav-icon {
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.header-icons .dropdown > a.nav-icon.dropdown-toggle {
  min-width: 160px;
  border-radius: 999px;
  background: transparent;
  justify-content: center;
}

.header-icons .badge {
  min-width: 23px;
  height: 23px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ff6a00 !important;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(255, 106, 0, 0.28);
}

.header-icons .nav-icon:hover,
.mobile-icons .nav-icon:hover {
  background: transparent;
  border-color: transparent;
  color: var(--primary-color);
  transform: translateY(-1px);
}

.header-icons i,
.mobile-icons i {
  font-size: 24px;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.account-label {
  margin-left: 10px;
  font-size: 18px;
  font-weight: 800;
}

.gift-balance-pill {
  background: linear-gradient(135deg, #ff8a00, #ff6a00);
  color: #ffffff;
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(255, 106, 0, 0.25);
}

.dropdown-menu {
  z-index: 100000 !important;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

/* Category bar */
.category-bar {
  padding: 0 26px 28px;
  background: #ffffff;
  border-bottom: none;
  position: relative;
  z-index: 1200;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.05);
}

.category-shell {
  width: min(100% - 24px, 100%);
  max-width: none;
  padding: 0 14px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 15px 36px rgba(15, 23, 42, 0.10);
}

.category-list {
  display: flex;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  overflow: visible;
  scrollbar-width: none;
}

.category-list::-webkit-scrollbar {
  display: none;
}

.category-item {
  position: static;
}

.category-item + .category-item {
  border-left: 1px solid rgba(15, 23, 42, 0.18);
}

.category-item > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 13px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 900;
  color: var(--text);
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.category-item > a::after {
  content: none;
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 5px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff8a00, #1f6feb);
  transition: width 0.22s ease;
}

.category-item:hover > a {
  background: transparent;
  color: #0f172a;
  transform: translateY(-1px);
}

.category-item:hover > a::after {
  width: 0;
}

.category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  color: #06112d;
  font-size: 17px;
}

.category-root-item > a {
  color: #ff6a00;
  font-size: 14px;
}

.category-root-item .category-icon {
  color: #ff6a00;
  font-size: 19px;
}

.category-all-link {
  min-height: 44px !important;
  margin-left: 10px;
  margin-right: 0;
  padding: 0 16px !important;
  min-width: max-content;
  border-radius: 12px !important;
  background: #07132e !important;
  color: #ffffff !important;
  box-shadow: 0 12px 24px rgba(7, 19, 46, 0.18);
}

.category-all-link .category-icon {
  color: #ffffff;
}

.mega-menu {
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  padding: 28px 0;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--line);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  z-index: 1250;
}

.category-item:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mega-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 12px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.mega-link {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #3f4d61;
  font-size: 13px;
  transition: background 0.2s ease, color 0.2s ease;
}

.mega-link:hover {
  background: var(--primary-soft);
  color: var(--primary-color);
}

/* Floating WhatsApp */
.whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #25d366, #20c05d);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 18px 35px rgba(34, 197, 94, 0.28);
  z-index: 1080;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 22px 40px rgba(34, 197, 94, 0.34);
}

@media (max-width: 1200px) {
  .mega-inner {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .desktop {
    display: flex !important;
  }

  .mobile {
    display: none !important;
  }
}

.desktop {
  display: none;
}

.mobile {
  display: flex;
}

@media (max-width: 991px) {
  .top-menu.desktop,
  .category-bar.desktop {
    display: none !important;
  }

  .header-main {
    min-height: 82px;
  }

  .logo-wrapper {
    min-width: 0;
    padding: 6px 0;
  }

  .logo-img {
    height: 56px;
  }

  .mobile-icons .nav-icon {
    min-width: 42px;
    min-height: 42px;
    width: 42px;
    height: 42px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(203, 213, 225, 0.65);
    background: #ffffff;
  }

  .mobile-icons i {
    font-size: 18px;
  }

  .mobile-search-row .search-box {
    min-height: 52px;
    padding-left: 12px !important;
    padding-right: 8px !important;
  }

  .mobile-search-row .search-box input {
    font-size: 15px;
    padding: 10px 8px;
  }

  .mobile-search-row .search-btn {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    border-radius: 999px !important;
    font-size: 17px;
  }

  .whatsapp-float {
    right: 16px;
    bottom: 84px;
    width: 56px;
    height: 56px;
    font-size: 28px;
  }
}
