/* ===============================
   KlikDataHub Navbar Styles
   =============================== */

/* -------- Base / reset -------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

:root {
  --accent: #00b4d8;
  --nav-bg: #0d1b2a;
  --nav-border: #1b263b;
  --link: #e0e0e0;
}

/* -------- Navbar shell -------- */
.navbar {
  background-color: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  padding: 0.7rem 1.25rem;
}

.navbar-logo {
  height: 65px;
  width: auto;
  object-fit: contain;
  display: block;
  padding: 6px 12px;
}


/* -------- Modern Hamburger -------- */
.menu-toggle {
  background: none;
  border: none;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  outline: none;
  position: relative;
  transition: box-shadow 0.2s ease;
}

.menu-toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.35);
}

.menu-toggle::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}
.menu-toggle:active::after {
  background: rgba(255, 255, 255, 0.06);
  transform: scale(1);
  opacity: 1;
}

.menu-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
}

.menu-bar {
  height: 3px;
  width: 100%;
  background-color: #f0f0f0;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.menu-toggle.is-open .menu-bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.is-open .menu-bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.is-open .menu-bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* -------- Nav Links -------- */
.navbar-nav {
  align-items: center;
  gap: 14px;
}

.nav-link {
  color: var(--link) !important;
  font-weight: 500;
  font-size: 15px;
  padding: 6px 12px;
  transition: color 0.2s ease-in-out;
  border-bottom: none !important;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent) !important;
}

.wallet-badge {
  font-size: 14px;
  font-weight: 600;
  background-color: #198754 !important;
  padding: 4px 10px;
  border-radius: 20px;
}

.fw-semibold {
  margin: 0;
  font-size: 15px;
}

/* -------- Cart Badge -------- */
.cart-count-badge {
  position: absolute;
  top: 2px;
  right: -8px;
  background-color: #ff7a00;
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 50%;
  font-weight: bold;
  line-height: 1;
}

/* ===================================================
   MOBILE NAV (max-width: 991.98px)
   =================================================== */
@media (max-width: 991.98px) {
  .navbar-logo {
    height: 42px !important;
    padding: 4px 10px;
  }

  .navbar-collapse {
    text-align: left;
    background: rgba(13, 27, 42, 0.98);
    backdrop-filter: saturate(140%) blur(4px);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 0.75rem;
  }

  .navbar-collapse.collapse {
    transition: transform 0.32s ease, opacity 0.32s ease;
  }
  .navbar-collapse.collapse:not(.show) {
    transform: translateY(-8px);
    opacity: 0;
  }
  .navbar-collapse.collapse.show {
    transform: translateY(0);
    opacity: 1;
  }

  .navbar-nav {
    flex-direction: column;
    align-items: flex-start !important;
    width: 100%;
    gap: 0;
  }

  .nav-item {
    width: 100%;
    opacity: 0;
    transform: translateY(6px);
    animation: navItemIn 0.32s ease forwards;
  }

  .navbar-collapse.show .navbar-nav > .nav-item:nth-child(1) { animation-delay: .05s; }
  .navbar-collapse.show .navbar-nav > .nav-item:nth-child(2) { animation-delay: .10s; }
  .navbar-collapse.show .navbar-nav > .nav-item:nth-child(3) { animation-delay: .15s; }
  .navbar-collapse.show .navbar-nav > .nav-item:nth-child(4) { animation-delay: .20s; }
  .navbar-collapse.show .navbar-nav > .nav-item:nth-child(5) { animation-delay: .25s; }

  @keyframes navItemIn {
    to { opacity: 1; transform: translateY(0); }
  }

  .nav-link {
    font-size: 18px;
    padding: 16px 22px;
    width: 100%;
    text-align: left;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }

  .wallet-badge {
    font-size: 14px;
    margin-left: 10px;
    padding: 6px 14px;
  }

  .dropdown-toggle {
    font-size: 16px;
    padding: 14px 20px;
    width: 100%;
    text-align: left;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
  }

  .dropdown-menu {
    width: 100%;
    position: static;
    background: #f8f9fa;
    box-shadow: none;
    border-radius: 0;
  }

  .dropdown-menu a {
    padding: 14px 20px;
    font-size: 14px;
    color: #212529;
    border-bottom: 1px solid #eee;
  }

  .cart-count-badge {
    top: 10px;
    right: 25px;
  }
}

/* -------- Optional: lock background scroll when menu is open -------- */
html.navbar-open,
html.navbar-open body {
  overflow: hidden;
}

/* ==========================
   User Dropdown Styling
   ========================== */
@media (min-width: 992px) {
  .dropdown-menu {
    border: none;
    border-radius: 12px;
    padding: 8px 0;
    min-width: 220px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    animation: dropdownFade .25s ease;
  }

  .dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    transition: background .2s, color .2s;
    border-radius: 6px;
    margin: 2px 8px;
  }

  .dropdown-menu .dropdown-item:hover {
    background: #f1f5f9;
    color: #0d6efd;
  }

  .dropdown-menu .dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 15px;
    opacity: 0.75;
  }

  .dropdown-menu .dropdown-divider {
    margin: 6px 0;
    border-top: 1px solid #e9ecef;
  }

  .dropdown-menu .dropdown-item.text-danger {
    color: #dc3545 !important;
    font-weight: 600;
  }

  .dropdown-menu .dropdown-item.text-danger:hover {
    background: #ffe6e9;
    color: #b02a37 !important;
  }

  @keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* -------- REMOVE underlines globally -------- */
.nav-link::after,
.dropdown-toggle::after {
  display: none !important;
}

@media (max-width: 991.98px) {
  .navbar-logo {
    height: 60px !important;
    padding: 6px 10px !important;
  }
}

.navbar-nav .nav-link {
  text-decoration: none !important;
}

.navbar-nav .nav-link:hover {
  text-decoration: none !important;
}

