.navbar {
  background-color: #333;
  height: 50px;
  display: flex;
  align-items: center;
  position: relative;
  padding: 0 20px;
}

/* Remove underline from all nav links */
.navbar a {
  text-decoration: none;
  color: inherit;
}

.menu-items {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.menu-item {
  color: white;
  padding: 0 20px;
  line-height: 50px;
  cursor: pointer;
  transition: background 0.3s;
  position: relative;
}

.menu-item:hover,
.menu-item.active {
  background-color: #444;
}


.menu-icon {
  display: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  position: absolute;
  left: 20px;
}

.dropdown-menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 50px;
  left: 0;
  background-color: #333;
  width: 200px;
  z-index: 1000;
  overflow: hidden;
}

.dropdown-item {
  height: 40px;
  line-height: 40px;
  padding: 0 20px;
  color: white;
  cursor: pointer;
  transition: background 0.3s;
}

.dropdown-item:hover,
.dropdown-item.active {
  background-color: #444;
}

/* View Cart button - Large & Mid Screens */
.view-cart-btn {
  height: 44px;
  width: 108px;
  background-color: #555;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  border-radius: 4px;
  text-decoration: none;
  margin-top: 10px; /* space below menu bar */
  position: absolute;
  right: 5px; /* align to right edge below logo */
  top: 40px;   /* position below menu bar */
}

.view-cart-btn:hover {
  background-color: #666;
}

/* Logo */
.logo {
  position: absolute;
  right: 20px;
  height: 50px;
  display: flex;
  align-items: center;
}

.logo img {
  height: 50px;
  width: 100px;
  object-fit: contain;
}

/* Desktop Submenu */
.has-submenu {
  position: relative;
}

.submenu {
  display: none;
  position: absolute;
  background-color: #333;
  top: 50px;
  left: 0;
  list-style: none;
  padding: 0;
  margin: 0;
  min-width: 200px;
  z-index: 1001;
}

.submenu-item {
  height: 40px;
  line-height: 40px;
  padding: 0 20px;
  color: white;
  cursor: pointer;
  transition: background 0.3s;
}

.submenu-item:hover {
  background-color: #444;
}

.has-submenu:hover .submenu {
  display: block;
}

/* Mobile Submenu */
.submenu-mobile {
  display: none;
  flex-direction: column;
  background-color: #444;
}

.submenu-mobile .submenu-item {
  font-size: 13px;
  height: 30px;
  line-height: 30px;
  padding: 0 30px 0 30px; /* <- Left padding increased to indent */
  color: white;
  cursor: pointer;
  transition: background 0.3s;
}


.submenu-mobile .submenu-item:hover {
  background-color: #555;
}


/* Responsive Styles */
@media (max-width: 844px) {
  .menu-items {
    display: none;
  }

  .menu-icon {
    display: block;
  }

  .dropdown-menu.show {
    display: flex;
  }

  .view-cart-btn {
    position: absolute;
    right: 120px;
    top: 0;           /* flush with top of menu bar */
    margin-top: 0;    /* no extra space */
  }
  
}