/* --- Sticky navbar (all devices) --- */
.navbar.desktop-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100; /* above page content */
}

/* Push content below the fixed navbar */
body { padding-top: 90px; }
@media (max-width: 991.98px){
  body { padding-top: 70px; }
}

/* Prevent hero overlaps if any negative margins exist */
.background-card { margin-top: 0 !important; }

/* ---- Cart icon + outside badge ---- */
.navbar .nav-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  margin-left: 8px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 10px;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}

/* Icon */
.navbar .nav-cart .cart-icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* Dark navbar = light icon */
.navbar-dark .nav-cart { color: #fff; }
.navbar-dark .nav-cart:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.35);
  transform: translateY(-1px);
}

/* Floating badge that sits slightly OUTSIDE the icon */
.navbar .nav-cart .cart-badge {
  position: absolute;
  top: -6px;      /* push it outside */
  right: -6px;    /* push it outside */
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff5722;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}

/* If you want to hide the badge when count is 0, set textContent = "" via JS */

/* --- Mobile tweaks --- */
@media (max-width: 991.98px) {
  /* Ensure mobile cart sits to the far right before the toggler */
  .navbar .nav-cart.d-inline-flex.d-lg-none {
    margin-left: auto;  /* pushes it to the right */
  }

  /* Ensure the hamburger stays clickable above neighbors */
  .navbar .navbar-toggler {
    position: relative;
    z-index: 1201;
  }
  .navbar .nav-cart.d-inline-flex.d-lg-none {
    z-index: 1200; /* just under the toggler */
  }

  /* Give the opened collapse a background so it overlays content cleanly */
  .navbar .navbar-collapse.collapse.show {
    background: #343a40; /* same as .bg-dark */
  }
}

/* Optional subtle shadow under the sticky navbar for depth */
/*
.navbar.desktop-fixed {
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
*/

/* push content below fixed navbar */
body { padding-top: 90px; }             /* desktop fallback */
@media (max-width: 991.98px){
  body { padding-top: 100px; }          /* was 70px; bump to ~navbar height */
}

/* Force the right-side container to consume remaining space */
.navbar .ml-auto { margin-left: auto !important; }
