.nav-dropdown {
  position: relative;
}

.products-popup {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 8px;
  width: 320px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.18);
  opacity: 0;
  max-height: 0;
  overflow: visible;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, max-height 0.35s ease;
  z-index: 10;
}

.products-popup.open {
  opacity: 1;
  max-height: 420px;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.products-popup a {
  color: #333;
  text-decoration: none;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f5f5f5;
  transition: background 0.2s ease, color 0.2s ease;
}

.products-popup a:hover {
  background: #ffe2e2;
  color: #d84343;
}

.submenu {
  position: relative;
}

.bosch-submenu {
  position: absolute;
  right: calc(100% - 10px);
  top: 0;
  width: 220px;
  padding: 10px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  gap: 8px;
  margin-right: 10px;
  z-index: 20;
}

.submenu:hover .bosch-submenu {
  display: flex;
}

.bosch-submenu a {
  background: #f5f5f5;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
}

.bosch-submenu a:hover {
  background: #ffe2e2;
  color: #d84343;
}

@media (max-width: 900px) {
  .products-popup {
    width: min(86vw, 320px);
  }
}

@media (max-width: 768px) {
  .topbar {
    flex-direction: column;
    align-items: center;
    padding: 14px 16px;
  }

  .logo {
    width: 72px;
    height: 72px;
  }

  nav {
    width: 100%;
  }

  .menuItems {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 14px;
  }

  .menuItems a {
    font-size: 16px;
  }

  .products-popup {
    position: absolute;
    left: 50%;
    top: calc(100% + 8px);
    width: min(92vw, 280px);
    transform: translateX(-50%) translateY(-8px);
    grid-template-columns: 1fr;
  }

  .products-popup.open {
    transform: translateX(-50%) translateY(0);
  }

  .submenu {
    position: static;
  }

  .bosch-submenu {
    position: static;
    width: auto;
    margin: 6px 0 0;
    display: none;
  }

  .submenu:hover .bosch-submenu,
  .submenu:focus-within .bosch-submenu {
    display: flex;
  }
}
